![Freescale Semiconductor HCS08 Series Reference Manual Download Page 266](http://html1.mh-extra.com/html/freescale-semiconductor/hcs08-series/hcs08-series_reference-manual_2330628266.webp)
Universal Serial Bus Device Controller (S08USBV1)
MC9S08JS16 MCU Series Reference Manual, Rev. 4
266
Freescale Semiconductor
The microcontroller uses the data stored in the BDs to determine:
•
Who owns the buffer in system memory
•
Data0 or Data1 PID
•
The received TOKEN PID
•
How much data was transmitted or received.
•
Where the buffer resides in buffer memory
The BDT is composed of buffer descriptors (BD) which are used to define and control the actual buffers
in the USB RAM space. BDs always occur as a 3-bytes block. See
Endpoint 0 IN start from USB RAM offset 0x00.
The format for the buffer descriptor is shown in
.
Offset
7 6 5 4 3 2 1
0
0x00
R
OWN DATA0/1
BDTKPID[3] BDTKPID[3] BDTKPID[1] BDTKPID[0] 0
0
W
0
0
DTS
BDTSTALL
0x01
R
BC[7:0]
W
0x02
R
EPADR[9:4]
W
Figure 15-19. Buffer Descriptor Example
Table 15-20. Buffer Descriptor Table Fields
Field Description
OWN
OWN
— This OWN bit determines who currently owns the buffer. The USB SIE generally writes a 0 to this bit
when it has completed a token. The USB module ignores all other fields in the BD when OWN=0. Once the BD
has been assigned to the USB module (OWN=1), the MCU must not change it in any way. This byte of the BD
must always be the last byte the MCU (firmware) updates when it initializes a BD. Although the hardware will
not block the MCU from accessing the BD while owned by the USB SIE, doing so may cause undefined
behavior and is generally not recommended.
0 The MCU has exclusive access to the entire BD
1 The USB module has exclusive access to the BD
DATA0/1
Data Toggle
— This bit defines if a DATA0 field (DATA0/1=0) or a DATA1 (DATA0/1=1) field was transmitted or
received. It is unchanged by the USB module.
0
Data 0 packe
t
1 Data 1 packet
BDTKPID[3:0]
The current token PID is written back to the BD by the USB module when a transfer completes. The values
written back are the token PID values from the USB specification: 0x1 for an OUT token, 0x9 for and IN token
or 0xd for a SETUP token.
DTS
Data Toggle Synchronization
— This bit enables data toggle synchronization.
0 No data toggle synchronization is performed.
1 Data toggle synchronization is performed.
Summary of Contents for HCS08 Series
Page 2: ......
Page 4: ......
Page 8: ......
Page 62: ...Chapter 4 Memory MC9S08JS16 MCU Series Reference Manual Rev 4 62 Freescale Semiconductor...
Page 305: ......