Skip to main content
hendry putra rahadi
Associate II
October 6, 2021
Question

STM32L4Q5 LP Run current consumption higher than datasheet

Dear Master,

I have problem dealing with STM32L4Q5CGT6, i just turn on the peripheral like SPI, I2C, UART and set the core clock to 400KHz.

in the datasheet and PCC says the current consumption (IDD) will be around 300uA.

but in actual i measure the idd drawn at 1.6mA.

i have set the DBGMCU->CR =0;

HAL_PWREx_EnableLowPowerRunMode();

here is the code:

void led1_off(void){
	HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_RESET);
}
 
void led2_on(void){
	HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, GPIO_PIN_SET);
}
 
void led2_off(void){
	HAL_GPIO_WritePin(LED2_GPIO_Port, LED2_Pin, GPIO_PIN_RESET);
}
 
int main(void)
{
 /* USER CODE BEGIN 1 */
 
 /* USER CODE END 1 */
 
 /* MCU Configuration--------------------------------------------------------*/
 
 /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
 HAL_Init();
 
 /* USER CODE BEGIN Init */
 
 /* USER CODE END Init */
 
 /* Configure the system clock */
 SystemClock_Config();
 
 /* USER CODE BEGIN SysInit */
 
 /* USER CODE END SysInit */
 
 /* Initialize all configured peripherals */
 MX_GPIO_Init();
 MX_I2C1_Init();
 MX_SPI1_Init();
 MX_SPI2_Init();
 MX_USART1_UART_Init();
 MX_USART3_UART_Init();
 /* USER CODE BEGIN 2 */
 
 DBGMCU->CR=0;
 HAL_PWREx_EnableLowPowerRunMode();
 
 HAL_Delay(3000);
 
 
 //HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);
 //HAL_GPIO_WritePin(ISO_EN_GPIO_Port, ISO_EN_Pin,GPIO_PIN_RESET);
 // sensoring_power_en();
 
 /* USER CODE END 2 */
 
 /* Infinite loop */
 /* USER CODE BEGIN WHILE */
 while (1)
 {
 /* USER CODE END WHILE */
 
 /* USER CODE BEGIN 3 */
	 //led1_on();
	 //led2_off();
	 //HAL_Delay(100);
	 //led1_off();
	 led2_on();
	 HAL_Delay(10);
	 led1_off();
	 led2_off();
	 HAL_Delay(800);
 
 
 }
 /* USER CODE END 3 */
}

i have disconnect all GPIO from board, only VDD,VDDA,VDDUSB,VBAT and VSS connected to supply.

here is the schematic:

0693W00000FBZuVQAX.jpg

How to achive the current consumption like the datasheet about 300uA?

Thanks,

Regards,

Hendry

This topic has been closed for replies.

4 replies

Mike_ST
ST Technical Moderator
October 6, 2021

Hello,

Page 130, datasheet says:

"fHCLK = fMSI

all peripherals disable"

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. 
hendry putra rahadi
Associate II
October 8, 2021

correct, if i disable all peripherals , idd = 300uA, but in PCC calculate the idd around 350uA when spi, uart, i2c enabled. just adding 50uA? ​

Mohamed Aymen HZAMI
ST Employee
October 8, 2021

Hello @hendry putra rahadi​,

Try to put all the unused GPIOs in analog state in order to reduce the power consumption.

Aymen

hendry putra rahadi
Associate II
October 8, 2021

sure , i have checked box "put all unused gpio to analog"​.

​

i have try in several days, when enable only I2C1, UART3. idd still 200uA.

​

when i enable SPI1 SPI2 and USART1 , idd raised 400uA each. total around 1.2 - 1.4mA​.

​

should i use bitbanged instead of dedicated peripheral?​