AnsweredAssumed Answered

STM32F401 stop mode

Question asked by jasonas.matas on Sep 3, 2015
Latest reply on Sep 5, 2015 by waclawek.jan
Hey, I have encountered a interesting error. I have made a logger and to save power it goes to stop mode (~6-7ms), while the sensor is converting the results and to stand by mode (1-2s) till the next measurement. The datasheet says that while in stop mode the consumption should be ~40uA and in standby ~2-4uA. Now here is the question in standby mode the consumption is close to zero, while in stop mode it is ~20mA, so why? If the circuitry would be wrong the logger should always consume 20mA. The main code part looks like this:

  RTC_Config();


  PWR_EnterSTOPMode(PWR_LowPowerRegulator_ON, PWR_STOPEntry_WFI);
    
  
   RCC_APB1PeriphClockCmd(RCC_APB1Periph_PWR, ENABLE);
  
  /* Allow access to Backup */
   
  PWR_BackupAccessCmd(ENABLE);
  
  RTC_WakeUpCmd(DISABLE);


        
  SYSCLKConfig_STOP();
  GPIO_ResetBits(GPIOB, GPIO_Pin_14);


 
  
  PWR_ClearFlag(PWR_FLAG_SB | PWR_FLAG_WU);
  RTC_WaitForSynchro();
  RTC_ClearFlag(RTC_FLAG_WUTF);
  jumperTime = 1020;
  
  RTC_SetWakeUpCounter(jumperTime); 
  RTC_WakeUpCmd(ENABLE);
      
  PWR_EnterSTANDBYMode();

on each wake up it initializeses the RTC settings, and after Stop mode just changes the sleep duration. Have any of you encountered this?

Outcomes