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-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.
2021-04-13 06:38 AM
Hi ABhat,7,
There are two types of USB projects: USB device where the STM32 is working as a device and USB Host where the STM32 is working as a Host.
If you want to use the STM32F1 device to store to a usb, so here we are talking about USB Host.
I recommend to look for the STM32CubeF1 FW package. You can find MSC_Standalone applications under the following directory: STM32Cube_FW_F1_V1.8.0\Projects\$board_name$\Applications\USB_Host/MSC_Standalone.
If you don't find the MSC_Standalone project, you can do a porting of the project existing under \STM32Cube_FW_F1_V1.8.0\Projects\STM3210C_EVAL\Applications\USB_Host\MSC_Standalone to your preferred device. Proting should be easy from device to another device in the same family.
You can also work with STM32CubeMx by following this tutorial.
For more information about USB Host you can see this document, and for more info about USB, you can look for USB 2.0 Specification by usb.org
I hope these are helpful. If you have any issue when creating and working on your MSC project, we are glad to help :smiling_face_with_smiling_eyes:
Best Regards,
Ons.
2021-04-13 08:39 AM
But there is no usb host in stm32f103 cubemx which is their in stm32f107 or other controller so how can i log data with stm32f103
2021-04-14 02:04 AM
Hi ABhat.7,
Can you please specify which STM32 Device/MCU you are working with ?
Best Regards,
Ons.
2021-04-14 02:29 AM
Hi, write now i am implement it with stm32f107 bit i have to do it with stm32f103c8 controller that why i asked is it possible to do usb host woth it or now can we perform usb log with stm32f103
2021-04-14 06:59 AM
Hi ABhat.7,
According to the Reference Manual on Sections 23 (This section applies to the STM32F103xx performance line and STM32F102xx USB access line families only) and Section 28 (This section applies only to STM32F105xx and STM32F107xx connectivity line devices) , the STM32F103xx line does not support USB OTG, it has a USB FS device only interface. Therefore, you cannot work with USB Host for the STM32F103xx line of STM32F1 devices, unfortunately.
Best Regards,
Ons.
2021-04-14 11:02 PM
hi, attached is the circuit i am i am using a custom board with stm32f107vct6 as main controller i have connected Vbus directly to 5 volt so after programming according to the youtube example only changing the controller i noticed that the controller not able to detected the usb device ,i suppose it might be becuase of Vbus getting in overcurrent since i supply +5v directly to Vbus is it possible to have usb host without vbus or please suggest what could be done with the same circuit
2021-04-15 01:44 AM
Hi ABhat.7,
Please refer to the MSC_Standalone application under: \STM32Cube_FW_F1_V1.8.0\Projects\STM3210C_EVAL\Applications\USB_Host\
You can share with me your .ioc file if you want, for more details about your issue.
Best Regards,
Ons.
2021-04-15 08:14 AM
2021-04-16 12:29 AM
Hi everyone i know is not directly related but do you ave any toughts about this?(@Ons KOOLI )
my usb cdc device transmitt function is giving me a headache