cancel
Showing results for 
Search instead for 
Did you mean: 

UART transmission hangs

SB-RK
Visitor

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

4 REPLIES 4
gbm
Principal

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
Guru

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

@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

Don't worry, I won't byte.
TimerCallback tutorial! | UART and DMA Idle tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.
SB-RK
Visitor

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.