When the system jumps from application program to boot, it needs to read the data in SRAM in boot, so it is hoped that the data in SRAM in this part will not be initialized. I have tried to disable BIST,but in vain.
S32R274 is used and the memrory allocation shows as follow:
Hello,
Accroding to the datasheet, this reset causes a system reset equivalent to assertion of the RESET pin,which means external reset. So, the ram content should have been preserved, however, the fact is that the data was destroyed. I don't know why.
External reset destroys RAM if BIST is enabled.
I recommend you to perform functional reset by SW instead of watchdog (just doesn't give me any sense):
I also tried Mode Entry Module, like this (In this picature, the variable mode is equal to 0,which means it triggers a 'functional' reset event):
Yes, this is the way how it should be done.
regards,
Peter
I have tried Mode Entry Module, like this (In this picature, the mode is equal to 0):.
however, after reset, the startup.s was executed and the data in address 0x4001c004 was destroyed too.I don't know why.
Hi,
looks like your stratup is not written well. So, you do RAM init on any kind of reset?
In real application customers do SW branching based on reset type ( RGM [FES/DES] registers.)
It will also save you initialization time and prevent loss of data in RAM.
Make sure your startup is properly written fro your application needs and it will work as you expect.
regards,
Peter
my startup was generated automatically and I didn't modify it. So, how to modify startup to prevent loss of data in RAM? I really have no knowledge of assembly language.
Thanks
Hello,
Well, that could be a little issue.
Since you want custom startup which will fit to you bootloader needs, it would require assembly knowledge. (if the startup is assembly - which I guess is ,to save boot time)
regards,
Peter
I just want to prevent loss of data in RAM,if modifying startup can solve this problem, I think there is no difference whether there is bootloader or not.
In fact, according to the annotation in startup, I can't see the process of Initializing SRAM,just the process of Initializing SRAM ECC. Could you give me a example where some data in RAM is preserved?
Thanks
Sure,
Comment our ECC initialization.
That is what is causing RAM content to be destroyed after functional reset.
as the RAM data and ECC syndrome must fit together. Therefore you doing RAM initialization.
regards,
Peter
Could you give me a project demo where some data in RAM is preserved?
Thanks
Hello,
system jumps from application program to boot, it needs to read the data in SRAM in boot,
I guess you are talking about reset after boot loader. Otherwise I see no issue for RAM to preserve its data.
What destroys RAM content is:
Power ON reset
Destructive resetr
and BIST - if started on reset.
RAM content is preserved in functional reset even if BIST is enabled.
Please specify what you want to achieve.
regards,
Peter
I think hardware reset is executed in my code.In application, Software Watchdog Timer(SWT) is used, and SWT time-out register is set to 20ms, waiting the reset. like this:
Then, the chip runs from boot, and I need to read the RAM, where data is wrote in application.
Hi,
then only way is to execute functional reset in your application otherwise the RAM content will be destroyed.
I have no idea what do you mean by hardware reset as such reset source does not Mode entry module implement.
regards,
Peter
I need to jump to boot from application, so I used SWT module, waiting for the watchdog timer to expire and assert a reset.
Accroding to the datasheet, this reset causes a system reset equivalent to assertion of the RESET pin,which means external reset. So, the ram content should have been preserved, however, the fact is that the data was destroyed. I don't know why.
I also tried Mode Entry Module, like this (In this picature, the variable mode is equal to 0,which means it triggers a 'functional' reset event):
however, after reset, the startup.s was executed and the data in address 0x4001c004 was destroyed too.