![NXP Semiconductors LPC43Sxx Скачать руководство пользователя страница 709](http://html1.mh-extra.com/html/nxp-semiconductors/lpc43sxx/lpc43sxx_user-manual_1721827709.webp)
UM10503
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2015. All rights reserved.
User manual
Rev. 2.1 — 10 December 2015
709 of 1441
NXP Semiconductors
UM10503
Chapter 25: LPC43xx/LPC43Sxx USB0 Host/Device/OTG controller
length protocol then ACK.
[3]
SYSERR – System error should never occur when the latency FIFOs are correctly sized and the DCD is
responsive.
25.10.8 Control endpoint operational model
25.10.8.1 Setup phase
All requests to a control endpoint begin with a setup phase followed by an optional data
phase and a required status phase. The device controller will always accept the setup
phase unless the setup lockout is engaged.
The setup lockout will engage so that future setup packets are ignored. Lockout of setup
packets ensures that while software is reading the setup packet stored in the queue head,
that data is not written as it is being read potentially causing an invalid setup packet.
In hardware the setup lockout mechanism can be disabled and a new tripwire type
semaphore will ensure that the setup packet payload is extracted from the queue head
without being corrupted by an incoming setup packet. This is the preferred behavior
because ignoring repeated setup packets due to long software interrupt latency would be
a compliance issue.
25.10.8.1.1
Setup packet handling using setup lockout mechanism
After receiving an interrupt and inspecting USBMODE to determine that a setup packet
was received on a particular pipe:
1. Duplicate contents of dQH.SetupBuffer into local software byte array.
2. Write '1' to clear corresponding ENDPTSETUPSTAT bit and thereby disabling Setup
Lockout (i.e. the Setup Lockout activates as soon as a setup packet arrives. By writing
to the ENDPTSETUPSTAT, the device controller will accept new setup packets.).
3. Process setup packet using local software byte array copy and execute
status/handshake phases.
Remark:
After receiving a new setup packet the status and/or handshake phases
may still be pending from a previous control sequence. These should be flushed &
deallocated before linking a new status and/or handshake dTD for the most recent
setup packet.
4. Before priming for status/handshake phases ensure that ENDPTSETUPSTAT is ‘0’.
The time from writing a ‘1’ to ENDPTSETUPSTAT and reading back a ‘0’ may vary
according to the type of traffic on the bus up to nearly a 1 ms. However, it is absolutely
necessary to ensure ENDPTSETUPSTAT has transitioned to ‘0’ after step 1 and
before priming for the status/handshake phases.
Remark:
To limit the exposure of setup packets to the setup lockout mechanism (if used),
the DCD should designate the priority of responding to setup packets above responding to
other packet completions.
25.10.8.1.2
Setup packet handling using the trip wire mechanism
•
Disable Setup Lockout by writing ‘1’ to Setup Lockout Mode (SLOM) in the
USBMODE register (once at initialization). Setup lockout is not necessary when using
the tripwire as described below.