Content originally posted in LPCWare by fpg on Fri Mar 18 11:18:53 MST 2011
I'm also in trouble with using timer in my LPC1769. I use timer0, I manage to start it, but I cannot make it stop, I've tried with a couple of methods (I only need one delayed interrupt):
- I set MR0S bit in Match Control Register during configuring timer with CMSIS function TIM_ConfigMatch.
- I tried the CMSIS function TIM_Cmd(LPC_TIM0, DISABLE), which resets enable bit in TCR register.
- I tried to disable interrupt on match by resetting MR0I bit in Match Control Register.
(- During debugging I noticed, that Counter Enable register does not remain one after enabling. At least, it seems so during from the debugger. Why is that... ? )
- It is written in lpc17xx datasheet, that during TCR[1] is set, TC and PC is 0. I tried that and they are 0, but the interrupt yet happens.
- I even tried disabling power supply, by resetting the appropriate bit in PCONP register in debug mode.
I really do not understand why interrupt is happening over and over again...