S32K344 - How to trigger ADC conversion at the center of OPWMCB ?

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

S32K344 - How to trigger ADC conversion at the center of OPWMCB ?

跳至解决方案
1,483 次查看
kyf
Contributor V

Hello all !

I'm studying how the OPWMCB mode of eMIOS channel works in order to set-up a center aligned PWM output. I've seen that the only Flag generation that OPWMCB mode is in the trailing or both trailing-leading edges of PWM pulse but instead of this I need flag at bus over/underflow.

I need to trigger my ADC conversions at the points that are shown in the image bellow:  

center aligned pwm.jpeg

Does anyone know if it is possible to trigger an ADC conversion with BCTU at the time shown in the image ?

 

 

Kind regards,

kyf

0 项奖励
回复
1 解答
1,452 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

in OPWMCB mode you need to select the timebase using Bus Select (Cn[BSL]). The timebase you select must be running in Up Count-Down Count mode and this timebase define PWM period. The channel generating this timebase can be then used to trigger ADC conversions at middle and period boundary. 
See MCB mode description to know more about flag generation in MCB Up Count-Down Count mode.

BR, Petr

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,453 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

in OPWMCB mode you need to select the timebase using Bus Select (Cn[BSL]). The timebase you select must be running in Up Count-Down Count mode and this timebase define PWM period. The channel generating this timebase can be then used to trigger ADC conversions at middle and period boundary. 
See MCB mode description to know more about flag generation in MCB Up Count-Down Count mode.

BR, Petr

0 项奖励
回复