English
Language : 

MC9S08JM16 Datasheet, PDF (318/386 Pages) Freescale Semiconductor, Inc – Microcontrollers
Universal Serial Bus Device Controller (S08USBV1)
• 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 Figure 17-19 for the BD example of
Endpoint 0 IN start from USB RAM offset 0x00.
The format for the buffer descriptor is shown in Table 17-22.
Offset
7
6
5
4
3
2
1
0
R
BDTKPID[3] BDTKPID[3] BDTKPID[1] BDTKPID[0]
0x00
OWN
DATA0/1
0
0
W
0
0
DTS BDTSTALL
R
0x01
W
R
0x02
W
BC[7:0]
EPADR[9:4]
Figure 17-19. Buffer Descriptor Example
Table 17-22. 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 packet
1 Data 1 packet
The current token PID is written back to the BD by the USB module when a transfer completes. The values
BDTKPID[3:0] 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.
BDTSTALL
BDT Stall — Setting this bit will cause the USB module to issue a STALL handshake if a token is received by
the SIE that would use the BDT in this location. The BDT is not consumed by the SIE (the OWN bit remains
and the rest of the BD is unchanged) when the BDTSTALL bit is set.
0 BDT stall is disabled
1 USB will issue a STALL handshake if a token is received by the SIE that would use the BDT in this location
MC9S08JM16 Series Data Sheet, Rev. 2
318
Freescale Semiconductor