About the interrupt enablel/disable in 'FreeRTOS_LowPower_LPTIM'
In the ST's example about the use of LPT with RTOS (STM32Cube_FW_L4_V1.15.1\Projects\B-L475E-IOT01A\Applications\FreeRTOS\FreeRTOS_LowPower_LPTIM). In the function 'vPortSuppressTicksAndSleep()', the interrupt is disabled as below:
/* Enter a critical section but don't use the taskENTER_CRITICAL() method as
that will mask interrupts that should exit sleep mode. */
__asm volatile ( "cpsid i" );
__asm volatile( "dsb" );
__asm volatile( "isb" );I'm a little confused by the comments and the code. Per freeRTOS's docs, the code here should disable the interrupt but left the interrupts which will bring the MCU out of sleep enabled. Apparently, the code above will disable all the interrupts. But the comment say it doesn't use 'taskENTER_CRITICAL()' because it will mask the interrupts will make MCU exiting sleep, right? Then who will disable more interrupts? 'taskENTER_CRITICAL()' or 'cpsid i'???????
