Skip to main content
Visitor II
June 12, 2020
Question

USB Mass Storage bridge to monitor USB traffic

  • June 12, 2020
  • 8 replies
  • 2838 views

Hi

I have stm32f446re nucleo. Is it possible to make one USB traffic monitoring bridge using it?

(USB Storage or SDCard) <-----STM32-----> Computer

I am trying to do is to make one monitor to see what content is getting accessed from the computer from the mass storage or sd card etc.

Can someone guide on this?

    This topic has been closed for replies.

    8 replies

    Graduate II
    June 12, 2020

    If you implement a USB MSC device you can see the SCSI READ/WRITE transactions as you perform them against SDRAM, or SDIO/SDMMC storage medium.

    SSune.1Author
    Visitor II
    June 12, 2020

    Is there any sample available. that will be helpful

    Graduate II
    June 12, 2020

    The CubeF4 trees have several MSC and SDIO examples for DISCO and EVAL boards that should port. Review those.

    SSune.1Author
    Visitor II
    June 13, 2020

    umm I don't know how to port. I'm very biginner in embedded. ​

    SSune.1Author
    Visitor II
    June 12, 2020

    Thank you. I ll try

    SSune.1Author
    Visitor II
    June 21, 2020

    Hi Clive

    I tried one example to make a mass storage device using SRAM, got it from ST's tutorial for USB MSC.

    I am having nucleo 446RE. I followed the same approach to make 64kb mass storage, I can see the device is attached to system as mass storage

    but Is says "Device is not started: USBSTOR"

    Device USB\VID_0483&PID_5727\307533543038 was not migrated due to partial or ambiguous match.

    What could be solution for this?

    Graduate II
    June 21, 2020

    I suspect this would be an issue with READ or GET CAPACITY functionality provided by the MSC, or some issue with the USB descriptors.

    You could instrument the USB interactions, via the Nucleo VCP, and observe the interactions with Windows. You could validate the read/write block functionality.

    SSune.1Author
    Visitor II
    July 1, 2020

    HI Clive

    I am trying to configure with the SDIO and the USB mass storage. is it possible to have both option at the same time?

    below is the configuration I did in CubeMx.

    0693W000001rsUjQAI.png

    When compiling the generated source code, getting the below error. can you please guide something what could went wrong?

    compiling syscall.c...

    linking...

    F466RE_USB_MASS_STORAGE\F466RE_USB_MASS_STORAGE.axf: Error: L6200E: Symbol HAL_SD_AbortCallback multiply defined (by stm32f4xx_hal_sd.o and bsp_driver_sd.o).

    F466RE_USB_MASS_STORAGE\F466RE_USB_MASS_STORAGE.axf: Error: L6200E: Symbol HAL_SD_RxCpltCallback multiply defined (by stm32f4xx_hal_sd.o and bsp_driver_sd.o).

    F466RE_USB_MASS_STORAGE\F466RE_USB_MASS_STORAGE.axf: Error: L6200E: Symbol HAL_SD_TxCpltCallback multiply defined (by stm32f4xx_hal_sd.o and bsp_driver_sd.o).

    Not enough information to list image symbols.

    Not enough information to list load addresses in the image map.

    Finished: 2 information, 0 warning and 3 error messages.

    "F466RE_USB_MASS_STORAGE\F466RE_USB_MASS_STORAGE.axf" - 3 Error(s), 1 Warning(s).

    0693W000001rsUtQAI.png

    I searched the function it;s in two places.

    how to fix it?

    SSune.1Author
    Visitor II
    July 1, 2020

    changing the IDE from Kiel to STMCube IDE worked :grinning_face:

    SSune.1Author
    Visitor II
    July 5, 2020

    Hi Again

    I tried to make it work.

    I have the SD card SDIO module. checked the connectivity.

    Some time I can see the USB device is added, but when try to format it it does not work.

    Attached the source generated with CubeMX.

    What is wrong with this?

    SSune.1Author
    Visitor II
    July 7, 2020

    @Community member​  any suggestions?