2018-10-25 12:56 AM
Hi, colleges!
I use Nucleo-144 STm32F767 development board to learn USB.
Now - Application example - device USB MSC.
How can I write/read to/from MCU from the PC?
Do I need some software on PC? Or can I do it by file manager (f.e. Total Commander)?
Please, reveal me the process? Or where can I read about it?
2018-10-25 04:04 AM
Device emulates a sub set of SCSI commands. Should be able to find SCSI/ATAPI docs online.
OS typically has an MSC or USBSTOR driver to talk to device, reads ID, CAPACITY and provides block READ /WRITE function. Would need to format media usually with a partition table, and then a file system.
OS might provide means to get handle to device to use IOCTL interface to query size, read/write blocks, or send commands. See tools like WinImage.
2018-10-25 04:52 AM
If I want to use FARfs on my device, is thees steps right?
2018-10-25 05:41 AM
Look through HAL code/examples trees and port the microsd to MSC ones to your platform.
2018-10-25 06:27 AM
HAL examples doesn't use FATfs with usb msc device mode. It is used only in host mode.
2018-10-25 08:01 AM
>>HAL examples doesn't use FATfs with usb msc device mode. It is used only in host mode.
And why would it need to use FATFs in this context, the PC wants to see a block storage device?
I'm confused about what you want to do.
If you want to read the MicroSD card on a PC, via USB, be a USB MSC Device.
If you want to read files from the MicroSD on the STM32 side, use FATFs.
Access SD Card from PC
STM32Cube_FW_F7_V1.12.0\Projects\STM32756G_EVAL\Applications\USB_Device\MSC_Standalone\readme.txt
Files from an SD Card on STM32
STM32Cube_FW_F7_V1.12.0\Projects\STM32F769I_EVAL\Applications\FatFs\FatFs_uSD
Files from a USB Flash Stick on STM32
STM32Cube_FW_F7_V1.12.0\Projects\STM32F769I_EVAL\Applications\FatFs\FatFs_USBDisk
2018-10-25 11:21 PM
Thanks a lot, Clive Two.Zero!
I want to see file system on PC when I'm working with SD card via USB.
Next, I will use external SD RAM on my own board instead of SD card.
2018-10-26 01:05 AM
"I want to see file system on PC when I'm working with SD card via USB."
Are thees steps right?
2018-10-26 04:03 AM
No