Skip to main content
Explorer II
December 19, 2023
Solved

Problem with switching pins

  • December 19, 2023
  • 3 replies
  • 1990 views

Hi to all!
I have the following question: why do the relays in the circuit start switching when I connect the STM32F1 microcontroller to the computer through the programmer?
And similar happens when I initialize RCC. As if all the contacts are being checked and the relays are starting to switch.
What could be the problem?
I will be grateful for the answer!

    This topic has been closed for replies.
    Best answer by Imen.D

    Hello @Embedded_dev1,

    Check the configuration and reset state of the pins.

     

    3 replies

    Super User
    December 19, 2023

    1. show your circuit - i cannot see it clear in my blue glass ball...

    Imen.DAnswer
    Technical Moderator
    December 19, 2023

    Hello @Embedded_dev1,

    Check the configuration and reset state of the pins.

     

    Explorer II
    December 20, 2023

    Ok, thank you!

    Visitor II
    December 19, 2023

    The relays switching during STM32F1 microcontroller connection may result from default GPIO states during initialization. Ensure proper pull-up/down resistors to prevent undefined states. When initializing RCC, check for inadvertent GPIO state changes and add delays or debouncing if necessary to stabilize signals during startup.

    Explorer II
    December 20, 2023

    Thanks for the answer!