I have a problem with the whole FTM module and getting it running.
After searching I could not find any working code example on how to activate the FTM0 module and link PTA6 to the module.
Could anyone link me / show me a piece of code, where you initialize the FTM0 module and link it to the PTA6 pin?
All I am trying to do is make an LED "blink" using the PWN signal provided by the K60.
I do not care right now what frequency it would blink at, I just want to get it running.
Thanks in advance!
Thanks a lot for your time and help. I downlaoded the SDK and also tried to run it, it compiled all fine with no errors.
After that I connected an LED to the PTA10 pin, but it did not do anything at all after starting the program in debug mode.
Is there something I am not quiet getting/understanding?
Thanks a log again for your help!
The SDK examples are tested and ready to use without adding anything. The frequency of the PWM SDK example is 24kHz, which is too high to see the LED response. Please change the frequency to something close to 3kHz. With this frequency you should be able to see the blink of the LED.
Do you have an oscilloscope? It could help to see the PWM output.
Hope you are going well. There are some examples in the SDK. You can download it in this link: SDK Builder. To see a driver example, you need to download it for a kinetis module, in this case the TWR-K60D100M.
There is the ftm_simple_pwm driver example, where FTM2_CH0 is configured. In this example the pin is PTA10. You can take this example and change it to your desired pin. In the chapter 10 of the Reference Manual you can see the alt functionality on each pin. If you want to use the FTM in your proposed pin, choose the ALT3 so you can configured the FTM0_CH3.
Let me know if you have further questions.