Triggering ADC from PWM CCU4 on "Compare match while counting up" and "Period match"

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User17585
Level 1
Level 1
First like given Welcome! 5 replies posted
Hi,

Triggering the ADC conversion from the PWM CCU4 works fine for me as long as I trigger only on "Compare match while counting up". Since I want to trigger on start as well as the end of the active PWM cycle I tried this:

3692.attach
3693.attach

Now the ADC conversion will not trigger any more at all.

I had to introduce an additional Interrupt App which is triggered on the CCU4 "Period match". In the IRQ handler routine of that App the ADC conversion is then started. Not a beautiful workaround.

"Period Match" should trigger even if the duty cycle of the PWM_CCU4 is set to 0.00%, but "Compare match while counting up" will not trigger in that situation, right?

Markus
0 Likes
0 Replies