Receiving Data; Transmission Of Data; Usb Status Register 1 (Usr1) - Motorola USB08 Reference Manual

Universal serial bus evaluation board using the mc68hc908jb8
Table of Contents

Advertisement

Universal Serial Bus (USB) Interface

4.7.1 Receiving Data

NOTE:

4.7.2 Transmission of Data

Designer Reference Manual
76
If data for endpoint 2 arrives, the interrupt handler calls handleOUT2().
The number of received bytes is noted in bits RPSIZ3–RPSIZ0 with the
allowed values in the range of 0–8.
Bit 7
6
Read:
R2SEQ
TXACK
Write:
Reset:
0
0
= Unimplemented
Figure 4-10. USB Status Register 1 (USR1)
The received data bytes are transferred from the USB endpoint data
registers UE2D0–UE2D7 to the buffer RxBuffer. This is a software ring
buffer, which can be filled by the interrupt service routine isrUSB() and
be read out by means of getUSB().
If the ring buffer is full, handleOUT2() waits until RxBuffer is able to store
data again. In this case, the USB module answers further transmission
attempts of the host with a NAK handshake.
In a real application, you should not leave the buffer unserviced over a
longer period of time.
The transmit data for EP1 is placed by the user program, via the function
putUSB(), into the send buffer TxBuffer. This is (just like RxBuffer) a ring
buffer, which blocks the application as soon as the buffer is about to
overflow.
The host polls all interrupt end points cyclically, taking into account a
guaranteed maximum latency time. That polling interval can be specified
in the endpoint descriptor. For low-speed USB devices with interrupt
endpoints the shortest specified polling interval is 10 ms. That means,
Universal Serial Bus (USB) Interface
5
4
3
TXNAK
TXSTL
RP2SIZ3 RP2SIZ2 RP2SIZ1 RP2SIZ0
0
0
0U
U = Unaffected
2
1
Bit 0
U
U
U
USB08 Evaluation Board
MOTOROLA

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mc68hc908jb8

Table of Contents