This question is specifically targeted to a RTOS -- ThreadX.
We are using it for our project. Problem with this is default RTOS tick time is 10ms which is very high. We need to change it to 1ms.
Has anyone used this RTOS?
(For Ref:ThreadX PPT
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It only takes a minute to sign up.Sign up to join this community
From what I can tell from the PPT you linked, you are responsible for setting up the hardware timer that generates the tick interrupt and therefore you can set it to whatever value you like. My primary reference is slide 66 in the PPT which says:
The System Tick Rate is set with #define
BSP_TICKS_PER_SECOND which defaults to 100
But chaning the #define won't change the period - altering the period register for the timer you're using will. Once you do that you'll have to change the #define to keep it consisten with the new period.
Tick time depends on how many threads you want to execute and at what frequency.
If you keep the tick time to 1mS make sure all the threads will execute in the defined tick time else you may have to place
tx_sleep() in all high priority tasks so that low priority tasks get a chance to execute.
So you may have to synchronize your tasks accordingly by either events/semaphores and
You need to go to
tx_initialize_low_level.s, and in line 56 change
1000 to set
SYSYTICK_CYCLES to 1000MHz (1 tick = 1 ms).
Edit: Don't forget to recompile the ThreadX project and put the new library instead of the old one your project has been using, otherwise the changes won't be made!