CubeMX bug regarding LPUART1 DMA (MX_Device.h)
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_Channel7The 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
#endifSo 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.
