I.MXRT1062 measuring pulse duration using ACMP and EflexPWM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

I.MXRT1062 measuring pulse duration using ACMP and EflexPWM

ソリューションへジャンプ
1,675件の閲覧回数
bzaz
NXP Employee
NXP Employee

Hi,

I am trying to use the ACMP to detect when my signal is above a given threshold and use an EflexPWM to measure the duration. Is there a way to do that ?

 

Regards,

 

bzaz

0 件の賞賛
返信
1 解決策
1,627件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Yes, I agree with you that you can use any of PWM_A/B/X signal as capture signal input pin. If you connect the ACMP1_OUT to FLEXPWM1_PWM0_EXTA via crossbar, with correct  PWM Source Select Register configuration, the ACMP1_OUT signal can output to PWM pin (PWM_A/B/X pads), but you can not guarantee that the PWM_A/B/X pad signals can be routed to the capture input pin of eFlexPWM module, I think it is 50% percent possibility that ACMP1_OUT signal  can be routed to capture input pin of eFlexPWM via crossbar. So you'd better have a test for the solution with EVK board.

 

If you output ACMP1_OUT signal to a predefined pad or to a crossbar pad, you connect the ACMP1_OUT signal pad to any of PWM_A/B/X pad signal via a cable, it is 100% percent okay.

Hope it can help you

BR

XiangJun Rong

 

元の投稿で解決策を見る

0 件の賞賛
返信
6 返答(返信)
1,653件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Stephane,

I do not know your application, if the ACMP output is related to eFLEXPWM signals, it is okay to use capture function of the  eFLEXPWM module. If the ACMP output is not related to eFLEXPWM signals, I suggest you use the capture function of normal timer for example, you can use the capture function of GPT (General Purpose Timer) or the capture function of QuadTimer(TMR). For detailed inf, pls refer to
Chapter 52 General Purpose Timer (GPT) or Chapter 54 Quad Timer (TMR), because you can set up the Timer cycle time as large as possible.

If the ACMP output is related to eFLEXPWM signals, it is okay to use capture function of the  eFLEXPWM module, you can connect the captured signal to the PWMx_nA, so that you can get the duty cycle or cycle time. Pls refer to the community ticket for the capture function of eFlexPWM module.

https://community.nxp.com/t5/Digital-Signal-Controllers/The-Capture-feature-of-eFlexPWM-module/ta-p/...

 

Hope it can help you

BR

XiangJun Rong

 

I

 

0 件の賞賛
返信
1,645件の閲覧回数
bzaz
NXP Employee
NXP Employee

Hi XiangJun,

An overview of my application is show in the diagram below.

Using EflexPWM to trigger the ADCs is straightforward. My issue is to use the ACMP output as a  trigger for the capture mode. In other word how to connect ACMP out to PWMX ? using xbar ?

Regards,

Stephane.

 

 

 

 

 

 

bzaz_0-1643014771261.png

 

0 件の賞賛
返信
1,643件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I see your application, it is okay to use capture function of the eFlexPWM module to get the high logic time of ACMP output signal.

For connection, I have checked the xbar module, you can not use the xbar, because the PWMx_nX is not xbar output pin. Therefore, you have to connect the ACMP output pin to the PWMx_nX pin with external cable.

For example,

The pad GPIO_AD_B1_12 is ACMP1_OUT signal output pad.

The pad GPIO_AD_B0_02 is FLEXPWM1_PWM0_X input signal

You can connect the GPIO_AD_B1_12 and GPIO_AD_B0_02 pads together via cable.

xiangjun_rong_0-1643019090457.png

 

Hope it can help you

BR

XiangJun Rong

 

 

 

0 件の賞賛
返信
1,636件の閲覧回数
bzaz
NXP Employee
NXP Employee

Hi,

I have seen that we can use any of the pwm IO as capture input (A, B or X), instead of using X I can use the A input for exemple and then using xbar to connec ACMP to PWM. For exemple xbar1_in26 to xbar1_out 26 to connect ACMP1 to PWM0_A. Am I correct ?

Regards,

Stephane.

 
0 件の賞賛
返信
1,628件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Yes, I agree with you that you can use any of PWM_A/B/X signal as capture signal input pin. If you connect the ACMP1_OUT to FLEXPWM1_PWM0_EXTA via crossbar, with correct  PWM Source Select Register configuration, the ACMP1_OUT signal can output to PWM pin (PWM_A/B/X pads), but you can not guarantee that the PWM_A/B/X pad signals can be routed to the capture input pin of eFlexPWM module, I think it is 50% percent possibility that ACMP1_OUT signal  can be routed to capture input pin of eFlexPWM via crossbar. So you'd better have a test for the solution with EVK board.

 

If you output ACMP1_OUT signal to a predefined pad or to a crossbar pad, you connect the ACMP1_OUT signal pad to any of PWM_A/B/X pad signal via a cable, it is 100% percent okay.

Hope it can help you

BR

XiangJun Rong

 

0 件の賞賛
返信
1,611件の閲覧回数
bzaz
NXP Employee
NXP Employee

Hi,

 

Yes it helped a lot.

 

thanks for your support.

 

Regards,

 

Stephane.

0 件の賞賛
返信