Skip to main content
Visitor II
March 3, 2023
Question

How to store a text file in STM32F4 using USB Mass Storage Class and FATFS?

  • March 3, 2023
  • 4 replies
  • 5094 views

I'm not able to create txt file, what issue , can you provide source code? please help me.

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    March 3, 2023

    Hello @ADevg.1​ and welcome to the Community :),

    I recommend you to get started with the example provided here STM32CubeF4/Projects/STM32469I-Discovery/Applications/USB_Host/MSC_Standalone.

    This example can help you to use the USB host application based on the Mass Storage Class (MSC) on the STM32F4xx devices and to write a small text file (less to 1 KB) on the USB flash disk.

    Also, I advise you to take a look at this wiki.

    I hope this help you!

    Kaouthar

    ADevg.1Author
    Visitor II
    March 7, 2023

    Using Flash memory to create text file , is it possible ? without use any external USB or SD card. .

    Graduate II
    March 7, 2023

    Yes, it's just a collection of bytes​.

    The larger 128KB Flash blocks are a bit awkward to manage.​

    ADevg.1Author
    Visitor II
    March 9, 2023

    I'm allocate 128KB Flash block size, but file not created and unable to complete the format. https://github.com/ankitdevganiya13/STM32_USB_MSC_FATFS/tree/master

    0693W00000aIYeZQAW.jpg

    ADevg.1Author
    Visitor II
    March 31, 2023

    Any reply ?

    ST Employee
    April 4, 2023

    Hi @ADevg.1​ 

    IIRC, you are configuring the STM32 as an USB storage device and want to write data using the windows machine on the internal flash of the STM32?

    is this correct?

    Technical Moderator
    March 31, 2023