[#4924] usb gadget zero bulk test NO. 1/3/5/7 fails on 527

Document created by Aaronwu Employee on Aug 30, 2013
Version 1Show Document
  • View in full screen mode

[#4924] usb gadget zero bulk test NO. 1/3/5/7 fails on 527

Submitted By: Vivi Li

Open Date

2009-02-20 05:43:53     Close Date

2009-06-18 03:29:27


Medium High     Assignee:

Cliff Cai


Closed     Fixed In Release:


Found In Release:

N/A     Release:


N/A     Board:



BF527     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:


Uboot version or rev.:

    Toolchain version or rev.:


App binary format:


Summary: usb gadget zero bulk test NO. 1/3/5/7 fails on 527



For usb gadget zero bulk test NO. 1/3/5/7, they easily fail for BF527-EZKIT on latest trunk.


* bf527-ezkit image on trunk (musb_hdrc: version 6.0, pio)

* silicon rev 0.2, board rev 1.4

* latest gadget zero bulk test script



sudo ./src/testusb -D /proc/bus/usb/005/112 -t1

unknown speed   /proc/bus/usb/005/112

/proc/bus/usb/005/112 test 1 --> 32 (Broken pipe)




sudo ./src/testusb -D /proc/bus/usb/005/112 -t3

unknown speed   /proc/bus/usb/005/112

/proc/bus/usb/005/112 test 3 --> 32 (Broken pipe)




sudo ./src/testusb -D /proc/bus/usb/005/112 -t5

unknown speed   /proc/bus/usb/005/112

/proc/bus/usb/005/112 test 5 --> 32 (Broken pipe)




sudo ./src/testusb -D /proc/bus/usb/005/112 -t7

unknown speed   /proc/bus/usb/005/112

/proc/bus/usb/005/112 test 7 --> 32 (Broken pipe)





--- Vivi Li                                                  2009-03-18 05:47:11

I re-test bf527-ezkit with the following configuration:

* bf527-ezkit image of 08r1.5 (musb_hdrc: version 6.0, pio mode)

* silicon rev 0.2, board rev 1.4

* latest gadget zero bulk test script


At first t5 test pass, after several test cycles, it breaks. Continue to run

t7, it fails to return and kernel reboots automatically. t1 and t3 always pass

before kernel reboots.


Bellow is the error log:


sudo ./src/testusb -D /proc/bus/usb/002/011 -t5

unknown speed   /proc/bus/usb/002/011

/proc/bus/usb/002/011 test 5 --> 32 (Broken pipe)




sudo ./src/testusb -D /proc/bus/usb/002/011 -t7

unknown speed   /proc/bus/usb/002/011

(kernel reboot automatically)



--- Cliff Cai                                                2009-05-13 02:06:04

All the Broken pipe failures on peripheral bulk out tests (-t1,3,5,7...)are

caused by receiving wrong data.the test driver(f_sourcesink.c in /usb/garget/)

will check the reveived data manually,to see if the data is correct or not,if

not,it halts the device,and returns ERROR.


In current test,the host issues all "0" data packets to device in

pattern 0,and the test driver will check if the buffer which store the data read

from Rx FIFO is all filled with zero,a failure is detected when non-zero data is

checked.see check_read_data() in f_sourcesink.c.


In peripheral BULK mode,this problem occurs in both DMA and PIO mode, I guess

that the corrupt data is wrongly sent to Rx FIFO,since I didn't see any CRC or

bit-stuff error check for the mode in the HRM.


Any thoughts?





--- Sonic Zhang                                              2009-05-13 02:19:42

In peripheral bulk transfer mode, when data received in RX fifo is corrupt, no

hardware CRC check or error status bit is set by the MUSB controller according

to the HRM. Either this is allowed by USB spec and the test cases are incorrect

or there is a hardware issue in MUSB controller to receive corrupt data without

error check.


--- Cliff Cai                                                2009-05-13 05:05:46

According to the usb2.0 spec,if the data packet has CRC or bit stuff error,it

should be discarded.see 8.7.1 of usb2.0 spec.




--- Cliff Cai                                                2009-06-11 23:55:30

fixed by disabling double buffer mode.




--- Vivi Li                                                  2009-06-18 03:29:27

OK now. Close it.












File Name     File Type     File Size     Posted By

No Files Were Found