Correct Teensy 4.1 PIT clock scaler

This commit is contained in:
Josh Stewart 2022-09-16 17:52:59 +10:00
parent b8278e7ecb
commit 114e9b2c7d
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ void initBoard()
* 48 * 1000000uS / PER_clock = 2uS
*/
CCM_CSCMR1 |= CCM_CSCMR1_PERCLK_CLK_SEL; // 24MHz
CCM_CSCMR1 |= CCM_CSCMR1_PERCLK_PODF(0b110000); //Prescale to 48
CCM_CSCMR1 |= CCM_CSCMR1_PERCLK_PODF(0b101111); //Prescale to 48
attachInterruptVector(IRQ_PIT, PIT_isr);
NVIC_ENABLE_IRQ(IRQ_PIT);