Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_50895
Level 1
Level 1
First like received First like given

Hello,

I am testing an Access Point with the ISM4319_TESTBOARD and the Wiced 2.4.0, I have noticed that when implementing some "for" and "while" loops, my application tends to fail. More specifically my program gets stuck in the loops, On the other hand, these failures are corrected by placing a delay within the loop.

For example:

while (1)

{

    wiced_rtos_delay_milliseconds (100);

}

What is the minimum time for the delay in order to make sure that my application will not fail?

What is this about?

1 Solution
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hi Raf:

       please have a check in the method wiced_rtos_delay_milliseconds , it has a tx_thread_sleep which will set current thread to enter sleep with the time you set,

using this RTOS delay  will let other Threads have chance to run ,  if you used for or while delay , cpu will be held in your main application,  other threads will have no chance to run.   wiced_rtos_delay_milliseconds (1) still can have a thread switch successfully ,  so i think the minimum value is 1ms of the function in current wiced release .

View solution in original post

1 Reply
Zhengbao_Zhang
Moderator
Moderator
Moderator
250 sign-ins First comment on KBA 10 questions asked

Hi Raf:

       please have a check in the method wiced_rtos_delay_milliseconds , it has a tx_thread_sleep which will set current thread to enter sleep with the time you set,

using this RTOS delay  will let other Threads have chance to run ,  if you used for or while delay , cpu will be held in your main application,  other threads will have no chance to run.   wiced_rtos_delay_milliseconds (1) still can have a thread switch successfully ,  so i think the minimum value is 1ms of the function in current wiced release .