Skip to main content
MHyst.1
Visitor II
November 6, 2021
Solved

STM32G030 ADC voltage residual issue

  • November 6, 2021
  • 1 reply
  • 721 views

Hi Almighty Internet & ST

So huge learning curve using MCU STM32G030J6 with ADC

Learned the hard way you cannot use pin 4 for ADC as this is shared by NRST and there is no way to turn off MCU resetting because the bit registers which exist in STM32G031J6, don't exist in STM32G030J6

Don't get me wrong, you can get ADC to work but the moment you push the voltage down below the threshold for NRST the MCU will hang or reset. Because NRST has to be held high to prevent the MCU from rebooting, the ADC reads what the MCU's output voltage is for that pin! kind of makes ADC pointless?!?!

Anyway, I digress a little, it seems there is also residual voltage on pin 7. With the pin having nothing but a 10k ohm resistor shorting the pin to ground, there is obviously a voltage coming from the MCU

The pins I can utilize the full range of the ADC is pin 5 and 6 as there is no residual voltage coming from the MCU.

ST, can you provide light on this issue? Can the full range of the ADC only be used on pin 5 & 6? Or is there some bit registers that I need to be paying attention to in order to disable any other potential functions on those pins that could be causing the MCU to have a voltage output on pin 7?

Any help is appreciated.

Cheers !!!!

Mathew

This topic has been closed for replies.
Best answer by MM..1

3. For the device in SO8N package, the PA0, PA1, and PA2 GPIOs are bonded with NRST on the pin 4. In order not to interfere with device functions, they must not be set in alternate function or in output but remain at all times in input configuration.

Pin7 is part swd maybe need some deinit , you dont show code then ...

And this package is little ...

1 reply

MM..1
MM..1Best answer
Chief III
November 6, 2021

3. For the device in SO8N package, the PA0, PA1, and PA2 GPIOs are bonded with NRST on the pin 4. In order not to interfere with device functions, they must not be set in alternate function or in output but remain at all times in input configuration.

Pin7 is part swd maybe need some deinit , you dont show code then ...

And this package is little ...