PIC16C745/765
10.5.1.3 USB Error Interrupt Status Register (UEIR)
interrupt bit has been set it must be cleared by writing
a zero to the respective interrupt bit. Each bit is set as
soon as the error condition is detected. Thus, the inter-
rupt will typically not correspond with the end of a
token being processed.
The USB Error Interrupt Status Register (UEIR) con-
tains bits for each of the error sources within the USB.
Each of these bits are enabled by their respective error
enable bits (UEIE). The result is OR’ed together and
sent to the ERROR bit of the UIR register. Once an
REGISTER 10-3: USB ERROR INTERRUPT FLAGS STATUS REGISTER (UEIR: 192h)
R/C-0
R/C-0
R/C-0
R/C-0
R/C-0
R/C-0
R/C-0
R/C-0
BTS_ERR OWN_ERR WRT_ERR BTO_ERR DFN8 CRC16 CRC5 PID_ERR
R = Readable bit
C = Clearable bit
U = Unimplemented
bit, read as ‘0’
-n = Value at POR
reset
bit7
bit0
bit 7:
bit 6:
BTS_ERR: A bit stuff error has been detected.
OWN_ERR: This bit is set if the USB is processing a token and the OWN bit within the BDT is equal to 0
(signifying that the microprocessor owns the BDT and the SIE does not have access to the BDT). If process-
ing an IN TOKEN this would cause a transmit data underflow condition. Processing an OUT or SETUP
TOKEN would cause a receive data overflow condition.
bit 5:
bit 4:
WRT_ERR: Write Error. A write by the MCU to the USB Buffer Descriptor Table or Buffer area was unsuc-
cessful.
BTO_ERR: This bit is set if a bus turnaround time-out error has occurred. This USB uses a bus turnaround
timer to keep track of the amount of time elapsed between the token and data phases of a SETUP or OUT
TOKEN or the data and handshake phases of a IN TOKEN. If more than 17-bit times are counted from the
previous EOP before a transition from IDLE, a bus turnaround time-out error will occur.
bit 3:
DFN8: The data field received was not 8 bits. The USB Specification 1.1 specifies that data field must be an
integral number of bytes. If the data field was not an integral number of bytes this bit will be set.
bit 2:
bit 1:
CRC16: The CRC16 failed.
CRC5: This interrupt will detect CRC5 error in the token packets generated by the host. If set the token
packet was rejected due to a CRC5 error.
bit 0:
PID_ERR: The PID check field failed.
Note 1: Bits can only be modified when UCTRL.SUSPND = 0.
DS41124A-page 62
Advanced Information
1999 Microchip Technology Inc.