Hello,
I read the ram blocks are zero-initialized during POR through boot rom.
How to zero-intialized them through a warm reset. Can I run the same routine in my c-code?
Regards, Holger
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I read the ram blocks are zero-initialized during POR through boot rom.
How to zero-intialized them through a warm reset. Can I run the same routine in my c-code?
Regards, Holger
Holger,
You can refer the TRM https://www.ti.com/lit/ug/sprui33d/sprui33d.pdf . There are registers to start the RAM initialization and check for the status of it.
You can write code to start the initalization and then poll till the Status in INITDONE register.
Best Regards
Siddharth
Hello Siddharth,
I thought that the RAM init is done automatically after a POR? Or do I have to start it per SW?
Can I execute the RAM init after a WD reset?
Regards, Holger
Holger,
This is done in boot ROM code.
After a WD reset, you can have code that initializes RAM.
Best Regards
Siddharth
Hello Siddarth,
writing init code is no problem. Can I use the INIT bits like the boot ROM code use it?
Regards, Holger
Hi,
Don't think there is any SW example for this. You can refer the GEL file "f280049.gel" for the initialization code.
Best Regards
Siddharth
I had a related question. If a RAM block is NOT initialized by setting the INIT bit to "1", what is the RAM value after POR? Is RAM most likely going to be 0x0?
Hi,
Its better to explicitly initialize the RAM in the code. RAM may have random values , some locations could be initialized to anything after POR
Best Regards
Siddharth
Thanks for the reply. Are the possible values completely random or is there a high likelihood that a RAM value is 0x0 on POR? For example, does a RAM location after POR have an equal chance of being 0x0000 or 0xFFFF or 0x5555 or 0xAAAA, etc?
The reason I'm asking is that I want to use a RAM location to distinguish between a WDT and a POR. I think I can do that by setting a RAM value to a known value (0xA5A5 for example) prior to initiating a WDT reset and then checking that RAM location in the application initialization sequence.
Maybe there is a better way to accomplish this? Please let me know if you have any suggestions.
Mark,
If you need to distinguish between a WDT reset and POR, then you can use the "RESC" register (Reset Cause register)
Best Regards
Siddharth
Mark,
Let me know if you have any other questions. If not, can I close this thread?
Best Regards
Siddharth