eclipse-threadx / usbx

Eclipse ThreadX - USBX is a high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with Eclipse ThreadX RTOS
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/usbx/index.md
MIT License
146 stars 87 forks source link

usbx host stack behavior #128

Closed sw2mrc closed 6 months ago

sw2mrc commented 7 months ago

Hello,

I have few clarification questions on usbx host stack behavior..

Assuming there are two devices and a hub on usb 2.0 bus, I would like some clarity on the host stack behavior:

  1. Will usbx allocate an EP0 channel for each device, so, in this case three ep0 channels?
  2. Will these three ep0 channels remain in allocated state and not available for reassignment until these devices are detached from the bus?

A separate question -- it seems like the host stack processes periodic edlist even where there are no devices on the bus - shouldn't it skip the processing task altogether when there are no devices on the bus?

Thank you.

sw2mrc commented 7 months ago

Hello, I would appreciate a response.. thank you.

xiaocq2001 commented 7 months ago

The action actually depends on the implement in HCD,

  1. Yes, the host stack allocates EP0 for each device and issues command to HCD to create physical channel for each EP0
  2. HCD allocates physical channel for each EP0 (the current implement) but it's possible for HCD to maintain logical EP0 to share a single physical channel for all EP0s on all devices.
sw2mrc commented 6 months ago

thanks.