tx_thread_sleep hangs with non-zero parameter

I’m having an odd problem when I call tx_thread_sleep. If I pass it anything other than zero, it hangs forever. Any ideas on what I’m doing wrong?

I’m using:
Digi ESP for NET+OS
Version: 1.4.0
Build id: 03132009 NET+OS 7.4.2

1 Like

Where are you in your code, when this happens? Are you in an ISR or otherwise in interrupt context?

Nope, just in the normal loop.

After some experimenting, it appears I caused the problem when I created another thread. Its looking like it takes priority over the root thread & never relinquishes the processor.

Hi i am facing the same issue for quite a while now. Could you tell me why does the low priority thread you created take priority over the root thread automatically and never relinquishes the processor? In Debug mode the processor hangs after I execute the tx_thread_sleep(1) line, so i have no way of knowing if the other thread has taken control of the processor or not.