2018-08-02 09:47 AM
This question is related to the code design in such a scenario when host and device communicate over USB for two purposes: two-way communication (CDC) and also host is reading the content of the Device' microSD card. The CDC mode is required in this scenario to provide dialog between their end points after the RESET but after the Host sends a "read from microSD" command to the Device, what is the best way to implement a follow up reading from microSD card? This can still be done in the same USB CDC mode - reading line-by-line the ASCII bytes from the card file or is it better (less code / faster) to force the Device to reconfigure it's USB end point to the MSC class, then read file and then force the Device to reconfigure it's USB back to CDC class for further communication?
Any input from your coding experience would be appreciated.
2018-08-09 06:28 PM
For commercial projects consider chatting with your local sales contacts and FAE.
MTP Class might be more appropriate for two independent/concurrent connections to the same media. Windows and FAT have coherency/corruption issues, so better the device serve and arbitrate access to files.
2019-03-07 07:40 AM
Hi @Vlad Blanshey
I have the same issue; could you find an appropriate way to perhaps switch between USB MSC and USB CDC (virtual come port)?
Edmond