cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429-NUCLEO-144 UART3 IS NOT RECEIVING

pratheep
Associate II
Posted on February 21, 2018 at 04:06

Hi,

I amUsing STM32F429-NUCLEO- I write the code for UART3 transmit/receive (poling method) and the board is transmitting but the data is not receiving. Pls help me to fix the issue.

Find the attached source code

Thanks,

Note: this post was migrated and contained many threaded conversations, some content may be missing.
22 REPLIES 22
Posted on February 21, 2018 at 05:00

...

/* Infinite loop */

/* USER CODE BEGIN WHILE */

HAL_UART_Transmit(&huart3, pbufftx, strlen(pbufftx), 0xFFFF);

while (1)

{

// Perhaps use the debugger as see what != HAL_OK values are returned

if(HAL_UART_Receive(&huart3, pbuffrx, 1, 0xFFFF)==HAL_OK)

{

HAL_UART_Transmit(&huart3, pbuffrx, 1, 0xFFFF);

}

/* USER CODE END WHILE */

/* USER CODE BEGIN 3 */

}

/* USER CODE END 3 */

...

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 21, 2018 at 05:15

Alternative

while (1)

{

  if (USART3->SR & 0x20) // RXNE

    USART3->DR = USART3->DR; // Echo

  if (USART3->SR & 0x0F) // Errors

    USART3->DR; // Clear

}
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 21, 2018 at 06:10

this also not working.

Posted on February 21, 2018 at 06:24

Perhaps it is not actually receiving data? Don't open a peripheral view of the USART in the debugger.

Check GPIO settings in debugger.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 21, 2018 at 06:56

0690X00000609lFQAQ.png Gpio settings are correct(PD8 and PD9 is used for USART) 

Still no data receiving

Posted on February 21, 2018 at 08:19

It's nucleo board so you should be able to use the VCOM - does it work fine? It eliminated external UART-to-USB converter as ST-LINK provides this feature.

Posted on February 21, 2018 at 07:41

receive process ends with hall time out ;(

Posted on February 21, 2018 at 07:55

Connect TXD with RXD using a wire (simple testing loop), send a few char and after receiving a char switch on a LED. Just to eliminate the cabling issue (not sure what you are connecting the uart3 to).

Second, does it imply that other uarts work fine?

Posted on February 21, 2018 at 08:11

I have verified the cable connection with PC and it is correct. The nucleo board can transmit data but not receiving and always exit with time out. I tested UART2 and 3 both are behaving same.

The simple testing loop also not working.