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 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?
Hi,
Ok, a stack overflow or a buffer overrun sounds likely to me. It's a good idea to enable the HardFault handling library, it may help you determine what caused it. Remember to also enable debug logging, add DEBUG flag to preprocessor list, and disable compiler optimization to get as much error information as possible.
Somesh Burkule said: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?
When would you want to flush the FIFO buffer? It will just remove the received UART data you may have received from RAM.
Also, please add a check on the 'index' variable before the "UNUSED_VARIABLE(app_uart_get(&cmd_Data.raw_Data[index]));" line, in case there is a chance it may be incremented beyond the buffer size.
eg.
if ( index >= "size of raw data buffer in bytes") { NRF_LOG_ERROR("Index is out of bounds with the value: %d", index"); APP_ERROR_CHECK(NRF_ERROR_INVALID_LENGTH); }
It's a good idea to enable the HardFault handling library
can I use it in production? or is it only used for debugging?
one more thing, I am using printf() to sent transmit data to other MCU via UART.
does it affect application? I am sending 10000bytes/500ms
I need more debug information from you to be able to help find the root cause. So please do what I suggested earlier and let me know when you have new information to share.
Somesh Burkule said:can I use it in production? or is it only used for debugging?
This is answered in the documentation I linked to. The short answer is yes.
Somesh Burkule said:
I am using printf() to sent transmit data to other MCU via UART.
does it affect application?
I don't think it's related to the hardfault if that's what you're asking.
I need more debug information from you to be able to help find the root cause. So please do what I suggested earlier and let me know when you have new information to share.
Somesh Burkule said:can I use it in production? or is it only used for debugging?
This is answered in the documentation I linked to. The short answer is yes.
Somesh Burkule said:
I am using printf() to sent transmit data to other MCU via UART.
does it affect application?
I don't think it's related to the hardfault if that's what you're asking.