Reset safe scratch registers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reset safe scratch registers

642 Views
andreweipel
Contributor I

Hi ,

I would like to implement a boot counter in u-boot, therefore I would need some register where i can keep the boot counter value. This value shall not be reseted after a HW reset.

Usecase: System cold boots, bootcounter increased by one, try to boot Linux, successful reset this counter.

If Linux panics on boot up, watchdog interrupts, u-boot boots again bootcounter ++;

If countervalue is e.g. > 4 then load alternative Linux.

Are there any registers on the vf6 cpu that are "reset save" and could be used for this usecase?

Thanx a lot, Andi

Labels (1)
0 Kudos
1 Reply

449 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Andreas,

The low-power (battery-backed) section incorporates a secure real time counter, a monotonic counter, and a general-purpose register. This portion of the block is powered by a battery that maintains the state of the SNVS_LP registers when the chip is powered off.

Please take a look to Chapter 7SNVS, Reset, eFuse, and Boot of Reference Manual.

https://www.nxp.com/docs/en/reference-manual/VFXXXRM.pdf 


Regards,
Carlos
NXP Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos