cancel
Showing results for 
Search instead for 
Did you mean: 

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

ADevg.1
Associate II

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

8 REPLIES 8
KDJEM.1
ST Employee

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

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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

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

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ADevg.1
Associate II

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

Sir, I'm allocate 128KB Flash block size, but file not created and unable to format.

https://github.com/ankitdevganiya13/STM32_USB_MSC_FATFS/tree/master

ADevg.1
Associate II

Any reply ?

KDJEM.1
ST Employee

Hello @ADevg.1​ ,

Could you please check these posts:

I hope this helps!

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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?