- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have a doubt about configuring a DMA with two TDs. For example, the first TD (TD[0]) goes from position 0 to 63 of an array, when it finishes, it switches to TD[1], where it goes from 64 to 128 of that same array. The first part is done correctly, however, the second part, the DMA is not transferring correctly the array's data.
I have set up the configuration as below:
-------------------------------------------------------------------------------------------------------------------------------------
CyDmaTdSetConfiguration(dmaDescriptor[0],
TEXT_MESSAGE_LENGTH*2, dmaDescriptor[1],
(TD_INC_SRC_ADR | DMA_1__TD_TERMOUT_EN));
CyDmaTdSetConfiguration(dmaDescriptor[1],
TEXT_MESSAGE_LENGTH*2, dmaDescriptor[0],
(TD_INC_SRC_ADR | DMA_1__TD_TERMOUT_EN));
CyDmaTdSetAddress(dmaDescriptor[0],
LO16((uint32)textMessage), LO16((uint32)UART_1_TXDATA_PTR));
CyDmaTdSetAddress(dmaDescriptor[1],
LO16((textMessage[TEXT_MESSAGE_LENGTH])), LO16((uint32)UART_1_TXDATA_PTR));
-------------------------------------------------------------------------------------------------------------------------------------
I think that the problem is that I didn't set up the offset correctly (I have tried using pointers also).
Thank you in advance
Chang
- Labels:
-
PSoC 3