none
Windows Embedded CE 6.0 R3 USB mass storage write error. RRS feed

  • Question

  • Hello,

    I have a very specific bug, that I can represent only at some USB sticks. I am using iMX28 + WinCE 6.0 R3 with updates until 31/12/2013

    When I am trying to copy file to specific USB stick - I have next error. After that error USB folder disappears from the root,

    but usb device still present on the control panel storage manager. When I am trying to mount/dismount device in that manager - system completely freezes.

    This stick works ok with standard PC. Looks like it is an error at c:\WINCE600\PUBLIC\COMMON\OAK\DRIVERS\USB\CLASS\STORAGE\CLASS\bot.c , but I can't understand why I am getting this error only with some USB flash drives.

    Please help to find out what to do, device in mass production now.

    debug output:

    BOT_DataTransfer warning(6.7.x.3, RequestLength:65536 TransferLength:11264 Err:0 UsbErr:0x4, dwTimeout:16553)
    +USBD:ResetPipe
    USB HCD: DEBUGCHK failed in file C:\WINCE600\platform\common\src\soc\common_ektos_v10\ms\usbh\usb2com\.\cdevice.cpp at line 5321
    CFunction::SetOrClearFeature - recipient = 2, wIndex = 130, set/clear = 0x1, feature = 0x0, FAILED
    BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x4, dwTimeout:4000)
    +USBD:ResetPipe
    USB HCD: DEBUGCHK failed in file C:\WINCE600\platform\common\src\soc\common_ektos_v10\ms\usbh\usb2com\.\cdevice.cpp at line 5321
    CFunction::SetOrClearFeature - recipient = 2, wIndex = 130, set/clear = 0x1, feature = 0x0, FAILED
    Retry CSW
    BOT_DataTransfer error(5.3.3, dwCswErr:31, dwUsbErr:0x4, dwTimeout:4000)
    +USBD:ResetPipe
    USB HCD: DEBUGCHK failed in file C:\WINCE600\platform\common\src\soc\common_ektos_v10\ms\usbh\usb2com\.\cdevice.cpp at line 5321
    CFunction::SetOrClearFeature - recipient = 2, wIndex = 130, set/clear = 0x1, feature = 0x0, FAILED
    BOT_DataTransfer error(5.3.3, ResetErr:0x0 StallCount:2)
    Retry BOT_MassStorageReset
    BOT_DataTransfer error(5.3.1, 1460, 0x0, 0, 31, 4000)
    Retry BOT_MassStorageReset
    BOT_DataTransfer error(5.3.1, 1460, 0x0, 0, 31, 4000)
    Retry BOT_MassStorageReset
    ScsiGetSenseData error:1460
    ScsiTestUnitReady ERROR:1460


    Sergii Makovetskiy

    Thursday, June 12, 2014 7:41 AM

All replies

  • As per the log its Data Transfer error ...

    Due to that it is trying to reset the pipe .

    To me it looks like the h/w is having issue which is some how working in most of the cases and doesn't work with some USB device.

    Check the USB differential signal integrity and shift with working and non working USB device.

    I doubt your h/w and not the s/w

    --- Misbah 


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    Thursday, June 12, 2014 9:01 AM
  • thank you for the answer, but it is not HW issue, because USB device works perfect on same HW. (i am using OTG port). i can debug kernel via USB RNDIS without any issue. So, i have an issue only with mass storage and only with some USB drives 

    I found one more articles about this issue, but nobody says how to fix it.

    http://www.industrialnetworx.com/forum/windows-ce/usb-mass-storage-problem

    https://groups.google.com/forum/#!topic/microsoft.public.windowsce.platbuilder/DJsx01OrLYs

    Best regards,

    Sergii Makovetskyi


    Sergii Makovetskiy

    Thursday, June 12, 2014 9:34 AM
  • Hi, I am using the i.MX28 and also having USB memory stick issues with similar debug output.

    I have checked the signal integrity of my board using test patterns and a scope set up for USB conformity tests and the hardware is fine.

    I have an SMSC hub IC between the i.MX28 and the board connectors to split to four ports. If I configure the USB interface to connect as full-speed only then the memory sticks work ok (set portSc.bit.PFSC = 0x1; in CHW::PowerOnAllPorts() to connect as full speed). This was our temporary work-around.

    One thing to note: The Freescale BSP has a clone of the Microsoft drivers in its own source tree so any of the updates applied since around 2009 do not apply to the USB memory stick code! You will find the MS code has been updated but the source for the i.MX28 BSP is at the same level as it was when it was originally written!

    I have looked at merging in the QFE changes but it looks like a big job to assess why Freescale cloned the driver and what essential platform-specific changes they have made. I have been quoted a large sum by a third-party company to apply the changes for me. Freescale are not interested in helping because their BSP is supplied 'as-is' so it is up to the developer to fix issues.

    You could either limit your board to full-speed USB (which seems to work) or try and apply the QFEs manually by assessing the code changes made in each QFE. One major annoyance with this is that the Freescale driver has also reformatted the code style (braces on following lines etc) which makes a diff tool show almost the whole file as being changed when there are only a few true code changes!!

    Did you manage to fix your issues?

    Regards, Mark

    Wednesday, August 6, 2014 12:07 PM