AnsweredAssumed Answered

Trasmitting through UART

Question asked by fraser.andrew on Sep 23, 2015
Latest reply on Sep 24, 2015 by fraser.andrew
I am trying to transmit a string of characters through USART3 of a STM32F215RG using the code below. If I run this code, I see no output on my terminal. If I single step through this code I see all characters on the terminal. If I replace the wait for TXE to go high with a HAL_Delay(1), I see all characters on the terminal. What am I missing ?

01.char textbuff[32];
02. 
03.strcpy( textbuff, "Hello\r\n" );
04. 
05.for ( i = 0 ; i < strlen( textbuff ) ; i++ )
06.{
07.   while ( USART3->SR & UART_FLAG_TXE == 0 )
08.      ;
09. 
10.   USART3->DR = textbuff[ i ];
11.}

Andy

Outcomes