cancel
Showing results for 
Search instead for 
Did you mean: 

Mass storage Issue STM32H7

jp.basirico
Associate II

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,

 

5 REPLIES 5
ABOUA
ST Employee

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

jp.basirico
Associate II

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,

 

 

 

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

Hello,

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

Thanks,

Best Regards,

 

 

 

 

Hello,

You will found attached the trace USB. Error appear the 29th may 2024 at 7:55 AM.

To visualize this log, you need to download the free software below:

jpbasirico_0-1716962837967.png

The URL download is : https://www.hhdsoftware.com/device-monitoring-studio

Thanks,

Best regards.