AnsweredAssumed Answered

Using STM32FCubeMX HAL Drivers for UART RX with unknown size data

Question asked by bayrak.burak on Jul 4, 2014
Latest reply on Feb 3, 2015 by sobol.andrey
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.

Outcomes