English
Language : 

MC9S08JM60 Datasheet, PDF (317/386 Pages) Freescale Semiconductor, Inc – Microcontrollers
Universal Serial Bus Device Controller (S08USBV1)
Table 17-22. Buffer Descriptor Table Fields (continued)
Field
Description
BC[7:0]
Byte Count — The Byte Count bits represent the 8-bit byte count. The USB module serial interface engine
(SIE) will change this field upon the completion of a RX transfer with the byte count of the data received. Note
that while USB supports packets as large as 1023 bytes for isochronous endpoints, this module limits packet
size to 64 bytes.
EPADR[9:4]
Endpoint Address— The endpoint address bits represent the upper 6 bits of the 10-bit buffer address within
the module’s local USB RAM. Bits [3:0] of EPADR are always zero, therefore the address of the buffer must
always start on a 16-byte aligned address within the local RAM. These bits are unchanged by the USB module.
This is NOT the address of the memory on the system bus. EPADR is relative to the start of the local USB RAM.
17.4.3 USB Transactions
When the USB module transmits or receives data, it will first compute the BDT address based on the
endpoint number, data direction, and which buffer is being used (even or odd), then it will read the BD.
Once the BD has been read, and if the OWN bit equals 1, the serial interface engine (SIE) will transfer the
packet data to or receive the packet data from the buffer pointed to by the EPADR field of the BD. When
the USB TOKEN is complete, the USB module will update the BDT and change the OWN bit to 0.
The STAT register is updated and the TOKDNE interrupt is set. When the microcontroller processes the
TOKDNE interrupt, it reads the status register. This gives the microcontroller all the information it needs
to process the endpoint. At this point the microcontroller can allocate a new BD, so additional USB data
can be transmitted or received for that endpoint, and it can process the previous BD. Figure 17-20 shows
a timeline for how a typical USB token would be processed.
MC9S08JM60 Series Data Sheet, Rev. 2
Freescale Semiconductor
317