cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 USB MSD Bootloader can't connect to WIN10.

erussell
Associate II

This is the second time I’ve asked for help about coding a USB MSD bootloader for the STM32L4 using the STM32L4R9I-EVAL board. I gave up for a while but would really like to figure this out so I can move forward and be able to use the STM32L4. I used STM32CubeMX to configure the board and included both FatFs and the USB Device library. As described in my earlier post (last March) I created the FAT16 structure using f_mkfs(). The result is that MacOS always recognizes the disk, but Win10 always fails. As before it still seems like a timing issue because the failure occurs at different places in the process. But most of the time Win10 fails in the reading of the FAT Tables. I’m observing the USB activity with a USB analyzer which shows one of the IN packets followed by a reset. This final IN packet indicates a data length as 68 bytes instead of the expected 64.

To try and determine whether it’s the format or the USB driver, I replaced the format from the f_mkfs routine with the FAT16 formatting from our existing product (based on a different processor) which does connect successfully to Win10. However, this configuration failed when used with the STM32L4R9I-EVAL board. 

It looked like the ST Link USB connection which I am using to power the eval board (but using JTAG for debugging) might be a FAT formatted MSD. Connecting to my USB analyzer and MacOS (using USB Prober) I see that it is formatted as a FAT12 MSD. And it has no problem being recognized by WIN10. 

So I’m left wondering if this is a problem with the USB Device Library. Is there some setting that could be a problem? What USB library does the ST Link connection use?

I would really appreciate any help!

0 REPLIES 0