hi ,dialog
we found some unexpected resets on the device.
Is there any way to identify different reset type ( POR , BOD reset , watch dog reset ,...)?
Keywords:
Device:
hi ,dialog
we found some unexpected resets on the device.
Is there any way to identify different reset type ( POR , BOD reset , watch dog reset ,...)?
Hi guixiang,
There is no standard procedure or any api that implements this functionallity, in case of the BOD a POR signal is set and you can check upon the new start up the BOD_STATUS_REGISTER (Brown Out Detection status register) in order to check which state of the BOD triggered the POR. Regarding Hardfault and NMI resets, both of the handlers are storing info in the retained section of the RAM area, so you should be able to store any custom indications and check upon a reset any flags that you have set, if no debugger is available for attaching.
Thanks MT_dialog
According to the datasheet , the BOD_STATUS_REGISTER should be 0 after reset . But I found it is 0x15. The power voltage is above 3V.
what does that mean?
Hi guxiang,
如果你是referring on table 16 on the datasheet, in the "RESET by POR only" column that the BOD_STATUS_REG should be set to zero after reset, this is a mistake on the datasheet and will be corrected in future releases. The BOD_STATUS_REG is not being reset by POR.
Thanks MT_dialog