|
想每2.4KHz翻转IO口,我觉得以下两种初始化定时器的方式都是正确的,可是后一种为何行不通呢?
方法一:
LPC_SYSCON->SYSAHBCLKCTRL |= (1 << 8);
LPC_TMR16B1->IR = 1;
LPC_TMR16B1->PR = 0;
LPC_TMR16B1->MCR = 3;
LPC_TMR16B1->MR0 = 20000;
方法二:
LPC_TMR16B1->IR = 1;
LPC_TMR16B1->PR = 9999;
LPC_TMR16B1->MCR = 3;
LPC_TMR16B1->MR0 = 2;
|
|