I am using my custom board with nrf52832 SoC and developing my application firmware with sdk15.2 & softdevice v6.1.0.
In my application code, BLE scanning and Advertising both are working parallely. I am using fds storage to store BLE advertising parameter's like tx power, manufacturer specific data, interval, etc.
At any condition if nrf resets then this parameters are read in main task and advertising starts again. fds write operation is done only when need to change parameters.
nrf is also communication with other MCU over UART to send scan data to other MCU and advertising parameters are set by sending command to nrf.
As I am testing my device, It is observed that there is hardfault in nrf52 where nrf does not advertise anymore and also no response to other MCU over UART until we give power cycle to it.( power OFF and ON).
Can you please help me to identify the issue?
As I am testing my device, It is observed that there is hardfault in nrf52 where nrf does not advertise anymore and also no response to other MCU over UART until we give power cycle to it.( power OFF and ON)
Use the debugger and see if the application is stuck or asserts. If it asserts what error code is printed out? How does the call stack look like, what function is calling the error handler?
There is assert due to communication error in uart event handler.
I have used APP_ERROR_CHECK() in communication error event.
Please provide exactly what function and error code.
Please refer to my another ticket https://devzone.nordicsemi.com/f/nordic-q-a/60653/nrf52832-softreset.
One more thing, I am using wdt in my application.
I have enabled NRFX_WDT_ENABLED and WDT_ENABLED both.
What is the difference between them? It will affect my application?
I have set NRFX_WDT_CONFIG_RELOAD_VALUE to 60000 and WDT_CONFIG_RELOAD_VALUE to 20000.
which one will work while feeding?
WDT_CONFIG_BEHAVIOUR is set to 9(Run in SLEEP and HALT) for both.
Somesh Burkule said:I have enabled NRFX_WDT_ENABLED and WDT_ENABLED both.
WDT_ENABLED is just the legacy definition. What value is set if you read-out the RESETREAS register?
Somesh Burkule said:I have set NRFX_WDT_CONFIG_RELOAD_VALUE to 60000 and WDT_CONFIG_RELOAD_VALUE to 20000.
Why are you using different values for it?
Please see attached screenshot for your reference.
the error occurs in uart event handler at APP_ERROR_HANDLER(p_event->data.error_communication);
void uart_event_handle(app_uart_evt_t * p_event)
if (cmd_Data.raw_Data[index - 1] == ';')
cmdRxFlg = true;
APP_ERROR_HANDLER(p_event->data.error_communication); //causes assert
It seems the issue is due to how data is sent from the other side. Have you checked the data with a scope? How have you connected the two?
If you're getting a APP_UART_COMMUNICATION_ERROR then you could check the ERRORSRC register which will detail what kind of error you're getting.
Also, this issue has been covered extensively in this forum. I suggest using the search option and see similar cases.
Thank you for your response.
It's not confirmed to me that APP_UART_COMMUNICATION_ERROR( framing error ) is cause of hardfault in nrf. I am just telling you my observation.
Jared said:Also, this issue has been covered extensively in this forum. I suggest using the search option and see similar cases.
As I have already gone through this issues and discussed with your team and I have already shared you the same link for your reference. (i.e. https://devzone.nordicsemi.com/f/nordic-q-a/60653/nrf52832-softreset)
so please go through it and help me to identify the issue. I have already gone through search option for the same.