FTM Output Trigger using Processor Expert

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

FTM Output Trigger using Processor Expert

跳至解决方案
1,856 次查看
philipp_laemmle
Contributor II

Hi

I'm using the MK21FN1M0 and I want to trigger the PDB from FTM output. Unfortunately I can't enable the trigger output on the TimerUnit in Processor Expert. Do you have any suggestions?

pastedImage_0.png

pastedImage_1.png

标记 (4)
1 解答
1,424 次查看
marek_neuzil
NXP Employee
NXP Employee


Hello Philipp,

You are right that TimerUnit_LDD does not provide properties to configure the external trigger (FTM_EXTTRIG register) that are used by PDB device. You can used TimerUnit_LDD and configure the FTM_EXTTRIG register by the FTM_PDD_WriteExternalTriggerReg(PeripheralBase, Value) PDD macro. Or you can use Init_FTM component that cover all register of the FTM (there are version specific registers; use the Advance view in the Component Inspector), see the following screenshot:

Init_FTM_ExternalTriggers.png

Best Regards,

Marek Neuzil

在原帖中查看解决方案

4 回复数
1,425 次查看
marek_neuzil
NXP Employee
NXP Employee


Hello Philipp,

You are right that TimerUnit_LDD does not provide properties to configure the external trigger (FTM_EXTTRIG register) that are used by PDB device. You can used TimerUnit_LDD and configure the FTM_EXTTRIG register by the FTM_PDD_WriteExternalTriggerReg(PeripheralBase, Value) PDD macro. Or you can use Init_FTM component that cover all register of the FTM (there are version specific registers; use the Advance view in the Component Inspector), see the following screenshot:

Init_FTM_ExternalTriggers.png

Best Regards,

Marek Neuzil

1,424 次查看
philipp_laemmle
Contributor II

Hello Marek

Thanks for your help.

In case of using the peripheral init module, I have to implement the methods for the timer by myself. Is this right?

Best Regards

Philipp

0 项奖励
回复
1,424 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Philipp,

I look at your PDB clock have not enable .

And Why FTM cant trigger PDB,  this is not only depend on your processor expert configuration , but also your code.

Please attach your code , or say in detailed.

Best Regards!

Alice

0 项奖励
回复
1,424 次查看
robotjosh
Contributor IV

Processor expert often does not give you complete control.  Its a great tool to use as a starting point to get stuff kinda working.  Then you can look at what it does to write the real driver.

0 项奖励
回复