SAML21 does not Reset Vector Table Offset (VTOR) on Wake from Backup Mode

1 post / 0 new
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After doing battle long enough with this issue, the title is all I can think of for the cause. Can anyone think of why the SAML21 (or any other Atmel ARM) would not reset the VTOR after waking from backup mode? Those registers are supposed to reset aren't they?


I have a Bootloader based on 0x00. It loads an application starting at 0x4000. This was all working fine, just like the ASF demo it's based on. However, when I go into Backup Sleep mode and wake with the Automatic Power Switch, the MCU does not appear to start in the Bootloader. It just starts the main application. The only way I've been able to get this working again is to call a Software Reset at the beginning of my main app. This seems to cause it to boot from the 'normal' 0x0004 location. I use a RTC GP register to hold a persistent flag so it only resets once. This seems to be working, but doesn't seem like a 'proper' solution, so if anyone has any theories, I'd like to hear them.