Posts: 1
Registered: ‎01-12-2015

CP2130 SLAB_USB_SPI.h Read() crash inside libusb

[ Edited ]

I'm trying to control the CP2130 device from a Ubuntu Linux desktop using the SiLabs provided library and the C header file SLAB_USB_SPI.h.

It appears that the Write(...) calls all work fine.  However, any calls that Read(...) crash inside libusb.  In particular, the crash occurs inside: libusb/src/io.c at line 2243.  libusb attempts to get the default libusb context, but one has not been initialized yet.  Therefore, the code ends up dereferencing a null pointer.  I'm using libusb-1.0.9.  


Does anyone have an ideas why this might be happening?  I may be using the library incorrectly, but I'm not sure.