pwm - determine the edge type

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by dragilla on Wed Jan 18 09:02:19 MST 2012
I'm trying to figure out how to setup pwm for my purposes. The feature I'm missing is a detection of the edge type. I want to detect both edges on MAT inputs (set in CTCR). But I need to know which edge is which... or at least I need to know the first detected edge type - the next I know will happen in alternating order. I hope you know what I mean...
I need to know if the edge that I capture is rising or falling edge because I need to measure the period between the rising and falling edge.
How can one do that?

ps: lpc1769
ps2: Table 427. on page 494, chapter 21.6.2. Timer Control Register (T[0/1/2/3]CR - 0x4000 4004, 0x4000 8004, 0x4009 0004, 0x4009 4004) of the UM10360 states:
"When one, the Timer Counter and Prescale Counter are enabled for counting. When 1, the counters are disabled. " - What's that suppose to mean? :)
My guess is that 'When 1' should be 'When 0' - then it makes sense.