STM32F4 Cube and FreeRTOS Don't Cooperate
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-16 12:08 PM
Posted on June 16, 2014 at 21:08
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 #freertos
Labels:
- Labels:
-
FreeRTOS
-
RCC
-
STM32Cube MCU Packages
-
TIM
This discussion is locked. Please start a new topic to ask your question.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-06-18 12:35 AM
Posted on June 18, 2014 at 09:35
Hi,
Try to set timer's interrupt priority lower than configMAX_PRIORITIES.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-07-21 8:02 AM
Posted on July 21, 2014 at 17:02
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