Question
Software reset flag (SFTRSTF) in RCC CSR register: what source?
Posted on April 09, 2013 at 11:52
Hi all,
I'm currently working on a custom bootloader. Whenever a reset occurs, it should check if that reset was initiated by the user application. The user application generates a reset by calling the NVIC_SystemReset function. It seemed logically to me, that this equals generating a software reset so i could check the SFTRSTF flag in RCC_CSR. However, it isn't set when calling NVIC_SystemReset. The reference manual RM0008 states that it is ''Set by hardware when a software reset occurs.'' [RM0008 rev 14,page 148]. So, I'm wondering what causes the SFTRSTF-flag bit to be set by hardware as stated in the reference manual? I'm currently setting the flag manually before calling NVIC_SystemReset, but I'm not sure if that's a correct solution. Regards Jesper.