1 of 1 people found this helpful
1. If you want to control GPIO from the host(PC) application, you can send an vendor command and parse it in the Firmware and assert and de-assert the GPIO.
Refer Bulk Source Sink (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\basic_examples\cyfxbulksrcsink) Example project for implementing the Vendor commands and Refer GPIO APP (C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\firmware\serialif_examples\cyfxgpioapp) for configuring the GPIOs and asserting and de-asserting the GPIOs.
2. You have to assert PKTEND# since 32 byte data cannot be committed automatically. Procedure for committing the buffer is same irrespective of endpoints.
Otherwise, If you want to send only 32 bytes from GPIF to FX3 (FX3 to GPIF), you can create buffer size of 32 bytes and implement flow control (using DMA RDY and Water mark flags) on GPIF interface.
When ever you send 32 bytes on Bulk Out Ep, the buffer will be committed to P-Port, since it is full.
Similarly, if you send 32 bytes from FPGA to GPIF, the buffer will be committed automatically, you don't need to use PKTEND# here.
Here you may get the delays due to Buffer Switching. Please compare the throughput in both the cases and go ahead with best one.
Thanks! Both of these are excellent answers, I'll go ahead and try them.