Dear All
I have PWM modules being switched at 20Khz.
1. I want to Sample ADC at 10Khz, (synchronized with PWM) and I can achieve that by ADC and CTU. (Achieved)
2. I want to Etimer at 20Khz sysced with PWM(toggle up and down at 10 kHz) (need help)
My problem is that I want ETIMER at 20Khz, which has to be synced with the same PWM and seems to be impossible to have both, ADC at 10KHz and ETIMER at 20KHz.
Is it possible to have ADC Sampling at 10Khz and Etimer at 20Khz synced with the same PWM (switched at 20Khz)?
Best Regards,
Abhishek
constantinrazvan.chivu -> for you maybe.
Solved! Go to Solution.
Hello abhishek.kumar@chassisbrakes.com,
I think the workaround you've found is fine since in this scenario (ETIMER sync with PWM and half ADC frequency conversion). You simply ignore the odd conversion. Probably another method was to enable an eTimer interrupt in which you enable or disable the Fifo interrupt request. But in this case you will still have an interrupt to handle and the conversion still has place. So keep it like in the model attached because it seems to work as expected.
Besr Regards,
Marius
Dear mariuslucianandrei
Sorry for delayed response.
The question still stays. We momentarily solved using state machine where we only accept the results from ADC every alternate reading but the conversion is still happening.
Please let me know if there is a smarter solution.
Best Regards,
Abhishek
Hello abhishek.kumar@chassisbrakes.com,
I think the workaround you've found is fine since in this scenario (ETIMER sync with PWM and half ADC frequency conversion). You simply ignore the odd conversion. Probably another method was to enable an eTimer interrupt in which you enable or disable the Fifo interrupt request. But in this case you will still have an interrupt to handle and the conversion still has place. So keep it like in the model attached because it seems to work as expected.
Besr Regards,
Marius