1.8.3 Wio Terminal energysaving library does not compile

When trying to compile the example sketch “WakeUpOnExternalInterrupt” I get the following compiler errors (but other examples compile and run without any problems):

...snip... 
"...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src" "...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp" -o "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\libraries\EnergySaving\EnergySaving.cpp.o"
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp: In member function 'void EnergySaving::begin(unsigned int, unsigned int, voidFuncPtr)':
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:7:23: error: 'volatile struct NVMCTRL_CTRLB_Type::<unnamed>' has no member named 'SLEEPPRM'
    NVMCTRL->CTRLB.bit.SLEEPPRM = 3;
                       ^~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp: In member function 'void EnergySaving::begin(unsigned int)':
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:27:9: error: 'struct Gclk' has no member named 'CLKCTRL'; did you mean 'GENCTRL'?
   GCLK->CLKCTRL.bit.CLKEN = 0; //disable GCLK module
         ^~~~~~~
         GENCTRL
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:28:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.bit.SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:30:17: error: request for member 'bit' in '((Gclk*)1073748992)->Gclk::GENCTRL', which is of non-class type 'volatile GCLK_GENCTRL_Type [12]'
   GCLK->GENCTRL.bit.RUNSTDBY = 1;  //GCLK6 run standby
                 ^~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:31:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:31:29: error: 'GCLK_STATUS_SYNCBUSY' was not declared in this scope
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                             ^~~~~~~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:31:29: note: suggested alternative: 'ADC_STATUS_ADCBUSY'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                             ^~~~~~~~~~~~~~~~~~~~
                             ADC_STATUS_ADCBUSY
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:33:9: error: 'struct Gclk' has no member named 'CLKCTRL'; did you mean 'GENCTRL'?
   GCLK->CLKCTRL.bit.CLKEN = 1; //disable GCLK module
         ^~~~~~~
         GENCTRL
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:34:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.bit.SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:36:22: error: 'volatile struct NVMCTRL_CTRLB_Type::<unnamed>' has no member named 'SLEEPPRM'
   NVMCTRL->CTRLB.bit.SLEEPPRM = 3;
                      ^~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp: In member function 'void EnergySaving::set_clk()':
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:56:8: error: 'struct Gclk' has no member named 'CLKCTRL'; did you mean 'GENCTRL'?
  GCLK->CLKCTRL.bit.CLKEN = 0; //disable GCLK module
        ^~~~~~~
        GENCTRL
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:57:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.bit.SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:9: error: 'struct Gclk' has no member named 'CLKCTRL'; did you mean 'GENCTRL'?
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
         ^~~~~~~
         GENCTRL
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:35: error: 'GCLK_CLKCTRL_CLKEN' was not declared in this scope
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                   ^~~~~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:35: note: suggested alternative: 'GCLK_CLKCTRL_IDs'
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                   ^~~~~~~~~~~~~~~~~~
                                   GCLK_CLKCTRL_IDs
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:56: error: 'GCLK_CLKCTRL_GEN_GCLK6' was not declared in this scope
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                                        ^~~~~~~~~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:56: note: suggested alternative: 'GCLK_PCHCTRL_GEN_GCLK6'
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                                        ^~~~~~~~~~~~~~~~~~~~~~
                                                        GCLK_PCHCTRL_GEN_GCLK6
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:81: error: 'GCLK_CLKCTRL_ID' was not declared in this scope
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                                                                 ^~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:81: note: suggested alternative: 'GCLK_CLKCTRL_IDs'
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                                                                 ^~~~~~~~~~~~~~~
                                                                                 GCLK_CLKCTRL_IDs
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:60:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.bit.SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:62:17: error: request for member 'reg' in '((Gclk*)1073748992)->Gclk::GENCTRL', which is of non-class type 'volatile GCLK_GENCTRL_Type [12]'
   GCLK->GENCTRL.reg = (GCLK_GENCTRL_GENEN | GCLK_GENCTRL_SRC_OSCULP32K | GCLK_GENCTRL_ID(6));  //source for GCLK6 is OSCULP32K
                 ^~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:62:74: error: 'GCLK_GENCTRL_ID' was not declared in this scope
   GCLK->GENCTRL.reg = (GCLK_GENCTRL_GENEN | GCLK_GENCTRL_SRC_OSCULP32K | GCLK_GENCTRL_ID(6));  //source for GCLK6 is OSCULP32K
                                                                          ^~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:62:74: note: suggested alternative: 'GCLK_GENCTRL_IDC'
   GCLK->GENCTRL.reg = (GCLK_GENCTRL_GENEN | GCLK_GENCTRL_SRC_OSCULP32K | GCLK_GENCTRL_ID(6));  //source for GCLK6 is OSCULP32K
                                                                          ^~~~~~~~~~~~~~~
                                                                          GCLK_GENCTRL_IDC
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:63:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:63:29: error: 'GCLK_STATUS_SYNCBUSY' was not declared in this scope
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                             ^~~~~~~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:63:29: note: suggested alternative: 'ADC_STATUS_ADCBUSY'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                             ^~~~~~~~~~~~~~~~~~~~
                             ADC_STATUS_ADCBUSY
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:65:17: error: request for member 'bit' in '((Gclk*)1073748992)->Gclk::GENCTRL', which is of non-class type 'volatile GCLK_GENCTRL_Type [12]'
   GCLK->GENCTRL.bit.RUNSTDBY = 1;  //GCLK6 run standby
                 ^~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:66:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:66:29: error: 'GCLK_STATUS_SYNCBUSY' was not declared in this scope
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                             ^~~~~~~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:66:29: note: suggested alternative: 'ADC_STATUS_ADCBUSY'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                             ^~~~~~~~~~~~~~~~~~~~
                             ADC_STATUS_ADCBUSY
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp: In member function 'void EnergySaving::enable_eic_wake(unsigned int)':
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:76:10: error: 'struct Eic' has no member named 'WAKEUP'
     EIC->WAKEUP.bit.WAKEUPEN9 = 1;
          ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:79:10: error: 'struct Eic' has no member named 'WAKEUP'
     EIC->WAKEUP.bit.WAKEUPEN14 = 1;
          ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:82:10: error: 'struct Eic' has no member named 'WAKEUP'
     EIC->WAKEUP.bit.WAKEUPEN15 = 1;
          ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:91:10: error: 'struct Eic' has no member named 'WAKEUP'
     EIC->WAKEUP.bit.WAKEUPEN6 = 1;
          ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:94:10: error: 'struct Eic' has no member named 'WAKEUP'
     EIC->WAKEUP.bit.WAKEUPEN7 = 1;
          ^~~~~~

Using library Energy Saving at version 1.0.0 in folder: ...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving 
exit status 1

Compilation error: exit status 1

Using board 'seeed_wio_terminal' from platform in folder: ...\Seeeduino\hardware\samd\1.8.3
Using core 'arduino' from platform in folder: ...\Seeeduino\hardware\samd\1.8.3
Detecting libraries used...
"...\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__=\"\"\"WakeUpOnExternalInterrupt.ino\"\"\"" -w -x c++ -E -CC -DF_CPU=120000000L -DARDUINO=10607 -DARDUINO_WIO_TERMINAL -DARDUINO_ARCH_SAMD -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DENABLE_CACHE -DTXRXLED_ENABLE -DROLE=0 -Os -DVARIANT_QSPI_BAUD_DEFAULT=50000000 -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/" "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/" "-I...\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino" "-I...\Seeeduino\hardware\samd\1.8.3\variants\wio_terminal" "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\sketch\WakeUpOnExternalInterrupt.ino.cpp" -o nul
Alternatives for EnergySaving.h: [Energy Saving@1.0.0]
ResolveLibrary(EnergySaving.h)
  -> candidates: [Energy Saving@1.0.0]
"...\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__=\"\"\"WakeUpOnExternalInterrupt.ino\"\"\"" -w -x c++ -E -CC -DF_CPU=120000000L -DARDUINO=10607 -DARDUINO_WIO_TERMINAL -DARDUINO_ARCH_SAMD -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DENABLE_CACHE -DTXRXLED_ENABLE -DROLE=0 -Os -DVARIANT_QSPI_BAUD_DEFAULT=50000000 -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/" "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/" "-I...\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino" "-I...\Seeeduino\hardware\samd\1.8.3\variants\wio_terminal" "-I...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src" "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\sketch\WakeUpOnExternalInterrupt.ino.cpp" -o nul
"...\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__=\"\"\"WakeUpOnExternalInterrupt.ino\"\"\"" -w -x c++ -E -CC -DF_CPU=120000000L -DARDUINO=10607 -DARDUINO_WIO_TERMINAL -DARDUINO_ARCH_SAMD -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DENABLE_CACHE -DTXRXLED_ENABLE -DROLE=0 -Os -DVARIANT_QSPI_BAUD_DEFAULT=50000000 -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/" "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/" "-I...\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino" "-I...\Seeeduino\hardware\samd\1.8.3\variants\wio_terminal" "-I...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src" "...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp" -o nul
Generating function prototypes...
"...\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions "-D__SKETCH_NAME__=\"\"\"WakeUpOnExternalInterrupt.ino\"\"\"" -w -x c++ -E -CC -DF_CPU=120000000L -DARDUINO=10607 -DARDUINO_WIO_TERMINAL -DARDUINO_ARCH_SAMD -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DENABLE_CACHE -DTXRXLED_ENABLE -DROLE=0 -Os -DVARIANT_QSPI_BAUD_DEFAULT=50000000 -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/" "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/" "-I...\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino" "-I...\Seeeduino\hardware\samd\1.8.3\variants\wio_terminal" "-I...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src" "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\sketch\WakeUpOnExternalInterrupt.ino.cpp" -o "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\preproc\ctags_target_for_gcc_minus_e.cpp"
"...\builtin\tools\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"...\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD "-D__SKETCH_NAME__=\"\"\"WakeUpOnExternalInterrupt.ino\"\"\"" -DF_CPU=120000000L -DARDUINO=10607 -DARDUINO_WIO_TERMINAL -DARDUINO_ARCH_SAMD -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DENABLE_CACHE -DTXRXLED_ENABLE -DROLE=0 -Os -DVARIANT_QSPI_BAUD_DEFAULT=50000000 -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/" "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/" "-I...\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino" "-I...\Seeeduino\hardware\samd\1.8.3\variants\wio_terminal" "-I...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src" "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\sketch\WakeUpOnExternalInterrupt.ino.cpp" -o "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\sketch\WakeUpOnExternalInterrupt.ino.cpp.o"
Compiling libraries...
Compiling library "Energy Saving"
"...\Seeeduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -std=gnu++14 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD "-D__SKETCH_NAME__=\"\"\"WakeUpOnExternalInterrupt.ino\"\"\"" -DF_CPU=120000000L -DARDUINO=10607 -DARDUINO_WIO_TERMINAL -DARDUINO_ARCH_SAMD -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DENABLE_CACHE -DTXRXLED_ENABLE -DROLE=0 -Os -DVARIANT_QSPI_BAUD_DEFAULT=50000000 -D__SAMD51P19A__ -DWIO_TERMINAL -DSEEED_WIO_TERMINAL -DSEEED_GROVE_UI_WIRELESS -D__SAMD51__ -DUSB_VID=0x2886 -DUSB_PID=0x802D -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Seeed Studio\"" "-DUSB_PRODUCT=\"Seeed Wio Terminal\"" -DROLE=0 "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/Core/Include/" "-I...\Seeeduino\tools\CMSIS\5.7.0/CMSIS/DSP/Include/" "-I...\Seeeduino\tools\CMSIS-Atmel\1.2.1/CMSIS-Atmel/CMSIS/Device/ATMEL/" "-I...\Seeeduino\hardware\samd\1.8.3\cores\arduino" "-I...\Seeeduino\hardware\samd\1.8.3\variants\wio_terminal" "-I...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src" "...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp" -o "Users\Danny\AppData\Local\Temp\arduino-sketch-3483FC6B5233B81EDB891F9CF2E733DE\libraries\EnergySaving\EnergySaving.cpp.o"
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp: In member function 'void EnergySaving::begin(unsigned int, unsigned int, voidFuncPtr)':
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:7:23: error: 'volatile struct NVMCTRL_CTRLB_Type::<unnamed>' has no member named 'SLEEPPRM'
    NVMCTRL->CTRLB.bit.SLEEPPRM = 3;
                       ^~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp: In member function 'void EnergySaving::begin(unsigned int)':
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:27:9: error: 'struct Gclk' has no member named 'CLKCTRL'; did you mean 'GENCTRL'?
   GCLK->CLKCTRL.bit.CLKEN = 0; //disable GCLK module
         ^~~~~~~
         GENCTRL
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:28:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.bit.SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:30:17: error: request for member 'bit' in '((Gclk*)1073748992)->Gclk::GENCTRL', which is of non-class type 'volatile GCLK_GENCTRL_Type [12]'
   GCLK->GENCTRL.bit.RUNSTDBY = 1;  //GCLK6 run standby
                 ^~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:31:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:31:29: error: 'GCLK_STATUS_SYNCBUSY' was not declared in this scope
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                             ^~~~~~~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:31:29: note: suggested alternative: 'ADC_STATUS_ADCBUSY'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                             ^~~~~~~~~~~~~~~~~~~~
                             ADC_STATUS_ADCBUSY
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:33:9: error: 'struct Gclk' has no member named 'CLKCTRL'; did you mean 'GENCTRL'?
   GCLK->CLKCTRL.bit.CLKEN = 1; //disable GCLK module
         ^~~~~~~
         GENCTRL
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:34:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.bit.SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:36:22: error: 'volatile struct NVMCTRL_CTRLB_Type::<unnamed>' has no member named 'SLEEPPRM'
   NVMCTRL->CTRLB.bit.SLEEPPRM = 3;
                      ^~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp: In member function 'void EnergySaving::set_clk()':
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:56:8: error: 'struct Gclk' has no member named 'CLKCTRL'; did you mean 'GENCTRL'?
  GCLK->CLKCTRL.bit.CLKEN = 0; //disable GCLK module
        ^~~~~~~
        GENCTRL
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:57:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.bit.SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:9: error: 'struct Gclk' has no member named 'CLKCTRL'; did you mean 'GENCTRL'?
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
         ^~~~~~~
         GENCTRL
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:35: error: 'GCLK_CLKCTRL_CLKEN' was not declared in this scope
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                   ^~~~~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:35: note: suggested alternative: 'GCLK_CLKCTRL_IDs'
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                   ^~~~~~~~~~~~~~~~~~
                                   GCLK_CLKCTRL_IDs
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:56: error: 'GCLK_CLKCTRL_GEN_GCLK6' was not declared in this scope
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                                        ^~~~~~~~~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:56: note: suggested alternative: 'GCLK_PCHCTRL_GEN_GCLK6'
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                                        ^~~~~~~~~~~~~~~~~~~~~~
                                                        GCLK_PCHCTRL_GEN_GCLK6
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:81: error: 'GCLK_CLKCTRL_ID' was not declared in this scope
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                                                                 ^~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:59:81: note: suggested alternative: 'GCLK_CLKCTRL_IDs'
   GCLK->CLKCTRL.reg = (uint16_t) (GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK6 | GCLK_CLKCTRL_ID( GCM_EIC )) ;  //EIC clock switched on GCLK6
                                                                                 ^~~~~~~~~~~~~~~
                                                                                 GCLK_CLKCTRL_IDs
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:60:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.bit.SYNCBUSY);
                ^~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:62:17: error: request for member 'reg' in '((Gclk*)1073748992)->Gclk::GENCTRL', which is of non-class type 'volatile GCLK_GENCTRL_Type [12]'
   GCLK->GENCTRL.reg = (GCLK_GENCTRL_GENEN | GCLK_GENCTRL_SRC_OSCULP32K | GCLK_GENCTRL_ID(6));  //source for GCLK6 is OSCULP32K
                 ^~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:62:74: error: 'GCLK_GENCTRL_ID' was not declared in this scope
   GCLK->GENCTRL.reg = (GCLK_GENCTRL_GENEN | GCLK_GENCTRL_SRC_OSCULP32K | GCLK_GENCTRL_ID(6));  //source for GCLK6 is OSCULP32K
                                                                          ^~~~~~~~~~~~~~~
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:62:74: note: suggested alternative: 'GCLK_GENCTRL_IDC'
   GCLK->GENCTRL.reg = (GCLK_GENCTRL_GENEN | GCLK_GENCTRL_SRC_OSCULP32K | GCLK_GENCTRL_ID(6));  //source for GCLK6 is OSCULP32K
                                                                          ^~~~~~~~~~~~~~~
                                                                          GCLK_GENCTRL_IDC
...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving\src\EnergySaving.cpp:63:16: error: 'struct Gclk' has no member named 'STATUS'
   while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);
                ^~~~~~
...snip...
Using library Energy Saving at version 1.0.0 in folder: ...\Seeeduino\hardware\samd\1.8.3\libraries\EnergySaving 
exit status 1

Compilation error: exit status 1

I’m playing with EnergySaving ~ aka sleep ~ on the Wio Terminal.
I get the same response, though I’m building with PlatformIO
The libs are at .platformio\packages\framework-arduino-samd-seeed\libraries\EnergySaving
The basic issue appears to be that that it isn’t written for SAMD51 in the WIo Terminal - its says written for a Cortex-M0+ or SAMD21.
Digging deeper it references Arduino - Home which doesn’t exist, and seems to have come from the Arduino.cc environment - which has never supported the SAMD51.
There is an XIAO SAMD21, so its worth building for that to just to check the cc.
I guess also need to find the Seeeduino\hardware\samd\1.8.3\libraries and see if this example is updated.
Though maybe this example should be at GitHub - Seeed-Studio/Seeed_Arduino_RTC: When your project needs to be unplugged, how to keep the time counting? This library can help you set up the current time.

It seems to be the only stuff that is not working so far on the WIO, a pity.
Everything else I tried worked, including using the onboard QSPI flash as a file system (WIP, GitHub - dheijl/WiotMpdcli: Wio Terminal MPD client).

Well I have a sleep working on an SAMD51/FeatherM4 with a much simpler hardware arrangement - and can wind the clock down to 48Mhz - then its 4mA. But how to fit it into all the interrupts with the WioT. I think I have a first pass of it appearing to sleep, but still got 34mA of Current.

Are you experimenting with Adafruit Sleepydog library for the SAMD51?

Hey thanks for the reference, I hadn’t seen it.
I haven’t had much time to work on the LowPower,
I think I need to transition to non USB - or a serial input for the debug, and that way I can tuneout the power hungry USB 48Mhz
For the SAMD51 its turning off/on the right clock lines that is challenging, and then what else is needed with the WioT. Can the WioT turn off all the extra devices and be comparable with the low power I’m seeing from the FeatherM4. At least on the WioT schematic I can’t see anything that jumps out as power hog.

Really low power for SAMD51 is turning off all internal clocks and static ram. However it requires a reset to exit. I’m hoping for less than 0.5mA in this case…
The Sleepydog lib has some interesting ways of using the OSC 32KHz, and typically thats low power, Hopefully it can keep the RTC running.

I’m afraid this low level SAMD51 stuff is way above my head at this moment. I suppose I should start reading up on the hardware and perhaps buy some simple SAMD51 board to experiment with first…

Well yes - possibly for a lot of us - thats the ARM infrastructure has a lot of knobs - and its trying to understand the base ARM machine and then the overlaid SAMD51 architecture ~ AND tweaking to just reducing the power.
Possibly like a driver shifting from a Renault CV4 to a raw no display Tesla. !!!

1 Like

I’ll experiment with powersaving on an M5Stack Core2 (ESP32) too, just out of curiosity…

I’ve got some baseline operation for the SAMD51 - LowPower using RTC on Express M4 SAMD51 - adafruit industries

Should be interesting what you find with the M5Stack - I looked at it, but understand mostly from others that its not well documented. Also the RTC and the USB are external chips. So the USB can’t go OTG - though the software Host stack is a big challenge… The SAMD51 seems to be well documented, even if hard to understand. Technically the SAMD51 has more flexibile serial, however the WioT uses so many of the Serial units that there are only two left over for the application useage.

Don’t hold your breath - it hasn’t arrived yet and the Wio Terminal project is not finished…

Well, it just arrived and looks good. You can put it in deep sleep for some time (msecs) after which it will restart, or in light sleep for some msecs after which the program will continue. Power consumption in both cases is identical I believe. Promising.
Example: M5Core2/sleep_test.ino at fm-experimental-sleep-test-1 · felmue/M5Core2 · GitHub

Well look whats out there …

part of

1 Like