STMG431 RBT6 - ADC sync does not seem to work as per manual
Hi,
i am testing the ADC at the moment, and the values i get out of it look pretty good. Except, when using a squarewave.
See my video:
https://www.youtube.com/watch?v=TmKADM2yQvU
The manual states for having the ADC run from AHB clock: "... has the advantage of bypassing the clock domain resynchronizations. This can be useful when the ADC is triggered by a timer and if the application requires that the ADC is precisely triggered without any uncertainty ...". But as can be seen, there is an issue, as the blue signal (which represents the bits of the adc - derived from tim2 pwm) does some "steps" over a period of about 1.3us. It does not so when inputting a triangular wave.
Anyone has experience here? Or any idea? I have already changed from checking the ADC measure from NOPs in a loop to PWM, to rule out any delays in code execution. But it still looks, like there is no precise triggering of the ADC.
I would expect the ADC value (blue pulse) to step up at one point.
Edit:
I made another screenshot, where it probably is easier to comprehend whats happening: Steep signals create artefacts in the measurement of unknown source.
