Skip to main content
Graduate II
February 24, 2020
Question

debug breaks when the relays operate. The system continues to run

  • February 24, 2020
  • 2 replies
  • 660 views

I design a PCB with a stm32f407.

Relays come into play shortly after debug starts. sometimes the debug fails and closes when the relay activates. What should I do to prevent the debug from closing?

relays are driven with 24 volts and lm2803.

The st link is connected to the processor by serial wire.

I tried with clone stlink V2 and Stlink V3.

    This topic has been closed for replies.

    2 replies

    Graduate II
    February 24, 2020

    This is EMI, electromagnetic interference. Rething your wiring, try to keep relay and signal line apart and also think where switching current flow and iof switching shifts your grounds.

    Explorer
    February 24, 2020

    Proper decoupling of the MCU power supply from the 24V supply line, proper back EMF suppression near the relay coils, and the driving MCU ouputs.

    Optimally, as little intersection of the relay section with the MCU section on the PCB.