Does PWM stop on A7 after stop mode

I have a buzzer connected to A7 (WKP) and the Tone function works perfectly prior to any sleep modes.

After I go into stop mode using (System.sleep(D4, FALLING, sleepDuration):wink: and the device wakes up. The tone function no longer works.

Does anyone know if the tone function has to be reinitialized after waking up or if anyone has seen this before?

Here’s a minimum test code example:
the second tone does not produce sound

#define Buzzer A7

void setup() {
pinMode(Buzzer, OUTPUT);
tone(Buzzer, 2000, 300);
    RGB.color(255, 255, 0);
System.sleep(D4, FALLING, 5);
    RGB.color(0, 255, 0);
tone(Buzzer, 2000, 1000);
    RGB.color(255, 0, 0);


void loop() {

1 Like