Skip to main content
Explorer II
March 13, 2024
Solved

STM32l552 : Create a file in USB with FATFS

  • March 13, 2024
  • 2 replies
  • 1244 views

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.
    Best answer by AScha.3

    Hi,

    L552 cannot play "host" , see ds:

    AScha3_0-1710348896213.png

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

    2 replies

    Graduate II
    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.

    Ted_Author
    Explorer II
    March 14, 2024

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

    AScha.3Answer
    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" .

    Ted_Author
    Explorer II
    March 14, 2024

    Ok, I'll do that. Thank you.