How to latch FTM_MOD counter on falling edge

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to latch FTM_MOD counter on falling edge

1,400 Views
nitinverma
Contributor III
Dear support team,
We are working with S32K144 device. We want to latch the falling edges of signal coming on FTM0_CH1. 
This signal is generated using FTM0_CH0 port. We want to configure FTM0_CH1 in such way that on falling edge
FTM_MOD counter value should be latched and not get reset. I tried to implement this using Global Base Timer 
feature of FTM. I am unable to configure it properly and don't  know how to read latched value using this feature 
(As I am trying this for single module with 2 different channels). Please help us if it is possible to implement using GBT.
0 Kudos
4 Replies

1,119 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Sorry but I have difficulties to understand. Could you reformulate the question?

The GTB function allows synchronization of multiple FTMs, but you want to use just one FTM.

 

Regards,

Daniel

0 Kudos

1,119 Views
nitinverma
Contributor III
Dear Daniel
Yes I have read from datasheets and articles available that GTB function is used for synchronization of multiple FTM's. But my requirement is to generate pwm using FTM0_CH0 and then I want to know the duty cycle of that generated pwm for diagnosis purpose but using another channel of same FTM module. So my query is can we use GTB function to implement above requirement or do we have another provision to implement above requirement . We can't configure other channel of same module(through which we are generating the PWM) as ICU. 
Please guide me through this.
0 Kudos

1,119 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi,

GTB is used to have the same timebase for more FTM modules. All FTM channels are connected to the same timebase, so this feature won't help you.

I don't understand exactly your usecase, but why you need to know the value of the duty cycle( which is stored in CnV, not in MOD)? The application knows the value configured as duty and you can compare it with the value obtained by FTM channel configured as input capture.

Best regards,

Razvan

0 Kudos

1,119 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Sorry, I don't see any way to connect internally FTM0_ch0 PWM output with FTM0_Ch1 IC input.

Regards,

Daniel

0 Kudos