I have some questions about tickless idle mode in FreeRTOS.
Does systick work in this mode, or systick just stop working when __WFI() has called and work again right after exiting __WFI() ?
Calling the __WFI() to make the MCU enter the low-power mode and using interrupts to wake up the MCU. But in FreeRTOS source code, port.c, as below. Before calling __WFI(), __disable_interrupt() is called. Hence, how can interrupt happen?
__weak void vPortSuppressTicksAndSleep( TickType_t xExpectedIdleTime )
{
...
__disable_interrupt();
if( eTaskConfirmSleepModeStatus() == eAbortSleep )
{
...
}
else
{
...
if( xModifiableIdleTime > 0 )
{
__WFI();
}
...
__enable_interrupt();
...
}
Thanks for your help.