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.
As I indicated earlier, the RAM is never reset, regardless of the reset source.
Is there any way to clear it using software API?
rather best solution is to initialise all buffers at the start in main().
Is there any way to clear it using software API?
rather best solution is to initialise all buffers at the start in main().
How are you declaring the buffers in your code? Global variables that are not assigned a value will automatically be initialized to '0' by the startup code (before reaching main()). Anyway, memset() is a standard function you can use to clear a block of memory.
e.g.,
memset(<p_buffer>, 0, sizeof(buffer))
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.