DSPRelated.com
Forums

edma use for video capture/display on DM642

Started by mayank agarwal April 25, 2005

Hi all,
If there is any example which explains how edma
is used to transfer between FIFO buffer and capture/
display buffers,Further how can we manage field/frame
synchronization and capture/display timings using edma
(i am not sure is edma the right choice to do that)
on DM642 platform.
If anyone has read SPRU629D document and
understood it please tell if there are any other
documents or sample/projects which i can use to
understand and use the concepts illustrated in the
manual.
Regards,
Mayank
__________________________________




Hi,

in Appendix B of spru629 there are examples of how to use the EDMA for
videoIn and videoOut. Even thought that it takes some time to understand and
make it running, it works...

Do you have the EVM642 evaluation board? This comes along with some DSP-Bios
videoPort drivers with sourcecode that are also quite useful as reference
from my point of view. I used the EVM642 to play around with the DM642
VideoPort. The main advantage is that you have ready to run examples that
work (for example loopback from a camera to VGA...). If you are stuck
somewhere, you can load the example, check all the registers and find what
is different to your program.

I found it quite difficult to setup the VideoPort. There are a lot of
registers that you have to think of (some of them with similar names). I
found it helpful to exchange parts of a ready made sample. I used the
readymade EVM642 example to initialize the VideoOut Decoder for example and
only implemented the VideoPort without caring about the rest...

I found it easier to use a 1D DMA to start. For the capture I setup the EDMA
that every event triggered a copy to the same destination memory. In the
transfercomplete ISR, I copied the memory to the destination. I found it
easier to have the 'automatic behind your back' EDMA copy as simple as
possible to start.

as extra documentation apart from spru629, I needed spru175 (I2C for
EVM...), spru234 (EDMA), spru610 (Cache), sprs200g (DM642 datasheet),
spraa52 (example...), dm642evm_TechRef.pdf (EVM642 docu - available at
spectrumdigital homepage)...

best regards,

thomas

>
>
> Hi all,
> If there is any example which explains how edma
> is used to transfer between FIFO buffer and capture/
> display buffers,Further how can we manage field/frame
> synchronization and capture/display timings using edma
> (i am not sure is edma the right choice to do that)
> on DM642 platform.
> If anyone has read SPRU629D document and
> understood it please tell if there are any other
> documents or sample/projects which i can use to
> understand and use the concepts illustrated in the
> manual.
> Regards,
> Mayank >
> __________________________________ >
>

--
+++ GMX - die erste Adresse f Mail, Message, More +++

10 GB Mailbox, 100 FreeSMS http://www.gmx.net/de/go/topmail




Mayank,

Thomas is correct; use the TI Example code as the first attempt. I'm using the EVM642 evaluation board along with the TI Video Port mini-driver software, and it was an excellant starting point.

You might want to read SPRA918A "The TMS320DM642 Video Port Mini-Driver" document;

There are indeed a lot of video port registers; however, depending upon what you want to ultimately accomplish, using the mini-driver may save you a lot of time.

Mark Bell -----Original Message-----
From: c6x@c6x@... [mailto:c6x@c6x@...]On Behalf Of
krahvogl@krah...
Sent: Tuesday, April 26, 2005 6:56 AM
To: mayank agarwal
Cc: c6x@c6x@...
Subject: Re: [c6x] edma use for video capture/display on DM642

Hi,

in Appendix B of spru629 there are examples of how to use the EDMA for
videoIn and videoOut. Even thought that it takes some time to understand and
make it running, it works...

Do you have the EVM642 evaluation board? This comes along with some DSP-Bios
videoPort drivers with sourcecode that are also quite useful as reference
from my point of view. I used the EVM642 to play around with the DM642
VideoPort. The main advantage is that you have ready to run examples that
work (for example loopback from a camera to VGA...). If you are stuck
somewhere, you can load the example, check all the registers and find what
is different to your program.

I found it quite difficult to setup the VideoPort. There are a lot of
registers that you have to think of (some of them with similar names). I
found it helpful to exchange parts of a ready made sample. I used the
readymade EVM642 example to initialize the VideoOut Decoder for example and
only implemented the VideoPort without caring about the rest...

I found it easier to use a 1D DMA to start. For the capture I setup the EDMA
that every event triggered a copy to the same destination memory. In the
transfercomplete ISR, I copied the memory to the destination. I found it
easier to have the 'automatic behind your back' EDMA copy as simple as
possible to start.

as extra documentation apart from spru629, I needed spru175 (I2C for
EVM...), spru234 (EDMA), spru610 (Cache), sprs200g (DM642 datasheet),
spraa52 (example...), dm642evm_TechRef.pdf (EVM642 docu - available at
spectrumdigital homepage)...

best regards,

thomas

>
>
> Hi all,
> If there is any example which explains how edma
> is used to transfer between FIFO buffer and capture/
> display buffers,Further how can we manage field/frame
> synchronization and capture/display timings using edma
> (i am not sure is edma the right choice to do that)
> on DM642 platform.
> If anyone has read SPRU629D document and
> understood it please tell if there are any other
> documents or sample/projects which i can use to
> understand and use the concepts illustrated in the
> manual.
> Regards,
> Mayank >
> __________________________________ >
>

--
+++ GMX - die erste Adresse f Mail, Message, More +++

10 GB Mailbox, 100 FreeSMS http://www.gmx.net/de/go/topmail


Hi,

We're working on a video compression project and we use the DM642 DSP. We don't have the EVM card but a personal card which includes the DSP, a video decoder SAA7118, SDRAM, etc...

We're trying to capture an incoming NSTC YUV video. We have just implemented the example code given in the SPRU629 doc. Unfortunately, we don't get the expected results : it seems that the DMA doesn't work properly. (The decoder is correctly configured).

Some questions :
- Is there anything to add in the main program to make the DMA work or the lines written in the example code (SPRU629) are sufficient ?
- As we don't have the EVM card we don't have the driver you mentioned in a previous post. Is there a way to get it from the net ? If no, could you send this to me ? Thanks.
- Tell me if I'm wrong : the data in YSRCA, CBSRCA en CRSRCA are just the addresses where the Y,Cb,Cr samples are saved ? Can we have access to the data stored in the FIFO and how ?

Thanks for your help.