arduino / ArduinoCore-mbed

347 stars 202 forks source link

Portenta: PWM on HRTIM has inverted corner case values #352

Open facchinm opened 3 years ago

facchinm commented 3 years ago

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

jonwhick commented 2 years ago

So do the min and max values invert? Or is the entire scale inverted?

Also is there an up to date pinout for the breakout board

pennam commented 2 years ago

@jonwhick only min and max values are inverted. For the pin mapping you can check this table https://github.com/arduino-libraries/Arduino_PortentaBreakout#peripherals-table