First Run Only Trigger?
Posted: Mon Nov 19, 2018 12:31 am
Looking to see if there is a cross-target way, in an AB context, for user code to know if it is being run for the first time after it has been flashed, or after a power on/reset event.
I know that on the 824, there is some RAM that is wiped during power cycles, Deep Power Down, or a BOR, but is retained during successive resets. From the 824 UM (Page 11):
Sadly, it seems that NXP doesn't do this on all of their devices. I could see some real value in having this be consistent across devices. Oh well...
Anyways, I am wondering if there is a means to an end here, w/o having to resort to user code doing an IAP of some Flash location, to keep track of something like this in a predictable and cross-target manner.
Bruce/Mike, care to comment (please).?. Others who might have skinned this cat already are also requested to comment. TIA.
-t
I know that on the 824, there is some RAM that is wiped during power cycles, Deep Power Down, or a BOR, but is retained during successive resets. From the 824 UM (Page 11):
Code: Select all
Remark: SRAM location 0x1000 0000 to 0x1000 0050 is not used by the bootloader and
the memory content in this area is retained during reset. SRAM memory is not retained
when the part powers down or enters Deep power-down mode.Anyways, I am wondering if there is a means to an end here, w/o having to resort to user code doing an IAP of some Flash location, to keep track of something like this in a predictable and cross-target manner.
Bruce/Mike, care to comment (please).?. Others who might have skinned this cat already are also requested to comment. TIA.
-t