You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Phani Kumar <ph...@gmail.com> on 2020/01/06 17:30:46 UTC

Some doubts in USB Host implementation...

Hi,

I am trying to port the USBHOST driver to RX65N controller. Basically I am
using lpc17_40_usbhost.c as reference (as this contains all the functions
of framework (xxxx_usbhost_initialize()) and host controller functions
(such as xxxx_wait(), xxxx_enumerate() etc)) in one file itself. Other
reference such as imxrt also follows same but the framework related code is
in (/boards/.../src/imxrt_usbhost.c:) and host controller related code is
in /arch/.../imxrt_ehci.c.
I have some basic doubts and your thoughts/ comments/ suggestion would help
me.
1. Basically all the references invariably refer to EHCI/ OHCI. But the USB
host in RX65N controller which we are using does not mention any thing
about this EHCI/ OHCI. My understanding is it should not matter but still -
Is there any things specific to be configured with respect to Nuttx for
these EHCI/ OHCI? RX65N contains USB peripheral with USB 2.0 complaint and
Full Speed.
2. What is IOBUFFERS with respect to USB Host? lpc17_40_usbhost.c refers to
LPC17_40_IOBUFFERS (and used as some #define) Is is the USB memory
dedicated for USB transfer? Or can we use normal RAM itself? What is the
specific use of IOBUFFER and how it needs to be configured?
3. We see xxxx_ioalloc and xxxx_iofree as well as xxxx_alloc and xxxx_free?
What is the difference between them? Is it that, xxxx_ioalloc and
xxxx_iofree functions are used with IOBUFFER? If we don't want to use them,
just implementing xxxx_alloc and xxxx_free is sufficient/ OK?
4. Many places, it is seen the debug code is wrapped between
CONFIG_DEBUG_USB_INFO, this depends on CONFIG_DEBUG_USB and I could not
find where to enable this option (not sure, if I missed something in
KConfig).
As I continue, possibly there will some more doubts/ some more clarity :)
With best regards,
Phani.