• 1
clau

DSPI Video Transfer Using Nexys Video

Question

My goal is to send data from the fpga to the pc using DSPI. This data, in this case RGB data, gets transformed into video using Unity.

There are, however, several problems with sending data from the fpga to pc.

Currently the pc is receiving data from the fpga as follows,
From the pc side:

  1. Open the device (NexysVideo) using the function DmgrOpen(&hif, "NexysVideo")
  2. Enable DSPI transfer using the function DspiEnable(hif)
  3. Set the SPI mode using the function DspiSetSpiMode(hif, idMod, fShRight)
  4. Set the master (pc) clock frequency using the function DspiSetSpeed(hif, frqReq, &pfrqSet)
  5. Set the slave select (SS) to the logic 0 state using the function DspiSetSelect(hif, fSel)
  6. Receive bytes from the slave (fpga) using the function DspiGet(hif, fFalse, fFalse, bFill, rgbRcv, cbRcv, fFalse), in a while loop

There are several things that are not working properly on the pc side, looking at point 3, the SPI mode I would like to use is mode 1, shift data at the rising edge and sample data at the falling edge. However, I can't use mode 1, and currently using mode 0 (sample data at the rising edge and shift data at the falling edge).

Another thing is point 4, setting the SCK clock frequency. I noticed that the maximum clock frequency is 30 MHz. When determining the clock frequency, however, using the fpga the clock frequency is about 12 kHz, which is much lower than I would expect! I checked the clock frequency on the pc side using DspiGetSpeed(...) and got 30 MHz, but clearly the fpga receives a lower frequency.

From the fpga side:

  1. A shift register is connected to the FT2232H IC, I used the diagram on page 14 from http://www.europractice.stfc.ac.uk/vendors/nexys_video_rm.pdf for the connection layout
  2. The clock from the pc to the FT2232H is connected to the shift register
  3. If the slave select (SS) signal is a logic 0, then
  4. Every clock cycle a bit is shifted into the FT2232H

The ultimate goal is to connect a camera, which outputs raw RGB data to the fpga, and feeds it to the pc. To test if transferring something simple works I continuously send the bitstream "111111110000000000000000", which would get translated to 0xFF0000 or the colour red. This however, does not seem to work, it seems as if the pc and fpga are not in sync. The pc receives values per byte such as (0, 127, 128).

Is there something I missed?

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi clau,

I have asked some of our applications engineers about this; they will get back to you here on the Forum.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

Hi clau,

I'm sorry about the late response. I am looking into your concerns with the DSPI mode in adept sdk and the 30Mhz data transfer from the Nexys Video. This might take some time, but i will get back to you as soon as I have something for you.

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi clau,

I have included a converted file of the DSPI demo to work with the Nexys Video in Visual Studios 2010. I also included a basic vivado project that shorts the miso and the mosi.  I also included a picture of the parameters and the results. Hopefully this helps!

thank you,

Jon

 

DSPI_Nexyx_V.cpp

assigned_miso.zip

nexyx_video_esc.jpg

nexyx_video_esc2.jpg

Edited by jpeyron

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now