Trouble having Windows 10 recognize a STM32L4 board configured as a FAT16 disk over USB MSD.
I am working on a bootloader for the STM32L4 and using the STM32L4R9I-EVAL board. Using STM32CubeMX version 5 I've generated code for a device USB MSD and have included FatFs as the file system. I've used the FatFs routine, f_mkfs() to format the drive as FAT16 which creates the partition sector, the FAT Boot sector, and the first sector of the FAT Table. When I connect USB to MacOS the disk is recognized and is available for copying a file. However, connecting to Window 10 fails. With a USB analyzer I can see that at times only the partition is read, other times the Fat Boot sector is read, and sometimes even first sector of the the FAT Table. But Windows determines that the disk cannot be read. I have thought that there may be a timing issue or a formatting issue but am not sure how to diagnose what is wrong with the connection to Windows. Does anyone have any suggestions?
Just to answer why I'm not using the DFU class - we have an existing product (using a different processor) where firmware updates use the MSD class. It is easy for users to just drag and drop a file without the need for a separate app which is necessary for DFU. Also DFU uses the control endpoint so for large files the download time is greater.
