Ver código fonte

Fix 24 MHz speed on Teensy 4.0

main
PaulStoffregen 5 anos atrás
pai
commit
49b46c2087
1 arquivos alterados com 3 adições e 2 exclusões
  1. +3
    -2
      teensy4/clockspeed.c

+ 3
- 2
teensy4/clockspeed.c Ver arquivo

@@ -153,8 +153,9 @@ uint32_t set_arm_clock(uint32_t frequency)
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

F_CPU_ACTUAL = frequency;

Carregando…
Cancelar
Salvar