OSDev.org
https://forum.osdev.org/

How to start with developing UHCI?
https://forum.osdev.org/viewtopic.php?f=1&t=33951
Page 1 of 1

Author:  Klakap [ Tue Aug 27, 2019 11:57 am ]
Post subject:  How to start with developing UHCI?

Good day!

I want write driver for USB and I want start with UHCI. But I have problem. I dont know where I should start. OsDev, LowLevel and BenLunt USB book contain many informations and I dont know how it use. My code for UHCI interface is here: https://github.com/Klaykap/LightningOS/blob/master/source/drivers/usb_uhci.c but I dont know how start initalize usb and do transfers.

Please where I can found "first step with USB"?
Please how is right initalization of usb port?

I thank you in advance.

Author:  SanderR [ Fri Aug 30, 2019 2:22 pm ]
Post subject:  Re: How to start with developing UHCI?

I had the same problem.

first you stop the controller by turning the running bit on 0. (at USBCMD)
then you call a reset by turning the reset bit on 1 (at USBCMD)
then you wait, and turn the reset bit off again.
then you fill all the registers with how you want to have it, then you put the running bit on again (USBCMD).
now it should detect usbsticks. on emulators he does this but on real hardware im not able to make it work yet.

Author:  nullplan [ Fri Aug 30, 2019 2:30 pm ]
Post subject:  Re: How to start with developing UHCI?

https://lmgtfy.com/?q=uhci+design+guide&p=1&iie=1

The spec tells you exactly which bits to set and how long to wait for the reset. As for transfers, you will have to read up on the Frame List. Essentially, you create a TD pointing to the buffer required, then tell the UHCI to run and wait for the frame to get sent or received.

Author:  Klakap [ Thu Sep 05, 2019 7:58 am ]
Post subject:  Re: How to start with developing UHCI?

Thank for answers!

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/