Hi all!
I configure the SAMD21 to wake up from STANDBY sleep mode from an EXTINT or an RTC alarm. We use a test jig to generate an EXTINT signal every 60 seconds. It is actually an old analogue clock with a magnet fixed to the second hand (see attached “clock test jig.jpg”). As the hand revolves through 360 degrees, it triggers the unit’s magnetic sensor which is supposed to wake up the SAMD21. After 8 - 48 hours at least one in four test units stops responding to an EXTINT and does not wake up. an RTC alarm is unable to wake up the SAMD21 either. After a week most / all of the units have locked up.
The FW configuration is:
- 48 MHz DFLL feeds system clock via GCLK0
- 32 kHz external oscillator feeds the DFLL via GCLK1
- 32 kHz external oscillator also feeds EXTINT via GCLK1
- 32 kHz oscillator feeds RTC via GCLK2
- Flash wait states set to 3
I enabled the output of GCLK0 which shows when the ARM core is getting an active clock. During STANDBY sleep mode, there is no clock output (as has been confirmed by Atmel). I also toggle a debug pin in all of the interrupt handlers to show when the core wakes up. When the SAMD21 locks up, there is no GCLK0 clock output and the debug pin is not toggled. A SWD debugger (Segger J-Link) is also not able to wake up the SAMD21 and reports “Error: SAMD (connect): Could not power-up debug port” (see attached “J-Link error.png”).
I have literally tried everything that I can think of (HW & FW) and have still not identified the root cause or a work around I have been working with Atmel support for a long time, but did not get any joy.
I don’t expect anyone to solve it for me, but I just want to know if anyone else has experienced the same issue? Have you managed to fix it?
Thanks in advance,
Pieter
P.S. I hope this is the right forum to post in. If not, please point me in the right direction.