Universal Serial Bus (USB) Interface
USB Implementation in the Reference Design
USB08 Evaluation Board
Designer Reference Manual
MOTOROLA
Universal Serial Bus (USB) Interface
67
4.5.3 USB Reset
An USB reset is an event which is used by the USB hub to reset the
attached devices to the initial state. Electrically, the reset signal is a
special bus condition (single ended zero) which is initiated by the host
and then passed on by the hub(s).
The USB module of the MC68HC908JB8 reacts to this either with a
hardware reset or with an interrupt, dependent on the configuration
selected in the CONFIG (configuration) register. Since a hardware reset
(in particular during the debugging via monitor mode) is not without side
effects, the generation of an interrupt is preferred here. For this purpose,
the URSTD bit in the CONFIG register has to be set. It has to be
considered that a write access to the CONFIG register is possible only
once after each power-on reset. Therefore, write access to this control
register is done in the function _HC08Setup() in the module
The USB reset interrupt, together with all the other USB sources of
interrupt, points to a central USB interrupt vector. The USB interrupt has,
apart from the software interrupt (SWI), the highest priority in the
interrupt system of the MC68HC908JB8. The USB interrupt vector is
stored at the vector address 0xFFFA/0xFFFB (see
). In the reference design, it points to
the function isrUSB(), which is responsible for the entire
interrupt-controlled USB handling.
In the interrupt service routine all applicable interrupt flags are
successively examined. If it is recognized that the RSTF bit in the USB
interrupt register 1 (UIR1) is set, it means that a USB reset interrupt has
occurred.
In this case, first the function initUSB() is called to set all control registers
of the USB module into the default condition. Afterward, the two interrupt
endpoints, EP1 and EP2, will be enabled to prepare for the following
transfer of data. Now, the local interrupt enable bits TXD0IE, RXD0IE,
TXD1IE and RXD1IE in the USB interrupt register 0 (UIR0) are set so
they can react on the information sent or received from the endpoints
using interrupts. In addition, the end-of-packet interrupt will be enabled
with EOPIE (suspend handling).
Содержание MC68HC908JB8
Страница 2: ...blank ...
Страница 6: ...Designer Reference Manual USB08 Evaluation Board 6 List of Sections MOTOROLA List of Sections ...
Страница 16: ...Designer Reference Manual USB08 Evaluation Board 16 List of Tables MOTOROLA List of Tables ...
Страница 42: ...Designer Reference Manual USB08 Evaluation Board 42 Hardware Description MOTOROLA Hardware Description ...
Страница 88: ...Designer Reference Manual USB08 Evaluation Board 88 USB08 Descriptors MOTOROLA USB08 Descriptors ...
Страница 243: ...blank ...