STM32L0 LPUART TX using DMA and STOP mode. Is it possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-18 8:06 AM
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
Solved! Go to Solution.
- Labels:
-
DMA
-
Power
-
STM32L0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-20 6:22 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-19 6:53 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-19 7:03 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-20 6:22 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-01-31 12:13 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-02-02 8:13 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2023-02-03 12:06 AM
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
