2025-02-13 01:50 AM - last edited on 2025-02-13 02:54 AM by SofLit
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.
2025-02-13 05:00 AM
yes,
2025-02-13 05:06 AM
Right: and you've demonstrated that both UART1 and UART7 work together without FreeRTOS 7 TouchGFX?
So this code works in a standalone project:
HAL_UART_Transmit(&huart1, TxData, 256 , 1000);
HAL_UART_Receive (&huart7, RxData, strlen((char *)TxData), HAL_MAX_DELAY);
HAL_UART_Transmit(&huart7, RxData, strlen((char *)RxData), 100);
?
2025-02-13 05:20 AM
yes, this transmission working fine.
Could you please go through the attached https://controllerstech.com/touchgfx-5-data-from-uart-to-ui/ , based on this i was generated the code and added the code. after you will get idea about task. please go through.
Thanks,
PSR