Content originally posted in LPCWare by gillys on Fri May 11 17:35:10 MST 2012
[SIZE=2]Hello,
is there a difference between
LPC_TIM0->IR = (0x1 << 1); and
LPC_TIM0->IR |= (0x1 << 1);[/SIZE]
The last example is not working in my case, however I don't understand why.
Quote from the datasheet:
The Interrupt Register consists of 4 bits for the match interrupts and 4 bits for the capture interrupts. If an interrupt is generated then the corresponding bit in the IR will be high. Otherwise, the bit will be low. Writing a logic one to the corresponding IR bit will reset the interrupt. Writing a zero has no effect. The act of clearing an interrupt for a timer match also clears any corresponding DMA request.