aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornucho <javatea@it.willcomlive.jp>2012-05-13 17:42:11 +0900
committernucho <javatea@it.willcomlive.jp>2012-05-13 18:07:13 +0900
commitabe4b2f170f037eb2278b93392275914b2e64918 (patch)
tree2a61a0d72913a89b2b326f22de2f588c259a2fcd
parente8f0502cac8cb7d165a59544e79f380f5c848383 (diff)
fixed delayMicroseconds error
-rwxr-xr-xsrc/core/delay.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/delay.cpp b/src/core/delay.cpp
index 929683d..f5e260c 100755
--- a/src/core/delay.cpp
+++ b/src/core/delay.cpp
@@ -46,6 +46,7 @@ void setup_TIMER32_1(void)
{
LPC_SYSCON->SYSAHBCLKCTRL |= (1UL << 10); // Enable clock for CT32B1 module
NVIC_DisableIRQ(TIMER_32_1_IRQn);
+ LPC_TMR32B1->PR = 48; //48MHz/48=1MHzに分周する
LPC_TMR32B1->TCR = 1; //タイマスタート
}
@@ -57,7 +58,7 @@ unsigned long attachMicroseconds(USER_TIMER_FUNC func,int us)
if(us <= 1)return 0;
- LPC_TMR32B1->PR = 48; //48MHz/48=1MHzに分周する
+// LPC_TMR32B1->PR = 48; //48MHz/48=1MHzに分周する
LPC_TMR32B1->MR2 = us - 1; //us
LPC_TMR32B1->MCR = (0x3 << 6); // clear at MR2 and Interrupt