Table of Contents
The B-Box RCP and B-Board PRO digital controllers hold 4 clock generators, which provide time-bases to use with various peripherals such as the PWMs and the control task routine. In a multi-device configuration, the clocks are propagated to all the devices and stay synchronized within ±2 ns.
Features:
- Variable frequency: the clock generators support glitch-less reconfiguration during execution as explained in Variable frequency operation with the B-Box/B-Board (PN121).
- Synchronization: in a multi-device configuration, all clock generators are intrinsically synchronized.
- Simultaneous reset: all the clock generators are reset at the same time. It implies that, if the frequency of a clock generator is a multiple of another one, they are guaranteed to stay in phase (e.g. 20kHz and 40 kHz).
Simulink block
A CLK block using CLOCK_0 is already embedded in the CONFIG block. See CONFIG – Interrupt configuration to learn more.
Signal specification
- The output can be wired to a PWM block input signal
>to set its switching frequency. - The input is only visible if the
variableparameter is selected and it sets the frequency of the clock during real-time execution.
Standard parameters
Clock IDselects which clock generator to configure. (CLOCK_0is already used by the CONFIG block and cannot be instantiated in a separate clock block.)Initial clock frequencyconfigures the frequency of the clock in Hertz (Hz). If the desired frequency is not achievable (because of the peripheral resolution of 4 ns), the clock frequency is replaced by the closest achievable frequency and a warning is generated in BB Control utility software.
This value is overwritten by the input signal value during run-time if the frequency is configured asVariable. In simulation, this value is used as the initial value during the first clock period.
Advanced parameters
Frequency valuethe option “variable frequency“ enables the reconfiguration of the clock frequency during real-time execution using the input signal.Frequency limitssets the minimal and maximal frequencies that the clock generator uses as saturation points.
PLECS block
A CLK block using CLOCK_0 is already embedded in the CONFIG block. See CONFIG – Interrupt configuration to learn more.
Signal specification
- The output can be wired to a PWM block input signal
>to set its switching frequency. - The input is only visible if the
frequency valueis set as variable frequency and it sets the frequency of the clock during real-time execution.
Standard parameters
Clock IDselects which clock generator to configure. (CLOCK_0is already used by the CONFIG block and cannot be instantiated in a separate clock block.)Initial clock frequencyconfigures the frequency of the clock in Hertz (Hz). If the desired frequency is not achievable (because of the peripheral resolution of 4 ns), the clock frequency is replaced by the closest achievable frequency and a warning is generated in BB Control utility software.
This value is overwritten by the input signal value during run-time if the frequency is configured asVariable. In simulation, this value is used as the initial value during the first clock period.
Advanced parameters
Frequency valuethe option “variable frequency“ enables the reconfiguration of the clock frequency during real-time execution using the input signal.Frequency limitssets the minimal and maximal frequencies that the clock generator uses as saturation points.








