2024-02-06 02:04 AM
I use the STM32L496ZG. When generating the files using STM32CubeMX it also generates MX_Device.h which contains several defines. When using LPUART1 with DMA it also generates defines like:
#define MX_LPUART_RX_DMA_DMA_Handle
#define MX_LPUART_RX_DMA_Instance DMA2_Channel7
The CMSIS Driver for the UART however uses:
#ifdef MX_LPUART1_RX_DMA_Instance
#define UART6_DMA_USE_RX UART_DMA_USE_RX
#else
#define UART6_DMA_USE_RX 0
#endif
So using MX_LPUART1_RX_DMA_Instance is not the same as MX_LPUART_RX_DMA_Instance and causes the DMA to be disabled.
MX_Device.h should contain LPUART1 instead of LPUART with regards to the DMA defines as it also does with the Pin and IRQ defines.
2024-02-06 05:44 AM
Hello @Reneb ,
First let me thank you for posting and welcome to the ST Community.
Your request is under investigation, and I will get back to you ASAP.
For more investigation I suggest also that you provide your ioc file.
Thanks.
Mahmoud.
2024-02-06 06:20 AM