Usb Reset - Motorola USB08 Reference Manual

Universal serial bus evaluation board using the mc68hc908jb8
Table of Contents

Advertisement

4.5.3 USB Reset

USB08 Evaluation Board
MOTOROLA
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
U08MAIN.C.
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
Reset Vector Module
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).
Universal Serial Bus (USB) Interface
Universal Serial Bus (USB) Interface
USB Implementation in the Reference Design
VECJB8.C). In the reference design, it points to
3.6 Interrupt and
Designer Reference Manual
67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908jb8

Table of Contents