2014-06-16 12:08 PM
Hi,
I'm having a very difficult time getting FreeRTOS v8 to run with CUBE/HAL. I started out using CUBE to generate a basic example for an ADC input configuration, and a timer that will count up (or down) and execute an interrupt handler. I can seem to get that to work, but when I add in FreeRTOS, it will not run. As soon as the Timer Init function is run, it will not allow the FreeRTOS scheduler to operate. In addition, when CUBE generates the ''void SystemClock_Config(void) '' function, it has this assignment: RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2; If the first type (RCC_CLOCKTYPE_HCLK) is not removed, the timer interrupt will not function or initialize at all. To get FreeRTOS to run, I must comment out the Timer Init (in other words, don't run it at all) FreeRTOS operates with no problem. In addition, after creating the example in CUBE and adding FreeRTOS (what it calls ''middlewares'') it generates the file ''FreeRTOSConfig.h''. At the bottom of the file there is a commented out define for the FreeRTOS xSystickHandler. It warns to NOT un-comment it as it will break the HAL systick. I'm hoping someone can shed some light on these mysteries please? Could anyone in this forum provide a working example of how to configure when using both HAL and FreeRTOS? Thank you... #timer #clock #hal #freertos2014-06-18 12:35 AM
Hi,
Try to set timer's interrupt priority lower than configMAX_PRIORITIES.2014-07-21 08:02 AM
Please note we don't support FreeRTOS v8 yet (v7.6 is supported).
There is a known issue that shall be patched manually for now (stm32fxxx_it.c). Please confirm if this solves your issue: Best Regards