K118 Capture timer

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

K118 Capture timer

Jump to solution
979 Views
rvalente
Contributor III

Hello Mates, 

i'm looking to migrate a simple project for the K118 to the STM32 micro but need some help with the capture architecture. I need to read four square waves from 0 to 3KHz. In the STM32 two 16 bit timers are chained and a 10MHz clock is fed to the timers. The rising edge makes a interrupt to read the capture value. In the K118 can a timer have 4 interrupt capture channels?

Greetings, Renan

0 Kudos
1 Solution
973 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Renan,

Each FTM channel can be configured for input capture.

For more information, please take a look at the RM, Section 47.5.5 Input Capture Mode.

You can use SDK, this example shows use of FTM Input capture: ftm_signal_measurement_s32k118

 

Regards,

Daniel

View solution in original post

3 Replies
974 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Renan,

Each FTM channel can be configured for input capture.

For more information, please take a look at the RM, Section 47.5.5 Input Capture Mode.

You can use SDK, this example shows use of FTM Input capture: ftm_signal_measurement_s32k118

 

Regards,

Daniel

930 Views
rvalente
Contributor III

Daniel,

I can't see how to chain the FTMs to make a 32 bit timer capture, could you please give me a hint?

0 Kudos
919 Views
rvalente
Contributor III

Daniel,

how should I chain the FTM0 with FTM1 in K118 to make 32 bit ftm? 

I'm looking to feed a 1MHz clock to FTM1 so it'll overflow every 65ms, I want this overflow to increment FTM1, should I do this externally or can I internally route it?

I believe Its fine to capture the FTM1 bits in software, so it would be set as a single counter only? Can I spare this timer and use another?

0 Kudos