LPTMR changes based on PJRC Teensy forum feedback from manitou.

This commit is contained in:
Jonathan Naylor 2016-12-13 09:45:10 +00:00 committed by GitHub
parent 3ec929ff52
commit f831b64518
1 changed files with 1 additions and 3 deletions

View File

@ -131,9 +131,7 @@ void CIO::startInt()
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;
LPTMR0_CSR = LPTMR_CSR_TIE | // Interrupt Enable LPTMR0_CSR = LPTMR_CSR_TPS(2) | // Pin: 0=CMP0, 1=xtal, 2=pin13
LPTMR_CSR_TPS(2) | // Pin: 0=CMP0, 1=xtal, 2=pin13
LPTMR_CSR_TFC | // Free-Running Counter
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
#else #else