summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2015-01-07 17:07:32 +0800
committerGrissiom <[email protected]>2015-01-07 17:15:50 +0800
commit05a01884e6b4bf0024397fa06c5bbe87d213609e (patch)
tree92ae002d72a5c14d7a6f7c02204e4b2a945bb44d
parent11026d05791d7208036b18c043d6e968ef366f00 (diff)
lpc43xx: fix clock configure
-rw-r--r--bsp/lpc43xx/M0/applications/board.c5
-rw-r--r--bsp/lpc43xx/M4/applications/board.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/bsp/lpc43xx/M0/applications/board.c b/bsp/lpc43xx/M0/applications/board.c
index 324e1bc7ae..000bd52f40 100644
--- a/bsp/lpc43xx/M0/applications/board.c
+++ b/bsp/lpc43xx/M0/applications/board.c
@@ -46,7 +46,8 @@ void rt_hw_board_init()
SystemCoreClockUpdate();
/* Setup RIT timer. */
- LPC_RITIMER->COMPVAL = SystemCoreClock / RT_TICK_PER_SECOND - 1;
+ LPC_RITIMER->MASK = 0;
+ LPC_RITIMER->COMPVAL = SystemCoreClock / RT_TICK_PER_SECOND;
/* Enable auto-clear. */
LPC_RITIMER->CTRL |= 1 << 1;
/* Reset the counter as the counter is enabled after reset. */
@@ -62,7 +63,5 @@ void rt_hw_board_init()
/* setup the console device */
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
-
- rt_kprintf("timer compval: %d\n", LPC_RITIMER->COMPVAL);
}
diff --git a/bsp/lpc43xx/M4/applications/board.c b/bsp/lpc43xx/M4/applications/board.c
index 3358e52c96..dc0859f666 100644
--- a/bsp/lpc43xx/M4/applications/board.c
+++ b/bsp/lpc43xx/M4/applications/board.c
@@ -55,7 +55,7 @@ void rt_hw_board_init()
SystemCoreClockUpdate();
/* init systick */
- SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND - 1);
+ SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND);
/* set pend exception priority */
NVIC_SetPriority(PendSV_IRQn, (1 << __NVIC_PRIO_BITS) - 1);
@@ -65,7 +65,6 @@ void rt_hw_board_init()
/* setup the console device */
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
- rt_kprintf("timer compval: %d\n", SystemCoreClock / RT_TICK_PER_SECOND - 1);
#if LPC_EXT_SDRAM == 1
lpc_sdram_hw_init();