I am using board Adafruit Grand Central M4 with this chip ATSAMD51P20.
In my sketch I am using this library https://github.com/adafruit/Adafruit_SleepyDog.
The problem occurs when board wakes up from sleep. I want to print some text to serial monitor but there are printed only garbage.
But before first executing sleep function everything work correctly.
As you can see in picture below text "Starting program" and text "test" are written before first sleep. Then board sleeps for 3000ms and then after wakes up it should writes again "test" into serial monitor, but from this time there is only garbage.
You can find my sketch also with library and picture of my setup at this link https://drive.google.com/file/d/18r9QDc ... sp=sharing
Code looks like this
Code: Select all
#include <Adafruit_SleepyDog.h>
void setup() {
delay(3000);
Serial1.begin(9600);
Serial1.println("Starting program");
}
void loop() {
Serial1.println("test");
Serial1.flush();
Watchdog.sleep(3000);
}