We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 94a1bdc + 65d6645 commit 8583716Copy full SHA for 8583716
libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KLXX/us_ticker.c
@@ -44,7 +44,7 @@ static void pit_init(void) {
44
PIT->CHANNEL[1].TCTRL |= PIT_TCTRL_TEN_MASK; // Start timer 1
45
46
// Use channel 0 as a prescaler for channel 1
47
- PIT->CHANNEL[0].LDVAL = bus_frequency() / 1000000 - 1;
+ PIT->CHANNEL[0].LDVAL = (bus_frequency() + 500000) / 1000000 - 1;
48
PIT->CHANNEL[0].TCTRL = PIT_TCTRL_TEN_MASK; // Start timer 0, disable interrupts
49
}
50
0 commit comments