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:
How to achive the current consumption like the datasheet about 300uA?
Thanks,
Regards,
Hendry
