I switched from a MKR WiFi 1010 to a Nano 33 IoT board and I'm having a problem getting the Nano to wake up from sleep with an external PIR sensor. The MKR 1010 worked fine with almost the same code and the same PIR sensor. I've checked to make sure the sensor is operating correctly by setting digital pin 8 HIGH for 2 seconds when activated. The problem seems to be that the external interrupt isn't working and I'm wondering if the ArduinoLowPower.h library works correctly with the Nano 33 IoT. The Arduino 2.0 IDE Library Manager reports that version 1.2.2 of the Arduino Low Power library is installed. The Nano will not wakeup with the ExternalWakeUp example sketch, which I modified slightly for the PIR sensor rather than a pushbutton switch. Any advice would be appreciated. Here is the sketch.
Update: I found the problem and, as usual, it was a wiring mistake on my part. This post can be deleted.
/*
ExternalWakeup
This sketch demonstrates the usage of External Interrupts (on pins) to wakeup a chip in sleep mode.
Sleep modes allow a significant drop in the power usage of a board while it does nothing waiting for an event to happen. Battery powered application can take advantage of these modes to enhance battery life significantly.
In this sketch, a HIGH on pin 8 from an external sensor will wake up the board.
Please note that, if the processor is sleeping, a new sketch can't be uploaded. To overcome this, manually reset the board (usually with a single or double tap to the RESET button)
This example code is in the public domain.
*/
#include "ArduinoLowPower.h"
// Blink sequence number
// Declare it volatile since it's incremented inside an interrupt
volatile int repetitions = 1;
// Pin used to trigger a wakeup
const int pin = 8;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
// Set pin 8 as INPUT wakeup
pinMode(pin, INPUT);
// Attach a wakeup interrupt on pin 8, calling repetitionsIncrease when the device is woken up
LowPower.attachInterruptWakeup(pin, repetitionsIncrease, CHANGE);
}
void loop() {
for (int i = 0; i < repetitions; i++) {
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}
// Triggers an infinite sleep (the device will be woken up only by the registered wakeup sources)
// The power consumption of the chip will drop consistently
LowPower.sleep();
}
void repetitionsIncrease() {
// This function will be called once on device wakeup
// You can do some little operations here (like changing variables which will be used in the loop)
// Remember to avoid calling delay() and long running functions since this functions executes in interrupt context
repetitions ++;
}
Here is the verbose compiler output for the ExternalWakeUp example.
Using board 'nano_33_iot' from platform in folder: /Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13
Using core 'arduino' from platform in folder: /Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13
Detecting libraries used...
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/sketch/ExternalWakeup.ino.cpp -o /dev/null
Alternatives for ArduinoLowPower.h: [Arduino_Low_Power@1.2.2]
ResolveLibrary(ArduinoLowPower.h)
-> candidates: [Arduino_Low_Power@1.2.2]
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/sketch/ExternalWakeup.ino.cpp -o /dev/null
Alternatives for RTCZero.h: [RTCZero@1.6.0]
ResolveLibrary(RTCZero.h)
-> candidates: [RTCZero@1.6.0]
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/sketch/ExternalWakeup.ino.cpp -o /dev/null
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src/nrf52/ArduinoLowPower.cpp -o /dev/null
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src/samd/ArduinoLowPower.cpp -o /dev/null
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /Users/ameranda/Documents/Arduino/libraries/RTCZero/src/RTCZero.cpp -o /dev/null
Generating function prototypes...
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/sketch/ExternalWakeup.ino.cpp -o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/preproc/ctags_target_for_gcc_minus_e.cpp
/Users/ameranda/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/sketch/ExternalWakeup.ino.cpp -o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/sketch/ExternalWakeup.ino.cpp.o
Compiling libraries...
Compiling library "Arduino_Low_Power"
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src/nrf52/ArduinoLowPower.cpp -o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/libraries/Arduino_Low_Power/nrf52/ArduinoLowPower.cpp.o
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src/samd/ArduinoLowPower.cpp -o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/libraries/Arduino_Low_Power/samd/ArduinoLowPower.cpp.o
Compiling library "RTCZero"
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot -I/Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power/src -I/Users/ameranda/Documents/Arduino/libraries/RTCZero/src /Users/ameranda/Documents/Arduino/libraries/RTCZero/src/RTCZero.cpp -o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/libraries/RTCZero/RTCZero.cpp.o
Compiling core...
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=48000000L -DARDUINO=10607 -DARDUINO_SAMD_NANO_33_IOT -DARDUINO_ARCH_SAMD -DCRYSTALLESS -D__SAMD21G18A__ -DUSB_VID=0x2341 -DUSB_PID=0x8057 -DUSBCON "-DUSB_MANUFACTURER=\"Arduino LLC\"" "-DUSB_PRODUCT=\"Arduino NANO 33 IoT\"" -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Include/ -I/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS-Atmel/1.2.0/CMSIS/Device/ATMEL/ -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino/api/deprecated-avr-comp -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/cores/arduino -I/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot /Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot/variant.cpp -o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/core/variant.cpp.o
Using precompiled core: /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-core-cache/core_arduino_samd_nano_33_iot_c08c2e04b673e7b817707c30949879ba.a
Linking everything together...
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -L/private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315 -Os -Wl,--gc-sections -save-temps -T/Users/ameranda/Library/Arduino15/packages/arduino/hardware/samd/1.8.13/variants/nano_33_iot/linker_scripts/gcc/flash_with_bootloader.ld -Wl,-Map,/private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/ExternalWakeup.ino.map --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m0plus -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/ExternalWakeup.ino.elf /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/sketch/ExternalWakeup.ino.cpp.o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/libraries/Arduino_Low_Power/nrf52/ArduinoLowPower.cpp.o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/libraries/Arduino_Low_Power/samd/ArduinoLowPower.cpp.o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/libraries/RTCZero/RTCZero.cpp.o /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/core/variant.cpp.o -Wl,--start-group -L/Users/ameranda/Library/Arduino15/packages/arduino/tools/CMSIS/4.5.0/CMSIS/Lib/GCC/ -larm_cortexM0l_math -lm /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/../arduino-core-cache/core_arduino_samd_nano_33_iot_c08c2e04b673e7b817707c30949879ba.a -Wl,--end-group
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-objcopy -O binary /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/ExternalWakeup.ino.elf /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/ExternalWakeup.ino.bin
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-objcopy -O ihex -R .eeprom /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/ExternalWakeup.ino.elf /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/ExternalWakeup.ino.hex
Using library Arduino_Low_Power at version 1.2.2 in folder: /Users/ameranda/Documents/Arduino/libraries/Arduino_Low_Power
Using library RTCZero at version 1.6.0 in folder: /Users/ameranda/Documents/Arduino/libraries/RTCZero
/Users/ameranda/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-size -A /private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/ExternalWakeup.ino.elf
Sketch uses 12752 bytes (4%) of program storage space. Maximum is 262144 bytes.
Global variables use 3724 bytes (11%) of dynamic memory, leaving 29044 bytes for local variables. Maximum is 32768 bytes.
--------------------------
Compilation complete.
Performing 1200-bps touch reset on serial port /dev/cu.usbmodem14101
Waiting for upload port...
No upload port found, using address:"/dev/cu.usbmodem14101" label:"/dev/cu.usbmodem14101" protocol:"serial" protocol_label:"Serial Port (USB)" as fallback
"/Users/ameranda/Library/Arduino15/packages/arduino/tools/bossac/1.7.0-arduino3/bossac" -i -d --port=cu.usbmodem14101 -U true -i -e -w -v "/private/var/folders/wq/32dsft1s2zngpbfvg_lqvjn40000gn/T/arduino-sketch-C70909AB4A28FC70097C7F757B1B3315/ExternalWakeup.ino.bin" -R
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Apr 19 2019 14:38:48
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x10)
writeWord(addr=0x20004020,value=0x20008000)
Device : ATSAMD21G18A
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Chip ID : 10010005
version()=v2.0 [Arduino:XYZ] Apr 19 2019 14:38:48
Version : v2.0 [Arduino:XYZ] Apr 19 2019 14:38:48
Address : 8192
Pages : 3968
Page Size : 64 bytes
Total Size : 248KB
Planes : 1
Lock Regions : 16
Locked : readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
none
readWord(addr=0x41004018)=0
Security : false
Boot Flash : true
readWord(addr=0x40000834)=0x7000a
BOD : true
readWord(addr=0x40000834)=0x7000a
BOR : true
Arduino : FAST_CHIP_ERASE
Arduino : FAST_MULTI_PAGE_WRITE
Arduino : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
chipErase(addr=0x2000)
done in 0.838 seconds
Write 12752 bytes to flash (200 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)
[========= ] 32% (64/200 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)
[=================== ] 64% (128/200 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0x1000)
[============================ ] 96% (192/200 pages)write(addr=0x20005000,size=0x200)
writeBuffer(scr_addr=0x20005000, dst_addr=0x5000, size=0x200)
[==============================] 100% (200/200 pages)
done in 0.092 seconds
Verify 12752 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = 8316
checksumBuffer(start_addr=0x3000, size=0x1000) = 9a93
checksumBuffer(start_addr=0x4000, size=0x1000) = e28d
checksumBuffer(start_addr=0x5000, size=0x1d0) = 2efe
Verify successful
done in 0.012 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)
--------------------------
upload complete.