cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
3,179 Views
Registered: ‎06-20-2017

UART_PS and DMA

Jump to solution

Hello everybody, 

 

I'm using a ZedBoard with zynq XC7Z020.

 

For a project, I want to use DMA with the UARTPS. Until now, I haven't seen any example of this. 

According to the image below, i think it should be possible:

 

 

Capture.PNG

 

Does someone have an idea? 

 

Thx

Tags (5)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Scholar
Scholar
5,128 Views
Registered: ‎04-13-2015

Using the PS DMA (ARM's PL-330) for UART transfers, you will face these 2:

1 - the DMA does not have a event (trigger) from the PS UART.

    ... that's kind of a show stopper :-)

2 - If there was a trigger, then the problem is to constantly re-program the DMA (it's not registers to set-up... it's a real sequence of instructions to generate) to transfer the data.

In the TX direction, it's kind of feasible as the number of char to send can be used to do it in one DMA re-programming.

On the RX direction, you'll see it ends up being the DMA doing 1 char transfer and then interrupting the CPU to report the transfer.

In both TX & RX cases, using interrupts and relying on the 64 char deep FIFO of the UART is easier to deal with and also more efficient.

 

Regards

View solution in original post

0 Kudos
4 Replies
Highlighted
Scholar
Scholar
5,129 Views
Registered: ‎04-13-2015

Using the PS DMA (ARM's PL-330) for UART transfers, you will face these 2:

1 - the DMA does not have a event (trigger) from the PS UART.

    ... that's kind of a show stopper :-)

2 - If there was a trigger, then the problem is to constantly re-program the DMA (it's not registers to set-up... it's a real sequence of instructions to generate) to transfer the data.

In the TX direction, it's kind of feasible as the number of char to send can be used to do it in one DMA re-programming.

On the RX direction, you'll see it ends up being the DMA doing 1 char transfer and then interrupting the CPU to report the transfer.

In both TX & RX cases, using interrupts and relying on the 64 char deep FIFO of the UART is easier to deal with and also more efficient.

 

Regards

View solution in original post

0 Kudos
Highlighted
Visitor
Visitor
3,119 Views
Registered: ‎06-20-2017

Thank you for the reply. 

That's actually what I noticed. 

The solution with interrupts works well and corresponds to the project. 

 

Regards

0 Kudos
Highlighted
Visitor
Visitor
3,097 Views
Registered: ‎04-21-2016

yves.cestele,

 

How did you implement uartps interrupt ?

Could you share your code and part of design?

0 Kudos
Highlighted
Scholar
Scholar
3,018 Views
Registered: ‎04-13-2015

@ashish7724

 

if you would like to get an interrupt based driver UART, our drivers are available for free under a BSD-2 license.

Just send a request in the BSP section area at:

www.code-time.com

 

For a bare-metal application, the driver supports circular buffers between the interrupts and the background.

With a RTOS, it also support queues between ISR & BG plus exclusive access protection (mutex / spinlock / ISR on-off).

The package includes demos using it for the Zedboard.

 

... No DMA support though.

 

Regards

 

0 Kudos