I have an LPC24 board and I'm struggling to get the counter to reset to 0.
int countval; T1TCR = 0x02; /*Counter Reset*/ T1TCR = 0x01; /*Counter Enable*/ T1CTCR = 0x05; /*Count Pulses*/ countval = T1TC; simplePrintf("%d", countval); /*Print to Display*/
It counts the pulses on the pin fine however the count always seem to start from either 7 or 14 depending on where I place the counter setup code.
Any help would be appreciated.