XIAO MG24 deepSleep wake failure after Serial.begin

Currently I’m only using the serial port for debugging but now cannot use it as a terminal interface with a battery.

I did add a custom 2812 library that enables DWT->CYCCNT, the ezWS2812 library didn’t have it running unless a debugger was connected…

    //enable debug cycle counter
    volatile unsigned int *DWT_LAR   = (volatile unsigned int *)0xE0001FB0;
    volatile unsigned int *SCB_DEMCR = (volatile unsigned int *)0xE000EDFC;
    *DWT_LAR = 0xC5ACCE55;
    *SCB_DEMCR |= 0x01000000;
    *DWT_LAR = 0xC5ACCE55;
    DWT->CTRL |= 1;