Use an FTM IC device to set several channels as output compare

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

Use an FTM IC device to set several channels as output compare

ソリューションへジャンプ
1,339件の閲覧回数
fengjuntian
Contributor I

As described in the title, I created a project on the 144 chip, added an FTM_IC, and successfully configured several Input Capture channels. How to configure the remaining channels as Output Compare?

0 件の賞賛
1 解決策
1,334件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @fengjuntian,

You can add the FTM_OC driver, but you would need to use it with another FTM module as the SDK does not allow using two or more FTM driver on the same FTM module.

The non-SDK FTM example (S32K144_project_FTM) that is available in the S32DS IDE configures OC, IC and PWM channels on FTM0.

 

Regards,

Daniel

元の投稿で解決策を見る

0 件の賞賛
4 返答(返信)
1,335件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @fengjuntian,

You can add the FTM_OC driver, but you would need to use it with another FTM module as the SDK does not allow using two or more FTM driver on the same FTM module.

The non-SDK FTM example (S32K144_project_FTM) that is available in the S32DS IDE configures OC, IC and PWM channels on FTM0.

 

Regards,

Daniel

0 件の賞賛
1,325件の閲覧回数
yfliu
Contributor IV

@danielmartynek 

So it seems that FTM_IC or FTM_OC software module design prevents multi-purpose usage of a FTM device, even though the hardware module allows that?

Do you see any possibility of refactoring the FTM driver software to remove that limitation? Especially can we refactor the ftmMode member as a bitmask type so that multi-purposes can be supported? do you see any hidden difficulties?

 

0 件の賞賛
1,305件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @yfliu,

Currently, FTM drivers in RTM 4.0.x in S32DS 3.4 accepts PWM and IC but not OC, this is due to concurrent access to the same timer which is hard to manage in this use case.

 

Regards,

Daniel

0 件の賞賛
1,328件の閲覧回数
fengjuntian
Contributor I

 

@danielmartynek ,Thanks!

Input Capture and Output Compare cannot be implemented in the same FTM driver??

I can only do this by configuring registers, is that what you mean?

 

0 件の賞賛