![](http://datasheet.mmic.net.cn/220000/R80C154-20R_datasheet_15505885/R80C154-20R_519.png)
519
SAM9G15 [DATASHEET]
11052E–ATARM–06-Feb-13
z
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.
z
z
z
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 (TXRDY_TRER) 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.
z
z
z
z
z
z
z
32.6.10.9 Data OUT
32.6.10.10 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.
32.6.10.11 Bulk OUT or Interrupt OUT: Receiving a Packet Under Application Control (Host to Device)
Algorithm Description for Each Packet:
The application enables an interrupt on RXRDY_TXKL.
When an interrupt on RXRDY_TXKL is received, the application knows that UDPHS_EPTSTAx register
BYTE_COUNT bytes have been received.
The application reads the BYTE_COUNT bytes from the endpoint.
The application clears RXRDY_TXKL.
Note:
If the application does not know the size of the transfer, it may
not
be a good option to use AUTO_VALID.
Because if a zero-length-packet is received, the RXRDY_TXKL is automatically cleared by the AUTO_VALID
hardware and if the endpoint interrupt is triggered, the software will not find its originating flag when reading the
UDPHS_EPTSTAx register.
z
z
z
z