Content originally posted in LPCWare by zmogedra on Sun Feb 17 07:02:11 MST 2013 Hi, I have some kind of problem with timer on LPC1347. I would like to run timer from external TTL clock source(200kHz).
LPC_IOCON->PIO0_8 |= 0x02; // Pin08 timer enable
LPC_GPIO->DIR[0] &= ~(1 << 8); //set dir as input
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 7); // CT16B0 enable clock LPC_SYSCON->SYSAHBCLKDIV = 0x01; // no division
LPC_CT16B0->CTCR |= 0x1; // Counter Mode: TC is incremented on rising edges on the CAP input
LPC_CT16B0->TCR |=0x1; // start timer
but for some reason nor TC nor CR0 isn't increasing. What em I missing here?