{"id":1574,"date":"2021-04-02T12:39:29","date_gmt":"2021-04-02T12:39:29","guid":{"rendered":"https:\/\/imperix.com\/doc\/?p=1574"},"modified":"2026-05-11T08:51:27","modified_gmt":"2026-05-11T08:51:27","slug":"clock-generators","status":"publish","type":"post","link":"https:\/\/imperix.com\/doc\/software\/clock-generators","title":{"rendered":"CLK &#8211; Clock generators"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_83 ez-toc-wrap-right-text counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/imperix.com\/doc\/software\/clock-generators\/#Simulink-block\" >Simulink block<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/imperix.com\/doc\/software\/clock-generators\/#Standard-parameters\" >Standard parameters<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/imperix.com\/doc\/software\/clock-generators\/#Advanced-parameters\" >Advanced parameters<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/imperix.com\/doc\/software\/clock-generators\/#PLECS-block\" >PLECS block<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/imperix.com\/doc\/software\/clock-generators\/#Standard-parameters-2\" >Standard parameters<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/imperix.com\/doc\/software\/clock-generators\/#Advanced-parameters-2\" >Advanced parameters<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/imperix.com\/doc\/software\/clock-generators\/#C-functions\" >C++ functions<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\">Imperix controllers feature <strong>4 clock generators<\/strong>, CLK0, CLK1, CLK2, and CLK3, which can be freely configured as derivatives of the 250 MHz base clock. These derivatives provide subsequent time bases for FPGA resources (such as ADCs and PWMs) and CPU events. However, as described in <a href=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\" type=\"link\" id=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\">PN259<\/a>, their behavior differs slightly:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The main clock, <strong>CLK0<\/strong>,<strong> <\/strong>is mandatory and always active. It is used to trigger essential events such as the analog-to-digital conversion (ADC) and the launch of the CPU task. In Simulink and PLECS blocks, this clock generator is already embedded inside the <a href=\"https:\/\/imperix.com\/doc\/software\/config-control-task-configuration\">CONFIG<\/a> block. CLK0 only supports fixed-frequency operation.<\/li>\n\n\n\n<li><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">The clocks\u00a0<strong>CLK1<\/strong>,\u00a0<strong>CLK2,\u00a0<\/strong>and\u00a0<strong>CLK3<\/strong> can be freely used as extra time bases for <a href=\"https:\/\/imperix.com\/doc\/software\/pulse-width-modulator\" target=\"_blank\">PWM<\/a>\u00a0resources.<\/span> Unlike CLK0, these clocks support glitch-free reconfiguration during runtime, enabling\u00a0variable-frequency operation. This capability is further described in <a href=\"https:\/\/imperix.com\/doc\/help\/variable-frequency-operation\" type=\"link\" id=\"https:\/\/imperix.com\/doc\/help\/variable-frequency-operation\">PN121<\/a>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">In stacked controller configurations (using imperix <a href=\"https:\/\/imperix.com\/technology\/distributed-modulation\/\"><em>RealSync<\/em><\/a>), all clock generators are <strong>intrinsically synchronized<\/strong>, with a guaranteed absolute maximum timing error of \u00b12 ns. Moreover, all the clock generators are reset at the same time, which implies that, if the frequency of one clock generator is a multiple of another, they are guaranteed to remain in phase (e.g., 20 kHz and 40 kHz).<\/p>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-success\" role=\"alert\">More information on the timing architecture of imperix controllers is given in <a href=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\" type=\"link\" id=\"https:\/\/imperix.com\/doc\/help\/timing-configuration-on-imperix-controllers\">PN259<\/a>.<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-simulink-block\"><span class=\"ez-toc-section\" id=\"Simulink-block\"><\/span>Simulink block<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<ul class=\"wp-block-list\">\n<li>The output can be connected to a <a href=\"https:\/\/imperix.com\/doc\/software\/pulse-width-modulator\">PWM<\/a>\u00a0block input signal (marked with the symbol <code>>)<\/code> to set its switching frequency.<\/li>\n\n\n\n<li>CLK blocks only have a visible input if the <code>variable<\/code> frequency parameter is selected. This sets the clock frequency during runtime.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"109\" height=\"70\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/clk1.png\" alt=\"\" class=\"wp-image-37505\"\/><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-standard-parameters\"><span class=\"ez-toc-section\" id=\"Standard-parameters\"><\/span>Standard parameters<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>Clock ID<\/strong>\u00a0selects which clock generator is used (CLK1, CLK2, or CLK3 only).<br>CLK0 is already used by the <a href=\"https:\/\/imperix.com\/doc\/software\/config-control-task-configuration\">CONFIG<\/a> block and cannot be instantiated as a separate clock block.<\/li>\n\n\n\n<li>The <strong>initial clock frequency<\/strong> specifies the clock frequency in Hertz (Hz). If the desired frequency is not achievable (because of the limited resolution of 4 ns), the clock frequency is replaced by the closest achievable frequency, and a warning log message is generated in Cockpit.<br>The initial clock frequency value is overwritten by the input signal value during runtime if the frequency is configured as <strong>Variable<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-advanced-parameters\"><span class=\"ez-toc-section\" id=\"Advanced-parameters\"><\/span>Advanced parameters<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>Variable <\/strong>checkbox enables the reconfiguration of the frequency during runtime using the input signal.<\/li>\n\n\n\n<li>The <strong>Frequency limits<\/strong>\u00a0set the minimal and maximal frequencies that the clock generator uses as saturation points.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"424\" height=\"293\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-267.png\" alt=\"\" class=\"wp-image-41299\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-267.png 424w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-267-300x207.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-plecs-block\"><span class=\"ez-toc-section\" id=\"PLECS-block\"><\/span>PLECS block<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<ul class=\"wp-block-list\">\n<li>The output can be connected to a <a href=\"https:\/\/imperix.com\/doc\/software\/pulse-width-modulator\">PWM<\/a>\u00a0block input signal (marked with the symbol <code>>)<\/code> to set its switching frequency.<\/li>\n\n\n\n<li>The input is only visible if the <strong>frequency value<\/strong> is set as <em>Variable<\/em>. It sets the clock frequency at runtime.<\/li>\n<\/ul>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"97\" height=\"77\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/clk3.png\" alt=\"\" class=\"wp-image-37515\"\/><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-standard-parameters-1\"><span class=\"ez-toc-section\" id=\"Standard-parameters-2\"><\/span>Standard parameters<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>Clock ID<\/strong>\u00a0selects which clock generator is used (CLK1, CLK2, or CLK3 only).<br>CLK0 is already used by the <a href=\"https:\/\/imperix.com\/doc\/software\/config-control-task-configuration\">CONFIG<\/a> block and cannot be instantiated as a separate clock block.<\/li>\n\n\n\n<li>The <strong>Initial clock frequency<\/strong> sets the clock frequency 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 log message is generated in Cockpit.<br>The initial clock frequency value is overwritten by the input signal value during runtime if the frequency is configured as <strong>Variable<\/strong>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-advanced-parameters-1\"><span class=\"ez-toc-section\" id=\"Advanced-parameters-2\"><\/span>Advanced parameters<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <strong>Frequency value<\/strong>\u00a0option can be set as <em>Constant<\/em> or <em>Variable.<\/em> Setting it as <strong>Variable<\/strong> enables the reconfiguration of the clock frequency during runtime.<\/li>\n\n\n\n<li>The <strong>Frequency limits<\/strong>\u00a0set the minimal and maximal frequencies that the clock generator uses as saturation points.<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"342\" height=\"348\" src=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-268.png\" alt=\"\" class=\"wp-image-41300\" srcset=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-268.png 342w, https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/04\/image-268-295x300.png 295w\" sizes=\"auto, (max-width: 342px) 100vw, 342px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-c-functions\"><span class=\"ez-toc-section\" id=\"C-functions\"><\/span>C++ functions<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n<style>.kt-accordion-id1574_c19ec9-b1 .kt-accordion-inner-wrap{column-gap:var(--global-kb-gap-md, 2rem);row-gap:1px;}.kt-accordion-id1574_c19ec9-b1 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;background:#ffffff;padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px;}.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;background:#ffffff;font-size:16px;line-height:24px;letter-spacing:0px;font-weight:bold;text-transform:none;color:var(--global-palette3, #1A202C);padding-top:12px;padding-right:10px;padding-bottom:8px;padding-left:16px;}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette3, #1A202C);}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger{background:var(--global-palette3, #1A202C);}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-icon-trigger:before{background:#ffffff;}.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id1574_c19ec9-b1 .kt-blocks-accordion-header:focus-visible{color:#444444;background:#ffffff;border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:before, body:not(.hide-focus-outline) .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-blocks-accordion--visible .kt-blocks-accordion-icon-trigger:after, body:not(.hide-focus-outline) .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle ) .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:before{background:#444444;}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger, body:not(.hide-focus-outline) .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger{background:#444444;}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:hover .kt-blocks-accordion-icon-trigger:before, body:not(.hide-focus-outline) .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:after, body:not(.hide-focus-outline) .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible .kt-blocks-accordion-icon-trigger:before{background:#ffffff;}.kt-accordion-id1574_c19ec9-b1 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{color:var(--global-palette3, #1A202C);background:var(--global-palette9, #ffffff);border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basiccircle ):not( .kt-accodion-icon-style-xclosecircle ):not( .kt-accodion-icon-style-arrowcircle )  > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette3, #1A202C);}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger{background:var(--global-palette3, #1A202C);}.kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:after, .kt-accordion-id1574_c19ec9-b1:not( .kt-accodion-icon-style-basic ):not( .kt-accodion-icon-style-xclose ):not( .kt-accodion-icon-style-arrow ) .kt-blocks-accordion-header.kt-accordion-panel-active .kt-blocks-accordion-icon-trigger:before{background:var(--global-palette9, #ffffff);}@media all and (max-width: 1024px){.kt-accordion-id1574_c19ec9-b1 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;}}@media all and (max-width: 1024px){.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;}}@media all and (max-width: 1024px){.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id1574_c19ec9-b1 .kt-blocks-accordion-header:focus-visible{border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}}@media all and (max-width: 1024px){.kt-accordion-id1574_c19ec9-b1 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}}@media all and (max-width: 767px){.kt-accordion-id1574_c19ec9-b1 .kt-accordion-inner-wrap{display:block;}.kt-accordion-id1574_c19ec9-b1 .kt-accordion-inner-wrap .kt-accordion-pane:not(:first-child){margin-top:1px;}.kt-accordion-id1574_c19ec9-b1 .kt-accordion-panel-inner{border-top:2px solid transparent;border-right:2px solid transparent;border-bottom:2px solid transparent;border-left:2px solid transparent;}.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header{border-top:2px solid #f2f2f2;border-right:2px solid #f2f2f2;border-bottom:2px solid #f2f2f2;border-left:2px solid #f2f2f2;}.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header:hover, \n\t\t\t\tbody:not(.hide-focus-outline) .kt-accordion-id1574_c19ec9-b1 .kt-blocks-accordion-header:focus-visible{border-top:2px solid #eeeeee;border-right:2px solid #eeeeee;border-bottom:2px solid #eeeeee;border-left:2px solid #eeeeee;}.kt-accordion-id1574_c19ec9-b1 .kt-accordion-header-wrap .kt-blocks-accordion-header:focus-visible,\n\t\t\t\t.kt-accordion-id1574_c19ec9-b1 > .kt-accordion-inner-wrap > .wp-block-kadence-pane > .kt-accordion-header-wrap > .kt-blocks-accordion-header.kt-accordion-panel-active{border-top:2px solid var(--global-palette6, #718096);border-right:2px solid var(--global-palette6, #718096);border-bottom:2px solid var(--global-palette6, #718096);border-left:2px solid var(--global-palette6, #718096);}}<\/style>\n<div class=\"wp-block-kadence-accordion alignnone\"><div class=\"kt-accordion-wrap kt-accordion-id1574_c19ec9-b1 kt-accordion-has-4-panes kt-active-pane-0 kt-accordion-block kt-pane-header-alignment-left kt-accodion-icon-style-arrow kt-accodion-icon-side-left\" style=\"max-width:none\"><div class=\"kt-accordion-inner-wrap\" data-allow-multiple-open=\"false\" data-start-open=\"none\">\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-1 kt-pane1574_23b063-a6\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code>Clock_SetFrequency <\/code>\u2014 Configure the clock frequency<\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Clock_SetFrequency<\/span><span class=\"hljs-params\">(tClock clock, <span class=\"hljs-keyword\">float<\/span> freq)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Configures the frequency of the clock in Hertz (Hz).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 log message is generated in Cockpit.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Can be called in <code>UserInit()<\/code> or in the interrupt routine. Usage within the interrupt routine requires prior configuration of the clock as <em>real-time<\/em> tunable using <code>Clock_ConfigureAsRealTimeTunable()<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>clock<\/code>: the clock to configure (<em>CLOCK_0<\/em>, <em>CLOCK_1<\/em>, <em>CLOCK_2<\/em> or <em>CLOCK_3<\/em>)<\/li>\n\n\n\n<li><code>freq<\/code>: the clock frequency in Hertz (Hz)<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-2 kt-pane1574_bfb7a5-19\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code>Clock_SetPeriod <\/code><strong>\u2014 <strong>Configure the clock period<\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Clock_SetPeriod<\/span><span class=\"hljs-params\">(tClock clock, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> period)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Configures the period of the clock in ticks (1 tick = 4 ns).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It can be used in place of the standard <code>Clock_SetFrequency()<\/code> to configure the frequency of the clock such as: \\(\\mathsf{frequency} = \\cfrac{1}{\\mathsf{period} \\times\\mathsf{prescaler} \\times 4\\,\\text{ns}}\\).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Can be called in <code>UserInit()<\/code> or in the interrupt routine. Usage within the interrupt routine requires prior configuration of the clock as <em>real-time<\/em> tunable using <code>Clock_ConfigureAsRealTimeTunable()<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>clock<\/code>: the clock to configure (<em>CLOCK_0<\/em>, <em>CLOCK_1<\/em>, <em>CLOCK_2<\/em> or <em>CLOCK_3<\/em>)<\/li>\n\n\n\n<li><code>period<\/code>: the period of the clock in ticks (1 tick = 4 ns). The maximal value is 65635.<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-3 kt-pane1574_d2a233-71\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code>Clock_SetPrescaler <\/code><strong>\u2014 <strong>Configure the clock prescaler<\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Clock_SetPrescaler<\/span><span class=\"hljs-params\">(tClock clock, <span class=\"hljs-keyword\">unsigned<\/span> <span class=\"hljs-keyword\">int<\/span> prescaler)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Configures the prescaler of the clock.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It can be used in place of the standard <code>Clock_SetFrequency()<\/code> to configure the frequency of the clock such as: \\(\\mathsf{frequency} = \\cfrac{1}{\\mathsf{period} \\times\\mathsf{prescaler} \\times 4\\,\\text{ns}}\\).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Can be called in <code>UserInit()<\/code> or in the interrupt routine. Usage within the interrupt routine requires prior configuration of the clock as <em>real-time<\/em> tunable using <code>Clock_ConfigureAsRealTimeTunable()<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>clock<\/code>: the clock to configure (<em>CLOCK_0<\/em>, <em>CLOCK_1<\/em>, <em>CLOCK_2<\/em> or <em>CLOCK_3<\/em>)<\/li>\n\n\n\n<li><code>prescaler<\/code>: the prescaler of the clock. The maximal value is 65635.<br>Using <code>prescaler=0<\/code> sets the prescaler to 1 and is therefore equivalent to <code>prescaler=1<\/code>.<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-pane kt-accordion-pane kt-accordion-pane-4 kt-pane1574_6ddfc3-13\"><div class=\"kt-accordion-header-wrap\"><button class=\"kt-blocks-accordion-header kt-acccordion-button-label-show\" type=\"button\"><span class=\"kt-blocks-accordion-title-wrap\"><span class=\"kt-blocks-accordion-title\"><code>Clock_ConfigureAsRealTimeTunable <\/code><strong>\u2014 <strong>Enable variable frequency operation<\/strong><\/strong><\/span><\/span><span class=\"kt-blocks-accordion-icon-trigger\"><\/span><\/button><\/div><div class=\"kt-accordion-panel kt-accordion-panel-hidden\"><div class=\"kt-accordion-panel-inner\"><pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"C++\" data-shcb-language-slug=\"cpp\"><span><code class=\"hljs language-cpp\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">void<\/span> <span class=\"hljs-title\">Clock_ConfigureAsRealTimeTunable<\/span><span class=\"hljs-params\">(tClock clock)<\/span><\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">C++<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">cpp<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Enables the reconfiguration of the clock frequency during <em>real-time<\/em> execution. In other words it allows using <code>Clock_SetFrequency()<\/code>, <code>Clock_SetPeriod()<\/code> or <code>Clock_SetPrescaler()<\/code> in the interrupt routine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Only CLOCK_1, CLOCK_2 and CLOCK_3 can be set a <em>real-time<\/em> tunable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Can be called in <code>UserInit()<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>clock<\/code>: the clock to configure (<em>CLOCK_1<\/em>, <em>CLOCK_2<\/em> or <em>CLOCK_3<\/em>)<\/li>\n<\/ul>\n<\/div><\/div><\/div>\n<\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Imperix controllers feature 4 clock generators, CLK0, CLK1, CLK2, and CLK3, which can be freely configured as derivatives of the 250 MHz base clock. These&#8230;<\/p>\n","protected":false},"author":4,"featured_media":33315,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[16],"tags":[],"software-environments":[105,103,104],"provided-results":[],"related-products":[50,31,32,92,166,51,113,114,112,111,110],"guidedreadings":[],"tutorials":[],"user-manuals":[],"coauthors":[70],"class_list":["post-1574","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","software-environments-c-plus-plus","software-environments-matlab","software-environments-plecs","related-products-acg-sdk","related-products-b-board-pro","related-products-b-box-rcp","related-products-b-box-micro","related-products-b-box-rcp-3-0","related-products-cpp-sdk","related-products-mmc","related-products-motor","related-products-peb","related-products-pm","related-products-tpi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CLK - Clock generators - Simulink, PLECS and C++ documentation<\/title>\n<meta name=\"description\" content=\"This page is the documentation of the Clock generators block from imperix libraries. It configures imperix power electronics controllers.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/imperix.com\/doc\/software\/clock-generators\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CLK - Clock generators - Simulink, PLECS and C++ documentation\" \/>\n<meta property=\"og:description\" content=\"This page is the documentation of the Clock generators block from imperix libraries. It configures imperix power electronics controllers.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/imperix.com\/doc\/software\/clock-generators\" \/>\n<meta property=\"og:site_name\" content=\"imperix\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-02T12:39:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-11T08:51:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png\" \/>\n\t<meta property=\"og:image:width\" content=\"500\" \/>\n\t<meta property=\"og:image:height\" content=\"334\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Beno\u00eet Steinmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Beno\u00eet Steinmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators\"},\"author\":{\"name\":\"Beno\u00eet Steinmann\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/a69a3bda75b05d0923cc76d7268cc94f\"},\"headline\":\"CLK &#8211; Clock generators\",\"datePublished\":\"2021-04-02T12:39:29+00:00\",\"dateModified\":\"2026-05-11T08:51:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators\"},\"wordCount\":888,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/software.png\",\"articleSection\":[\"Software reference\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators\",\"name\":\"CLK - Clock generators - Simulink, PLECS and C++ documentation\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/software.png\",\"datePublished\":\"2021-04-02T12:39:29+00:00\",\"dateModified\":\"2026-05-11T08:51:27+00:00\",\"description\":\"This page is the documentation of the Clock generators block from imperix libraries. It configures imperix power electronics controllers.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators#primaryimage\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/software.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2025\\\/05\\\/software.png\",\"width\":500,\"height\":334},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/software\\\/clock-generators#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge base\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Software reference\",\"item\":\"https:\\\/\\\/imperix.com\\\/doc\\\/category\\\/software\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"CLK &#8211; Clock generators\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#website\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\",\"name\":\"imperix\",\"description\":\"power electronics\",\"publisher\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/imperix.com\\\/doc\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#organization\",\"name\":\"imperix\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/imperix_logo.png\",\"contentUrl\":\"https:\\\/\\\/imperix.com\\\/doc\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/imperix_logo.png\",\"width\":350,\"height\":120,\"caption\":\"imperix\"},\"image\":{\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/imperix.com\\\/doc\\\/#\\\/schema\\\/person\\\/a69a3bda75b05d0923cc76d7268cc94f\",\"name\":\"Beno\u00eet Steinmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g3b3f3d8e66019ebcb2848094940b98c0\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g\",\"caption\":\"Beno\u00eet Steinmann\"},\"description\":\"Benoit is an embedded systems expert and the leader of software and firmware developments at imperix. On the knowledge base, he is the author of numerous software reference documents.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/benoit-steinmann\\\/\"],\"url\":\"https:\\\/\\\/imperix.com\\\/doc\\\/author\\\/steinmann\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CLK - Clock generators - Simulink, PLECS and C++ documentation","description":"This page is the documentation of the Clock generators block from imperix libraries. It configures imperix power electronics controllers.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/imperix.com\/doc\/software\/clock-generators","og_locale":"en_US","og_type":"article","og_title":"CLK - Clock generators - Simulink, PLECS and C++ documentation","og_description":"This page is the documentation of the Clock generators block from imperix libraries. It configures imperix power electronics controllers.","og_url":"https:\/\/imperix.com\/doc\/software\/clock-generators","og_site_name":"imperix","article_published_time":"2021-04-02T12:39:29+00:00","article_modified_time":"2026-05-11T08:51:27+00:00","og_image":[{"width":500,"height":334,"url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","type":"image\/png"}],"author":"Beno\u00eet Steinmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Beno\u00eet Steinmann","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/imperix.com\/doc\/software\/clock-generators#article","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/software\/clock-generators"},"author":{"name":"Beno\u00eet Steinmann","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/a69a3bda75b05d0923cc76d7268cc94f"},"headline":"CLK &#8211; Clock generators","datePublished":"2021-04-02T12:39:29+00:00","dateModified":"2026-05-11T08:51:27+00:00","mainEntityOfPage":{"@id":"https:\/\/imperix.com\/doc\/software\/clock-generators"},"wordCount":888,"commentCount":0,"publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"image":{"@id":"https:\/\/imperix.com\/doc\/software\/clock-generators#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","articleSection":["Software reference"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/imperix.com\/doc\/software\/clock-generators#respond"]}]},{"@type":"WebPage","@id":"https:\/\/imperix.com\/doc\/software\/clock-generators","url":"https:\/\/imperix.com\/doc\/software\/clock-generators","name":"CLK - Clock generators - Simulink, PLECS and C++ documentation","isPartOf":{"@id":"https:\/\/imperix.com\/doc\/#website"},"primaryImageOfPage":{"@id":"https:\/\/imperix.com\/doc\/software\/clock-generators#primaryimage"},"image":{"@id":"https:\/\/imperix.com\/doc\/software\/clock-generators#primaryimage"},"thumbnailUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","datePublished":"2021-04-02T12:39:29+00:00","dateModified":"2026-05-11T08:51:27+00:00","description":"This page is the documentation of the Clock generators block from imperix libraries. It configures imperix power electronics controllers.","breadcrumb":{"@id":"https:\/\/imperix.com\/doc\/software\/clock-generators#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/imperix.com\/doc\/software\/clock-generators"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/software\/clock-generators#primaryimage","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2025\/05\/software.png","width":500,"height":334},{"@type":"BreadcrumbList","@id":"https:\/\/imperix.com\/doc\/software\/clock-generators#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Knowledge base","item":"https:\/\/imperix.com\/doc\/"},{"@type":"ListItem","position":2,"name":"Software reference","item":"https:\/\/imperix.com\/doc\/category\/software"},{"@type":"ListItem","position":3,"name":"CLK &#8211; Clock generators"}]},{"@type":"WebSite","@id":"https:\/\/imperix.com\/doc\/#website","url":"https:\/\/imperix.com\/doc\/","name":"imperix","description":"power electronics","publisher":{"@id":"https:\/\/imperix.com\/doc\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/imperix.com\/doc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/imperix.com\/doc\/#organization","name":"imperix","url":"https:\/\/imperix.com\/doc\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/imperix.com\/doc\/#\/schema\/logo\/image\/","url":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/imperix_logo.png","contentUrl":"https:\/\/imperix.com\/doc\/wp-content\/uploads\/2021\/03\/imperix_logo.png","width":350,"height":120,"caption":"imperix"},"image":{"@id":"https:\/\/imperix.com\/doc\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/imperix.com\/doc\/#\/schema\/person\/a69a3bda75b05d0923cc76d7268cc94f","name":"Beno\u00eet Steinmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g3b3f3d8e66019ebcb2848094940b98c0","url":"https:\/\/secure.gravatar.com\/avatar\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/22a9252907f853f91d07b143dfcc84f6ec0cc31f6b72408b503a7026eed5b109?s=96&d=mm&r=g","caption":"Beno\u00eet Steinmann"},"description":"Benoit is an embedded systems expert and the leader of software and firmware developments at imperix. On the knowledge base, he is the author of numerous software reference documents.","sameAs":["https:\/\/www.linkedin.com\/in\/benoit-steinmann\/"],"url":"https:\/\/imperix.com\/doc\/author\/steinmann"}]}},"_links":{"self":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/1574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/comments?post=1574"}],"version-history":[{"count":43,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/1574\/revisions"}],"predecessor-version":[{"id":45583,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/posts\/1574\/revisions\/45583"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media\/33315"}],"wp:attachment":[{"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/media?parent=1574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/categories?post=1574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tags?post=1574"},{"taxonomy":"software-environments","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/software-environments?post=1574"},{"taxonomy":"provided-results","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/provided-results?post=1574"},{"taxonomy":"related-products","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/related-products?post=1574"},{"taxonomy":"guidedreadings","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/guidedreadings?post=1574"},{"taxonomy":"tutorials","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/tutorials?post=1574"},{"taxonomy":"user-manuals","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/user-manuals?post=1574"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/imperix.com\/doc\/wp-json\/wp\/v2\/coauthors?post=1574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}