adafruit / ArduinoCore-samd

115 stars 119 forks source link

Receiving USART in SLEEPMODE = STANDBY #293

Closed FordJ closed 3 years ago

FordJ commented 3 years ago

After setting PM->SLEEPCFG.bit.SLEEPMODE = PM_SLEEPCFG_SLEEPMODE_STANDBY_Val; and calling DSB, WFI, ISB, nothing appears to be in USART buffer.

I've tried SERCOM0->USART.CTRLA.bit.RUNSTDBY = 1; (between disable and re-enabling the SERCOM), without luck.

Everything is working as expected with SLEEPMODE set to PM_SLEEPCFG_SLEEPMODE_IDLE2_Val

SERCOM0_0_Handler, SERCOM0_2_Handler and SERCOM0_3_Handler are all firing from sleep, but unsure how to debug further.