2021-04-13 04:20 AM
@Ons KOOLI.
Hi, i want to use stm32f103 or stm32f1 family microcontroller for mass storage in usb for data logging.any reference and example are pretty useful as i am new to usb logging with stm32.
Solved! Go to Solution.
2021-04-16 12:31 AM
you dont really need VUSB pin if youre using USB in device mode (i am at the moment and i dont use VUSB)
2021-04-16 03:35 AM
Hi, right now i am using usb host for Msc so as per reference manual it shown that we required to give vcc to vvbus,do you have done any mass storage project with stm32f1 kindly share your .ioc file
2021-04-19 02:06 AM
i am struggling also to do the mass storage in stm32f1 also but i do know this:
If you want your stm32 to behave as a usb flash drive use usb device mode:
https://www.youtube.com/watch?v=Us_sTdGGcOQ
If you want your stm32 to read an external flash drive connected to its usb use usb host mode:
https://www.youtube.com/watch?v=_bfROydrssA
Hardware:
Anyway VUSB needs to have a 2 resistors voltage divider becasue the bus is 5v and the adcs range ends in 3v3 as shown here:
https://www.youtube.com/watch?v=vwlXUOY7KY0&list=PLnMKNibPkDnFFRBVD206EfnnHhQZI4Hxa&index=8
2021-04-23 06:05 AM
Hi @ABhat.7 ,
Can you please specify which IDE are you using ?
Best Regards,
Ons.
2021-04-24 03:32 AM
Hi @Ons KOOLI i am using ewarm with cubemx v4.3 is their any problems with this can you example why my appli state is always showing application start in usb process function even though i have connect usb and secondly i noticed that when generate code the gpio definition for DP and DM are not present so what could be the reason
2021-04-26 02:37 AM
Hi ABhat,7,
After generating the .ioc file you provided, I found some errors on your project. Can you please re-check if you provided the good file ?
Best Regards,
Ons.
2021-04-26 02:45 AM
Hi @Ons KOOLI what error you found as i said earlier I am new to usb with stm32 so i seethe youtube example with stm32f4 the only difference that is their is that i donot use gpio for vbus i simply put a resistor divider and activate vbus is they is any other error please let me know so that i can work on it thank again waiting for your support
2021-04-26 02:50 AM
I am using cubemx v4.3 for usb code generate and after that following step provide in training video pls describe what error you are getting so that i can work on it
2021-04-27 08:46 PM
Hi, @Ons KOOLI as per your advise i revised my project with latest stm32cubef1 library v1.8.3 so i am attached my latest .ioc file and the warning is coming since i have not selected any option for vbus activation since my idea is to always keep vbus on i.e i simply put a resistor divider that has 4k7 and 10k resistance so that i can get supply as per mentioned in hal usb host document i simply do not want to use any gpio apart from that all configuration is done as per ST USB HOST MSC training video ,kindly advise me what is wrong i am doing that my device is not getting detected while debug i always notice my appli state as application start. i don't think it any issue if i donot use any gpio for activating vbus if i am giving continuously the supply to vbus.
Thanks & wait for early reply
2021-04-28 07:08 AM
Hi ABhat.7,
I checked your new .ioc version, a good thing that there is no errors/warnings anymore. However, I have to load it to an STM32F107 board but I have not at the time, unfortunately, since I am on home office. I ask you to kindly wait some time until I have access to the board.
Best Regards,
Ons.