| Electronic Components Datasheet Search |
|
TAS1020 Datasheet(PDF) 25 Page - Texas Instruments |
|
|
|||||||||||||||||||||||||||||
TAS1020 Datasheet(HTML) 25 Page - Texas Instruments |
|
25 / 93 page ![]() 2–11 3. If the NACK bit is set to a 1 when the in token packet is received, the UBM simply returns a NAK handshake to the host PC. If the STALL bit is set to a 1 when the in token packet is received, the UBM simply returns a STALL handshake to the host PC. If no handshake packet is received from the host PC, then the UBM prepares to retransmit the same data packet again. 2.2.7.1.3 Control Read Transfer (In Transfer) The host PC uses a control read transfer to read data from the USB function. A control read transfer consists of a setup stage transaction, at least one in data stage transaction, and an out-status stage transaction. The steps to be followed for a control read transfer are as follows: 1. MCU initializes in endpoint 0 and out endpoint 0 by programming the appropriate USB endpoint configuration blocks. This entails programming the buffer size and buffer base address, selecting the buffer mode, enabling the endpoint interrupt, initializing the TOGGLE bit, enabling the endpoint, and clearing the NACK bit for both in endpoint 0 and out endpoint 0. Setup Stage Transaction: 2. The host PC sends a setup token followed by the setup data packet addressed to out endpoint 0. If the data is received without an error, then the UBM writes the data to the setup data packet buffer, sets the setup stage transaction (SETUP) bit to a 1 in the USB status register, returns an ACK handshake to the host PC, and asserts the setup stage transaction interrupt. Note that as long as the setup transaction stage transactions (SETUP) bit is set to a 1, the UBM returns a NACK handshake for any data stage or status stage transactions regardless of the endpoint 0 NACK or STALL bit values. 3. The MCU services the interrupt and reads the setup data packet from the buffer then decodes the command. If the command is not supported or valid, the MCU sets the STALL bit in the out endpoint 0 configuration byte and the endpoint 0 configuration byte before clearing the setup stage transaction (SETUP) bit. This causes the device to return a STALL handshake for any data stage or status stage transactions. After reading the data packet and decoding the command, the MCU clears the interrupt, which automatically clears the setup stage transaction status bit. The MCU also sets the TOGGLE bit in the out endpoint 0 configuration byte to a 1. For control read transfers, the PID used by the host for the first out data packet is a DATA1 PID. Data Stage Transaction: 1. The data packet to be sent to the host PC is written to the in endpoint 0 buffer by the MCU. The MCU also updates the data count value then clears the in endpoint 0 NACK bit to a 0 to enable the data packet to be sent to the host PC. 2. The host PC sends an out token packet addressed to out endpoint 0. After receiving the in token, the UBM transmits the data packet to the host PC. If the data packet is received without an error by the host PC, then an ACK handshake is returned. The UBM will then toggle the TOGGLE bit, set the NACK bit to a 1 and assert the endpoint interrupt. 3. The MCU services the interrupt and prepares to send the next data packet to the host PC. 4. If the NACK bit is set to a 1 when the in token packet is received, the UBM simply returns a NAK handshake to the host PC. If the STALL bit is set to a 1 when the in token packet is received, the UBM simply returns a STALL handshake to the host PC. If no handshake packet is received from the host PC, then the UBM prepares to retransmit the same data packet again. 5. MCU continues to send data packets until all data has been sent to the host PC. Status Stage Transaction: 1. For output endpoint0, the MCU sets the TOGGLE bit to 1, then clears the NACK bit to a 0 to enable the data packet to be sent to the host PC. Note that for a stage transaction a null data packet with the DATA1 PID is sent to the host PC. 2. The host PC sends an out token packet addressed to out endpoint0. If the data packet is received without an error the UBM updates the data count value, toggles to the TOGGLE bit, sets the NACK bit to a 1, returns an ACK handshake to the host PC, and asserts the endpoint interrupt. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |