DRAFT
DRAFT DRAFT DR
DRAFT DRAFT DRAFT
D
RAF
DRAFT DRAFT DRA
FT D
RAFT DR
AFT D
DRA
FT DRAFT DRAFT
D
RAFT
DRAFT
D
RAFT
DRA
UM10601
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2012. All rights reserved.
Preliminary user manual
Rev. 1.0 — 7 November 2012
99 of 313
NXP Semiconductors
UM10601
Chapter 8: LPC800 Pin interrupts/pattern match engine
8.7.2 Pattern Match engine example
Suppose the desired boolean pattern to be matched is:
(IN1) + (IN1 * IN2) + (~IN2 * ~IN3 * IN6fe) + (IN5 * IN7ev)
with:
IN6fe = (sticky) falling-edge on input 6
IN7ev = (non-sticky) event (rising or falling edge) on input 7
Each individual term in the expression shown above is controlled by one bit-slice. To
specify this expression, program the pattern match bit slice source and configuration
register fields as follows:
•
PMSRC register (
–
CLR_EDGEDET: A 1 may be written to bit 5 to clear any pre-existing edge detects
on bit-slice 5, if that is what is desired.
–
SRC0: 001 - select input 1 for bit slice 0
–
SRC1: 001 - select input 1 for bit slice 1
–
SRC2: 010 - select input 2 for bit slice 2
–
SRC3: 010 - select input 2 for bit slice 3
–
SRC4: 011 - select input 3 for bit slice 4
–
SRC5: 110 - select input 6 for bit slice 5
–
SRC6: 101 - select input 5 for bit slice 6
–
SRC7: 111 - select input 7 for bit slice 7
•
PMCTRL register (
):
–
Bit[0]: Setting this bit will select pattern matches to generate the pin interrupts in
place of the normal pin interrupt mechanism.
For this example, pin interrupt 0 will be asserted when a match is detected on the
first product term (which, in this case, is just a high level on input 1).
Pin interrupt 2 will be asserted in response to a match on the second product term.
Pin interrupt 5 will be asserted when there is a match on the third product term.
Pin interrupt 7 will be asserted on a match on the last term.
–
Bit[1]: Setting this bit will cause the RxEv signal to the ARM CPU to be asserted
whenever a match occurs on ANY of the product terms in the expression.
Otherwise, the RXEV line will not be used.
–
Bit[31:24]: At any given time, bits 0, 2, 5 and/or 7 may be high if the corresponding
product terms are currently matching.
–
The remaining bits will always be low.