What is the function of the TOGGLE bit?
Its function depends on whether ISO operation is selected (ISO bit in EPCx register is set). For non-ISO operation, the TOGGLE bit specifies the PID used when transmitting the packet: a value of 0 causes a DATA0 PID to be generated; a value of 1 causes a DATA1 PID to be generated. For ISO operation, the TOGGLE bit and the LSB of the frame counter (FNL0) act as a mask for the TX_EN bit to allow pre-queuing of packets to specific frame numbers; i.e., transmission is enabled only if bit 0 in FNL register is set to TOGGLE. If an IN token is not received while this condition is true, the contents of the FIFO are flushed with the next SOF. If the endpoint is set to ISO, data is always transferred with a DATA0 PID. Note that the TOGGLE bit cannot be altered by hardware.