STM32L0 low-power run mode
Hi,
I'm tring to set low power mode in an STM32L031 MCU, using a NUCLEO 32 for evaluation first.
Now my aim is to set MCU in a low power mode, only checking some digital pins during this state.
Anyway, I switched off analogs and LPUART beforw invoking HAL_PWREx_EnableLowPowerRunMode();
My consumption is about 1,5mA, but it should be some uA instead.
I tried to set in stop mode and it goes in very low power mode correctly (<1uA), but Is not possible for me to stop the CPU.
This is the code I used.
//Disable uart
if (HAL_UART_DeInit(&hlpuart1) != HAL_OK)
{
Error_Handler();
}
//Disable adc
HAL_ADC_Stop_DMA(&hadc);
__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
HAL_PWREx_EnableLowPowerRunMode();
Thanks in advance
Diego