Lately I’ve been working on a Kinetis K70 cortex M4 micro controller. It’s one of my favorite micro controllers by the way. I needed to control a 3 phases BLDC motor. Obviously, there was going to be some PWM signals involved!
There are two ways to generate PWM signals with a kinetis MCU, either using the “classic” TPM-compatible registers (that’s when the bit FTMEN in FTMx_MODE register si cleared), or the FTM mode (FTMEN = 1). Using the TPM-compatible mode is rather simple and straight forward, but offer limited functionalities, compared to FTM mode. (more…)