On Portenta H7, writing `analogWrite(3, 255)` results in a signal with 0% duty cycle, while `analogWrite(3, 0)` is 100% `analogWrite(3, n)` , on the other hand, has exactly the expected duty (n/256) See https://github.com/arduino/ArduinoCore-mbed/issues/351#issuecomment-947423777