Skip to main content
Graduate II
January 14, 2025
Question

low power with STM32U5 and LPUART

  • January 14, 2025
  • 2 replies
  • 1149 views

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.

    This topic has been closed for replies.

    2 replies

    Graduate II
    January 14, 2025

    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...

    nicolasAuthor
    Graduate II
    January 15, 2025

    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.

    nicolasAuthor
    Graduate II
    January 15, 2025

    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)

     

    nicolasAuthor
    Graduate II
    January 15, 2025

    Thanks for the help.

    I saw the AN4635 but there measurement show <10uA only when using LPBAM. I think they use LPBAM_LPUART_TransmitReceive.

    https://community.st.com/t5/stm32-mcus-products/x-cube-lpuart-does-not-contain-any-project-for-stm32u5/m-p/130317

     

    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:

    https://github.com/STMicroelectronics/STM32CubeL4/blob/master/Projects/NUCLEO-L476RG/Examples_LL/LPUART/LPUART_WakeUpFromStop2_Init/Src/main.c

    https://github.com/STMicroelectronics/STM32CubeWL/blob/main/Projects/NUCLEO-WL55JC/Examples_LL/LPUART/LPUART_WakeUpFromStop2_Init/Src/main.c

     

    Unfortunately the only example in STM32CubeU5 with LPUART use the LPBAM:

    https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/NUCLEO-U575ZI-Q/Applications/LPBAM/LPBAM_LPUART_TransmitReceive

     

    I can try there UART example in stop mode to see if i achieve lower than 100uA:

    https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/NUCLEO-U575ZI-Q/Examples/UART/UART_WakeUpFromStopUsingFIFO

    nicolasAuthor
    Graduate II
    January 15, 2025

    I measure ~830uA with UART_WakeUpFromStopUsingFIFO :(