Hi,
Do you use software triggering or hardware triggering?
If you use software triggering mode, you configured to have reloading event to fire interrupt, in the reloading ISR, you set the ADC SRART bit to launch a ADC conversion. In the process, The SMxCTRL[LDFQ] controls the frequency, if you want to trigger ADC for each PWM, set the LDFQ=0.
If you use hardware triggering mode, for example, the PWM generates triggering signal via SMxTCTRL register, then the signal triggers ADC via cross-bar.
Pls refer to 27.3.22 Output Trigger Control Register (SM0TCTRL - SM3T
CTRL). If you use hardware triggering mode and want to trigger ADC for each PWM cycle, I suggest you clear the SMxTCTRL[TRGFRQ] bit, otherwise, the LDFQ also controls the triggering frequency.
If you toggle a GPIO in ADC ISR, note if the PWM is 50khz, the GPIO frequency is 25Khz when each PWM cycle triggers ADC.
Hope it can help you
BR
XiangJun Rong