Skip to main content
Visitor II
April 13, 2021
Solved

USB SUPPORT

  • April 13, 2021
  • 3 replies
  • 4426 views

@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.

    This topic has been closed for replies.
    Best answer by Ons KOOLI

    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.

    3 replies

    Visitor II
    April 13, 2021

    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.

    ABhat.7Author
    Visitor II
    April 13, 2021

    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

    Visitor II
    April 14, 2021

    Hi ABhat.7,

    Can you please specify which STM32 Device/MCU you are working with ?

    Best Regards,

    Ons.

    Graduate II
    April 16, 2021

    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

    https://community.st.com/s/question/0D53W00000hPoRCSA0/cdctransmitfs-doesnt-flag-when-tx-is-done-in-usb-cdc-device-mode

    ABhat.7Author
    Visitor II
    April 28, 2021

    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

    Ons KOOLIAnswer
    Visitor II
    April 28, 2021

    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.

    ABhat.7Author
    Visitor II
    May 6, 2021

    Thank for your help once again i am succesfully implement usb mass storage with my custom board it actually the new library that did the work for me thank once again for your support except same in future also.