2016-08-02 02:29 AM
hi,
i am using STM32F746G-Disco in that i have receiving a 16 byte of data from other device,which can be get at interrupt .
problem:
i have created two threads for GUI and Uart Thread, in that uart thread i have i amcontinuously polling for uart data has receivedcompletely.
Is there is anypossibility for resume task from whenever complete packet received from interrupt given below.
i have tried below code it was hangs some where can any one help me this issue
regards
rajesh
i have two threads 1. GUI and uart thread
/*
uart thread that resumes from interrupt when data buffer fills in uart RX.
*/
static
void
UartThread(
void
const
* argument )
{
static
uint8_t taskState = FALSE;
if
(taskState == TRUE)
{
taskState = FALSE;
while
(1)
{
HAL_Delay(100);
BSP_LED_Toggle(LED_GREEN);
}
}
else
{
if
(HAL_UART_Receive_IT(&UartHandle, (uint8_t *) aRxBuffer, 16) != HAL_OK)
{
}
else
{
vTaskSuspend(NULL);
taskState = TRUE;
}
}
}
/****
uart rx call back function
*****/
void
HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
if
(huart->RxXferCount == 0x00)
{
vTaskResume(uartTaskhandle);
}
else
{
#stm32f746-uart-and-freertos
2016-08-19 05:42 AM
Hi,
You can insprire from STM32746G-DISCO examples and implement your code within STM32CubeF7 package from this path:
STM32Cube_FW_F7_V1.4.0\Projects\STM32746G-Discovery\Applications\FreeRTOS
Regards