Skip to main content
Mabou.1
Associate II
September 18, 2023
Question

Unexpected MCU (Microcontroller Unit) behavior during programming

  • September 18, 2023
  • 1 reply
  • 945 views

Hello, 
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?

This topic has been closed for replies.

1 reply

TDK
Super User
September 18, 2023

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""."