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

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Jump to solution
677 Views
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 Kudos
1 Solution
672 Views
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

View solution in original post

0 Kudos
4 Replies
673 Views
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 Kudos
663 Views
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 Kudos
643 Views
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 Kudos
666 Views
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 Kudos