Skip to main content
Graduate
June 3, 2024
Question

USB Host read gets interrupted

  • June 3, 2024
  • 2 replies
  • 1367 views

Hi y'all.

I'm working on a project which uses a stm32 nucleo board (f446re) as both usb host and device, using USBFS as device and USBHS as host.

The goal is to make some sort of interface between computer and memory sticks, which renders them as read only devices.

Currently I was able to bring up micro as a usb MSC device and connect it to computer with relative ease, ans also I can read/write on any MSC devices attached to my board (on specific sectors) hence I get to conclusion that both usb device and usb host roles of micro are working correctly independently.

The problem is when I try to merge these two roles together, in a way that micro is a bridge between computer and memory stick, it fails without any good explanation. When I atttach my memory stick to board, for a brief time OS recognizes the filesystem and even shows there is a partition on memory stick, but after a few seconds it vanishes and os cannot mount my filesystem as if usb device is not attached to micro at all.

Can anyone please guide me through this? I'm really confused and cannot figure it out by myself.

    This topic has been closed for replies.

    2 replies

    Graduate
    June 3, 2024

    And here is my complete project folder attached

    Sorry for uploading the project entirely, I didn't knwo which file would be required for review

    Graduate
    June 3, 2024

    Sorry, the site does not allow me to upload the whole project so I just attached the two files that I manipulated