![](http://datasheet.mmic.net.cn/380000/-PD78F9801_datasheet_16745018/-PD78F9801_120.png)
CHAPTER 8 USB FUNCTION
120
(7)
Handshake packet send reservation register (HTXRSV)
This register sets the handshake packet to be sent. By setting each flag of this register, a handshake
packet is sent following normal reception of an IN packet, or normal or abnormal reception of a data packet.
Bit 0 corresponds to the ACK packet send reservation flag, bits 1 to 3 correspond to the NAK packet send
reservation flag, and bits 4 to 7 correspond to the STALL packet send reservation flag.
The HTXRSV is set with a 1-bit or 8-bit memory manipulation instruction. When the HTXRSV is used in
combination with the data packet send reservation register (DTXRSV) as the 16-bit register USBCON, the
HTXRSV is set with a 16-bit memory manipulation instruction.
RESET input sets the HTXRSV to 00H.
Figure 8-16. Format of Handshake Packet Send Reservation Register (1/2)
Symbol
6
7
5
4
3
2
1
0
E1STEN E0STEN
DSTEN
STALEN E1NAEN E0NAEN DNAEN
ACKEN
E1STEN
STALL packet send reservation flag for Endpoint1 after IN packet
0
1
FF14H
Address
HTXRSV
After reset
00H
R/W
R/W
No data are sent.
STALL handshake is sent 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
E1NAEN
NAK packet send reservation flag for Endpoint1 after IN packet
0
1
No data are sent.
NAK handshake is sent 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 send reservation flag for Endpoint0 after IN packet
0
1
No data are sent.
STALL handshake is sent 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 send reservation flag after data packet
0
1
No data are sent.
STALL handshake is sent 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 send reservation flag for data packet receive byte length error
0
1
No data are sent.
STALL handshake is sent when all the following conditions are satisfied in EOP during data packet reception.
Set this flag to send STALL handshake when byte length error has occurred in one data packet during
control write transfer.
DIDRST = 1, DBYER = 1, DBITER = 0