Skip to main content
AxB
Visitor II
June 7, 2023
Question

STM32L451 not able to DFU program over USART2

  • June 7, 2023
  • 2 replies
  • 1306 views

Hello,

I am using the STM32CubeProgrammer attempting UART connection to the device, but fails with this error. I would greatly appreciate any guidance or suggestions you may have. See below for additional details about the setup.
_legacyfs_online_stmicro_images_0693W00000dDL8cQAG.png 

  • MCU is STM32L451REY
  • Peripheral on the MCU is USART2
  • Main flash is erased
  • The Boot0 pin (PH3) was pulled down

According to the Reference Manual, this state should have activated DFU in System Memory. I could attach debugger (Serial Wire) and confirm the CPU is running the instructions in System memory.

BTW USART2 works fine - verified with a simple program into main flash and communicate with the Host. At this point, I am wondering if there is something more needs to be done to activate DFU.

Thank you

Praveen

This topic has been closed for replies.

2 replies

TDK
Super User
June 9, 2023

> I could attach debugger (Serial Wire) and confirm the CPU is running the instructions in System memory.

Okay, so it is in the bootloader somewhere.

Is it attached via USB? If so, the USB DFU bootloader will start and it will ignore input on USART2. Similarly, if other bootloader inputs are active, it may switch to those.

Note: "DFU" is a USB-specific bootloader. You're not trying to do this, but to connect via USART2, right?

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
June 9, 2023

USART:COM != DFU:USB

The system loader has very specific pin and uart expectations, see AN2606

Noise on other pins of interest will take precedence, both in terms of the pins/ports used, and the auto-bauding of speed.

You can't have a GNSS receiver, or MODEM, squawking at startup, the STM32 will see this as "first-contact"

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..