mbed library sources

Dependents:   bare

Fork of mbed-src by mbed official

Revision:
97:a69e21de83fb
Parent:
82:0b31dbcd4769
--- a/targets/hal/TARGET_Freescale/TARGET_KLXX/us_ticker.c	Tue Feb 18 15:45:07 2014 +0000
+++ b/targets/hal/TARGET_Freescale/TARGET_KLXX/us_ticker.c	Tue Feb 18 18:00:05 2014 +0000
@@ -44,7 +44,7 @@
     PIT->CHANNEL[1].TCTRL |= PIT_TCTRL_TEN_MASK;   // Start timer 1
     
     // Use channel 0 as a prescaler for channel 1
-    PIT->CHANNEL[0].LDVAL = bus_frequency() / 1000000 - 1;
+    PIT->CHANNEL[0].LDVAL = (bus_frequency() + 500000) / 1000000 - 1;
     PIT->CHANNEL[0].TCTRL = PIT_TCTRL_TEN_MASK;    // Start timer 0, disable interrupts
 }