S12G ADC SYNC

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S12G ADC SYNC

跳至解决方案
1,726 次查看
fanziyu
Contributor IV

Hi folks!

Is there a way with the S12G128 to sync or trigger an ADC sample & conversion from the start of the PWM period?

PWM Frequence is 20k

I use HalfBridge to control a brush DC by PWM and need measure the current ,the current sense is a square wave(20k) .

Is there a clever way to solve the problem ? it is too late for me to change the chip.

Thanks

0 项奖励
回复
1 解答
1,642 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

Yes, there is internal HW connection between PW0 and ETRIG0, PWM1 and ETRIG1, etc ...   Please check chapter 2.6.4 ADC External Triggers ETRIG3-0 in reference manual (page 254,255). If PWM is enabled, ETRIG will be driven by PWM (internally or trough pin).  Since PWM outputs in 16-Bit Mode are PWM1, PWM3, PWM5 and PWM7, only two internal links 
ETRIG1 and ERIG3) could be used of ADC triggering.  I would like to recommend in your case external link from PWM outputs into some of remaining 
port AD inputs (ETRIGSEL=0, ETRIGCH[3:0] refers to appropriate PAD input). For more details please see Table 11-5. External Trigger Channel Select Coding (page 427).   Best regards,
Ladislav

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,643 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

Yes, there is internal HW connection between PW0 and ETRIG0, PWM1 and ETRIG1, etc ...   Please check chapter 2.6.4 ADC External Triggers ETRIG3-0 in reference manual (page 254,255). If PWM is enabled, ETRIG will be driven by PWM (internally or trough pin).  Since PWM outputs in 16-Bit Mode are PWM1, PWM3, PWM5 and PWM7, only two internal links 
ETRIG1 and ERIG3) could be used of ADC triggering.  I would like to recommend in your case external link from PWM outputs into some of remaining 
port AD inputs (ETRIGSEL=0, ETRIGCH[3:0] refers to appropriate PAD input). For more details please see Table 11-5. External Trigger Channel Select Coding (page 427).   Best regards,
Ladislav
0 项奖励
回复