Skip to main content
Nikhil D&K
Associate III
July 24, 2023
Question

STM32L4A6 consuming 2 mA system current in Stop 2 mode configuration

  • July 24, 2023
  • 3 replies
  • 2838 views

Hello developers,

We are currently developing a low power metering product using STM32L4A6 controller. It is clocked by HSE (16 MHz) and LSE (32 KHz) for RTC and LCD.  It has a magnetic and optical sensor which will be always active and generating interrupts if read value is greater than set threshold. It also incoprates glass LCD for displaying stats, NFC (ST25DV), LoRa module (RAK3172) for communication and an gas gauge IC (STC315) for battery gauging.  

 

Devices that are currently triggered off in my product are NFC, LoRa, Gas Gauge. Before entering STOP2 mode i am also de-intializing the LCD drivers. Still the current consumption measured on entering STOP 2 mode is  approximately:

MCU : 300 uA

System Measurement: 2.5 mA 

 

So can anyone please guide me why my system current is consuming arounf 2.5 mA even when all the components are triggered off. And all the uncessesary peripherals are de-initalzed. 

3 replies

Piranha
Principal III
July 24, 2023
Ced
ST Employee
July 27, 2023

Hello @Nikhil D&K 

Can you check if the debug MCU STOP mode is not enabled. (Bit DBG_STOP inside the DBGMCU_CR register).

In Debug Stop mode, the FCLK and HCLK are provided by the internal RC oscillator which remains active in STOP mode.

Best Regards,

Ced

 

 

Nikhil D&K
Associate III
July 29, 2023

Hello @Ced ,

As per your suggestion, i have checked if DBG_STOP bit is set or not using the below code :

 

 

// Assuming DBGMCU_CR is a 32-bit register and DBG_STOP is bit 1 (bit index starts from 0)

// Read the value of the DBGMCU_CR register
uint32_t dbgmcu_cr_value = DBGMCU->CR; // Replace 'DBGMCU' with the correct register base address for your microcontroller.

// Extract the DBG_STOP bit
uint32_t dbg_stop_bit = (dbgmcu_cr_value >> 1) & 0x1;

// Check the value of the DBG_STOP bit
if (dbg_stop_bit == 1) {
 // DBG_STOP is enabled
 // Your code here...
} else {
 // DBG_STOP is disabled
 // Your code here...
}

 

Using above code it shows that the dbg_stop_bit is set. But  on power on reset it is disabled. 

 

 

 

 

Andrew Neil
Super User
January 13, 2025

@Nikhil D&K wrote:

the current consumption measured on entering STOP 2 mode is  approximately:

MCU : 300 uA

System Measurement: 2.5 mA 


Not sure what you mean by that?

Have you measured that the MCU itself is consuming 300uA ?

Please post your schematics, and indicate where you are measuring.

How are you measuring?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.