2025-01-14 09:26 AM
I'm trying to port code from STM32L4 to STM32U5.
The STM32L4 code was using the LPUART, with a baudrate of 20k, clocked with HSI but in stop2 mode the HSI was stopped, it was able to wakeup and read incoming data. This configuration was using ~10uA.
I'm trying to do the same with STM32U5 but i think the HSI is not stopped during stop2 so it use ~200uA. AFAIK the knowledge base example keep HSI running.
Is it possible to use the same configuration with the STM32U5 ? If yes, is there an example ?
Or the only solution is to use the LPBAM with STM32U5 (like in LPBAM_LPUART_TransmitReceive) ?
Thanks in advance.
2025-01-14 10:03 AM
RM945 chapter 6 10.7 tells for stop mode "The PLL, the MSI
(MSIS and MSIK) RC, the HSI16 RC and the HSE crystal oscillators are disabled. The
LSE or LSI is still running."
So look for other current suckers...
2025-01-15 12:30 AM
Thanks for the answer but i didn't found the RM945. The reference manual for STM32U5 is the RM0456. This RM effectively say the same at chapter 10.7.1.
2025-01-15 12:38 AM - edited 2025-01-15 12:39 AM
The reference manual say HSI is disable in stop mode but in stm32u5xx_hal_rcc.h there something contradictory:
/**
* @brief Macros to enable or disable the force of the Internal High Speed oscillator (HSI)
* in STOP mode to be quickly available as kernel clock for USARTs, LPUART and I2Cs.
* @note Keeping the HSI ON in STOP mode allows to avoid slowing down the communication
* speed because of the HSI startup time.
* @note The enable of this function has not effect on the HSION bit.
* This parameter can be: ENABLE or DISABLE.
* @retval None
*/
#define __HAL_RCC_HSISTOP_ENABLE() SET_BIT(RCC->CR, RCC_CR_HSIKERON)
2025-01-15 01:26 AM
2025-01-15 01:43 AM
Thanks for this information. This confirm that it's possible to be in stop2 mode with HSI running so my hypothesis in my first post is possible.
2025-01-15 01:52 AM
Have you seen Application Note AN4635, How to optimize LPUART power consumption on STM32 MCUs ?
Does this help: https://community.st.com/t5/stm32-mcus-wireless/stm32wl55-using-lpuart-in-stop2-mode-with-wake-up-amp-clock/m-p/755245/highlight/true#M22565 ?
2025-01-15 02:39 AM
Thanks for the help.
I saw the AN4635 but there measurement show <10uA only when using LPBAM. I think they use LPBAM_LPUART_TransmitReceive.
For the STM32WL55 topic, the STM32WL55 is based on STM32L4 and I already achieve low power with STM32L4.
I didn't found significant difference with there STM32L4 code:
Unfortunately the only example in STM32CubeU5 with LPUART use the LPBAM:
I can try there UART example in stop mode to see if i achieve lower than 100uA:
2025-01-15 03:01 AM
I measure ~830uA with UART_WakeUpFromStopUsingFIFO :(