I'm having trouble setting up the PWM component in PEx. I want to output a simple PWM waveform with a base frequency of about 25 kHz.
I added the PWM component to my project, and selected "FTM0_C1V" for the PWM device. But when I try to select the pin to route the output to, they are all prefixed with the symbol "[!]". There is no documentation what that means so I'm guessing that means that those pins are not available??? There is some text in red on that line. It says, "Peripheral-signal is not specified for the pin routing, Unassigned peripheral". I'm not sure what that means or how to fix it.
So, I just selected a pin, PTB1, and the error changed to "Peripheral-signal is not specified for the pin routing". This error is not documented, so I'm wondering how to fix it.
So, I opened the TimerUnit_LDD component that the PWM component references. The top two entries in the Component Inspector had an error, "Unassigned peripheral". I clicked on the second one, "Counter" and selected "FTM0_CNT". This caused the first line ("Module name") to be changed to "FTM0". I selected a random value for the Counter frequency and all the errors for TU1 went away, but this didn't help the errors in the PWM component.
When I tried to change the Period of the PWM component, the dialog box had an error: "Invalid component configuration: Property does not specify any peripheral for timing configuration". I'm puzzled as to what peripheral it's referring to. I specified the TU1 Timer and FTM0....
I also tried using the PinSettings component to reserve FTM0, channel 1 (Pin T7, PTB1), but that didn't change anything.
ARM DS-5, Ubuntu 32-bit 12.10, Vybrid Tower
Can someone help?
Thanks.
解決済! 解決策の投稿を見る。
Hello,
you can also setup PWM directly in TimerUnit component (as workaround), details steps are in the attached document (it is intended for K60, but main features of FTM device are the same on all platforms).
Best regards
Vojtech Filip
Processor Expert Support Team
I tried it and it works for Vybrid. I'm seeing 100Hz square wave with 50% duty cycle. I was also able to vary its duty cycle by varying the "offset" parameter.
Thanks, Vojtech!