2024-05-24 04:33 AM - last edited on 2024-05-26 01:46 AM by STOne-32
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.
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,
2024-05-28 04:28 AM
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
2024-05-28 04:50 AM
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,
2024-05-28 05:00 AM
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
2024-05-28 06:35 AM
Hello,
I am agree with, I provide you USB trace ASAP.
Thanks,
Best Regards,
2024-05-28 11:11 PM
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:
The URL download is : https://www.hhdsoftware.com/device-monitoring-studio
Thanks,
Best regards.