Skip to main content
Alexander Hoffman
Associate II
August 9, 2017
Solved

how to set STM32 HAL FreeRTOS timer period?

  • August 9, 2017
  • 3 replies
  • 3032 views
Posted on August 09, 2017 at 15:21

I am working with the HAL RTOS generated through cube and generally speaking, so far so good. I am used to using FreeRTOS but am a little stumped with this HAL RTOS, more specifically the timers. I have generated the code from cube and it looks exactly like the example code here (pg 20)

http://www.st.com/content/ccc/resource/technical/document/user_manual/2d/60/ff/15/8c/c9/43/77/DM00105262.pdf/files/DM00105262.pdf/jcr:content/translations/en.DM00105262.pdf

 

My problem is that I don't know how to set/adjust a timer's period, as the osTimerCreate function does not take a period like the classic FreeRTOS function xTimerCreate.

Cheers

#rtos #timer
This topic has been closed for replies.
Best answer by Alexander Hoffman
Posted on August 09, 2017 at 16:51

Figured it myself, it was a problem with the configTIMER_TASK_PRIORITY in the RTOSconfig. Once it was increased both the OG xTimerCreate and HAL methods worked.

3 replies

Alexander Hoffman
Alexander HoffmanAuthorBest answer
Associate II
August 9, 2017
Posted on August 09, 2017 at 16:51

Figured it myself, it was a problem with the configTIMER_TASK_PRIORITY in the RTOSconfig. Once it was increased both the OG xTimerCreate and HAL methods worked.

andy b
Senior
August 9, 2017
Posted on August 09, 2017 at 20:55

Hi Alex

Happy to see that you were able to find the solution to your problem.Could you hit the ''mark as correct'' button next to your comment ?(usually in upper right corner) This will inform others that you have solved your problem.If someone else has a similar problem they will know this post contains a possible answer.

-Andy