Hi Jan
Writing after a long time.
Now I am stuck woth yet another thing to figure out and that is Device disconnect.
"
The EOP field varies depending on the bus speed. For low- or full-speed buses, the EOP consists of an SE0 for two bit times. For high-speed buses, because the bus is at SE0 when it is idle, a different method is used to indicate the end of the packet. For high-speed, the transmitter induces a bit stuff error to indicate the end of the packet. So if the line state before the EOP is J, the transmitter will send 8-bits of K. The exception to this is the high-speed SOF EOP, in which case the high-speed EOP is extended to 40-bits long. This is done for bus disconnect detection."1.Over here, I want to know how with a 40 bit long SOF EOP , would a device disconnect option be deetrmined? As in, how would the D+ D- lines be monitored?
2. When a device is removed (without ejecting it safely from the system) abruptly, what should be the USB line status of D+ and D- on the HOST and the Device side?
In my setup, I have a transparent Bridge between the HOST(PC) and my device(usb 2.0 mass storage device). So now when I eject the mass storage device safely ,where should I be looking for SE0 State, on Host or on Device Side? ( I have provisions to monitor the D+ and D- lines at both the Host and the Device side).
3. What is the significance of Start/Stop Unit as far as device disconnect is concerned? I have read it in ur book on mass storage devices, that "
A host issues the START STOP UNIT command to request to change the
device’s power condition to active, idle, or standby and to request the device
to load or eject its storage media. The command has no data-transport
phase. SBC devices aren’t required to support this command.
"
4. Is it necessary that each time the device is safely ejected from the system, the Start Stop command is sent by the HOST?
5. If I directly unplug the USB 2.0 storage device without safely ejecting it, I do not get any such command issued from the HOST side. Could you please explain that.
6. Also when I observe the D+ and D- lines of the USB device, on ejecting the media safely , the D+ line goes high and remains so until the device is plugged in again and the chirping and enumeration repeats.
In this case , I am a lil confused as to where is the "SE0" state which should come on disconnecting the device.
Anxiously awaiting your reply.
(PS: my system is working fine and the mass storage device gets detected with my logic implemented
)