// handle the case where we were already in AUTO mode...
// ...for example: back to back firmware downloads...
SYNCDELAY; //
EP2FIFOCFG = 0x00; // AUTOOUT=0, WORDWIDE=1
// core needs to see AUTOOUT=0 to AUTOOUT=1 switch to arm endp's
SYNCDELAY; //
EP6FIFOCFG = 0x4C; // AUTOIN=0, ZEROLENIN=1, WORDWIDE=1
// EP6FIFOCFG = 0x4E
// I have made some modification here to make it testable without FPGA
// 6 INFM1 IN Full Minus One.
// 5 OEP1 OUT Empty Plus One.
// 4 AUTOOUT Instantaneous Connection to Endpoint FIFO. This bit applies only to OUT endpoints.
// 3 AUTOIN Auto Commit to SIE. This bit applies only to IN endpoints. !! auto in slave fifo mode
// 2 ZEROLENIN Enable Zero length IN Packets.
// 0 WORDWIDE Select Byte/Word FIFOs on PORTB/D Pins.
SYNCDELAY;
}
这个Reserved pin 官方给的解释是:
The RESERVED pin is a test mode pin. If it is not grounded, the FX2LP is placed into a test mode and does not operate correctly.