Current consumption is high in Standby ( 500uA to 1ma)
Hi,
I have been working in Lower devices ( STM32L0),
Using 1MHZ Clock. ( MSI)
I m using Standy Mode to reduce current consumption when i am not using controller. In Standby mode with accelerometer i am expecting 37uA current but sometimes it is consuming 500 uA to 1 ma.
I Suspect 3 things,
1) capacitors , started to reduce the capacitors in VCC line( removed C5,C6,C7,C8,C9,C10,C33 ,C34 ) and kept C19 as 4.7ua and C32 as 0.1ua near vddio2 pin after that in some devices the problem solved but after some days if i measure the same devices , the problem exits. (Capacitor details i have attached in circuit diagram)
2) In some devices in standby LED is glowing (Mildly), So i thought some clock is ON in Standby So i Started disabling all clocks while going to standby and when i disabled APB2 Clock current consumption Reduces by 150uA.
3) When i have go through some websites , there preferred to give different power suppy to VDD and VDDA pin. So , i pulled the VDDA pin off and gave 2.9v separately and found current consumption is reduced in some devices.
I have attached my standby Code:
__HAL_RCC_PWR_CLK_ENABLE();
ACCLR_StandbyMode();
__HAL_RCC_APB2_FORCE_RESET(); // added to control power in Standby
RCC->APB1RSTR = 0xEFFFFFFFU; // PWR_EN , all periperal disabled
SET_BIT(PWR->CR, PWR_CSR_SBF); // Standby clear
SET_BIT(PWR->CR, PWR_CSR_WUF_Pos); //Wakeup clear
CLEAR_BIT(PWR->CR, PWR_CSR_PVDO_Pos); // PVD Clear
RTC_AlarmDisable(RTC_ALARM_A);
RTC_AlarmDisable(RTC_ALARM_B);
RTC_TamperDisable(RTC_TAMPER_1);
RTC_TamperDisable(RTC_TAMPER_2);
RTC_WakeupTimerDisable();
/* Clear PWR wake up Flag */
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
/* Clear Alarm A flag */
__HAL_RTC_ALARM_CLEAR_FLAG(&hrtc, RTC_FLAG_ALRAF);
/* Clear Alarm B flag */
__HAL_RTC_ALARM_CLEAR_FLAG(&hrtc, RTC_FLAG_ALRBF);
/* Clear RTC Tamper 1 Flag */
__HAL_RTC_TAMPER_CLEAR_FLAG(&hrtc,RTC_FLAG_TAMP1F);
/* Clear RTC Tamper 2 Flag */
__HAL_RTC_TAMPER_CLEAR_FLAG(&hrtc,RTC_FLAG_TAMP2F);
/* Clear RTC Wake Up timer Flag */
__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF);
/* Enable Ultra low power mode */
HAL_PWREx_EnableUltraLowPower();
/* Enter the Standby mode */
HAL_PWR_EnterSTANDBYMode();
