
UM10800
All information provided in this document is subject to legal disclaimers.
© NXP Semiconductors N.V. 2016. All rights reserved.
User manual
Rev. 1.2 — 5 October 2016
153 of 487
NXP Semiconductors
UM10800
Chapter 10: LPC82x Pin interrupts/pattern match engine
10.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 (
):
–
Since bit slice 5 will be used to detect a sticky event on input 6, you can write a 1 to
the SRC5 bits to clear any pre-existing edge detects on bit slice 5.
–
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
•
PMCFG register (
):
–
PROD_ENDPTS0 = 1
–
PROD_ENDPTS02 = 1
–
PROD_ENDPTS5 = 1
–
All other slices are not product term endpoints and their PROD_ENDPTS bits are
0. Slice 7 is always a product term endpoint and does not have a register bit
associated with it.
–
= 0100101 - bit slices 0, 2, 5, and 7 are product-term endpoints. (Bit
slice 7 is an endpoint by default - no associated register bit).
–
CFG0: 000 - high level on the selected input (input 1) for bit slice 0
–
CFG1: 000 - high level on the selected input (input 1) for bit slice 1
–
CFG2: 000 - high level on the selected input (input 2) for bit slice 2
–
CFG3: 101 - low level on the selected input (input 2) for bit slice 3
–
CFG4: 101 - low level on the selected input (input 3) for bit slice 4
–
CFG5: 010 - (sticky) falling edge on the selected input (input 6) for bit slice 5
–
CFG6: 000 - high level on the selected input (input 5) for bit slice 6
–
CFG7: 111 - event (any edge, non-sticky) on the selected input (input 7) for bit
slice 7
•
PMCTRL register (