Datasheet
SAM9G45 [DATASHEET]
Atmel-6438O-ATARM-SAM9G45-Datasheet_08-Dec-15
842
A response should be made to the first token IN recognized inside a microframe under the following conditions:
If at least one bank has been validated, the correct DATAx corresponding to the programmed Number Of
Transactions per Microframe (NB_TRANS) should be answered. In case of a subsequent missed or
corrupted token IN inside the microframe, the USB 2.0 Core available data bank(s) that should normally
have been transmitted during that microframe shall be flushed at its end. If this flush occurs, an error
condition is flagged (ERR_FLUSH is set in UDPHS_EPTSTAx).
If no bank is validated yet, the default DATA0 ZLP is answered and underflow is flagged (ERR_FL_ISO is set
in UDPHS_EPTSTAx). Then, no data bank is flushed at microframe end.
If no data bank has been validated at the time when a response should be made for the second transaction
of NB_TRANS = 3 transactions microframe, a DATA1 ZLP is answered and underflow is flagged
(ERR_FL_ISO is set in UDPHS_EPTSTAx). If and only if remaining untransmitted banks for that microframe
are available at its end, they are flushed and an error condition is flagged (ERR_FLUSH is set in
UDPHS_EPTSTAx).
If no data bank has been validated at the time when a response should be made for the last programmed
transaction of a microframe, a DATA0 ZLP is answered and underflow is flagged (ERR_FL_ISO is set in
UDPHS_EPTSTAx). If and only if the remaining untransmitted data bank for that microframe is available at
its end, it is flushed and an error condition is flagged (ERR_FLUSH is set in UDPHS_EPTSTAx).
If at the end of a microframe no valid token IN has been recognized, no data bank is flushed and no error
condition is reported.
At the end of a microframe in which at least one data bank has been transmitted, if less than NB_TRANS banks
have been validated for that microframe, an error condition is flagged (ERR_TRANS is set in UDPHS_EPTSTAx).
Cases of Error (in UDPHS_EPTSTAx)
ERR_FL_ISO: There was no data to transmit inside a microframe, so a ZLP is answered by default.
ERR_FLUSH: At least one packet has been sent inside the microframe, but the number of token IN received
is lesser than the number of transactions actually validated (TX_BK_RDY) and likewise with the NB_TRANS
programmed.
ERR_TRANS: At least one packet has been sent inside the microframe, but the number of token IN received
is lesser than the number of programmed NB_TRANS transactions and the packets not requested were not
validated.
ERR_FL_ISO + ERR_FLUSH: At least one packet has been sent inside the microframe, but the data has not
been validated in time to answer one of the following token IN.
ERR_FL_ISO + ERR_TRANS: At least one packet has been sent inside the microframe, but the data has
not been validated in time to answer one of the following token IN and the data can be discarded at the
microframe end.
ERR_FLUSH + ERR_TRANS: The first token IN has been answered and it was the only one received, a
second bank has been validated but not the third, whereas NB_TRANS was waiting for three transactions.
ERR_FL_ISO + ERR_FLUSH + ERR_TRANS: The first token IN has been treated, the data for the second
Token IN was not available in time, but the second bank has been validated before the end of the
microframe. The third bank has not been validated, but three transactions have been set in NB_TRANS.
37.5.8.4 Data OUT
Bulk OUT or Interrupt OUT
Like data IN, data OUT packets are sent by the host during the data or the status stage of control transfer or during
an interrupt/bulk/isochronous OUT transfer. Data buffers are sent packet by packet under the control of the
application or under the control of the DMA channel.