I am trying to transfer data from memory to GPIO using uDMA.
My goal is to transfer a few bytes from memory (source) to PORTD (destination) using uDMA.
I am using tivaware_c_series_2_1_4_178 library.
I modified the udma_demo.c to achieve the above.
When I try memory to memory transfer , it works fine. But when I change the destination address to GPIO PORTD, the uDMA interrupt does not get generated.
I have made the following changes .
// mem to gpio ControlSet
uDMAChannelControlSet(UDMA_CHANNEL_SW | UDMA_PRI_SELECT,
UDMA_SIZE_8 | UDMA_SRC_INC_8 | UDMA_DST_INC_NONE |
UDMA_ARB_1);
// mem to gpio TransferSet
uDMAChannelTransferSet(UDMA_CHANNEL_SW | UDMA_PRI_SELECT,
UDMA_MODE_BASIC, g_ui32SrcBuf,(void *)( GPIO_PORTN_BASE+0x0),
MEM_BUFFER_SIZE);
I suspect the destination address I used in uDMAChannelTransferSet function may be wrong. How to specify this .correctly.
The Tivaware peripheral driver Library has the following note on page 592
Note:
When the GPIO_O_DATA register is the source or destination, the application code must
use the bit banded address space instead of specifying the source or destination address
as GPIO_O_DATA.
How to take care of the above?
Thanks in advance for your help.