Browse Source

Fix 24 MHz speed on Teensy 4.0

teensy4-core
PaulStoffregen 5 years ago
parent
commit
49b46c2087
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      teensy4/clockspeed.c

+ 3
- 2
teensy4/clockspeed.c View File

CCM_CBCDR = cbcdr; CCM_CBCDR = cbcdr;
} }


cbcdr &= ~CCM_CBCDR_PERIPH_CLK_SEL;
CCM_CBCDR = cbcdr;
//cbcdr &= ~CCM_CBCDR_PERIPH_CLK_SEL;
//CCM_CBCDR = cbcdr; // why does this not work at 24 MHz?
CCM_CBCDR &= ~CCM_CBCDR_PERIPH_CLK_SEL;
while (CCM_CDHIPR & CCM_CDHIPR_PERIPH_CLK_SEL_BUSY) ; // wait while (CCM_CDHIPR & CCM_CDHIPR_PERIPH_CLK_SEL_BUSY) ; // wait


F_CPU_ACTUAL = frequency; F_CPU_ACTUAL = frequency;

Loading…
Cancel
Save