Skip to main content
Visitor II
February 13, 2025
Question

How to display the uart data on stm32f429i eval board?

  • February 13, 2025
  • 1 reply
  • 1464 views

Hello ST,

 I'm trying  to display the uart data on stm32f429i(MB1046) eval board GUI, followed below link as 

https://controllerstech.com/touchgfx-5-data-from-uart-to-ui/,

 
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)

{

RxData[Size] = '\0';

if (osMessageQueueGetSpace(uartQueueHandle)>0)

{

strncpy (uartData_q->Data, (char *)RxData, Size+1);

uartData_q->size = Size+1;

osMessageQueuePut(uartQueueHandle, &uartData_q, 0, 0);

HAL_UART_Transmit(&huart1, uartData_q->Data,uartData_q->size , 1000);

}

HAL_UARTEx_ReceiveToIdle_IT(&huart1, RxData, 256);

}

void StartDefaultTask(void *argument)

{

/* USER CODE BEGIN 5 */

HAL_UARTEx_ReceiveToIdle_IT(&huart1, RxData, 256);



/* Infinite loop */

for(;;)

{

osDelay(1000);

}

/* USER CODE END 5 */

}

This code added in main.c but uart  receive interrupt is not working.

could you please help me to develop.


Thanks& Regards,

PSR.

    This topic has been closed for replies.

    1 reply

    Super User
    February 13, 2025

    Please see How to insert source code.

     

    @PSR1 wrote:

    code added in main.c but uart  receive interrupt is not working..


    Before getting into the extra complications of interrupts, have you proved basic connectivity with a simple polled read?

    Do this first in a standalone project - no TouchGFX.

    https://wiki.st.com/stm32mcu/wiki/Getting_started_with_UART

    https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Step3_Introduction_to_the_UART

    https://community.st.com/t5/stm32-mcus/implementing-uart-receive-and-transmit-functions-on-an-stm32/ta-p/694926 

    PSR1Author
    Visitor II
    February 13, 2025

    Hello Andrew Neil,

    Thanks for supporting, as you mentioned i have done but the i'm facing the issue as to integrate the touch gfx designer generated FREERTOS code, 

    HAL_UART_Transmit(&huart1, TxData, 256 , 1000);

    i added above line in main.c , The TxData is showing on teraterm.

     

    Thanks & Regards,

    PSR.

    Super User
    February 13, 2025

    So you have confirmed that both Tx & Rx work in a simple standalone project without TouchGFX or FreeRTOS?