Skip to main content

usb-host-storage

:::warning [UNTESTED] — compile-only skeleton Build-verified for alp_e1m_aen401_m55_hp/ae402fa0e5597le0/rtss_hp. The uhc_xhci_alif driver is a compile-only skeleton: the uhc_api op table is complete and every function is reachable, but ring processing, transfer scheduling, IRQ wiring, and root-hub enumeration are TODO(aen401-bench) pending hardware access. Live enumeration is bench-gated. :::

Opens the USB host role via the portable <alp/usb.h> surface and enumerates an attached USB mass-storage device on the E1M-AEN401 Cortex-M55-HP. The USB host controller is grounded at 0x48200000 / IRQ 101 from the Alif DFP soc.h (AE402FA0E5597).

Source: examples/peripheral-io/usb-host-storage/.

What it does

  1. alp_usb_host_open() — drives usbh_init() on the xHCI controller context (bound to the zephyr_uhc0 DT node at 0x48200000).
  2. alp_usb_host_enable() — drives usbh_enable().
  3. Waits 2 seconds (placeholder for the enumeration wait).
  4. alp_usb_host_disable() then alp_usb_host_close().

On real silicon, step 3 would wait for a connect event, mount the MSC LUN via Zephyr's USB host MSC class driver, and list the root directory — all TODO(aen401-bench).

board.yaml

som:
sku: E1M-AEN401

preset: e1m-evk

cores:
m55_hp:
app: ./src
peripherals:
- usb

diagnostics:
log_level: info

USB host bring-up requires CONFIG_USB_HOST_STACK=y + CONFIG_UHC_XHCI_ALIF=y (in prj.conf). Build with -b alp_e1m_aen401_m55_hp/ae402fa0e5597le0/rtss_hp.

Console output shape

The stub prints the host-role lifecycle (exact text from src/main.c):

== usb-host-storage (E1M-AEN401 M55) ==
USB host enabled -- attach a mass-storage device
(enumeration is bench-gated; xHCI bring-up required)
USB host closed.

If no host backend is compiled in, alp_usb_host_open() returns NULL and the app reports the missing CONFIG_USB_HOST_STACK / DT node.

See also

Questions about this page? Discuss in Community Forum