2012年12月9日

[Note] USB firmware development note

1. Host 要求data前,要先將Data放入endpoint的buffer中,中斷發生是通知韌體可以繼續放入下一筆資料,如果認為在提供資料前等待中斷,也許中斷永遠都不會來臨
2. All Control Transfer must have SETUP/STATUS phase, but DATA phase is not necessary.
    The control transfer without DATA phase can be referred to as Control Write.
3. First data in data phase of control transfer is DATA1, the one in setup phase in DATA0
4. Interrupt Transfer中,資料請求必定為Host所送出
5. HUB上有pull-down電阻,Device上有pull-high電阻,Full Speed Device為D+, Low Speed Device在
    D-上,HUB利用D+/D-電壓來監控是否有Device插上,在Host Reset Command(Set Port Feature)
    後,Device會把Pull-up電阻移走,改接上終端電阻(利用Device FW去對USB_enable pin做控
    制,也必須有額外的硬體電路)
6. Control Transfer中如果命令不被裝置所接受,裝置會回應STALL來告知HOST。但是在SETUP
    階段裝置必須回應ACK,因此STALL是在Data或Status回應。盡可能在Data階段回應。
7. Normally a SOF packet (at full speed) or a Keep Alive signal (at low speed) is sent by the host every 1 ms, and this is what keeps the device awake.

沒有留言: