Bladeren bron

Don't try slow clock for PWM on Teensy LC (not supported by hardware)

main
PaulStoffregen 8 jaren geleden
bovenliggende
commit
83b837a520
1 gewijzigde bestanden met toevoegingen van 6 en 0 verwijderingen
  1. +6
    -0
      teensy3/pins_teensy.c

+ 6
- 0
teensy3/pins_teensy.c Bestand weergeven

ftmClock = 16000000; ftmClock = 16000000;
} else } else
#endif #endif
#if defined(__MKL26Z64__)
// Teensy LC does not support slow clock source (ftmClockSource = 2)
ftmClockSource = 1; // Use default F_TIMER clock source
ftmClock = F_TIMER; // Set variable for the actual timer clock frequency
#else
if (frequency < (float)(F_TIMER >> 7) / 65536.0f) { if (frequency < (float)(F_TIMER >> 7) / 65536.0f) {
// frequency is too low for working with F_TIMER: // frequency is too low for working with F_TIMER:
ftmClockSource = 2; // Use alternative 31250Hz clock source ftmClockSource = 2; // Use alternative 31250Hz clock source
ftmClockSource = 1; // Use default F_TIMER clock source ftmClockSource = 1; // Use default F_TIMER clock source
ftmClock = F_TIMER; // Set variable for the actual timer clock frequency ftmClock = F_TIMER; // Set variable for the actual timer clock frequency
} }
#endif


for (prescale = 0; prescale < 7; prescale++) { for (prescale = 0; prescale < 7; prescale++) {

Laden…
Annuleren
Opslaan