How to detect external reset reason through NRST in stm8?
Hello all. There are 9 sources of reset possible in STM8AF52xx according to the reference manual.
They are :
External reset through the NRST pin
• Power-on reset (POR)
• Brown-out Reset (BOR)
• Independent watchdog reset (IWDG)
• Window watchdog reset (WWDG)
• Software reset
• SWIM reset
• Illegal opcode reset
• EMC reset: generated if critical registers are corrupted or badly loaded
Except for external reset throguh NRST pin, all others are said to be internal reset.
There are flags available to check the reset reason for internal resets except POR and BOR in the RST_SR register.
How to distinguish between External reset, POR and BOR?
Could anyone share a strategy on how this is possible?
