I am currently migrating from STM32F303x to STM32G431x microcontroller (48-pin package) and started testing the GPIOs in reset state, without any firmware on-board. Also, there are no external HW circuitries connected to the pins (I meantioned in my description below). The power pins are connected with voltage supplied from a 3.3V LDO, without any high noise on the lines.
The NRST pin is connected to GND with a 100nF capacitor.
I observed some strange behaviour which I could not get an answer from the datasheet/application note/presentations and I would like to post here and get some answers, possibly.
The following documents were referred before I posted the question here.
I might have missed something from these references. It will be great if you can provide me some insights into them. Thanks!!
You didn't mention to have a capacitor connected to NRST - it is not a power pin.
Apart from that, what do you mean by "PA2 is connected to VDD" - if PA2 is not connected, then pin PA2 on the STM32G431 is in Analog Mode (see RM0440, GPIOx_MODER). Have you measured this apparent connection and if so, how?
How do you control PA5?
The points mentioned in the description are all questions from my side. I meant PA2 is "tied" to VDD and not connected (by me). The PA2 has a serial resistance of < 10 ohms with VDD. Ideally, it should be in analog mode but apparently it isnt.
I should've rephrased my description as -> The pins I mentioned in the description has no external connection to any HW circuitry. I do not control any pins at all ! I just observe the state using multimeter device.
However, you can also measure anything with multimeters, so it is always important to pay close attention to the conditions. In this case, it would be the type of multimeter (depending on this, the resistance measurement is carried out with a different measuring voltage and possibly a different measuring current) and the polarity of the measurement. For example, you may have measured the parasitic diodes between GPIO and VDD.
Thanks for the response. If PA2 is analog input indeed, and if I am measuring not at the right place, the current consumption shoots up to >60 mA, when I try to short PA2 to GND. If it is analog input, this should not happen, right?
The same goes with the pins I mentioned as "tied" to VDD.
This is absolutely not normal, so something seems to be wrong - the housing maybe turned 90° or the STM32G431 defective or a fake?
The housing is in the right direction and I got the sample from an official distributor of ST microcontrollers. I tried to flash the µc with a valid firmware, where I used the PA2 to measure some incoming analog signal and the measurement is working fine indeed. The problem happens only when the µC is powered on, and there is no firmware on it.
> there is no firmware
After being erased? How?
While the 'G431 has bootloader entry Pattern 15 per AN2606, and that does not contain "flash empty", I wouldn't be surprised if you see bootloader in action, maybe in some devious way.
How is BOOT0 pin connected, and how are the option bits set?