Introduction to USB--Part 2, Page 2.
J AND K STATES
The J State is the same polarity as the idle state (the line with the pull-up resistor is high, and the other line is low), but is being driven to that state by either host or device.
The K state is just the opposite polarity to the J state.
The J and K terms are used because for Full Speed and Low Speed links, they are of opposite polarity.
The End of Packet (EOP) is an SE0 state for 2 bit times, followed by a J state for 1 bit time.
This is the illegal condition where both lines are high. It should never occur on a properly functioning link.
When the host wants to start communicating with a device it will start by applying a 'Reset' condition, which sets the device to its default unconfigured state.
The Reset condition involves the host pulling down both data lines to low levels (SE0) for at least 10 ms. The device may recognize the reset condition after 2.5 us.
This 'Reset' should not be confused with a micro-controller power-on type reset. It is a USB protocol reset to ensure that the device USB signaling starts from a known state.
With today’s emphasis on energy saving, the USB suspend mode is very useful. It allows to power down an unused device.
Suspending a device is achieved by not sending anything to the device for 3 ms.
A Start-Of-Frame packet (at full speed, see Packets section) or a Keep Alive signal (at low speed) is sent by the host every 1 ms to keep the device awake.
A suspended device must recognize the resume signal and the reset signal.
This is represented by a Low speed EOP. It is sent at least once every millisecond on a Low speed link, in order to keep the device from suspending.
When the host wants to wake the device up after a suspend, it does so by reversing the polarity of the signal on the data lines for at least 20ms. The signal is completed with a low speed end of packet signal.
It is also possible for a device with its remote wakeup feature set, to initiate a resume itself. It must have been in the idle state for at least 5ms, and must apply the wakeup K condition for between 1 and 15 ms. The host takes over the driving of the resume signal within 1 ms.
NEXT: USB Topology
µC/USB Device: Universal Serial Bus Device Stack for the Renesas RX63N, Chapter 2, by Christian Legare, is excerpted with permission. The text is available at Micrium.