mirror of https://github.com/g4klx/MMDVM.git
Reduce the value of the LPTMR CMR by one.
This commit is contained in:
parent
2747e2979d
commit
dca6dd35dc
|
@ -131,7 +131,7 @@ void CIO::startInt()
|
||||||
SIM_SCGC5 |= SIM_SCGC5_LPTIMER; // Enable Low Power Timer Access
|
SIM_SCGC5 |= SIM_SCGC5_LPTIMER; // Enable Low Power Timer Access
|
||||||
LPTMR0_CSR = 0; // Disable
|
LPTMR0_CSR = 0; // Disable
|
||||||
LPTMR0_PSR = LPTMR_PSR_PBYP; // Bypass prescaler/filter
|
LPTMR0_PSR = LPTMR_PSR_PBYP; // Bypass prescaler/filter
|
||||||
LPTMR0_CMR = EXTERNAL_OSC / 24000;
|
LPTMR0_CMR = (EXTERNAL_OSC / 24000) - 1; // Frequency divided by CMR + 1
|
||||||
LPTMR0_CSR = LPTMR_CSR_TPS(2) | // Pin: 0=CMP0, 1=xtal, 2=pin13
|
LPTMR0_CSR = LPTMR_CSR_TPS(2) | // Pin: 0=CMP0, 1=xtal, 2=pin13
|
||||||
LPTMR_CSR_TMS; // Mode Select, 0=timer, 1=counter
|
LPTMR_CSR_TMS; // Mode Select, 0=timer, 1=counter
|
||||||
LPTMR0_CSR |= LPTMR_CSR_TEN; // Enable
|
LPTMR0_CSR |= LPTMR_CSR_TEN; // Enable
|
||||||
|
|
Loading…
Reference in New Issue