Skip to main content
Visitor II
February 21, 2025
Question

Bootloader UART Issue – STM32G070CBT6 (DFU Works, but No Response via UART)

  • February 21, 2025
  • 2 replies
  • 649 views

Hello ST team,

I am experiencing an issue when trying to access the bootloader via UART on the STM32G070CBT6 and STM32L4R5ZI microcontrollers. When I set BOOT0 = 1, the bootloader works correctly via DFU (USB), but no response is received from the UART interface.

Tests Performed:

  1. Bootloader Activation via Hardware (BOOT0 = 1):

    • When I set BOOT0 = 1 and reset the microcontroller, it successfully enters DFU mode, and it is recognized by STM32CubeProgrammer via USB.
    • However, none of the UART interfaces respond to the 0x7F (Get) command.
  2. Testing Different UART Interfaces:

    • I tested USART1, USART2, and USART3 on both microcontrollers.
    • None of the UART ports respond to the bootloader protocol.
    • Important: I verified the UART communication using an Arduino as a USB-UART converter and a custom software to send and receive data via UART. The UART communication works correctly in this scenario, confirming that the microcontroller's hardware and serial connection are operational.
  3. Reading Bootloader Registers:

    • I developed a software tool to read and modify the registers related to the bootloader (BOOT_SELECT, nBOOT0, etc.).
    • The register values confirm that the settings are being correctly applied and that the System Boot memory is being activated.
  4. Serial Communication Configuration:

    • Tested multiple baud rates: 9600, 115200, 57600, 38400.
    • Used STM32CubeProgrammer, minicom, picocom, and screen on Linux.
    • No response to the 0x7F command, and STM32CubeProgrammer returns a timeout error when attempting to connect via UART.
  5. Readout Protection (RDP) Check:

    • RDP is set to Level 0 (0xAA), ensuring that the bootloader is accessible.

Questions:

  1. Does the bootloader in these models support UART for firmware programming, or only DFU via USB?
  2. Is there any additional configuration required to activate UART communication in the bootloader?
  3. Are there any known limitations in the STM32G070CBT6 and STM32L4R5ZI that could prevent the bootloader from working via UART?

I appreciate your assistance and look forward to your guidance on how to proceed.

Best regards

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    February 21, 2025

    Hello @joao_reis_p2go 

    Is the USB connected when trying to connect with UART?

    Super User
    February 21, 2025

    If the USB DFU bootloader is active (i.e. connected to the computer, not necessarily being used), all other bootloader interfaces are disabled, including UART.