How to report back i2c errors to host (PC)?

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

cross mob
arnova2
Level 2
Level 2
10 replies posted 10 sign-ins 5 replies posted

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?

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

When CyU3PUsbSendEP0Data() or CyU3PUsbGetEP0Data() is called before returning false from the fallback, then the control transfer will not fail.

Regards,

Hemanth

View solution in original post

3 Replies