Which is the mode which permits the lowest current with RAM retention for variables?
In this mode which is the current consumption for the STM32L476?
Hi le_mer.michel ,
The STM32L4 Series implements three Stop modes with full SRAM and Peripheral retention capability (SRAM1, SRAM2 and all registers content are retained)and capacity to wakeup in 1 µs thanks to the use of the MSI up to 48 MHz.
In Standby mode the BOR is always enabled, ensuring that the device is under reset when the supply voltage is below the selected functional threshold. By default the SRAMs content is lost in Standby mode. However, it is possible to preserve the content of the SRAM2 (with an additional current consumption).
I recommend you to have a look to AN4621 application note, Power control (PWR) chapter in your related reference manual and Typical and maximum current consumption in your related datasheet.
Compared to your competitor we actually use, only the Stop 2 mode is equivalent.
I am only worried about wake up from uart. Is there any solution to wake up with 2 uarts from stop 2 mode? (either a component with 2 LPUART or USART which can wake up from stop 2 but with low baudrate, ???)
Where the message that will wake-up the microcontroller is a known/controlled-by-you format, you might get away with configuring that pin as a trigger input as well, waking up on the leading edge of the start bit.
You will miss the first (few) characters and there is the risk that the UART will use the wrong bit as its start bit and receive rubbish until something like 0xFF is sent.
I was fortunate that the sequence that wakes up my stm32f4 starts 0xbf, 0xff, 0x00, <wanted data> and I find that I can reliably receive my wanted data at 921600 baud running off the internal MSI oscillator.
Normal U(S)ART interfaces in STM32L4 family can wake up the MCU down to STOP1 mode. They have no capability to wake up the MCU from STOP2/Standby/Shutdown modes.
LPUART has the advantage over the normal U(S)ART that it can wake up the MCU from STOP2 mode.
However STM32L4 MCUs provide only one LPUART, so it is not possible to wake up the MCU from STOP2 mode by two different UART channels.
You can consider scenario mentioned by Danish Ali (thanks for this hint!). This would mean that MCU can be woken up from STOP2 mode:
Retrieving data ...