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

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

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

Jump to solution
687 Views
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 Kudos
1 Solution
656 Views
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

View solution in original post

0 Kudos
1 Reply
657 Views
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 Kudos