AnsweredAssumed Answered

how reach few uA current consumption in stm32f4 stop mode

Question asked by d.urbano on Oct 7, 2014
Latest reply on Oct 9, 2014 by d.urbano

Hi,

I’m working with an stm32f4xx mounted on Discovery platform; my goal is to measure current consumption in stop mode, using a multimeter (configured as amperometer) linked to the JP1 jumper. I use the UART2 to link the mcu to the PC; by this, I can send a command to the mcu to enter in stop mode, while using the button linked to the port PA0 (configured as external interrupt), I can exit the mcu from stop mode. In my example code, I note in run mode a current consumption of 2mA while in stop mode drop down to the ~800uA; my problem is that I expected a current consumption of few tens of uA and not hundreds of uA. I read the reference manual and the STM32F401xC data sheet about low power modes, and I try what I have read to reduce power consumption in stop mode (flash in power down, etc.) but it was all useless. If it can be useful, I report the code relative to the enter/exit stop mode:

      uint32_t temp;

      blink(2);  

     

      // Flash memory in power-down when the device is in Stop mode

      // Bit 9, FPDS, del power control register, = 1

      temp = PWR->CR;

      temp |= (uint32_t) 0x00000200;

      PWR->CR = temp;

     

      __HAL_RCC_HSI_ENABLE();//enable HSI RC oscillator

      while((RCC->CR & (uint32_t)0x00000002)==0);//wait until HSI is stable

      // Switch to HSI oscillator before enter stop mode

      temp = RCC->CFGR;

      temp &= (uint32_t) 0xFFFFFFFC;

      RCC->CFGR = temp;

     

      HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);//<- qui il codice si ferma

      /* L'istruzione agisce sul power control register resettando il bit 1, PDDS,

         e settando il bit 0, LPDS, in base al valore di 'Regulator' */   

           

      SystemClock_Config();//<- qui il codice riprende la sua esecuzione       

      HAL_GPIO_TogglePin(debugPin.port, debugPin.pin);

      HAL_UART_Receive_IT(&huart2, rxBuffer, 12);

      blink(2);

 

I really don’t know how can I reach the few uAs in stop mode; please, could anyone help me ?

Regards

 

Outcomes