STM32 Pin reading high even when it's not on development boards.
- Alessandro Nardinelli
- Feb 11
- 1 min read
You may encounter an issue when developing for the STM32 microcontroller using STM32 development boards where a pin that is configured for reading on a General Purpose Input/Output (GPIO) reports a high state even when it is not physically connected to any circuit. This can lead to significant difficulties when developing for the target. In my specific use case, this behavior resulted in an LED flashing when the jumper was not bridged, leading to confusion and misinterpretation of the system's status.
It took me more than a week to understand what was happening because debugging step by step using the STMCubeIDE always resulted in the expected functionality.
I believe such an issue can arise due to floating inputs and/or electrical noise, mainly if the board is sitting on an isolator.

In the above image, my board was standing on my neoprene mat, which somehow was causing an issue. Given this, I inserted my board into the breadboard, and the problem got fixed.

To fix this please make sure to implement pull-up or pull-down resistors in your design to ensure that the GPIO pin has a defined state when it is not actively driven by an external signal, or, if you are using a development board (in my case the NUCLEO-F411RE), make sure to place the board in a breadboard and connect GND.
コメント