eFlexPwm
Arduino eFlexPwm library for Teensy 4.x
|
Arduino eFlexPwm library for Teensy 4.x (and SparkFun MicroMod Teensy)
This library allows advanced use of NXP eFlexPWM timers. These timers are very powerful and can be used to manage power stages, motor controls, etc.
The Arduino API is easy to use, unfortunately, the analogWrite() function allows you to do very little when compared to the very advanced possibilities of the eFlexPwm timers of NXP microcontrollers such as the i.MXRT 1062 which equips the Teesny 4.x !
Here is an example of 6 synchronized signals with deadtime generated by the eFlexPwmSimple program:
These signals are generated with the source code below :
But this is only a small example of the possibilities offered by the eFlexPwm timers which are also designed to generate SPWM signals (Sine Pulse Width Modulation) :
This library is based on the code of the FSL_PWM driver from the NXP SDK, it is published under the BSD 3-Clause License. It is still in beta version.
Teesny eFlexPWM pins
The table below will allow you to identify the pins of the Teensy to use, by clicking on it, you can the Libre Office version of this table :