Getting Data Transfer Error while using LPDMA with LPUART on STM32U575
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-01-14 8:42 PM
Hi,
I am using LPUART and LPDMA on STM32U575. But I am getting Data Transfer Error.
I have tried LPUART with GPDMA it works fine but LPUART with LPDMA giving Data Transfer Error.
So I have two questions:
1. Can we use LPUART & LPDMA together?
2. What will be the cause of Data transfer error and how to configure LPDMA ?
Can you please guide me on this?
- Labels:
-
STM32U5 series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2024-01-15 8:12 AM
Hello @PCC,
Thank you for your questions :
1/ "The DMA operation can take advantage of the LPBAM mode. In autonomous mode the LPDMA and LPUART can work even with CPU in Stop mode, thanks to a hardware subsystem embedded in the STM32 microcontroller. The autonomous mode is rich in features and settings. The additional effort to set and
optimize it is paid off by the performance enhancement. CubeMX includes a tool that helps setting up the code servicing the LPBAM library and hardware. An LPTIM is used to trigger the LPDMA when the CPU is in Stop mode." (extract from chapter 7.6 of AN4637) Please, read the entire chapter.
2/ You can check these articles Getting Started LPBAM, and How to configure the GPDMA?.
On a bus access (as a AHB single or a burst) to the source or the destination
- The source or destination target reports an AHB error.
- The programmed channel transfer is stopped (GPDMA_CxCR.EN cleared by the
GPDMA hardware). The channel status register reports an idle state
(GPDMA_CxSR.IDLEF = 1) and the data error (GPDMA_CxSR.DTEF = 1). - After a GPDMA data transfer error, the user must perform a debug session, taking care
of the product-defined memory mapping of the source and destination, including the
protection attributes. - After a GPDMA data transfer error, the user must issue a channel reset (set
GPDMA_CxCR.RESET) to reset the hardware GPDMA channel data path and the
content of the FIFO, before the user enables again the same channel for a next
transfer.
(extract from chapter 17.4.6 in RM0456)
If you have other question, feel free to ask. You can share screenshot of your configuration.
Best Regards,
Pierre
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.
