Multiple reset causes at the same time?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a custom board with ATSAML21 and sometimes I detect a reset. The reset cause byte is 0x22

 

#define RSTC_RCAUSE_OFFSET          0x00         /**< \brief (RSTC_RCAUSE offset) Reset Cause */

#define RSTC_RCAUSE_POR_Pos         0            /**< \brief (RSTC_RCAUSE) Power On Reset */
#define RSTC_RCAUSE_POR             (0x1ul << RSTC_RCAUSE_POR_Pos)
#define RSTC_RCAUSE_BOD12_Pos       1            /**< \brief (RSTC_RCAUSE) Brown Out 12 Detector Reset */
#define RSTC_RCAUSE_BOD12           (0x1ul << RSTC_RCAUSE_BOD12_Pos)
#define RSTC_RCAUSE_BOD33_Pos       2            /**< \brief (RSTC_RCAUSE) Brown Out 33 Detector Reset */
#define RSTC_RCAUSE_BOD33           (0x1ul << RSTC_RCAUSE_BOD33_Pos)
#define RSTC_RCAUSE_EXT_Pos         4            /**< \brief (RSTC_RCAUSE) External Reset */
#define RSTC_RCAUSE_EXT             (0x1ul << RSTC_RCAUSE_EXT_Pos)
#define RSTC_RCAUSE_WDT_Pos         5            /**< \brief (RSTC_RCAUSE) Watchdog Reset */
#define RSTC_RCAUSE_WDT             (0x1ul << RSTC_RCAUSE_WDT_Pos)
#define RSTC_RCAUSE_SYST_Pos        6            /**< \brief (RSTC_RCAUSE) System Reset Request */
#define RSTC_RCAUSE_SYST            (0x1ul << RSTC_RCAUSE_SYST_Pos)
#define RSTC_RCAUSE_BACKUP_Pos      7            /**< \brief (RSTC_RCAUSE) Backup Reset */
#define RSTC_RCAUSE_BACKUP          (0x1ul << RSTC_RCAUSE_BACKUP_Pos)
#define RSTC_RCAUSE_MASK            0xF7ul       /**< \brief (RSTC_RCAUSE) MASK Register */

 

0x22 is 0b 0010 0010

 

so if I'm not wrong, both BOD12  AND RSTC_RCAUSE_SYST are set. 

 

Is it reasonable to get multiple reset causes at the same time?

 

thanks, 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anyone? 

 

thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Is it reasonable to get multiple reset causes at the same time?

I've seen it happen on AVRs.  Both PWRON and EXTRST, IIRC.

It makes a certain amount of sense from a hardware PoV, especially on AVR where there can be ~100ms during reset waiting for a crystal to stabilize (where presumably, excursions on RESET would cause a 2nd reset before any code gets to run.)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you westfw !