Техническая Спецификация для Atmel Evaluation Kit for AT32uC3A0512, 32-Bit AVR Microcontroller Atmel ATEVK1105 ATEVK1105

Модели
ATEVK1105
Скачать
Страница из 826
516
AT32UC3A
The OUT retry is always ACKed. This reception sets RXOUTI and TXINI. Handle this with the
following software algorithm:
set TXINI
wait for RXOUTI OR TXINI
if RXOUTI, then clear flag and return
if TXINI, then continue
Once the OUT status stage has been received, the USB controller waits for a SETUP request.
The SETUP request has priority over any other request and has to be ACKed. This means that
any other flag should be cleared and the FIFO reset when a SETUP is received.
The firmware has to take care of the fact that the byte counter is reset when a zero-length OUT
packet is received.
30.7.2.12
Management of IN Endpoints
30.7.2.12.1
Overview
IN packets are sent by the USB device controller upon IN requests from the host. All the data
can be written by the firmware which acknowledges or not the bank when it is full.
The endpoint must be configured first.
The TXINI bit is set by hardware at the same time as FIFOCON when the current bank is free.
This triggers an EPXINT interrupt if TXINE = 1.
TXINI shall be cleared by software (by setting the TXINIC bit) to acknowledge the interrupt, what
has no effect on the endpoint FIFO.
The firmware then writes into the FIFO and clears the FIFOCON bit to allow the USB controller
to send the data. If the IN endpoint is composed of multiple banks, this also switches to the next
bank. The TXINI and FIFOCON bits are updated by hardware in accordance with the status of
the next bank.
TXINI shall always be cleared before clearing FIFOCON.
The RWALL bit is set by hardware when the current bank is not full, i.e. the software can write
further data into the FIFO.
Figure 30-17.
Example of an IN Endpoint with 1 Data Bank
IN
DATA
(bank 0)
ACK
TXINI
FIFOCON
HW
write data to CPU
BANK 0
SW
SW
SW
SW
IN
NAK
write data to CPU
BANK 0
32058K
AVR32-01/12