Content originally posted in LPCWare by alexan.e on Fri May 25 01:12:31 MST 2012
I noticed in your first post the following code
------------------
NVIC_SetPriority(FLEX_INT0_IRQn,0); /* Default priority can be 0(highest) - 31(lowest) */
NVIC_EnableIRQ(FLEX_INT0_IRQn); /* Enable External Interrupt 0 Interrupt */
------------------
Seems to be from ARMwizard but in my application these two are used in the reverse order which I know now (after reading the M0 manual) that shouldn't be used because the priority level shouldn't be changed when the interrupt is enabled, it should be set before enabling the interrupt.
The second bug I have is that M0 have only four interrupt priority, 0 to 3 so the 0-31 comment is not correct.
These will be corrected in the next release in a few days.
About your question, I think you should use the timer capture mode directly and not use an external pin interrupt that stores that timer value etc.
You can set the capture to be trigger with falling edge (CAP pins), get the first interrupt timer value and then the second and do the math.
Alex