XIAO MG24 deepSleep wake failure after Serial.begin

Can’t say I’ve used raw code to set the cycle counter!
I use this…

void sl_cycle_counter_enable(void)
{
  CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
  ITM->LAR          = 0xc5acce55;
  DWT->CTRL        |= DWT_CTRL_CYCCNTENA_Msk;
}

I shall leave the intricacies of ezWS2812 up to you :slight_smile:
I just use SPI for WS2812 on MG2x - seems OK - though haven’t tried using with Arduino code.

1 Like