Hi @Michael Fowler thank you for posting this question here. The documentation states that the tx_thread_sleep
is using timer_ticks as an input parameter which is of type ULONG.
UINT tx_thread_sleep(ULONG timer_ticks);
I believe the value 2 set to the function does not translate to 2 seconds. I could not find any information on the documentation that denotes how the timer_ticks denote time. I suspect the timer_ticks might be in milliseconds. I will check this with our team and provide more information on this.
The example provided in the section https://video2.skills-academy.com/en-us/azure/rtos/threadx/chapter4#example-66 uses the value 100 as an input parameter for the function. Please refer the below code
UINT status;
/* Make the calling thread sleep for 100
timer-ticks. */
status = tx_thread_sleep(100);
/* If status equals TX_SUCCESS, the currently running
application thread slept for the specified number of
timer-ticks. */
Can you try setting a higher value such as 2000 and see if you notice the same behavior in the code?
Please let us know if the above feedback helps.