For STOP2, Is it necessary to disable unused peripherals?
Hi,
I'm using a NUCLEO-L452RE and wanted to check out current in different low power modes.
With only the basic pins configured, I can measure <7uA in Stop2. Not bad.
using:
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
Problem I have is if I configure the 4 UART ports, an I2C port, etc... then go to stop mode 2, my current is between 200 and 1000uA, depending on what I have configured in the IOC file.
Since I'm going to stop mode 2, most of these devices can't be used. Is it really necessary to disable all unused peripherals before I enter stop mode 2? I probably assumed wrong that I could leave them configured assuming they'd not be powered in this low power state.
I've run some tests where I call:
HAL_UART_MspDeInit(&huart1);
HAL_UART_MspDeInit(&huart2);
HAL_UART_MspDeInit(&huart3);
before going to stop2, and I see major current improvements. Do I need to do this for all peripherals that can't be used in stop mode 2, then re-enable them on wake-up?
I couldn't find a good example that specifically shows that this needs to be done, so I'm wondering if I'm missing something.
