blockSynchronizeRealtime

A pseudo realtime synchronization

Parameters

TypeNameDefaultDescription
RealactualInterval(prescalerConstants[prescaler]*(count + 1)*iterations)/mcu.cpuFrequency
General › Constants
SIunits.FrequencydesiredFrequencymcu.desiredFrequencyOverride the MCU global real-time settings
RealmaxError0.01Used when calculating allowed clock parameters. 0.01=1% maximum error.
Types.TimerSelecttimer
Types.TimerPrescalerprescalerFunctions.Utilities.reasonableClockSelect(mcu.cpuFrequency, desiredFrequency, maxError, prescalerConstants)Pre-scaler for the clock.
IntegercountFunctions.Utilities.getClockCounterValue(mcu.cpuFrequency/prescalerConstants[prescaler], desiredFrequency, maxError)The number of counts to be made. A value of 249 counts 250 steps.
Integeriterationsdiv(integer(mcu.cpuFrequency/(desiredFrequency*prescalerConstants[prescaler])), (count + 1))The number of times each interrupt should be executed.

Components

TypeNameDefaultDescription
Microcontrollermcu