Skip to main content
Graduate
December 3, 2024
Solved

Unable to Boot STM32 via UART and Connect Using STM32CubeProgrammer

  • December 3, 2024
  • 3 replies
  • 1640 views

Hi,

I tried booting the STM32F103C8T6 via UART following the boot configuration details from the AN2606 document provided by ST. I have outlined the configuration below.

Sankar_Eswaran_1-1733216894076.png

After setting up the boot configuration, I attempted to connect the STM32's UART using a TTL converter and the STM32CubeProgrammer software (Win64, versions 2.18.0 and 2.5.0). However, I encountered some issues, and I have attached a snippet showing the error.

Sankar_Eswaran_0-1733216815056.png

I also tried connecting an STM32L562E-DK board, but I faced similar issues.

Could anyone help identify what might be going wrong? Your suggestions and advice would be greatly appreciated!

 

Thank you!

 

 

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    December 3, 2024

    Hello,

    1- Are you sure the UART converter is OK? need to tell us how you did check this converter is working well.

    2- How did you set the boot configuration?

     

    Graduate
    December 4, 2024

    Hi,

    Thank you for your response. Here are the details regarding your queries:

    1. TTL Converter:
    The TTL converter is working correctly. Before attempting the boot method, I verified its functionality by running a UART communication test application. The test confirmed that the TTL converter is operating without any issues.

    2. Boot Configuration:
    I followed the bootloader configuration details for STM32F103C8T6 as outlined in the AN2606 document, specifically under the STM32F10xxx devices section. I used Pattern 1 for the boot configuration. Below are the steps and connections I made:

    Boot Pin Setup:
    I set the boot pins as follows:

    BOOT0: High
    BOOT1: Low

    Refer to the attached image for the configuration.

    Sankar_Eswaran_0-1733289841773.png

    boot pin setup:

    unnamed.jpg

      and after TTL side setup as mentioned Bootloader configuration :

    Sankar_Eswaran_1-1733290431463.png 

    Sankar_Eswaran_2-1733291169062.png

     

    TTL Side Setup:
    Following the bootloader configuration guidelines, I connected the TTL converter's TX and RX lines as follows:

    TTL TX -> STM32 USART1 RX (PA10)
    TTL RX -> STM32 USART1 TX (PA9)

    After this setup, I sent the 0x7F command to initiate communication but did not receive any response. Additionally, I could not establish a connection using the STM32CubeProgrammer software.

    Refer to the attached images for further details.

    Sankar_Eswaran_3-1733291209016.png

    Let me know if you need more details or if there are additional steps I should try. Thank you!

     

    Technical Moderator
    December 4, 2024

    Looks like you are using a Blue Pill board. I recommend to use one of the ST boards instead of these Black/Blue (or other colors) Pill boards that most probable have a fake STM32.

     

    Graduate II
    December 4, 2024

    please check the RX side connection as well in your test program. If the controller is not receiving any input it cant transmit. Please disconnect any other UART connections and other external connections to avoid interferences. Check your GND connection to the usb to uart, check the voltage selection to 3.3v for the usb to uart since it comes with 5v TTL and 3.3V ttl. Generally the board works for programming via UART, u less there are some errors in the connection or interfaces. Check the 3.3V using mutltimeter. 

    Graduate
    December 5, 2024

    Thank you all for your responses and suggestions. I appreciate your guidance!

    After following your advice, I was finally able to boot via UART using the STM32 NUCLEO-L053R8 board. It seems that the Blue Pill board I initially used might have some issues, as switching to the NUCLEO board resolved the problem. I successfully booted the STM32 via UART and connected it using the STM32CubeProgrammer, following the bootloader configuration document provided by ST (AN2606).

    Now, I have another query:
    Is there a way to achieve the same UART bootloading functionality without relying on software tools like STM32CubeProgrammer? If you have any insights or suggestions for manual or alternative approaches, I would greatly appreciate it!

     

    Thank you once again for your assistance!