Serial IN Interface in GPIF II

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
E_521156
Level 4
Level 4
100 sign-ins 50 replies posted 50 sign-ins

Hi ,
I have two FX3 boards. I used from Serial interface using GPIF II and Using FX3 GPIF in Serial Mode : Example projects  and I sent out data by serial out (DQ[15], SOF and clock(internal) ) in endpoint 0x01 output and it works when I checked on oscilloscope. (serial out interface in GPIF works)

I am trying to receive that data on the other board by serial in(DQ[14], SOF, EOF and clock(external))  by endpoint 0x81 input. I don't receive any thing. I connected  DQ[15], SOF and EOF  in one board to DQ[14], SOF and EOF in the other board, respectively by 3 wires and one more wire for GND.(should  I connect in another way?)
I modified the "usbtogpif" code and changed  CY_U3P_PIB_GPIF_SERIAL_IN_CONFIG = 0x00007c83  and CY_U3P_PIB_GPIF_SERIAL_OUT_CONFIG = 0x00001F82. I also tested different state for bit8-9 in CY_U3P_PIB_GPIF_SERIAL_IN_CONFIG.  when it is bi8:9=0, I always get zero in control center and for other values in these bits, I got error 997.  Should I change anything else?
Thanks

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

I downloaded the firmware from my previous response and programmed both the FX3 with respective firmware.

The results are as follows

gpif_serial.PNG

gpif_serial_1.PNG

Please try sending the data as per these settings and let me know the results.

It is strange the bulk out (usb to gpif ) is failing becaus usb block commits short packets also. Please confirm that you used C:\Users\rasx\Downloads\UsbtoGpif (1)\UsbtoGpif\Debug\UsbToGpif.img file for programming

The DMA buffer size as per the firmware is 512 bytes. Please try sending 512 bytes and check. As the PROD event would occur when the DMA buffer is full. The firmware does not commit partial DMA buffer. So please confirm you send the data equal or more than  DMA buffer size

There is a possibility of error 997 at bulk out to occur when the data is continuously sent to DMA buffer and the DMA buffer are not consumed by the consumer. As the buffer size is 512 bytes, in the firmware i shared in my previous response, you check by increasing the DMA buffer count.

Pins DQ 9 and DQ8 can be used as SOF and EOF respectively. You cannot use GPIO[26] and [27] as SOF and EOF.

GPIO 17 and 18 are not actually used in the GPIF state machine. Please ignore them.

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
9 Replies