I want to send data to UART using DMA. Every 3 transfers I want to generate another DMA request (without using core) to transfer data from the timer CNT register to memory. The documentation of the DMAMUX is generally impossible to understand. They have lines and signals which are not connected to anything.
Tis figure shows that it is possible.

The DMAMUX request generator generates the request which can be used by another DMAMUX channel and routed to the actual DMA
The code (minimal example):
DMA1_Channel2 -> CNDTR = 10;
DMA1_Channel2 -> CPAR = (uint32_t)&TIM15 -> CNT;
DMA1_Channel2 -> CMAR = (uint32_t)data16;
DMA1_Channel1 -> CNDTR = 6;
DMA1_Channel1 -> CMAR = (uint32_t)data;
DMA1_Channel1 -> CPAR = (uint32_t)&LPUART1 -> TDR;
DMAMUX1_Channel0 -> CCR = DMA_REQUEST_LPUART1_TX | DMAMUX_CxCR_EGE | (2 << DMAMUX_CxCR_NBREQ_Pos);
DMAMUX1_Channel1 -> CCR = DMA_REQUEST_GENERATOR0;
DMAMUX1_RequestGenerator0 -> RGCR = DMAMUX_RGxCR_GPOL_Msk | (0 << DMAMUX_RGxCR_GNBREQ_Pos);
DMAMUX1_RequestGenerator0 -> RGCR |= DMAMUX_RGxCR_GE;
DMA1_Channel1 -> CCR |= DMA_CCR_EN;
DMA1_Channel2 -> CCR |= DMA_CCR_EN;
LPUART1 -> CR3 |= USART_CR3_DMAT;
But unfortunately, it transfers the data to the LPUART, but does not generate the events which can be consumed by by the DMAMUX channel1.
Is it doable? What am I doing wrong?
Link to RM from page 396
Eventually, I have found the solution.
The
MAMUX1_RequestGenerator0 -> RGCRSIG_ID field has to be set to correct "synchronization inputs to resource" (Table 58 in RefMan)So this line will become
(16 as it is
dmamux_evt0signal)