Home > other >  Stm32 serial USART_GetFlagStatus marks an infinite loop
Stm32 serial USART_GetFlagStatus marks an infinite loop

Time:09-26

Stm32 serial USART_GetFlagStatus marks an infinite loop, has been to 0, receiving less than data is how to return a responsibility, what a great god help solve it

CodePudding user response:

What are the signs?

CodePudding user response:

To ask, I also met this problem, a serial port to send logo has been occupied state
While (USART_GetFlagStatus (USART2, USART_FLAG_TXE)==RESET); Infinite loop

CodePudding user response:

refer to the second floor yunleizi response:
to ask, I also met this problem, a serial port to send logo has been occupied state
While (USART_GetFlagStatus (USART2, USART_FLAG_TXE)==RESET); Infinite loop

Excuse me, how to solve??

CodePudding user response:

Use the USART_FLAG_TC , on behalf of the transfer is complete

CodePudding user response:

That is the flag has been setting, corresponding hardware is analyzed,

CodePudding user response:


Data show that you didn't sent out, use the keil debug, see if DR register is to fill in the data
  • Related