K118 Capture timer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,041件の閲覧回数
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 件の賞賛
1 解決策
1,035件の閲覧回数
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

元の投稿で解決策を見る

3 返答(返信)
1,036件の閲覧回数
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

992件の閲覧回数
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 件の賞賛
981件の閲覧回数
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 件の賞賛