SAML21 Cannot Wake from Backup Mode

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

 I have a project using a ATSAML21J18B MCU. The device is put into 'Backup' sleep mode using the Automatic Power Switch. The RTC is kept running from a supercap. My problem occurs when trying to wake from Backup mode. When I restore main power, the device appears bricked. No code is executed (I turn on IO in the reset handler and get no output) and the device cannot be programmed or debugged. The only way to restore functionality is to kill power and momentarily short the super cap affecting a Power-On Reset. My best guess is the device is not actually waking when power is restored...?

 

 Does anyone have any experience using Backup mode on the SAML21/22 devices?

 

Thanks for any advice.

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

For whatever reason, setting IO Retention (PM.CTRLA.IORET) = 1, seems to lock the chip up/prevent it from leaving backup mode. I'm not sure how that can be, but removing "REG_PM_CTRLA |= PM_CTRLA_IORET;" from the program allows the code to exit Backup mode normally.

 

Should've listened to the little voice nagging me to try removing it when I didn't really need it anymore. So many hours wasted to flip 1 bit. Oh well, nothing unusual about that dealing with MCUs.

Last Edited: Fri. Nov 18, 2016 - 12:58 AM