S12G ADC SYNC

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