STMG431 RBT6 - ADC sync does not seem to work as per manual
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-08 3:36 AM - edited ‎2024-05-08 8:38 AM
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.
Solved! Go to Solution.
- Labels:
-
ADC
-
STM32G4 series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-08 10:37 AM
I found the cause:
I had oversampling on. This, the fact, that the Rigol DG800 could not be used as one would need (could not sync anything with the backside plugs - and much more issues), and that the scope also has its capture and processing "rhythm", most likely caused the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-08 10:37 AM
I found the cause:
I had oversampling on. This, the fact, that the Rigol DG800 could not be used as one would need (could not sync anything with the backside plugs - and much more issues), and that the scope also has its capture and processing "rhythm", most likely caused the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-08 1:18 PM - edited ‎2024-05-08 1:26 PM
Now i have finished the research:
- It works as in the manual stated.
- The results could be quantified.
AHB freq is 42.5MHz.
The triangular wave is 25kHz with 1% sym.
Blue trace is pwm from timer 2 at 170Mhz -> timer tics = adc bits
