UM10503 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2012. All rights reserved.User manual Rev. 1.3 — 6 July 2012 570 of 1269NXP Semiconductors UM10503Chapter 23: LPC43xx USB0 Host/Device/OTG controllerlength protocol then ACK.[3] SYSERR – System error should never occur when the latency FIFOs are correctly sized and the DCD isresponsive.23.10.8 Control endpoint operational model23.10.8.1 Setup phaseAll requests to a control endpoint begin with a setup phase followed by an optional dataphase and a required status phase. The device controller will always accept the setupphase unless the setup lockout is engaged.The setup lockout will engage so that future setup packets are ignored. Lockout of setuppackets 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 typesemaphore will ensure that the setup packet payload is extracted from the queue headwithout being corrupted by an incoming setup packet. This is the preferred behaviorbecause ignoring repeated setup packets due to long software interrupt latency would bea compliance issue.23.10.8.1.1 Setup packet handling using setup lockout mechanismAfter receiving an interrupt and inspecting USBMODE to determine that a setup packetwas 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 SetupLockout (i.e. the Setup Lockout activates as soon as a setup packet arrives. By writingto the ENDPTSETUPSTAT, the device controller will accept new setup packets.).3. Process setup packet using local software byte array copy and executestatus/handshake phases.Remark: After receiving a new setup packet the status and/or handshake phasesmay 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 recentsetup 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 varyaccording to the type of traffic on the bus up to nearly a 1 ms. However, it is absolutelynecessary to ensure ENDPTSETUPSTAT has transitioned to ‘0’ after step 1 andbefore 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 toother packet completions.23.10.8.1.2 Setup packet handling using the trip wire mechanism• Disable Setup Lockout by writing ‘1’ to Setup Lockout Mode (SLOM) in theUSBMODE register (once at initialization). Setup lockout is not necessary when usingthe tripwire as described below.