This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB: indication of end of transfer

Hello,
I am transferring a file using USB MSD to a device, based on the Keil USB library. Can I know, when the transfer starts, how many bytes to expect? What is the indication in software as to the "end of file"?

Parents
  • 3) Mount the device.
    5) Unmount the device.

    The problem lies in the detection of unmount.
    While mounted, Windows put "Test Unit Ready (TUR)" SCSI command periodically (about every 1 sec). Also, SOF is put to the bus connected to the MSC device.

    When unmounted,
    Windows XP SP2 and SP3 stop both of TUR and SOF.
    Vista SP1 stops TUR, but SOF is continuously put to the bus.

    If you detect unmount by SOF, you'll fail in Vista.
    It is the reason that many USB hard disk on the market tell that the power-down function on unmount doesn't work on Vista.

    I don't know how it may change on Windows 7.

    In this way, when you depend on the feature not original in the MSC/SCSI spec, you'll get suffered minor incompatibility between OS versions.

    I repeat that firmware update using MSC is a bad idea, even if NXP have released such an example.

    Tsuneo

Reply
  • 3) Mount the device.
    5) Unmount the device.

    The problem lies in the detection of unmount.
    While mounted, Windows put "Test Unit Ready (TUR)" SCSI command periodically (about every 1 sec). Also, SOF is put to the bus connected to the MSC device.

    When unmounted,
    Windows XP SP2 and SP3 stop both of TUR and SOF.
    Vista SP1 stops TUR, but SOF is continuously put to the bus.

    If you detect unmount by SOF, you'll fail in Vista.
    It is the reason that many USB hard disk on the market tell that the power-down function on unmount doesn't work on Vista.

    I don't know how it may change on Windows 7.

    In this way, when you depend on the feature not original in the MSC/SCSI spec, you'll get suffered minor incompatibility between OS versions.

    I repeat that firmware update using MSC is a bad idea, even if NXP have released such an example.

    Tsuneo

Children