A bug of STM32G4xx LL library
I reporte a bug of STM32G4xx LL library, the Definition of DMAMUX_LL_EC_REQUEST Transfer request in header file "stm32g4xx_ll_dmamux.h" as shown below.
#define LL_DMAMUX_REQ_FMAC_WRITE 0x0000006EU /*!< DMAMUX FMAC WRITE request */
#define LL_DMAMUX_REQ_FMAC_READ 0x0000006FU /*!< DMAMUX FMAC READ request */
#define LL_DMAMUX_REQ_CORDIC_WRITE 0x00000070U /*!< DMAMUX CORDIC WRITE request*/
#define LL_DMAMUX_REQ_CORDIC_READ 0x00000071U /*!< DMAMUX CORDIC READ request */
But the STM32G4 Series reference manual is defined as below.
110 FMAC_Read
111 FMAC_Write
112 Cordic_Read
113 Cordic_Write
The HAL library is defined as follows.(stm32g4xx_hal_dma.h)
#define DMA_REQUEST_FMAC_READ 110U
#define DMA_REQUEST_FMAC_WRITE 111U
#define DMA_REQUEST_CORDIC_READ 112U
#define DMA_REQUEST_CORDIC_WRITE 113U
So it looks like that read and write are defined as the exact opposite in the LL library,include FMAC and CORDIC module.
Not only that, but a compilation error will be generated after generating the project, because there are no two macro definitions.
"LL_DMAMUX_REQ_MATRIX_READ"
"LL_DMAMUX_REQ_MATRIX_WRITE"
After the following modifications, can pass the compilation.
// LL_DMA_SetPeriphRequest(DMA1, LL_DMA_CHANNEL_3, LL_DMAMUX_REQ_MATRIX_READ);
LL_DMA_SetPeriphRequest(DMA1, LL_DMA_CHANNEL_3, LL_DMAMUX_REQ_FMAC_READ);
// LL_DMA_SetPeriphRequest(DMA1, LL_DMA_CHANNEL_4, LL_DMAMUX_REQ_MATRIX_WRITE);
LL_DMA_SetPeriphRequest(DMA1, LL_DMA_CHANNEL_4, LL_DMAMUX_REQ_FMAC_WRITE);
Expecting official feedback.
Thanks.
