2014-05-26 09:52 AM
Hi everyone!
I developed the USB Composite CDC+MSC. It worked right. Now, I want to disable a MSC and use CDC only. Do we have any way to do that (without re-connect the USB)? I tried to ignore the MSC packets IN/OUT by return the NAK signal. However, the CDC can transfer several strings then stop.void EP2_OUT_Callback(void)
{
if (MSC_Enable)
{
Mass_Storage_Out();
}
else
{
SetEPTxStatus(ENDP2, EP_RX_NAK);
}
}
Thank you so much.
#stm #usb-composite
2014-05-28 04:03 AM
Hi
I have not tried USB MSC device, so I do not know much about it. A quick scan through the USB OTG device library user manual, in the section for USB device MSC - it shows SCSI_StartStopUnit command. I think you need to send this command and say the 'unit' has stopped.2014-05-29 03:23 AM
Hi,
Thank for your reply. I am using STM32F103 USB-FS-Lib, It does not support this function. However, I tried to understand the host's behavior when I did not reply its packet (MSC). The USB protocol shows that the host will send a reset command to the device in this case. So that this reset command may be the reason why the CDC is halted also. Finally, I switched the (CDC+MSC) to CDC only (using the button) by generate the reset signal and the device will be re-enumerated with new description. This is a simple trick to deal with this situation.2014-10-30 12:02 PM
Can you post the project? I am trying to implement a composite device CDC and MSC on the STM3220G-EVAL board. There are not many examples.
2018-04-17 09:13 PM
@dangthanhtung : Can i know how do you composite USB MSC + CDC ?
2019-02-16 11:11 AM
I'm interested in composite usb cdc+msc. Few years ago I modified usb+msc on avr32. Now I need change platform to stm32. Can you post your project or usb configuration?