TurboPWM not working on Adafruit Trinket

Has anyone managed to get TurboPWB working with a Trinket MO (samd)? I have tried a couple of turboPWB examples but none are working. I have tried different timers with no luck. I can see debug messages on the serial interface so I know that it is executing.
I thought I would first check here before I dig deeper into the register settings.

Thanks
Mark

What is TurboPWB ?

HA! A typo. It should be turboPWM.
It is a fast pwm library for Samd-21 based boards..

The library checks for specific boards instead of just for the SAMD21G processor.
Here is a request for another Adafruit board: https://github.com/ocrdu/Arduino_SAMD21_turbo_PWM/pull/11

The Trinket M0 is added here: https://github.com/ocrdu/Arduino_SAMD21_turbo_PWM/blob/master/src/SAMD21turboPWM.h#L109
You could be the first one that tests it.

Thanks
That pull request added a new Adafruit board. It doesn't look like there were any new changes since 2021 for the trinket.

The problem is the build defs has ARDUINO_SAMD_ZERO defined as well as ADAFRUIT_TRINKET_M0. In fact all of the Adafruit board definition include ARDUINO_SAMD_ZERO. Not sure why this would be the case.

adafruit_trinket_m0.build.extra_flags=-D__SAMD21E18A__ -DCRYSTALLESS -DADAFRUIT_TRINKET_M0 -DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS {build.usb_flags}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.