RT-Thread / rt-thread

RT-Thread is an open source IoT real-time operating system (RTOS).
https://www.rt-thread.io
Apache License 2.0
10.03k stars 4.9k forks source link

[F1C100S] USH HS HOST integration for Allwinner F1C100S #3648

Open Hoel opened 4 years ago

Hoel commented 4 years ago

Hello, Is there any direction on how to add the USB HOST support for F1C100S? I have the Sunxi low level drivers working in bare metal (usbc_dev.c, usbc_dma.c, usbc_host.c, usbc_i.h, usbc_phy.c, usbc_resource.c, usbc.h, usbc.c) but i dont clearly see what has to be done to use the RTTHread USB HS HOST core. Thank you.

BernardXiong commented 4 years ago

USB Host or USB Device? Mostly, your bare metal code are USB device.

Hoel commented 4 years ago

Hello, we want to implement USB HOST. The bare metal code i have is extracted from u-boot, it is the official USB stack from sunxi, and it does cover both HOST and DEVICE mode (as well as DMA) but at low level only. To implement device from this code is simple, and there is no need for a higher level stack, however that is not the case for HOST mode.

Hoel commented 4 years ago

F1C100S_USB_Driver_V1_1 2.zip

This is the bare metal Eclipse project containing the low level driver files from USB Sunxi.

Guozhanxin commented 3 years ago

You can refer to the STM32 USB host driver https://github.com/RT-Thread/rt-thread/blob/master/bsp/stm32/libraries/HAL_Drivers/drv_usbh.c

thinpv commented 3 years ago

F1C100S_USB_Driver_V1_1 2.zip

This is the bare metal Eclipse project containing the low level driver files from USB Sunxi.

I am investigating this matter. Have you tried the usb host feature yet?