Combined PWM Generation on FTM2

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Combined PWM Generation on FTM2

3,607件の閲覧回数
_daniel_
Contributor II

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.

ラベル(1)
0 件の賞賛
返信
9 返答(返信)

2,813件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I attach the driver, the example is located at:C:\DriverE\Freescale\kexx_drv_lib\build\cw\ke02\FTM_EPWM_demo

Hope it can help you.

BR

Xiangjun Rong

0 件の賞賛
返信

2,813件の閲覧回数
tommyliu
Contributor I

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

0 件の賞賛
返信

2,813件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

2,813件の閲覧回数
tommyliu
Contributor I

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);

0 件の賞賛
返信

2,813件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Tommy,

   请问你的这个例程是从哪里下载的?

  请给我个链接,我去看看。

 

Kerry

0 件の賞賛
返信

2,813件の閲覧回数
Jiandong_li
Contributor I

Dear Kerry,

       Many thank:smileyhappy:

0 件の賞賛
返信

2,813件の閲覧回数
_daniel_
Contributor II

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

0 件の賞賛
返信

2,813件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信

2,813件の閲覧回数
tommyliu
Contributor I

Dear Mr. Rong,

   I can't find the FTM example. could you help add a .Zip file of FTM example.

  Many thanks.

0 件の賞賛
返信