S32k146 SDK dual-edge input capture

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

S32k146 SDK dual-edge input capture

Jump to solution
612 Views
Chandler_L
Contributor II

Hi  NXP:

I am using the S32K146 for the first time and would like to set up a demo for dual-edge input detection. According to the manual, dual-edge detection requires configuring two channels. However, I would like to know if it's possible to detect the frequency and duty cycle of the input signal using just one channel. Could you please provide an SDK-driven demo for dual-edge detection and how to measure the input signal's frequency and duty cycle?

Thank you.

LaiBighead_0-1737180365035.png

 

Tags (2)
0 Kudos
Reply
1 Solution
564 Views
Senlent
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
5 Replies
565 Views
Senlent
NXP TechSupport
NXP TechSupport
0 Kudos
Reply
525 Views
Chandler_L
Contributor II
双边沿检测功能已实现,但很奇怪,会一致卡住FTM4_CH2_Input_Detect函数里面,捕获通道频率设置为375Khz,给通道输入250Khz的PWM波;
0 Kudos
Reply
516 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@LaiBighead

双边沿输入捕获250KHz,一秒钟相当于中断差不多500K次,你说你这样用考虑过S32K146的性能吗?

通常电机控制中也就个10K或者20K,你这么高的速率它能处理的了吗。

0 Kudos
Reply
496 Views
Chandler_L
Contributor II
谢谢,问题已解决,祝您生活愉快
0 Kudos
Reply
539 Views
Chandler_L
Contributor II
I'm glad to receive your reply. I have made some attempts with this case, and it was somewhat enlightening. However, when trying the dual-edge detection, I’m unsure when to obtain the Cnv values of CHn and CHn+1.
0 Kudos
Reply