cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7 with eMMC and USB Mass Storage Class electronics/software question

yaxsomo
Associate III

Hello everyone!

 

I have a very important question about a PCB design that I'm making.

I basically have a PCB with a bunch of sensors, a 4Gb eMMC memory and a USB-C connector. Here's the related schematics : 


- Power section : 

yaxsomo_0-1724068353566.png

- Microcontroller (I'm sorry for this layout, I'll make it more readable in the near future) : 

yaxsomo_1-1724068391301.png

- eMMC memory and USB-C connector : 

yaxsomo_2-1724068461863.png

If you see some issues on the schematics please do not hesitate to let me know.
The desired behavior is : 

 

1)  The USB is not connected and the module is powered up -> Data gathering from sensors and logging into the eMMC memory.

2) The USB is connected and powers up the module (with the VBUS pin that goes from the USB to the input of the DC/DC converter) -> Data Retrieval mode -> The sensors are not gathering data neither logging into the eMMC memory, but the module can be accessed with a PC as a USB stick so i can pick up the log data easily. 

 

My question is : Are the electronics schematics showed above good for what i'm doing? How can i switch between this 2 modes by detecting a connection via USB? 

I found this function on the USBD driver that can maybe do the job: 

 

yaxsomo_3-1724068921221.png


Do you know if there's a basic implementation of this function for what I'm trying to do ?

 

I hope my post is clear enough, thank you in advance for your help!



10 REPLIES 10
yaxsomo
Associate III

I checked and it's 5V tolerant, but I added a voltage divider for safety! Thank you all for you help, I really appreciate it!