-
I'm trying to get a MAX3421 host adapter to work with a STM32H723. My goal is to read a file from a FAT formatted USB key that is directly connected to the MAX3421 (no hub). The STM32H723 USB device is not available on my board. Probably I don't fully understand what needs to be done. I did the following:
I can see that the MAX3421 code in src\portable\analog\max3421\hcd_max3421 is not included in the code. Do I need to define "MAX3421_HOST = 1" in the makefile? Any feedback would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
The board I'm talking about is a 3D printer board, the Mellow Fly D8 Pro: |
Beta Was this translation helpful? Give feedback.
-
yeah, if you use the example makefile, you need to have |
Beta Was this translation helpful? Give feedback.
-
Thanks, that's very helpful. Here my progress: It seems to be working :D I will cleanup the code a bit and post it here soon. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure what to do, because the board I use (Mellow Fly D8 Pro V1.1 3D printer motherboard) does not fit into the STM32H7xx family, it doesn't have Vbus control and doesn't use the USB ID pin, it only connects the USB D+ and D- pins, and there is a hub on the board with the upstream port at the external type-C connector. This means that the STM32H723 can only be used as a device. I tried the dual port CDC example, which works fine on the board. Here the board configuration I made for this board: Probably the most interesting part is the MAX3421 API implementation for the STM32H7 platform. Compile it with: Some conclusions:
UPDATE: 2 more items
I use 50 frames and a 1500ms timeout. If there is no USB drive present then the timeout will run out. Any question are always welcome. |
Beta Was this translation helpful? Give feedback.
yeah, if you use the example makefile, you need to have
make BOARD=yourboard MAX3421_HOST=1 all
to include hcd_max3421.c in the compiling sources, it will also add define for CFG_TUH_MAX3421=1 as well https://github.com/hathach/tinyusb/blob/master/examples/build_system/make/make.mk#L117