cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 LPUART TX using DMA and STOP mode. Is it possible?

MŁask.1
Associate II

Hello,

I know that LPUART can wake up MCU from STOP mode. But I'm unable to send data using DMA when entering STOP mode. I use LSE and 9600 as baudrate, so transfer takes a lot of time. I need my core to be in stop mode to reduce current consumption.

Is it possible to use DMA TX in LPUART in stop mode? Any example for that?

Without entering stopmode transmission is perfect.

Thanks

Maciek

1 ACCEPTED SOLUTION

Accepted Solutions
RBENF.1
ST Employee

Hello @Maciej �?aski​ 

In Stop mode, DMA is clocked-off, therefore it will not operate. Only STM32U5 using LPBAM supports DMA transfers in stop mode.

Regards,

Ryan

View solution in original post

6 REPLIES 6
KDJEM.1
ST Employee

Hi @Maciej �?aski​,

The LPUART is able to wake up the MCU from Stop mode when the UESM bit is set and the LPUART clock is set to HSI16 or LSE.

When the UESM bit in LPUART_CR1 register is cleared, the LPUART is not able to wake up the MCU from Stop mode.

For that, please try to clear this bit to make sure that the MCU in stop mode.

For more details please refer to RM0367.

Thank you.

Kaouthar 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

MŁask.1
Associate II

Hello Kaouthar,

I know that LPUART can wake up. this works perfectly.

What I need is to _SEND_ data using dma while entering STOP mode. Currently every time I enter stop mode the LPUART stops transfering. I've set LSE as clock source so I was sure that LPUART will work as this clock is on.

Is it possible to _SEND_ data using LPUART and DMA when CPU is in STOP mode?

Regards

Maciek

RBENF.1
ST Employee

Hello @Maciej �?aski​ 

In Stop mode, DMA is clocked-off, therefore it will not operate. Only STM32U5 using LPBAM supports DMA transfers in stop mode.

Regards,

Ryan

MŁask.1
Associate II

Hi RBENF.1,

Hi KDJEM.1,

Yes, now I see that.

So what is the best (talking about power consumption) method to transmit data using LPUART?

I wanted to enter STOP mode to minimize current consumption but I see that in STOP mode LPUART TX doesn't work. So is it only avaliable in sleep? I can't find specific information about that in RM. Only info is that LPUART can wake up from STOP mode but nothing about transmission.

Should I configure something else to have working TX (using interrupts for example) in STOP mode or is it unavaliable also?

Regards

Maciek

RBENF.1
ST Employee

Hello @Maciej �?aski​ ,

You could make sure STOP mode is used most of the time to minimize consumption. 

When needed, use an exit method such as an interrupt to wake up the system and transmit data before going back to stop.

Then, you can configure LPUART to be able to wake up the MCU upon reception. Process your data and go back to stop.

Regards,

Ryan

MŁask.1
Associate II

Hi RBENF.1,

Thank you for help.

Yes, now I know that it is impossible to transmit in STOP mode. So for time of transmission I go to SLEEP mode.

Regards,

Maciek