Skip to main content
Associate
March 5, 2025
Question

UART transmission hangs

  • March 5, 2025
  • 4 replies
  • 1786 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

gbm
Super User
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.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
TDK
March 5, 2025

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

"If you feel a post has answered your question, please click ""Accept as Solution""."
Karl Yamashita
Principal
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

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
SB-RKAuthor
Associate
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.