mfgtools icon indicating copy to clipboard operation
mfgtools copied to clipboard

Fail Bulk(R):LIBUSB_ERROR_TIMEOUT(2.009s)

Open mhadavan opened this issue 2 years ago • 2 comments

Based on some other issues reported here #334 , I did a simple test to reproduce a LIBUSB_ERROR_TIMEOUT problem that I have on a board:

SDP: boot -f imx-boot-sd.bin-flash_evk SDPV: delay 1000 SDPV: write -f imx-boot-sd.bin-flash_evk -skipspl SDPV: jump FB[-t 15000]: ucmd sleep 3

The problem here is that I always get Fail Bulk(R):LIBUSB_ERROR_TIMEOUT during the sleep operation.

Is this a bug in uuu or is there some parameters I can change to avoid the error message?

mhadavan avatar Sep 27 '23 12:09 mhadavan

After some more investigations and testing, I have found that if I increase the m_Timeout to something big in trans.cpp:: BulkTrans:Read function, I do not get the LIB_ERROR_TIMEOUT message in my test above.

ret = libusb_bulk_transfer( (libusb_device_handle *)m_devhandle, m_ep_in.addr, p, size, &actual_length, 100000 );

Is there any reason for having it at 2000?

mhadavan avatar Sep 27 '23 13:09 mhadavan

uboot command is sync. Default 2s to run it. BulkTrans:read try to get ucmd's running result. If exceed 2s, it will be timeout.

nxpfrankli avatar Sep 27 '23 14:09 nxpfrankli