16-bit data to USB from GPIF-II in 32-bit mode | Cypress Semiconductor
16-bit data to USB from GPIF-II in 32-bit mode
Our application requires 16 GPIF data pins for reading from a peripheral device and 4 GPIF data pins for writing to the peripheral device. Unfortunately this means the GPIF must be configured in 32-bit mode because of those 4 extra data pins (24-bit mode appears to not be an option currently). This means that during every read event, we must transfer 32 bits, only half of which (the lower half) contain valid data.
We want to transfer this 16-bit data as rapidly as possible over USB to our host. What is the fastest way to strip out those upper 2 bytes to avoid doubling the size of our data transfer?
Can the GPIF be placed in 16-bit mode for the data readout phase, and back to 32-bit for the write phase? If so, can this be done on the fly, or would separate state machines need to be loaded?
Alternatively, the CPU could perform the byte stripping or memory remapping, but this could add substantial latency to the overall data transfer to the USB endpoint.
Any suggestions? Thanks in advance.