cancel
Showing results for 
Search instead for 
Did you mean: 

STM32l552 : Create a file in USB with FATFS

Ted_
Associate II

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!

1 ACCEPTED SOLUTION

Accepted Solutions
AScha.3
Chief III

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 "Accept as Solution".

View solution in original post

4 REPLIES 4

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
Up vote any posts that you find helpful, it shows what's working..
AScha.3
Chief III

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 "Accept as Solution".

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

Ok, I'll do that. Thank you.