
59
SNDTOG1, SNDTOG0
RCVTOG1, RCVTOG0
Meaning:
Set or clear the data toggle value for a data transfer.
Mode:
Host only
The CPU writes a 1 to one of these bit pairs to initialize the data toggle value for a data transfer.
Writing a 0 to these bits has no effect. Writing 1s to both bits of either bit pair has no effect.
Programming Notes
The MAX3421E contains two data toggle flip-flops, which it uses to implement USB signaling
protocol during SNDFIFO and RCVFIFO data transfers. Before transferring data to an endpoint,
the CPU initialized the data toggle value for the endpoint by using these bits. After transferring
data to the endpoint, the CPU reads the toggle value in the SNDTOGRD or RCVTOGRD bit
(page
) and stores this value in CPU local storage. For multiple endpoints, the CPU maintains
an array of toggle bit values, one per endpoint.
When the CPU returns to an endpoint to transfer more data, it must first initialize the data toggle
value to the last value saved for the endpoint. The CPU uses the SNDTOG1/0 and RCVTOG1/0
bits to set the data toggle to the saved last value for the endpoint.
During consecutive transfers to the same endpoint, the SIE maintains the toggle values.
The
CPU needs to save and reinitialize toggle values only when switching endpoints.
See
) for more information about data toggles.