Usage of generic register in CPU reset

Hi All,

Could anyone please tell me which generic register/location in memory can be used for storing a bit value which will not get reset after a CPU reset? I need the register to hold the value after a CPU reset so that I can know if a reset has happened successfully or not.

I am trying to use the SYS_NVFLAGSSET register. As I understand, this is a general purpose flag register. So I am trying to write certain value to it, which can be used later for checking. However, I am unable to write any value to it using the STR instruction. I understand that this register is at an address of 0x00000038. On checking the contents after writing, I see the default value of 0x00007F02 still loaded. (However, on researching I found this is a device specific register and may not be generic to ARM Cortex-M4 processors!)

Please let me know the correct register and if this approach is right or not.

My main purpose is that I want a value of 1 to be written to a register so that after a CPU soft-reset this value is retained and can be checked to see if the CPU has been resetted or not.

Thanks & Regards,

\Kashif

Message was edited by: Kashif Updated with newer inputs

Parents
  • Hi Kashif

    Please give details of the hardware with which you're working - ARM core and board.

    I thought we had covered this in your last question about CPU Reset during debug.  Your software will know when the core has been reset because execution will continue from the reset handler.  You are then free to store a flag anywhere in memory that is free *on your device*.  Alternatively you could choose to use a register - it is entirely a software choice.

    Regards

    Jon

Reply
  • Hi Kashif

    Please give details of the hardware with which you're working - ARM core and board.

    I thought we had covered this in your last question about CPU Reset during debug.  Your software will know when the core has been reset because execution will continue from the reset handler.  You are then free to store a flag anywhere in memory that is free *on your device*.  Alternatively you could choose to use a register - it is entirely a software choice.

    Regards

    Jon

Children
More questions in this forum