cancel
Showing results for 
Search instead for 
Did you mean: 

how to set STM32 HAL FreeRTOS timer period?

Alexander Hoffman
Associate III
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
1 ACCEPTED SOLUTION

Accepted Solutions
Alexander Hoffman
Associate III
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.

View solution in original post

3 REPLIES 3
Alexander Hoffman
Associate III
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.

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
Posted on December 01, 2017 at 07:06

Hi! We can set the interval by calling the function named  osTimerStart().