This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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 Jon,

    Thanks. i got your point. I am working on it currently.

    Could you let me know if there is any offset address calculation to be done for calculating the address of this system control register? As I read,(on page 225), the System control register base address is 0x400F.E000 and the offset for our RESC register is 0x05C. So the final address of our register would be 0x400F.E05C, right?

    Thanks!

    BR,

    \Kashif

Reply
  • Hi Jon,

    Thanks. i got your point. I am working on it currently.

    Could you let me know if there is any offset address calculation to be done for calculating the address of this system control register? As I read,(on page 225), the System control register base address is 0x400F.E000 and the offset for our RESC register is 0x05C. So the final address of our register would be 0x400F.E05C, right?

    Thanks!

    BR,

    \Kashif

Children