FX3 not reading FPGA data, getting address instead | Cypress Semiconductor
FX3 not reading FPGA data, getting address instead
I'm having a problem with an FX3 hooked up to an FPGA. The goal is to "peek" at a register on the FPGA, so the PC sends a register address to the FX3, the FX3 relays it to the FPGA, the FPGA returns the register value, and the FX3 relays it to the PC. It sounds pretty simple but I can't get it to work.
As an example, if I send register address 0x6 I would expect to read back 0 (or whatever the correct value is), however the data that I always get back is 0x6. It's no coincidence that the address is coming back as the data, the same thing happens no matter what register address I put out (0x1 returns 0x1, 0x2 returns 0x2, etc).
With a scope, I can verify that on data strobe the data pins have the correct values but the USB packet coming back to the PC has the wrong value. I've fiddle with DMA channels, endpoint ids, etc. for hours and can't figure out what's going on. Can anyone help me figure out what's wrong? Or suggest how to troubleshoot this?
The code is based on the bulkloop example but modified (e.g. the DMA mode is auto). The state diagram, GPIF file and a sample app are attached.
Thanks for your help.