This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

RAM reset after softreset | nrf52832 | sdk 15.2 | softdevice 6.1.0

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() )?

Parents Reply
  • 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);
    }

Children
Related