This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI-RTOS
Hello,
I'm on SDK 2.4 on the Simple_central base project.
I keep having the following error from the ROV Hard Fault: FORCED: BUSFAULT: PRECISERR.Data Access Error. Address = 0x400c8000
I have followed the debugging advices from the Developer's Guide for Deciphering CPU Exceptions and added the line to get the precise exception.
Now that i have the precise error adresse 0x400c8000, it gives me AUX_SMPH_SMPH0 in the memory browser.
From that point, i have no idea what i am supposed to do, as this AUX_SMPH_SMPH0 does not come from my application code.
1 - How can i solve this problem in particular ?
2- In a more general way, anytime i debug my code, always end up with adresse that are out of my code : Is there a general methodology to debug such problems ?
I feel like the example given in the developpers guide is very trivial and does not really help for real bugs.
Thanks
Hi,
Thanks for your answer.
The goal of this project is to make a BLE to LPWAN gateway. So there are basically two steps :
1 / collect BLE Data ( only advertising data for this first version, then BLE connection on the second version => that's why i have choosen the simple_central )
2/ send the data through a UART LPWAN module.
To Collect the Data :
I added a task with priority 1 that communicates with the Simple_central task through it's original event loop. ( see the SBC_START_COLLECT_EVT and SBC_STOP_COLLECT_EVT event at the bottom )
static void SimpleCentral_taskFxn(UArg a0, UArg a1) { // Initialize application SimpleCentral_init(); // Application main loop for (;;) { uint32_t events; events = Event_pend(syncEvent, Event_Id_NONE, SBC_ALL_EVENTS, ICALL_TIMEOUT_FOREVER); if (events) { ICall_EntityID dest; ICall_ServiceEnum src; ICall_HciExtEvt *pMsg = NULL; if (ICall_fetchServiceMsg(&src, &dest, (void **) &pMsg) == ICALL_ERRNO_SUCCESS) { if ((src == ICALL_SERVICE_CLASS_BLE) && (dest == selfEntity)) { // Process inter-task message SimpleCentral_processStackMsg((ICall_Hdr *) pMsg); } if (pMsg) { ICall_freeMsg(pMsg); } } // If RTOS queue is not empty, process app message if (events & SBC_QUEUE_EVT) { while (!Queue_empty(appMsgQueue)) { sbcEvt_t *pMsg = (sbcEvt_t *) Util_dequeueMsg(appMsgQueue); if (pMsg) { // Process message SimpleCentral_processAppMsg(pMsg); // Free the space from the message ICall_free(pMsg); } } } if (events & SBC_INIT_DONE_EVT) {
//this semaphore is used to notify the added task that simple_central initialisation is done. Semaphore_post(start_semaphore); } if (events & SBC_START_COLLECT_EVT) { SimpleCentral_startGapDiscovery(); } if (events & SBC_STOP_COLLECT_EVT) { GAPCentralRole_CancelDiscovery(); } } } }
My task just post Events to start and stop BLE scanning, and once a device is discovered, the device info is Queued by Simple_central so that my task enqueue, free and use it.
case GAP_DEVICE_INFO_EVENT: { gapDeviceInfoEvent_t *device_info = ICall_malloc( sizeof(gapDeviceInfoEvent_t)); queueRec_t *pRec = ICall_malloc(sizeof(queueRec_t)); memcpy(device_info, &pEvent->deviceInfo, sizeof(gapDeviceInfoEvent_t)); pRec->pData = (uint8_t *) device_info; Queue_put(frame_queue_handle, &pRec->_elem); Event_post((*((Event_Handle *) event_collect_handle)), NEW_FRAME_EVENT); } break;
The problem is that i can't reproduce this bug all the time. For instance, with the exact same code, this morning i have a :
FORCED: USAGE: INVSTATEBUSFAULT: PRECISERR.Data Access Error. Address = 0x0MEMFAULT: IACCVIOL Instruction Fetch Error. Address = 0x0
when the discovery starts. A bug i did not have yesterday with the exact same code.
Commenting / Uncommenting is already how i debug.
I am looking for a way to debug from the informations given by the ROV : what do i do once i found out that the faulty adresse is not from my code ?
Hello Marie,
Thank you for the link to the Technical documentation, it will help me a lot.
The main changes are listed in my second post : i basically use the simple_central task to collect BLE advertisement frames and send them to a LPWAN module through the regular UART Driver.
void init_uart(void) { Board_initUART(); UART_Params_init(&uart_params); uart_params.readMode = UART_MODE_BLOCKING; uart_params.readTimeout = MS_TO_TICKS(60000); uart_params.writeDataMode = UART_DATA_BINARY; uart_params.readDataMode = UART_DATA_TEXT; uart_params.readReturnMode = UART_RETURN_FULL; uart_params.readEcho = UART_ECHO_OFF; uart_params.baudRate = 38400; }
Event though i have never used it, i have already had a problem with the sensor controller which was locking the ADC on an other project with the same chip ( Sable-X-R2: cc2640r2 based )
I wonder if Laird ( Sable-X-R2 manufacturer ) uploads a default sensor controller program that run in the background and some how mess with my code.
Is the sensor Controller erased and disabled when we upload a new base example from CCS ?
Is there a way to make sure the Sensor controller is totally disabled ?
Except for that i have no other clues on what is going on, any suggestion is welcome.
Hi Hugo,
I don't know anything specific about sable modules, you would have to ask Laird.
According to internal documentation the 0x400C8000 is related to semaphones. This could either be in your code or a driver which uses semaphores.
Can you check if the AUX peripheral is powered when this happens? (Just look in the register view.)