Thank you ard_newbie for your help.
I changed the second CMR config line to the following:
t0->TC_CMR = (t0-> TC_CMR | TC_CMR_ACPA_CLEAR | TC_CMR_ACPC_SET ); // set clear and set from RA and RC compares
Now it seems to work fine.
Nethertheless, i´m interested in using the event line as proposed by MasterT.
Thank you MasterT also for your code, i tried to understand it. I changed the PWM Freq down to 2kHz and changed the event line compare conditions to trigger in the middle of the PWM. unfortunately the adc Handler is not called every PWM Cycle but somehow erratically. It´s at the right place, but not at every PWM Cycle. Any Idea what i´ve got wrong ?
Did you test the ADC Triggering with your code ? Can you monitor on a port the ADC trigger acting every PWM Cycle?
Thanks a lot for your support
pwm_adc_2b.zip (4.61 KB)