DMA UART PSoC4

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
DaveCanterbury
Level 1
Level 1
First reply posted First question asked First like given

I have been trying to use DMA to transfer a pre-defined byte array  out of a transmit only standard UART.

Everything works fine when a DMA channel is defined for both Tx and Rx (Based on the DMA_UART_PSoC4 example code) and everything works as the interrupts are turned off, the second descriptor deleted and all the code except the  "RxDma_Start((void *)UART_RX_FIFO_RD_PTR, (void *)uartBuffer0);" deleted. When this line is deleted, or the RxDma  block removed the schematic the TxDma stops working.

I am clearly missing something or there is some deep reason for this, anyone got any insights?

Many thanks

  Dave

0 Likes
1 Solution
SuSh_1535366
Level 5
Level 5
Distributor - Macnica (Japan)
10 solutions authored 10 likes given 10 likes received

Hi,

In order to use DMA, the CyDmaEnable(); function must be called.
In the project you attached, this function is only called in the RxDma_Start() function.
Please add CyDmaEnable(); after TxDmaSetConfig();.

It will probably work.

View solution in original post

3 Replies
SuSh_1535366
Level 5
Level 5
Distributor - Macnica (Japan)
10 solutions authored 10 likes given 10 likes received

Hi,

In order to use DMA, the CyDmaEnable(); function must be called.
In the project you attached, this function is only called in the RxDma_Start() function.
Please add CyDmaEnable(); after TxDmaSetConfig();.

It will probably work.

lock attach
Attachments are accessible only for community members.
SuSh_1535366
Level 5
Level 5
Distributor - Macnica (Japan)
10 solutions authored 10 likes given 10 likes received

Hi,

The project file is attached just in case.
I don't have the CY8C4248LQI-BL483 kit, so I checked it with PSoC4200L.
It worked fine in my environment.

DaveCanterbury
Level 1
Level 1
First reply posted First question asked First like given

Many thanks, it was exactly that.
I had forgotten how much gets buried in the auto generated code, and is not documented in the module data sheets. It kept me guessing for several hours...must be losing my touch!  🙂

0 Likes