- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using vendor commands (implemented in the setup callback function) to implement i2c register read/write to/from my FPGA. I was wondering: How does one normally report back to the host (PC) that the i2c transfer failed? I assumed that returning false from the Setup-Callback (in some examples used by some "isHandled"-logic) would do this, but apparently it's not. Furthermore I was unable to find what exactly is done with the value returned from the Setup-callback-function.
Would one simply implement an additional vendor command for reading back the result of the previous vendor command?
Solved! Go to Solution.
- Labels:
-
USB Superspeed Peripherals
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When CyU3PUsbSendEP0Data() or CyU3PUsbGetEP0Data() is called before returning false from the fallback, then the control transfer will not fail.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When false is returned from the setup callback function ep0 endpoint is stalled and hence the vendor command is expected to fail.
Please see section 5.36.5.11 of FX3 API Guide available in below path:
C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\doc\firmware
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But that is only supposed to work when there's still data available in ep0, right? If all data is already consumed, there's not point in stalling it, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When CyU3PUsbSendEP0Data() or CyU3PUsbGetEP0Data() is called before returning false from the fallback, then the control transfer will not fail.
Regards,