I'm working on a project using a SAMD51 and GSM modem, and struggling to get Serial comms when in standby.
Having minimal power consumption is key, so need to have the SAMD51 in STANDBY mode as much as possible, using PM->SLEEPCFG.bit.SLEEPMODE = PM_SLEEPCFG_SLEEPMODE_STANDBY_Val.
If using PM_SLEEPCFG_SLEEPMODE_IDLE2_Val instead, data is received exactly as expected, but unfortunately power consumption is too high.
When in STANDBY power mode, the device isn't receiving anything into Serial buffer.
Prior to going to sleep, the time until next task is calculated, and a timer is started with appropriate match value to wake up.
This is normally using GCLK3 (32.768KHz) and works fine, but when testing with GCLK1 (48MHz), which I believe is what the USART is clocked by, this does NOT function in STANDBY, but does in IDLE2.
It obviously points to the 48MHz clock (GCLK1) going off in STANDBY, but setting GCLK->GENCTRL[1].bit.RUNSTDBY = 1 has no effect. I've also tried OSCCTRL->DFLLCTRLA.bit.RUNSTDBY = 1, which also makes no difference.
All help or suggestions of next steps are very much appreciated.