I would like to learn how it's works
I have some some problems with RX.
You can refer the example codes. If you don't have, the example codes is available in the below ftp
Download the ADuCMxxxV1.3.exe and install it.
Suggest to run the UART without DMA firstly. If no problems, then add DMA function.
I have already installed
I have been working with UART without DMA firstly and all was ok. Then I add DMA function, TX mode works fine but RX mode I can see characters in the buffer but I don't receive the interruption. How I can know if I receive something?
I am using UARTDma_Demo.c
When I Enable UART RX DMA channel
I see changes in DMAENSET but also in DMAENCLR. Both bits UARTRX changes to EN.
Is this right?
You can set a flag, such as toggle GPIO, in the DMA_UART_RX_Int_Handler(), if a UART DMA receive is completed and you enable the NVIC_EnableIRQ(DMA_UART_RX_IRQn).
Did you use the serial debugging assistant? Be sure to care about the data format in the serial debugging assistant.
An alternative method is that you can use another ADuCM360 or other part which has UART interface to send data.
You can watch the DMAENSET register 0x40010028, if you enable the UART DMA RX function, the UARTRX bit of the DMAENSET register will be set.
Note that the controller disables a channel automatically by setting the appropriate bit when it completes the DMA cycle. Set the appropriate bit to disable the corresponding channel. So if the DMA transfer is finished, the UARTRX bit of the DMAENCLR register will be set automatically.
So if you enable the UART RX DMA, the bit of UARTRX in DMAENSET register should be 1, and the bit of UARTRX in DMAENCLR register should be 0.
Retrieving data ...