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!!
The test was conducted at first on a fresh chip. where there is no firmware flashed (ideally). After flashing the firmware, I erased it using the STM32 Cube Programmer software, where you have the option "FULL CHIP ERASE".
How is the aforementioned actions on multiple pins (analog, digital) can be explained by the bootloader? It will be great if I can have some information on this.
And did you try the same test also after erase?
> How is the aforementioned actions on multiple pins (analog, digital) can be explained by the bootloader?
As I've said "maybe in some devious way", i.e. not running "normally".
How is BOOT0 pin connected, and how are the option bits set?
> And did you try the same test also after erase?
Yes. I tried it after performing a full chip erase. I performed such operation on three different test setups with similar configuration of GPIOs mentioned in the description. The result was same on all the three.
> As I've said "maybe in some devious way", i.e. not running "normally".
Should I contact a FAE regarding this, inorder to obtain more information? Or do you have any other suggestions regarding this?
> How is BOOT0 pin connected, and how are the option bits set?
The BOOT0 pin is held high on two test setups during startup and then changed to LOW manually. Since I have plans to use this pin for other peripheral (CAN), I held this high to simulate the pull-up resistor inside a transceiver.
On another sensor, it is left floating.
Since we are speaking about µC without any firmware from my side, does the option bits have a role to play here? I thought it can only be set in the firmware.
During flash process, the following bits are used.
nSWBOOT0 = 0
nBOOT1 = 1
nBOOT0 = 1
I think your answer already makes sense.
Eventhough it has been specified that the BOOT0 pin shall be used for other purposes, its state during startup makes a great influence on the other pin behaviours. I repeated the tests where all the three test setups had the BOOT0 connected directly to GND, and the behaviour is normal.
I tried to pull it down with 1k ohm resistor, but it did not help me. I had to connect it directly to the GND at the startup to have a normal behaviour, and then can switch states as per my wish on this BOOT0 pin.