Skip to main content
Associate II
August 8, 2023
Solved

USB MSD/USB Stick example for STM32G4 Series

  • August 8, 2023
  • 2 replies
  • 4467 views

Hello, 

I have a STM32G4 evaluation board. My goal is to read and write to a USB thumb drive (pen drive/MSD device) using an STM32G4 microcontroller (bare-metal). 

When I look at the possible USB examples in the CubeIDE, I can't find any examples for MSD devices that are not obsolete and supported in CubeIDE.

1.png

Am I searching for the incorrect thing within CubeIDE?

Would you be able to point me to example(s) for this?

Thanks, 

Emma

This topic has been closed for replies.
Best answer by waclawek.jan

Why would those board be obsolete?

But, AFAIK, the'G4 family uses a device-only USB, so you can't implement Host on it.

Choose a different family or a different solution.

JW

2 replies

RhSilicon
Lead
August 8, 2023

There are videos about this in the USB Host section. See the description of this video:

https://www.youtube.com/watch?v=uIOb5sSFyUY

To be able to do baremetal code, you can open the HAL functions and analyze the accessed registers.

waclawek.jan
waclawek.janBest answer
Super User
August 9, 2023

Why would those board be obsolete?

But, AFAIK, the'G4 family uses a device-only USB, so you can't implement Host on it.

Choose a different family or a different solution.

JW