Hello, please;
How I could do to configure FTM2 module of the MKE02Z64 microcontroller to generate a combined PWM signal (complementary + deadtime) in channels 0 and 1, approximately 25kHz? So many registrars who I got confused, do not know where to start. There is a "cake recipe"/tutorial of the following steps one-a-one, or a component for Processor Expert?
Thank you.
Dear Mr. Rong,
:C:\DriverE\Freescale\kexx_drv_lib\build\cw\ke02\FTM_EPWM_demo
this example is not based on PE or PDD. Could you give us some FTM example based on PE?
I remember PE for DSC products can provide PWMMC. PWMMC is very useful for motor control.
but in Kenitis, i can't use PWMMC component :smileysad:
Many thanks
Hi Tommy,
If you want to use the PE component, you can use the init_FTM component.
I already help you to create a project based on CW PE, please find my project on the attachment.
The PTC0 and PTC1 is the combined FTM pin, these pin can output 25Khz PWM wave.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Dear Kerry,
万分感谢。
此外,贵司的一个例程里面,channel value为负值,不是很理解。计数时,是由负数->0->正数 这样吗?
还望多多指点!
uint32_t ChanValTop = (-1800 / 2) + ((-1800 * torque) / 200);
uint32_t ChanValBottom = -(-1800 / 2) - ((-1800 * torque) / 200) - 1;
FTM_PDD_WriteChannelValueReg(FTM0_DEVICE, FTM_PDD_CHANNEL_0, ChanValTop);
FTM_PDD_WriteChannelValueReg(FTM0_DEVICE, FTM_PDD_CHANNEL_1, ChanValBottom);
FTM_PDD_WriteChannelValueReg(FTM0_DEVICE, FTM_PDD_CHANNEL_2, ChanValTop);
FTM_PDD_WriteChannelValueReg(FTM0_DEVICE, FTM_PDD_CHANNEL_3, ChanValBottom);
FTM_PDD_WriteChannelValueReg(FTM0_DEVICE, FTM_PDD_CHANNEL_4, ChanValTop);
FTM_PDD_WriteChannelValueReg(FTM0_DEVICE, FTM_PDD_CHANNEL_5, ChanValBottom);
FTM_PDD_WritePwmLoadReg(FTM0_DEVICE, 0x200);
Hello; Unfortunately I could not install the package, an error is displayed.
Details:
Can not complete the install because one or more required items could not be found.
Software being installed: Microcontrollers Driver Suite for Kinetis 48MHz KE02 1.0.0 (com.freescale.processorexpert.ke02.sp.feature.group 1.0.0)
Missing requirement: Microcontrollers Driver Suite for Kinetis 48MHz KE02 1.0.0 (com.freescale.processorexpert.ke02.sp.feature.group 1.0.0) requires 'com.freescale.processorexpert.standalone.feature.group 10.3.0' but it Could not be found
Where could I find him?
Installed Products:
- CodeWarrior for MCU
Version: 10.7
Build Id:160721
Hi, Daniel,
If you do not need asymmetric PWM signal, you do not need the COMBINED mode, it is okay to use just complementary mode to generate the complementary PWM signals with deadtime..
You can download FTM example from the link based on KE family.
ARM Cortex-M0+|Kinetis KE02 40 MHz 32-bit 5V MCUs|NXP
at the end of the web page, pls download "PExDrv 10.3 Kinetis KE02 40MHz Service pack", you can see the FTM example.
BR
XiangJun Rong