how safe is it to rely on MPC5777C SRAM data retention under software reset?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how safe is it to rely on MPC5777C SRAM data retention under software reset?

ソリューションへジャンプ
613件の閲覧回数
ajmerijaimin
Contributor III

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.

ajmerijaimin_0-1652329416635.png

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:

ajmerijaimin_1-1652329914944.pngajmerijaimin_2-1652329939063.png


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?

タグ(3)
0 件の賞賛
1 解決策
574件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

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

元の投稿で解決策を見る

1 返信
575件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

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