- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
wiced_rtos_delay_milliseconds(WIFI_SLEEP_TIME);
wwd_result_t host_rtos_delay_milliseconds( uint32_t num_ms )
{
//WPRINT_APP_INFO(("Timer Start\n"));
if ( ( num_ms * SYSTICK_FREQUENCY / 1000 ) != 0 )
{
if ( ( tx_thread_sleep( (ULONG) ( num_ms * SYSTICK_FREQUENCY / 1000 ) ) ) != TX_SUCCESS )
{
return WWD_SLEEP_ERROR;
}
}
else
{
uint32_t time_reference = host_platform_get_cycle_count( );
int32_t wait_time = (int32_t)num_ms * CPU_CLOCK_HZ / 1000;
//WPRINT_APP_INFO(("Timer Start\n"));
while ( wait_time > 0 )
{
uint32_t current_time = host_platform_get_cycle_count( );
wait_time -= (int32_t)( current_time - time_reference );
time_reference = current_time;
}
}
return WWD_SUCCESS;
}
When using the above function enters the sleep mode, using an external interrupt
Is there a way to wake-up ??
enviroment :
WICED v3.1.1
RTOS ThreadX v5.6
NetX v5.7_sp1
- Labels:
-
Interrupts
-
SDK 3.x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Do you mean, return from the delay prematurely before the time is up, no.
The sleep/delay thread handles the requested delay, depending of the RTOS.
Seyhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Discussion is being locked. If you have any follow-up, please start a new discussion.