I have run the uart dma example provided in CSL and everything works.
When I tried to optimize the code, I noticed that in the example the UART_setup is called after the DMA_start function.
When I tried multiple uart writes, I saw that although the UART_setup should be called only once during initialization, the transmission does not work if UART_setup is not called after DMA_start .
I found out that what triggers the transfer is the reset of the uart . When I add the following code after a call to DMA_start , everything wokrs :
hUart->uartRegs->PWREMU_MGMT = CSL_UART_PWREMU_MGMT_RESETVAL;
hUart->uartRegs->PWREMU_MGMT = 0x6001;
My question is why is this required ?
I am afraid it can cause problems if receiving data when initiating a transmmit.
Is there other way to start the transmission via DMA?
Thanks.