lpcware

LPC11 timer capture

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by nickich on Mon Jul 13 05:52:55 MST 2015
Hello,

I'm trying to get the capture configured in order to measure the time between the edges.
So far I have configured the following way:
Chip_IOCON_PinMux(LPC_IOCON, IOCON_PIO1_5, IOCON_MODE_INACT, IOCON_FUNC2);
Chip_TIMER_Init(LPC_TIMER32_0);
Chip_TIMER_TIMER_SetCountClockSrc(LPC_TIMER32_0, TIMER_CAPSRC_RISING_PCLK, 0);
Chip_TIMER_PrescaleSet(LPC_TIMER32_0, 1);//1=> every 2 PCLK clocks
Chip_TIMER_CaptureRisingEdgeEnable(LPC_TIMER32_0, 0);
Chip_TIMER_CaptureFallingEdgeEnable(LPC_TIMER32_0, 0);
Chip_TIMER_CaptureEnableInt(LPC_TIMER32_0, 0);
/* preemption = 1, sub-priority = 1 */
NVIC_SetPriority(TIMER_32_0_IRQn, 1);
NVIC_EnableIRQ(TIMER_32_0_IRQn);


but no interrupt (on TIMER32_0_IRQHandler()) is received.

Am I doing anything obviously wrong or am I missing something?

Outcomes