Jump to content
  • 1

DSPI Video Transfer Using Nexys Video


clau

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?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...