Open
Description
I’m working with Atmel SAMD microcontroller on Adafruit Feather M0 board. Looking at the documentation here: https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/, I read that PWM will be stopped or changed by next call to analogWrite() (or a call to digitalRead() or digitalWrite()) on the same pin. In my tests, only analogWrite() affects the PWM on given pin, e.g.:
analogWrite(1, 128);
analogWrite(1, 0);
will leave pin 1 in low state, but
analogWrite(1, 128);
digitalWrite(1, 0);
will leave it producing 50% duty cycle PWM. Forum post https://community.platformio.org/t/analogwrite-on-atmel-samd-behaves-differently-than-documented/22202 has a detailed explanation why it's happening.
Metadata
Metadata
Assignees
Labels
No labels