This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
I want to trigger an ADC conversion with every pulse of the PWM signal created by the TIMA0.
Therefore I set the timer as event publisher and the ADC as event subscriber for the triggering which seems to work well.
Following information I can find for the ADC in AUTO sampling mode for event triggering:
•In single channel single conversion, ENC is cleared when conversion is over • For repeat and sequence modes, ADC waits for HW trigger or automatically starts the next conversion based on TRIG setting
For me it sounds that only in single channel mode the ENC would be cleared when the conversion is over.
I use sequence mode and would have expected that I do not need to set ENC bit again after each HW trigger.
But the behavior I see is that the first AD-conversion is triggered by the HW trigger, but then no more because the ENC bit is reset.
Is the observed behavior correct?
If yes, I do not really understand what sense it makes to manually set the ENC bit every time in SW when I want to use HW triggering. Could someone please explain?
Thank you in advance!
Regards,
Holger
Hi Holger,
In single mode, the ENC bit will reset automatically when convert finished.
You can try to set ADC to repeat mode, and then set this bit to 1 to keep next ADC convert will triggered by event:
Thanks!
Best Regards
Johnson
Hi Johnson,
thank you for your reply! This solves my issue.
It was not entirely clear for me when reading the refernce manual.
Regards,
Holger