Skip to main content
pratheep
Associate II
February 21, 2018
Question

STM32F429-NUCLEO-144 UART3 IS NOT RECEIVING

  • February 21, 2018
  • 22 replies
  • 3752 views
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.
    This topic has been closed for replies.

    22 replies

    Tesla DeLorean
    Guru
    February 21, 2018
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    February 21, 2018
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    pratheep
    pratheepAuthor
    Associate II
    February 21, 2018
    Posted on February 21, 2018 at 06:10

    this also not working.

    Bogdan Golab
    Lead
    February 21, 2018
    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.

    Bogdan Golab
    Lead
    February 21, 2018
    Posted on February 21, 2018 at 08:22

    Syarted CubeMX and pre-initilaized the board. It seems that USART3 is used as VCOM (frankly I do not have this particular board to verify).

    On nucleo-64 the USART2 is used and it is wired to the ST-LINK to appear as the emulated port.

    Try the VCOM assuming that the UART3 is used. Preinitialize board by the CubeMX when selecting the nucleo-144. The CubeMX 4.24 seems to initiate it.