Skip to main content
Associate II
March 13, 2024
Solved

STM32l552 : Create a file in USB with FATFS

Hi the community,

I tried to use a STM32L552 to create file in a USB key with FatFS but without success.

I already create and write file in SD card with FatFS but my aim (after a USB key) is to do it on an external hard drive (so througth USB, the capacity storage of SD cards are too small).

Contrary to SD Card, I have to use user-defined and USB Device library.

My problem is that my f_open return me FR_NOT_READY, and it is impossible to found an exemple.

 

I tried to use this library ->

STM32Cube_FW_L5_V1.3.0\Projects\STM32L562E-DK\Applications\USB_Device\MSC_Standalone\readme.txt but I have the same problem.

Has anyone ever managed to do that?

Thanks!

This topic has been closed for replies.
AScha.3
AScha.3Best answer
Super User
March 13, 2024

Hi,

L552 cannot play "host" , see ds:

AScha3_0-1710348896213.png

So to have usb host msc : need other chip, that can be "host" .

If you feel a post has answered your question, please click on " Best Answer ".

4 replies

Tesla DeLorean
Guru
March 13, 2024

A USB Flash drive would need to use a USB HOST example, not a USB DEVICE one.

Not sure the L5 design facilitates that.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Ted_Author
Associate II
March 14, 2024

I tried to use USB HOST from a STM32F4 code but it didn't work.

AScha.3
AScha.3Best answer
Super User
March 13, 2024

Hi,

L552 cannot play "host" , see ds:

AScha3_0-1710348896213.png

So to have usb host msc : need other chip, that can be "host" .

If you feel a post has answered your question, please click on " Best Answer ".
Ted_Author
Associate II
March 14, 2024

Ok, I'll do that. Thank you.