Skip to main content
Visitor II
March 5, 2025
Question

UART transmission hangs

  • March 5, 2025
  • 4 replies
  • 537 views

When I wrote the code created with CubeMX in the circuit in the attached image and executed it, it hung up at UART transmission.

This is a simple program with one line of additional code.(HAL_UART_Transmit)

What am I doing wrong?

I haven't been able to resolve it for a week.

 

capture.PNG

capture2.PNG

    This topic has been closed for replies.

    4 replies

    Graduate
    March 5, 2025

    To ensure proper user program start, BOOT0 must be at logic LOW - connected to GND directly or via resistor up to 100k.

    Super User
    March 5, 2025

    How do you know it's hung up? What happens when you debug it and step through the code?

    Graduate II
    March 5, 2025

    @SB-RK wrote:

    When I wrote the code created with CubeMX in the circuit in the attached image and executed it, it hung up at UART transmission.


    Very vague. Describe in more detail on what you mean by hung up

    SB-RKAuthor
    Visitor II
    March 5, 2025

    Thank you everyone.
    I solved it by connecting BOOT0 to GND.

    I say hang-up because stepping does not return from HAL_UART_Transmit.

    It was really helpful.

     

    Thank you very much.