Hi
Im trying to implement LPDS on a CC3235S using the following implementation
Power_enablePolicy();
UART2_rxDisable(g_uart1_handle);
uint32_t Timeout = HIBINTERVAL * 1000;
struct timespec abstime;
clock_gettime(CLOCK_REALTIME, &abstime);
if(abstime.tv_nsec < 0)
{
abstime.tv_sec = Timeout;
return (sem_timedwait(&app_CB.WoBtnSleepSem, &abstime));
}
/* Add the amount of time to wait */
abstime.tv_sec += Timeout / 1000;
abstime.tv_nsec += (Timeout % 1000) * 1000000;
abstime.tv_sec += (abstime.tv_nsec / 1000000000);
abstime.tv_nsec = abstime.tv_nsec % 1000000000;
sem_timedwait(&app_CB.WoBtnSleepSem, &abstime);
UART2_rxEnable(g_uart1_handle);
and syscfg file
However, the device do not wakeup on timer after HIBINTERVAL sec just sleeping forever, only when posting the semaphore app_CB.WoBtnSleepSem the device wake up. When changing the syscfg to the one below the device start to wakeup on timer after HIBINTERVAL sec, the difference in syscfg file is the enable/disable of Enable GPIO Wakeup LPDS.
Is this a expected behaviour? Or is it something in my implementation that is wrong?
Regards Tomas