Skip to main content
Associate III
July 30, 2026
Question

STM32H723 USB disk

  • July 30, 2026
  • 16 replies
  • 224 views

I need to transfer files from my hardware (STM32H723 based) and a PC, using an USB port, just like an USB disk; my hardware uses a FT234XD USB interface chip (UART connection) and an EEPROM where I save the data.

Anyone may help me to understand how to do it ?

 

Thank you

16 replies

unsigned_char_array
Lead III
July 30, 2026

How much data are we talking about?
 

You want to transfer the files over UART? There are protocols for this such as  X-Modem.

You can also write your own flashloader and use stm32cubeprogrammer to download data as hex.

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."
carloVAuthor
Associate III
July 30, 2026

I would like to have the device working like an USB disk (FAT,...); the device USB interface is realized using the FT234XD chip (FTDI, USB to a STM32H723 UART port) and the files must be stored in a EEPROM connected with an I2C interface to the STM32H723.

 

 

unsigned_char_array
Lead III
July 30, 2026

Why not use USB OTG interface of the STM32H723? That way you can directly connect the STM32 to the PC. You can also use the USB host interface and store the data on a thumb drive.

If you really want to use a USB serial chip to connect to the PC you need some software to map it to a drive.

Examples:

 

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."
Andrew Neil
Super User
July 30, 2026

my hardware uses a FT234XD USB interface chip (UART connection) 

As you say, that’s a UART connection - that will never give you a Mass Storage connection.

But, as ​@unsigned_char_array said, there are plenty of protocols to allow data transfer over a UART link.

 

If you want your board to appear to your PC as a Mass Storage device (like a USB stick), then you will have to implement the USB Mass Storage Class Device on the STM32’s USB hardware.

 

Or do you want to be able to plug a USB stick into your board, so that you can transfer data from your board?

In that case, you would need to implement a USB Mass Storage Class Host on your board.

 

There should be USB examples available in CubeMX.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
carloVAuthor
Associate III
July 30, 2026

 

I want my board to appear to my PC as a Mass Storage device (like an USB stick), but I need to save/read my files into/from an EEPROM connected to an I2C interface of the STM32H723.

Is there an application or example available ?

 

Thank you

Andrew Neil
Super User
July 30, 2026

 

I want my board to appear to my PC as a Mass Storage device (like an USB stick), but I need to save/read my files into/from an EEPROM connected to an I2C interface of the STM32H723.

So you will have to implement the USB Mass Storage Class Device on the STM32’s USB hardware.

 

but I need to save/read my files into/from an EEPROM connected to an I2C interface of the STM32H723.

As always, do one step at a time; eg,

  1. Get the USB Mass Storage Class Device working alone.
  2. Get your I2C EEPROM working alone.
  3. Integrate the two.

You can’t expect there to be a ready-made example for every single possible combination of everything!

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
carloVAuthor
Associate III
July 30, 2026

ok, thank you

 

LCE
Principal II
July 30, 2026

Expect this to be a long and hard journey, from the questions you asked this seems rather new to you.

The STM32H7 can do that with some external memory, but it’s nothing that you can click to a working product with CubeMX.

The USB interface itself is far from the simplicity of a UART, the same goes for the external memory interface, and then the SW glue in-between with a file system… not the most simple stuff for a start!

carloVAuthor
Associate III
July 30, 2026

Yes...I agree, what do you suggest I do to deal with the problem?

 

Thank you

Andrew Neil
Super User
July 30, 2026

Yes...I agree, what do you suggest I do to deal with the problem?

I think that’s a new question for a new thread.

The original question of how to make your STM32 look like a USB stick has been answered, so please mark the solution on the post which provided the answer - not this one!

 

Then start a new thread describing what you’re actually trying to achieve - then people can make suggestions on how to reach that goal.

Describe the goal, not the step

The XY Problem

 

Give a link here to the new thread.

In the new thread, you can give a link back here, for reference, if you feel it helps.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Explorer II
July 31, 2026

my hardware uses a FT234XD USB interface chip (UART connection) 

That means you’ll never get a USB Mass Storage connection. FT23x could only work as a USB CDC device, like a virtual COM.

 

So you have two options to choose from:

  1. YOU STILL WANNA A USB DISK.  Then you should take FT23x as nonsense and build a USB Full-speed connection directly with H723. Reference to ST’s USB firmware examples like MassStorage & portable file systems like exFAT you’ll be sure to implement an applicable solution, though much effort needed which may be quite challenging for a newbie, like you. or you may
  2. YOU WANNA MAKE IT EASIER.  Then you just study communication protocols like XMODEM and upload your raw data through a USB Virtual COM. You can build your soft on your upper-computer to hand-shake with your device, receive your raw data and do further data-processing tasks. Put emphasis on your ultimate objective, not a time-consuming building-while-learning...