Function to calculate a clock counter value for PWM or interrupts at a specific frequency
function getClockCounterValue extends .Modelica.Icons.Function; import SIunits = Modelica.Units.SI; input SIunits.Frequency prescaledFrequency, desiredFrequency; input Real allowedError; output Integer i; end getClockCounterValue;