CHAPTER 8 USB FUNCTION
User’s Manual U12978EJ3V0UD
116
(7) Handshake packet transmit reservation register (HTXRSV)
This register sets the handshake packet to be transmitted. By setting each flag of this register, a handshake
packet is transmitted following normal reception of an IN packet, or normal or abnormal reception of a data
packet.
Bit 0 corresponds to the ACK packet transmit reservation flag, bits 1 to 3 correspond to the NAK packet transmit
reservation flag, and bits 4 to 7 correspond to the STALL packet transmit reservation flag.
HTXRSV is set with a 1-bit or 8-bit memory manipulation instruction. When HTXRSV is used in combination
with the data packet transmit reservation register (DTXRSV) as the 16-bit register USBCON, HTXRSV is set
with a 16-bit memory manipulation instruction.
RESET input sets HTXRSV to 00H.
SETUP reception
Note
also sets HTXRSV to 00H.
Note
SETUP reception implies the satisfaction of all the following three conditions.
•
Matching of address
•
Endpoint 0 received
•
No error in reception
Figure 8-16. Format of Handshake Packet Transmit Reservation Register (1/2)
Symbol
6
7
5
4
3
2
1
0
E1STEN E0STEN
DSTEN STALEN E1NAEN E0NAEN DNAEN
ACKEN
E1STEN
STALL packet transmit reservation flag for Endpoint 1 after IN packet
0
1
FF14H
Address
HTXRSV
After reset
00H
R/W
R/W
No data is transmitted.
STALL handshake is transmitted when all the following conditions are satisfied in EOP during IN packet reception.
INRX (internal signal) = 1, ADRRST = 1, END1RX = 1, TBYER = 0, TBITER = 0, CRC5ER = 0
E0STEN
STALL packet transmit reservation flag for Endpoint 0 after IN packet
0
1
No data is transmitted.
STALL handshake is transmitted when all the following conditions are satisfied in EOP during IN packet reception.
INRX (internal signal) = 1, TIDRST = 1, ADRRST = 1, END0RX = 1, TBYER = 0, TBITER = 0, CRC5ER = 0
STALEN
STALL packet transmit reservation flag after data packet
0
1
No data is transmitted.
STALL handshake is transmitted when all the following conditions are satisfied in EOP during data packet reception.
Set this flag when length error of transfer occurs in control write transfer.
DIDRST = 0, DBITER = 0
DSTEN
STALL packet transmitted reservation flag for data packet receive byte length error
0
1
No data is transmitted.
STALL handshake is transmitted when all the following conditions are satisfied in EOP during data packet reception.
Set this flag to transmit STALL handshake when byte length error has occurred in one data packet during
control write transfer.
DIDRST = 1, DBYER = 1, DBITER = 0