Skip to main content
Visitor II
June 9, 2026
Question

STM32U545 lpuart not working in stop mode

  • June 9, 2026
  • 0 replies
  • 12 views

Hello, 

I am trying to make the lpuart1+dma_linked_list transferring data in stop1 mode.
My setup is like this:

    SPI1 + GPDMA: // SPI clocked from HSI
    Start transfer
    Enter STOP
    SCK continues toggling
    DMA continues
    Transfer completes
    DMA irq wakes from stop

LPUART1 + GPDMA: // LPUART clocked from LSE
    Start transfer
    Enter STOP
    TX line freezes
    DMA stops progressing
    Exit STOP
    TX resumes

 

Both peripherals are using dma in linked list mode in a similar manner.

My understanding is that since both peripherals are “autonomous” they should work in a similar way. I have no problem with the SPI1 working during stop1 mode but the LPUART seems to behave differently.

This is my LPUART1 init code:
 

void bsp_lpuart_init(void)

{

    bsp_lpuart1_reset_hard();    

    LL_LPUART_SetPrescaler(LPUART1, LL_LPUART_PRESCALER_DIV1);

    // Disable before configuration

    LL_LPUART_Disable(LPUART1);

    while (LL_LPUART_IsEnabled(LPUART1));

    LPUART1->BRR = 3495; //419430

    LL_LPUART_SetDataWidth(LPUART1, LL_LPUART_DATAWIDTH_8B);

    LL_LPUART_SetParity(LPUART1, LL_LPUART_PARITY_NONE);

    LL_LPUART_SetStopBitsLength(LPUART1, LL_LPUART_STOPBITS_1);

    LL_LPUART_SetTransferDirection(LPUART1,LL_LPUART_DIRECTION_TX);

    LL_LPUART_EnableInStopMode(LPUART1);

    LL_LPUART_ClearFlag_TC(LPUART1);

    //LL_LPUART_EnableIT_TC(LPUART1);

    LL_LPUART_Enable(LPUART1);

    LL_LPUART_EnableDMAReq_TX(LPUART1);

    while (!(LPUART1->ISR & USART_ISR_TEACK));

}

the lpuatr1 dma linked list works in run mode but when stop1 is entered i can see that the TX pin is frozen and when stop1 exits data transmission continues. The SMEN for lpuart1 is set. LSE is running which i can confirm because the RTC is running fine.

I can’t figure out what is missing.