NXP Semiconductors PN7462 series User Manual page 321

Table of Contents

Advertisement

NXP Semiconductors
15.3.3 Generic endpoint
15.3.3.1 Generic endpoint – single buffering
To enable single buffering, firmware must set the corresponding "USB EP Buffer Config"
bit to zero. In the "USB EP Buffer in use" register, firmware can indicate which buffer is
used in this case.
When firmware wants to transfer data, it programs the different bits in the endpoint
command/status entry and sets the active bits. Hardware will transmit/receive multiple
packets for this endpoint until the NBytes value is equal to zero. When NBytes goes to
zero, hardware clears the active bit and sets the corresponding interrupt status bit.
Firmware must wait until hardware has cleared the active bit to change some of the
command/status bits. This prevents that hardware will overwrite a new value
programmed by firmware with some old values that were still cached.
If firmware wants to disable the active bit before the hardware has finished handling
complete buffer, it can do this by setting the corresponding endpoint skip bit in USB
endpoint skip register.
15.3.3.2 Generic endpoint – double buffering
To enable double buffering, firmware must set the corresponding "USB EP Buffer Config"
bit to one. The "USB EP Buffer in use" register indicates which buffer will be used by
hardware when the next token is received.
When hardware clears the active bit of the current buffer in use, it will switch the buffer in
use. Firmware can also force hardware to use a certain buffer by writing to the "USB EP
Buffer in use" bit.
15.3.4 Special cases
15.3.4.1 Usage of the Active bit
The use of active bit is a different between OUT and IN endpoints.
When data must be received for the OUT endpoint, the firmware will set the Active bit to
one and program the NBytes field to the maximum number of bytes it can receive.
When data must be transmitted for an IN endpoint, the firmware sets the Active bit to one
and programs the NBytes field to the number of bytes that must be transmitted.
15.3.4.2 Generation of a STALL handshake
Special care must be taken in programming the endpoint to send a STALL handshake. A
STALL handshake is only sent in the following situations:
• The endpoint is enabled (Disabled bit = "0‟)
• The active bit of the endpoint is set to zero (No packet needs to be
15.3.4.3 Clear feature (Endpoint HALt)
When a non-control endpoint has returned a STALL handshake, the host will send a
Clear Feature (Endpoint HALt) for that endpoint. When the device receives this request,
the endpoint must be unstalled and the toggle bit for that endpoint must be reset back to
zero. In order to do that the firmware must program the following items for the endpoint
that is indicated.
UM10858
User manual
COMPANY PUBLIC
received/transmitted for that endpoint)
All information provided in this document is subject to legal disclaimers.
Rev. 1.4 — 14 May 2018
314514
UM10858
PN7462 family HW user manual
© NXP B.V. 2018. All rights reserved.
321 of 345

Advertisement

Table of Contents
loading

Table of Contents