Standby mode doesn't reduce the power consumption in stm32l4, using RTOS uCOS-III
I'm using the stm32l4 MCU with uCOS-III RTOS. The system frequency = 2MH using the MSI internal clk. I'm using ADC, 2 UART, I2C, SPI. My power consumption is about 700uA. The standby mode works well, enter to standby and wake up from standby. But the power consumption doesn't reduce, it's still about 400uA. Do I have to do somthings to kill the rtos processing or what ???
My code to enter to standby mode:
/**
* @brief Enter to Standby mode
* @param None
* @retval None
*/
void enterToStandByMode(void)
{
/* Disable all used wakeup sources: WKUP pins PC5, PC13 (Right and Left pins)*/
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN2);
HAL_PWR_DisableWakeUpPin(PWR_WAKEUP_PIN5);
// disable r`enter code here`tc wake up
HAL_RTCEx_DeactivateWakeUpTimer(&RtcHandle);
/* Clear wake up Flag */
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF2);
__HAL_PWR_CLEAR_FLAG(PWR_WAKEUP_PIN5);
/* Enable wakeup pins WKUP2, WKUP5 PC5, PC13 (Right and Left pins)*/
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN2_LOW);
HAL_PWR_EnableWakeUpPin(PWR_WAKEUP_PIN5_LOW);
/* Request to enter STANDBY mode */
HAL_PWR_EnterSTANDBYMode();
}*
