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 843 of 1269NXP Semiconductors UM10503Chapter 28: LPC43xx State Configurable Timer (SCT)– When the counters are stopped, both an event configured to clear the STOP bit orsoftware writing a zero to the STOP bit can start the counter again.– When the counter are halted, only a software write to clear the HALT bit can startthe counter again. No events can occur.– When the counters are halted, software can set any SCT output HIGH or LOWdirectly by writing to the OUT register.The current state can be read at any time by reading the STATE register.To change the current state by software (that is independently of any event occurring), setthe HALT bit and write to the STATE register to change the state value. Writing to theSTATE register is only allowed when the counter is halted (the HALT_L and/or HALT_Hbits are set) and no events can occur.28.7.10.3 Configure the SCT without using statesThe SCT can be used as standard counter/timer with external capture inputs and matchoutputs without using the state logic. To operate the SCT without states, configure theSCT as follows:• Write zero to the STATE register (zero is the default).• Write zero to the STATELD and STATEV fields in the EVCTRL registers for eachevent.• Write 0x1 to the EVSTATEMASK register of each event. Writing 0x1 enables theevent.In effect, the event is allowed to occur in a single state which never changes while thecounter is running.28.7.10.4 ExampleFigure 94 shows a simple application of the SCT using two sets of match events (EV0/1and EV3/4) to set/clear SCT output 0. A third match event (EV2) is used to reset thecounter regardless of the current state.In the initial state 0, match event EV0 sets output 0 to HIGH and match event EV1 clearsoutput 0. The SCT input 0 is monitored: If the input transitions from HIGH to LOW (EV2),the state is changed to state 1, and EV3/4 are enabled, which create the same output buttriggered by different match values. If input 0 transitions from LOW to HIGH, theassociated event (EV5) causes the state to change back to state 0. In state 0, the eventsEV0 and EV1 are enabled.The example uses the following SCT configuration:• 1 input• 1 output• 5 match registers• 7 events• 2 states