2021-09-03 05:22 AM
Hello
Our STM32G4 is measuring a sinus-ADC value with offset. The offset is at VDDA/2.
Our ADC measurement shows a plateau at the offset, even, when the sinus signal is crossing the VDDA/2 (see attached picture).
The signal them self seems to be ok (measured by a KO).
Is there an ADC issue? Any hint, what this could be effected?
Settings from the ADC not ok?
thanks for your reply
Solved! Go to Solution.
2021-09-03 07:43 AM
This is consequence of inadequate (too high impedance) VDDA/VREF+ or even VSSA.
Read the 'G4-specific ADC appnote.
JW
2021-09-03 07:43 AM
This is consequence of inadequate (too high impedance) VDDA/VREF+ or even VSSA.
Read the 'G4-specific ADC appnote.
JW
2021-09-03 08:42 AM
@Roland Gmünder Yes, this defect happened to me too. I was using the ADC's asynchronous clock and it was set to clock the ADC at 56.666 MHz (which would be lower than the maximum of 60 MHz with Vdd = 3.3V), but I had the flaw.
Furthermore, the same problem can be obtained on the NUCLEO-G474 board, so I believe that it should not have problems with impedance on the supplies VDDA/VREF+ ;)
I solved the problem by reducing the clock frequency to the ADC: I had to go down to 42.5 MHz to no longer have that step at 2048. Try it too.
I am curious to hear the response from STM employees.
Andrea.
2021-09-07 04:26 AM
Hello both
thanks for your support.
I checked both solutions and both will bring me to the expected behavioral. :grinning_face:
The reduce from the clock is one solution, but we may need more speed.
The VDDA has a good impedance. The VREF+ has a "long" track to the first cap.. so I added there a 10n//1uF to the uC-pin and then the ADC value was also good!
Finally probably I'll implement both solutions. =) :thumbs_up:
So thanks for your quick and valuable support!!
Roland
2021-09-07 06:03 AM
@Roland Gmünder
"The VREF+ has a "long" track to the first cap"
How many millimeters is this "long distance" that you wrote?
I have a distance of about 5 millimeters from the pin (VddA or Vref +) and the pair of capacitors 100nF//4.7microFarad but I have the same problem as you.
Andrea
2021-09-07 06:19 AM
Hey Andrea
The track from the voltage source to the microcontroller pin is about 20mm long. There is currently no cap between. I added a 10nF//1uF colse to the microcontroller.
Have you checked the Application Note?
Section 4.2 -> Figure 20
Roland
2021-09-07 07:18 AM
Hi Roland,
if you have 20mm track length without any capacitors then it is obvious that you may have this problem. But in my situation the pair of capacitors (100nF // 4.7uF) has the trace length of only 5mm, so I didn't expect to have such problems.
Also I do not understand why the defect is highlighted only around half scale (2048 units) and not in other points of the conversion.
Yes, I have seen that AN and I confirm that I have decoupling capacitors on both pins.
Andrea.
2021-09-07 09:42 AM
> Also I do not understand why the defect is highlighted only around half scale (2048 units) and not in other points of the conversion.
The answer lies probably in the minute details of the ADC design. and might have to do something with the fact that the switched capacitor ADC revolves around VREF/2.
JW
2021-09-07 02:28 PM
It is because the switch from 0x7FF to 0x800 involve many bits, which produces a glitch on poorly decoupled power supplies.