I want to be getting my characters , including the first one from uart at 115200 baud rate and use UART to wake up from sleep, how do I do this ? The sleep mode and low power sleep mode, with all gpios changed to analog no pull and all other peripherals disabled, still give a current draw of more than 2.2mA .
I put it to low power sleep using
HAL_SuspendTick(); // Suspend the system tick timer during low-power modes
The stop mode does not wake up with uart, I have tried using
So mthat UART1 on HSI wiould still wake up, but it doesn't
What else can I do to achieve low power in low power sleep mode or get the stop mode working to get under 1.2mA in sleep ? I can turn off everything except for UART1, which I'm already doing right now
Some ideas of things to check :
Hope this helps.
Sleep mode leaves the processor clock running at whatever speed you had it before, and that clock is still fed to the peripherals. To reduce current consumption in sleep mode, you need to slow that clock down.
For example if you are using HSE or HSI with PLL to get 32 MHz, at core-voltage range 1, the current consumption will be typically 1.7 mA, worst-case 2.4 mA
But if your clock is only 16 MHz you can set core voltage range 2 so current consumption is typically 700 uA, worst-case 950 uA.
On top of this consumption, there is the consumption of each peripheral that is still enabled during sleep.
I'm pretty sure 115200 can easily be handled with a 16 MHz clock, but I don't know if you need to run faster when awake. It can get messy to switch between clock frequencies because you need to update the baud-rate generator of any UARTs.
(I'm consciously not addressing why you can't wake up from stop).