Browse Source

Fix initial delay bug on Teensy-LC

https://forum.pjrc.com/threads/28325-Teensy-LC-and-delay
teensy4-core
PaulStoffregen 9 years ago
parent
commit
66b28afda0
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      teensy3/mk20dx128.c

+ 1
- 0
teensy3/mk20dx128.c View File



// initialize the SysTick counter // initialize the SysTick counter
SYST_RVR = (F_CPU / 1000) - 1; SYST_RVR = (F_CPU / 1000) - 1;
SYST_CVR = 0;
SYST_CSR = SYST_CSR_CLKSOURCE | SYST_CSR_TICKINT | SYST_CSR_ENABLE; SYST_CSR = SYST_CSR_CLKSOURCE | SYST_CSR_TICKINT | SYST_CSR_ENABLE;
SCB_SHPR3 = 0x20200000; // Systick = priority 32 SCB_SHPR3 = 0x20200000; // Systick = priority 32



Loading…
Cancel
Save