Showing results for 
Search instead for 
Did you mean: 

Unexpected MCU (Microcontroller Unit) behavior during programming

Associate II

I'm using an STM32F411RE MCU to control a DC motor driver, and I'm encountering an issue. Whenever I program the microcontroller using the STM32CubeIDE software, the motor starts operating.

This occurs even when I connect the electronic board to the power supply or press the reset button. I suspect that the STM32 microcontroller is sending a high-level signal to the GPIOs when.

The problem is not consistent; sometimes I can program the microcontroller without any issues, and other times, when I connect the board to the power supply, nothing goes wrong. Do you have any suggestions to prevent these actions from occurring?


GPIO pins are generally in a high-impedance state when the chip is in reset. When these pins are floating, it can lead to either a high or low level.

If you need a specific state, either high or low, add an external pullup or pulldown resistor to those specific pins.


If you feel a post has answered your question, please click "Accept as Solution".