cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor

Has anyone had success using the FX3 DMA fabric to do CPU to Parallel Port DMA operations?

CPU to/from  USB socket  MANUAL_OUT, MANUAL_IN mode DMA operation works...

USB to/from PPort  socket MANUAL DMA  operation works...as per AN65974 ( despite the timing diagram and text not matching the application code)

I have found examples for using CPU MANUAL_IN,MANUAL_OUT for Debug serial sockets, USB, etc. but no examples of Parallel Port operation with the CPU.

I would rather use the DMA fabric for transfers, rather than repetitive register reads/writes to the Parallel Interface.

Is the PPort<->CPU DMA fabric broken?

0 Likes
Reply
1 Solution
Moderator
Moderator

Hello,

Please find the attached project. This is a modification of the example project gpiftousb. Here, the dma channel is modified so that the channel is from CPU socket to P Port socket 0. The DMA buffers are filled with AAs and is sent out to the P Port. The data sent out was read by using the default example gpif to USB available in FX3 SDK. Please try using this and let us know if you have any queries on the implementation.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
Reply
3 Replies
Moderator
Moderator

Hello,

Please find the attached project. This is a modification of the example project gpiftousb. Here, the dma channel is modified so that the channel is from CPU socket to P Port socket 0. The DMA buffers are filled with AAs and is sent out to the P Port. The data sent out was read by using the default example gpif to USB available in FX3 SDK. Please try using this and let us know if you have any queries on the implementation.

Best Regards,

Jayakrishna

Best Regards,
Jayakrishna

View solution in original post

0 Likes
Reply
New Contributor

Thanks for the quick response.

I will take a look at the project.

We were already doing a CPU->PPort MANUAL_OUT DMA earlier today.

Still working on the PPort->.CPU MANUAL_IN (not seeing the produce event for the assigned thread and socket).

The root cause of our issue was a lack of transition in the GPIF II project from our other socket processing states to the states which process the parallel port socket.

In our 4 socket GPIF II project, we never escaped the states handling sockets 0 and 1 via a drawn transition in order to process the DR Data operation for PPort socket 3.

Question:

If the IN_DATA followed by COMMIT state operations are used with a MANUAL DMA operation, will we still receive a producer event ?

I suspect not, since this is probably the equivalent of calling  CyU3PDmaChannelCommitBuffer within a manual DMA callback routine.

Thanks again.

0 Likes
Reply
Moderator
Moderator

Hi,

If COMMIT action is used in a state separately followed by the state where IN_DATA is done, then the partial buffer is committed and another buffer of zero length is also committed by the GPIF. There will be a DMA callback corresponding to these. If the buffer with zero length is not desired, then COMMIT action should be used when the last IN_DATA is being performed. In this case too, there will be a DMA callback with only one buffer available.

Regards,

Hemanth

Hemanth
0 Likes
Reply