-
Notifications
You must be signed in to change notification settings - Fork 39
Description
When writing PWM values, the analogWrite function (v1.0.5) gets stuck when writing a value of 0 a second time. Using the builtin LED connected to D5 of the ATP board and running the following code:
void setup() {
Serial.begin(115200);
delay(100);
pinMode(5, OUTPUT);
Serial.println("Start!");
analogWrite(5,0);
Serial.println("Wrote a value of 0");
analogWrite(5,1);
Serial.println("Wrote a value of 1");
analogWrite(5,0);
Serial.println("Wrote a value of 0");
}
void loop() {
Serial.println("Looping");
delay(100);
}
My serial terminal window displays:
⸮Start!
Wrote a value of 0
Wrote a value of 1
It seems that the interrupt isn't triggering when the value is changed back to 0 a second time. AnalogWrite seems to work as expected if I write any 8-bit value other than 0.