If this is a problem of the thread time slice, please try a function "void CyU3PThreadRelinquish ( void )"
184.108.40.206 void CyU3PThreadRelinquish ( void )
Relinquish control to the OS scheduler.
This is a RTOS call for fair scheduling which relinquishes control to other ready threads that are at the same priority
level. The thread that relinquishes control remains in ready state and can regain control if there are no other ready
threads with the same priority level.
Current thread will be suspended by calling this function.