- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am communicating with a [Cypress FX3 kit](https://www.cypress.com/products/ez-usb-fx3-superspeed-usb-30-peripheral-controller) device.
I did everything that was explained on AN84868. However, I would like to do my own source code so that I can integrate it with my code. (On linux)
I call cyusb_control_write() with:
bReqType: 40 (hex)
bType: 40 (hex)
bTarget: 0
bRequest: B2
wValue: 0
wIndex: 1
wLength: 16 (decimal)
like this:
C++ code fragment |
---|
rStatus = cyusb_control_write( MimacUSB3Connection::device_handle, /* a handle for the device to communicate with */ |
Everytime I run there are 3 options (in order of frequency):
- cyusb_control_write never returns but it is able to send data and FX3 device gets all correctly.
- cyusb_control_write gets `Process finished with exit code 139 (interrupted by signal 11: SIGSEGV).`
- Everything works correctly.
Why could this be happening? As I get unexpected output I am clueless on how to debug this. My main concern is cyusb_control_write not returning after sending the data.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I solved the problem. Instead of using this static variable I'm using cyusb_gethandle(0) to get the handle.
I'm still trying to fully understand the problem (why my static variable didn't work). But I solved immediate problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I solved the problem. Instead of using this static variable I'm using cyusb_gethandle(0) to get the handle.
I'm still trying to fully understand the problem (why my static variable didn't work). But I solved immediate problem.