Skip to main content
Visitor II
May 24, 2024
Question

Mass storage Issue STM32H7

  • May 24, 2024
  • 2 replies
  • 1866 views

Hello,

With windows 11 and Ux_Device _MSC example,  the transfer from the STM32H735G-DK evaluation board to the PC stop near 80% with a big file (500Mo).

When the bug appears, In the  “_ux_device_class_storage_request_sense” file,  the « storage -> ux_slave_class_storage_host_length » variable equal 64 is different with  “sense_length” equal 18

This generate the UX_SLAVE_CLASS_STORAGE_CSW_PHASE_ERROR error.

jpbasirico_0-1716549933833.png

When I comment the if condition on top, the transfer don't stop anymore and the file transfered  is reliable.

Let me see your comment about this issue ?

Thanks,

 

    This topic has been closed for replies.

    2 replies

    ST Employee
    May 28, 2024

    Hello,

    According to your observation, the host requested a sense data with length of 64bytes but device prepared only 18bytes for data sense (essential), 

    in USBX MW the request sense response is fixed to 18bytes

    #define UX_SLAVE_CLASS_STORAGE_REQUEST_SENSE_RESPONSE_LENGTH 18

    the if condition is to stall any unexpected more IN from host side as the device sent only the available sense data

    from this point it difficult to provide more inputs without a protocol trace

    Regards

    Visitor II
    May 28, 2024

    Hello,

    As I am not USB specialized, what is a sense data ?

    The "if" condition can be ignored without files corrupted ?

    I have try  approximaly twenty tests and the file transfered is reliable.

     

    Best regards,

     

     

     

    ST Employee
    May 28, 2024

    Hello,

    the sense data is a set of information prepared by the device in response to a sense request from host this is scsi based protocol

    but we need to understand why do you get an error if you keep the if condition

    IMO the "if" should not lead to a corruption of the file itself, but this condition should be kept to respect the USB protocol

    Regards

    Visitor II
    May 28, 2024

    Hello,

    I am agree with, I provide you USB trace ASAP.

    Thanks,

    Best Regards,