![FTDI FT51A Application Note Download Page 105](http://html1.mh-extra.com/html/ftdi/ft51a/ft51a_application-note_2341158105.webp)
Application Note
AN_289 FT51A Programming Guide
Version 1.0
Document Reference No.: FT_000962 Clearance No.: FTDI# 483
104
Copyright © 2015 Future Technology Devices International Limited
2.11.4.7
Clear Buffer
Command
: 0xF2
Data
: None
Following a Read Buffer command, the Clear Buffer command should be issued after all data has
been read out from the endpoint buffer. This is to free the buffer to receive next packet from the
USB host.
2.11.4.8
Validate Buffer
Command
: 0xFA
Data
: None
Following a Write Buffer command, the Validate Buffer command should be issued after all data
has been written to the endpoint buffer. This is to set the buffer full flag so that the packet can be
sent to the USB host when the IN token arrives.
2.11.4.9
Set Endpoint Status
Command
: 0x40-0x45 (0x40-0x4F for Enhanced Mode)
Data
: Write 1 byte
Bit
Symbol
Reset
Description
0
Stall
0
0: Disable the endpoint STALL state.
1: Enable the endpoint STALL state.
For EP0 OUT (control OUT endpoint) the STALL state will
automatically be cleared by a received SETUP packet.
When this bit is written to ‘0’, the endpoint will
reinitialise. Any data in the endpoint buffer will be
flushed away, and the PID for the next packet will carry
a DATA0 flag.
7..1
Reserved
0
Reserved
Table 2.132 Endpoint Control Register
2.11.4.10
Acknowledge Setup
Command
: 0xF1
Data
: None
When receiving a SETUP packet the USB Full Speed device controller will flush the IN buffer and
disable the Validate Buffer and Clear Buffer commands for both Control IN and Control OUT
endpoints. The MCU shall read and process the SETUP packet, and then issue the Acknowledge
Setup command to re-enable the Validate Buffer and Clear Buffer commands. The Acknowledge
Setup command must be sent to both Control IN and Control OUT endpoints.