- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I want to set a few "flags or strings" before the reset event and read it back in the next boot up.
As per the reference manual, I felt using System RAM (SRAM) for this purpose is better as data written to SRAM before the reset event will be retained on software reset.
I have modified the LD file to reduce the SRAM size by reserving last 128 bytes for my purpose. That's because the startup code (init.asm) would initialize entire SRAM with 32 GP register values. Which would lead to losing the data that was written right before the reset event.
Below is the screenshot from my LD file:
I'm aware of the C55FMC flash controller to use flash memory for storage purposes. How safe is it to rely on SRAM data retention under software reset?
解決済! 解決策の投稿を見る。


- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi,
in case of software reset there's no problem at all, it's safe and you can rely on that. Software reset is triggered by user, so you can ensure that there's no SRAM access at that moment.
Notice that except linker file, you should modify also startup file. The SRAM needs to be initialized due to ECC. It's necessary to check content of SIU_RSR register. If it was software reset and flag SSRS is set, skip the initialization of your SRAM segment for data retention. If it was any other reset, initialize whole SRAM.
Regards,
Lukas


- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi,
in case of software reset there's no problem at all, it's safe and you can rely on that. Software reset is triggered by user, so you can ensure that there's no SRAM access at that moment.
Notice that except linker file, you should modify also startup file. The SRAM needs to be initialized due to ECC. It's necessary to check content of SIU_RSR register. If it was software reset and flag SSRS is set, skip the initialization of your SRAM segment for data retention. If it was any other reset, initialize whole SRAM.
Regards,
Lukas
