Hi,
I need to reset RAM after softreset. As I read product specification, RAM cannot be cleared after softreset or CPU lockup.
Please see below image for reference.
How can I clear total RAM after softreset( NVIC_SystemReset() )?
Hi,
I need to reset RAM after softreset. As I read product specification, RAM cannot be cleared after softreset or CPU lockup.
Please see below image for reference.
How can I clear total RAM after softreset( NVIC_SystemReset() )?
Hi,
It's usually your startup code that's responsible for re-initializing (or resetting) the RAM. Notice the statement below the table you referred to: "The RAM is never reset, but depending on reset source, RAM content may be corrupted.". Maybe you give some more background on what you are trying to achieve?
Hi Vidar,
thanks for your quick response.
I need to clear all buffers and variables used in application code same as hardreset.
Hi,
Can you please clear me that what is mean by RAM reset? which type of memory is cleared after RAM reset?
I am asking this because as per my understanding global variables are also part of RAM and they cannot be initialise again when softreset is done in nrf52832.
As I using other MCU's, they always resets RAM when there is softreset.
Hi Vidar Berg,
Please tell me your thought about RAM reset? what does it includes?
Awaiting your reply.
Thanks,
Somesh
Hi,
These are basic concepts that are not specific to Nordic MCUs and it's difficult to cover it one answer. It's better if you post some code to demonstrate the problem.
Globals are always initialized on startup, so it doesn't matter what the reset source is.
Hi,
I have issue related to nordic hardfault. I am using UART, BLE Scanner, Advertiser parallely in my application code and also fds for storing the parameters. please see below link for the issue.
I suspect this may due to no RAM reset. please help me out for the same.
You can comment the "APP_ERROR_HANDLER(p_event->data.error_communication);" line in APP_UART_COMMUNICATION_ERROR event to ignore communication errors on the UART bus. This is not related to RAM initialization
You can comment the "APP_ERROR_HANDLER(p_event->data.error_communication);" line in APP_UART_COMMUNICATION_ERROR event to ignore communication errors on the UART bus. This is not related to RAM initialization
I tried with that also still facing an issue.
what if wrong values passed to ble stack for advertiser and scanner?
Does "APP_ERROR_HANDLER(p_event->data.error_communication);" causes hardfault?
Can you post your updated uart callback? A APP_UART_COMMUNICATION_ERROR does not cause a hardfault by itself.
Hi Vidar Berg,
please check uart callback given below:
void uart_event_handle(app_uart_evt_t * p_event) { switch (p_event->evt_type) { case APP_UART_DATA_READY: UNUSED_VARIABLE(app_uart_get(&cmd_Data.raw_Data[index])); index++; if (cmd_Data.raw_Data[index - 1] == ';') { cmdRxFlg = true; } break; case APP_UART_COMMUNICATION_ERROR: //APP_ERROR_HANDLER(p_event->data.error_communication); break; case APP_UART_FIFO_ERROR: APP_ERROR_HANDLER(p_event->data.error_code); break; default: break; } }
Hi,
There does not seem to be anything to trigger a hardfault on APP_UART_COMMUNICATION_ERROR. Are you still able to reproduce the same stack trace you shared with Jared, or is it different now?
Hi Vidar Berg,
yes, I am only getting this one. I am not confirm about hardfault is due communication error or not.
Actually when I kept my device on for long time, after some time( 1-2 days or once in day )nordic not responding to other MCU. when I power OFF and ON device again it works ok.
today I got one point that I have not used uart flush in application anywhere. so I;ll add it now. will this affect something?
there may stack overflow due to that may cpu lockup but I need to confirm it.
can I enable hardfault handler? what does this do?