Question
Using STM32FCubeMX HAL Drivers for UART RX with unknown size data
Posted on July 04, 2014 at 11:13
Hi;
I want to receive unknown size data from uart with isr. The problem is STM32CubeMX generated HAL UART libraries want to know incoming data size for buffer. Is there any solution other than writing my own isr routine for this problem ? STM32CubeMX always owerwrite ''void USART3_IRQHandler(void)'' and i cannot insert my code there. This is not good practice if i need to regenerate my config in CubeMX. And there is another problem involving FreeRTOS systick. Stm32FCubeMX generated code below not working correctly and cause hard fault./**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
xPortSysTickHandler();
HAL_IncTick();
}
Thus i always modify this code to get it work like this.
/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
if (xTaskGetSchedulerState()!=taskSCHEDULER_NOT_STARTED)
{
xPortSysTickHandler();
}
HAL_IncTick();
}
Thanks.
#receiver-timeout-api-stm32f0