![Freescale Semiconductor HCS08 Series Скачать руководство пользователя страница 268](http://html1.mh-extra.com/html/freescale-semiconductor/hcs08-series/hcs08-series_reference-manual_2330628268.webp)
Universal Serial Bus Device Controller (S08USBV1)
MC9S08JS16 MCU Series Reference Manual, Rev. 4
268
Freescale Semiconductor
Figure 15-20. USB Packet Flow
The USB has two sources of data overrun error:
•
The memory latency to the local USB RAM interface may be too high and cause the receive buffer
to overflow. This is predominantly a hardware performance issue, usually caused by transient
memory access issues.
•
The packet received may be larger than the negotiated MAXPACKET size. This is caused by a
software bug.
In the first case, the USB will respond with a NAK or bus timeout (BTO) as appropriate for the class of
transaction. The BTOERR bit will be set in the ERRSTAT register. Depending on the values of the
INTENB and ERRENB register, USB module may assert an interrupt to notify the CPU of the error. In
device mode the BDT is not written back nor is the TOKDNE interrupt triggered because it is assumed
that a second attempt will be queued at future time and will succeed.
In the second case of oversized data packets, the USB specification assumes correct software drivers on
both sides. The overrun is not due to memory latency but to a lack of space to put the excess data. NAK'ing
the packet will likely cause another retransmission of the already oversized packet data. In response to
oversized packets, the USB module will still ACK the packet for non-isochronous transfers. The data
written to memory is clipped to the MAXPACKET size so as not to corrupt the buffer space. The USB
module will assert the BUFERRF bit of the ERRSTAT register (which could trigger an interrupt, as above)
and a TOKDNE interrupt fails. The BDTKPID field of the BDT will not be “1111” because the BUFERRF
is
not
due to latency. The packet length field written back to the BDT will be the MAXPACKET value to
represent the length of the clipped data actually written to memory. From here the software can decide an
= USB Host
= Function
USB RST
SOF
USBRST
Interrupt Generated
SOF
Interrupt Generated
SETUP TOKEN
DATA
ACK
TOKDNE
Interrupt Generated
IN TOKEN
DATA
ACK
OUT TOKEN
DATA
ACK
TOKDNE
Interrupt Generated
TOKDNE
Interrupt Generated
Содержание HCS08 Series
Страница 2: ......
Страница 4: ......
Страница 8: ......
Страница 28: ...Chapter 2 Pins and Connections MC9S08JS16 MCU Series Reference Manual Rev 4 28 Freescale Semiconductor...
Страница 34: ...Chapter 3 Modes of Operation MC9S08JS16 MCU Series Reference Manual Rev 4 34 Freescale Semiconductor...
Страница 62: ...Chapter 4 Memory MC9S08JS16 MCU Series Reference Manual Rev 4 62 Freescale Semiconductor...
Страница 114: ...Keyboard Interrupt S08KBIV2 MC9S08JS16 MCU Series Reference Manual Rev 4 114 Freescale Semiconductor...
Страница 146: ...Multi Purpose Clock Generator S08MCGV1 MC9S08JS16 MCU Series Reference Manual Rev 4 146 Freescale Semiconductor...
Страница 166: ...Real Time Counter S08RTCV1 MC9S08JS16 MCU Series Reference Manual Rev 4 166 Freescale Semiconductor...
Страница 186: ...Serial Communications Interface S08SCIV4 MC9S08JS16 MCU Series Reference Manual Rev 4 186 Freescale Semiconductor...
Страница 214: ...16 Bit Serial Peripheral Interface S08SPI16V1 MC9S08JS16 MCU Series Reference Manual Rev 4 214 Freescale Semiconductor...
Страница 274: ...Universal Serial Bus Device Controller S08USBV1 MC9S08JS16 MCU Series Reference Manual Rev 4 274 Freescale Semiconductor...
Страница 282: ...Cyclic Redundancy Check Generator S08CRCV2 MC9S08JS16 MCU Series Reference Manual Rev 4 282 Freescale Semiconductor...
Страница 305: ......