Compatible USB Sticks

  • Hello all,


    My employer currently uses the PicoCOMA9 for one of its equipment ( https://www.wika.com.br/ga11_pt_br.WIKA) and we are required to do some firmware update once in a while. The main issue with that is that some USB Sticks/Flash Drives work during its boot up process allowing the update to happen, but most USB sticks don't, and I couldn't find a general rule to identify which ones would and wouldn't work.


    Is there any exact specification for the usb sticks in order to be compatible with the PicoCOMA9 boot process? It is running on Linux, but I don't have much information about it.


    The same USB sticks that do not work for firmware upgrade, do work afterwards, for example, while exporting the collected data from the system as a backup drive.


    Regards,


    Rafael

  • The USB protocol has a 16 bit value for the count of data blocks that can be transferred in one go. In other words up to 65535 data blocks with 512 bytes each, which is nearly 32MB. From the protocol, there are no restrictions given for this 16 bit value. However in real life, some USB sticks seem to have problems when the maximum value 65535 is used. Then they simply don't answer anymore, which results in USB protocol timeouts. From my point of view these USB sticks do not implement the protocol correctly.


    We have fixed this issue partly in the U-Boot that was part of the fsimx6-V3.0, fsimx6sx-V2.0 and fsimx6ul-V2.0 releases, by restricting the value to be used to 65534. This worked fine for a couple of USB sticks that we had by that time and that were showing this issue.


    Nonetheless I say partly, because we have observed a new issue with some USB sticks in the meantime. If the USB stick is very very slow, then reading and transferring these many blocks does take so much time that a data timeout happens. The timeout is set to a fix five seconds. So these slow sticks do need longer than 5 seconds to transfer 32MB of data, i.e. they can provide less than 54 MBit/s of data. USB 2.0 should be capable of delivering up to 480 MBit/s, so these sticks are really slow.


    So in the meantime, we have reduced the maximum number of blocks to transfer in one go further down to 32768 blocks. Up to now we did not have any problems anymore. However this fix was added after the last Buildroot releases (fsimx6-V3.1, fsimx6sx-V2.1, fsimx6ul-V2.1), but it is already part of the current Yocto releases (fsimx6-Y1.0, fsimx6sx-Y1.0, fsimx6ul-Y1.0). So if you want an U-Boot with this patch, download the Yocto release and extract the U-Boot source package from there.


    Of course for boards that are already in the field, you simply should use a stick that is 1) fast enough and that 2) can deliver 65535 blocks of data in one go. But do not ask me how you can decide this by just looking at the device...


    Your F&S Support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.