AnsweredAssumed Answered

Terrible Experience with STM32 UART HAL

Question asked by fraser.andrew on Sep 17, 2015
Latest reply on Oct 2, 2015 by chen
I am having no end of difficulty doing even the simplest thing with serial ports.
I am using STM32CubeMX to generate my project which is being compiled by CrossWorks. I try to send a string of text using:

HAL_UART_Transmit( &huart3, ( uint8_t * )"TEST\r\n", 6,0 );

All I get out the serial port is T nothing else !

I also wait for incoming characters using:

 if ( HAL_UART_Receive( &huart3, buff, 1, 0 ) == HAL_OK )

but despite typing characters into the terminal application this function never returns HAL_OK.

So I tried enabling interrupts on UART3 and used:

HAL_UART_Transmit_IT( &huart3, ( uint8_t * )"TEST\r\n", 6 );

Still nothing but if I trace the code through the ISR, it seems to be failing with HAL_BUSY

Does anyone have any idea what I am doing wrong ?