cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 FreeRTOS HAL_Uart_Transmit_IT Frame Error

konsolplus
Associate
Posted on October 27, 2016 at 08:22

Helllo,

Create a SW4STM32 project using Cubemx. Project in UART, freertos and lwip. I use the task with hal_uart_transmit_it not work.The give a framing error. Added ioc file

void
StartDefaultTask(
void
const
* argument)
{
/* init code for LWIP */
MX_LWIP_Init();
/* USER CODE BEGIN 5 */
/* Infinite loop */
uint8_t buffer[] = { 0x01 , 0x02, 0x33 };
for
(;;)
{
osDelay(1);
HAL_UART_Transmit_IT(&huart1, buffer, 3);
}
/* USER CODE END 5 */
}

0690X00000603CxQAI.jpg #- #!stm32 #!freertos #!uart
1 REPLY 1
Walid FTITI_O
Senior II
Posted on October 27, 2016 at 12:58

Hiyildirim.yi_it,

Try de defined a global buffer and not a local one. And pass a pointer to data buffer in the HAL_UART_Transmit_IT() like following:

HAL_UART_Transmit_IT(&huart1, (uint8_t*)buffer, 3);

-Hannibal-