Projekt

Allgemein

Profil

Feature #301

Von Maximilian Seesslen vor etwa 2 Jahren aktualisiert


prescaler=( cpu / target / 65536 ) + 1;
period=( cpu / target / prescaler );

e.g.
prescaler = int( 48000000 / 440 / 65536 ) + 1 = 2
period = int((48000000 / 440) / 2) = 54545

48000000 / 2 / 54545 = 440,00367

int( 48000000 / 44000 / 65536 ) + 1 = 1
int((48000000 / 44000) / 1) = 1090
(48000000 / 1) / 1090 = 44036,697

https://www.digikey.ch/en/maker/projects/getting-started-with-stm32-timers-and-timer-interrupts/d08e6493cefa486fb1e79c43c0b08cc6

Zurück