{"id":5956,"date":"2021-05-20T08:59:05","date_gmt":"2021-05-20T08:59:05","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=5956"},"modified":"2023-09-02T16:06:47","modified_gmt":"2023-09-02T10:36:47","slug":"exercise-understanding-mcu-clock-configuration-part-1","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/","title":{"rendered":"FreeRTOS Lecture 26 &#8211; Exercise: Understanding MCU clock configuration Part-1"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 25px; padding-bottom: 0px; background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"col-md-1 col-sm-12 col-xs-12 col-lg-1\">\n<p>&nbsp;<\/p>\n<\/div>\n<div class=\"col-md-10 col-sm-12 col-xs-12 col-lg-10\">\n<h1 class=\"\" style=\"text-align: center; font-size: 30px; border-width: 0px; line-height: 43px;\"><span style=\"color: #000080;\">Exercise: Understanding MCU clock configuration Part-1<\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\" style=\"border-width: 0px; margin-top: -25px;\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<p>&nbsp;<\/p>\n<div class=\"bg-hr bg-hr-10 color2-color\" style=\"border-style: solid; border-width: 0px 0px 3px;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Before implementing any exercise, let\u2019s ask ourselves what exactly the clock speed of our microcontroller is.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\"> Now let\u2019s find out the clock speed of the microcontroller for our project.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">If you go to the FreeRTOSConfig.h of your project, there is one configurable item called&nbsp; configCPU_CLOCK_HZ, which is initialized to the SystemCoreClock variable or symbol.<\/span><\/p>\n<figure id=\"attachment_5958\" aria-describedby=\"caption-attachment-5958\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-5958\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-1-34.png\" alt=\"FreeRTOSConfig.h file\" width=\"744\" height=\"393\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-768x406.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-1024x541.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-600x317.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-120x63.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-500x264.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-400x211.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-800x423.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34-1200x634.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5958\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. FreeRTOSConfig.h file.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">If you trace the SystemCoreClock variable, it is actually defined in the system_stm32F4x.c file, which is there in the source folder and initialized to 180 MHz, as shown in Figure 2.<\/span><\/p>\n<figure id=\"attachment_5959\" aria-describedby=\"caption-attachment-5959\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-5959\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-2-33.png\" alt=\"definition of SystemCoreClock variable in the system_stm32F4x.c file\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-33-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5959\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. definition of SystemCoreClock variable in the system_stm32F4x.c file.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">In Figure 3, you can also see that the 180 MHz is applicable to only the microcontroller like STM32F427, STM32F437xx, STM32F439xx, or STM32F446xx.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\"> Now in all these microcontrollers, the system clock, i.e., the microcontroller&#8217;s main clock, can rise up to 180 MHz but remember, that is not the default case. It can go up to 180 MHz maximum. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Let&#8217;s say you are using the STM32lx series of the microcontroller; then you may not be able to go up to 180 MHz. You may end up having a maximum of 80 MHz.<\/span><\/p>\n<figure id=\"attachment_5960\" aria-describedby=\"caption-attachment-5960\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-5960\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-3-28.png\" alt=\"Understanding MCU clock configuration Part-1\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-28-1200x639.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5960\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Microcontrollers with maximum clock speed of 180 MHz.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Remember that this discussion is not just bound to STmicroelectronics microcontrollers. This concept is applicable to any microcontroller, whether it is from NXP, TI, or Atmel. Everywhere the microcontroller needs a clock. That clock is called a system clock. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">For the system clock, there will always be a default case as well as the maximum capacity. By going through the reference manual of the microcontroller, you can understand the default clock and the maximum value of the system clock of the microcontroller. There is no other way to get this information. You have to obtain it from the reference manual.&nbsp;<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now let\u2019s go to the reference manual to understand this. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">In the reference manual of the STM32F446RE microcontroller, go to the reset and clock control or RCC, as shown in Figure 4. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">RCC is the block that is used to control the clock to the various parts of the microcontroller like the processor, peripherals that are hanging on the AHB domain, peripherals that are hanging on the APB domain, and to the various other sections of the microcontroller like memories, etc. Basically, this block manages the clock.&nbsp;<\/span><\/p>\n<figure id=\"attachment_5961\" aria-describedby=\"caption-attachment-5961\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5961\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-4-24.png\" alt=\"Understanding MCU clock configuration Part-1\" width=\"744\" height=\"394\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-24-1200x636.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5961\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. Reference manual of the STM32F446RE microcontroller.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">In the RCC section, you will find a clock tree (Figure 5), just open that, and in the clock tree, you will find a CPU clock, which is getting generated by this engine.<\/span><\/span><span style=\"color: #000000;\"><span style=\"font-weight: 400;\"> If you trace this CPU clock, it will actually be going to the CPU of the microcontroller, i.e., ARM processor. <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">The CPU clock is derived from the system clock, and the system clock is derived from a couple of sources that are HSE, HSI, PLLCLK, and PLLR. HSE stands for High-Speed External, which is the crystal that you connect to the microcontroller externally.<\/span><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Remember that, by default, the microcontroller doesn\u2019t come with the crystal. The crystal is something that you provide externally to the microcontroller on the PCB. <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">In most of the products, the crystal may not be present. That\u2019s why the microcontroller should not drive the system clock from HSE by default because HSE may not be present. That\u2019s why there is another source called HSI or High-Speed Internal, which is internal to the microcontroller and is derived from the RC oscillator, which is there inside the microcontroller. <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">You can observe HSI RC in Figure 5, and its value is 16 MHz in this microcontroller, which may not be true for some ST family microcontrollers. Some microcontrollers may have HSI as 8 MHz. So, the internal RC oscillator is considered as HSI, and it provides a clock of 16 MHz.<\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\"> In Figure 5, you can see that&nbsp;&nbsp;<\/span><span style=\"font-weight: 400;\">the HSI RC comes all the way to the HSI. Since it is internal to the microcontroller, it is used as a default system clock. This is the reason the system clock will be 16 MHz by default.<\/span><\/span><\/p>\n<figure id=\"attachment_5962\" aria-describedby=\"caption-attachment-5962\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5962\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-5-24.png\" alt=\"Understanding MCU clock configuration Part-1\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-24-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5962\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. Clock tree of STM32F446RE microcontroller.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The microcontroller will also have a clock generating engine called PLL, and by using that PLL, you can produce high-speed clocks. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">By taking the help of PLL, you can reach up to 180 MHz in this microcontroller. PLLCLK helps you to achieve higher and higher clock speeds, and the maximum value is 180 MHz. But remember that by default, HSE will be off PLL\u2019s will be off. <\/span><span style=\"font-weight: 400; color: #000000;\">The main PLL block of the microcontroller will be off by default. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">So, the system clock will always derive the clock from HSI. That\u2019s why 16 MHz will be delivered to the CPU. If the AHB prescaler is 1, then the system clock is directly fed into the CPU clock. 16 MHz is the default clock.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Now let\u2019s go to the FreeRTOSConfig.h file of your project (Figure 6). <\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">In that hex file, there is one configurable item called configCPU_CLOCK_HZ. You have to configure this configurable item with the clock frequency you deliver to the CPU clock, which is then equated to SystemCoreClock.&nbsp;&nbsp;<\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">In Figure 2, the SystemCoreClock is mentioned as 180 MHz, which is a maximum value. That means that this project somehow turns on the PLL. Because without PLL, you can\u2019t go up to 180 MHz. That means somewhere, this project is doing PLL configuration to boost the clock to 180 MHz. So, you have to find out the initialization code that configures the PLL because we have not done any PLL configuration.<\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\"> Now let\u2019s find out that initialization code. Let\u2019s trace all the way from the reset handler. Because whenever you reset the microcontroller, the first handler (or function) that runs is the reset handler.&nbsp;<\/span><\/span><\/p>\n<figure id=\"attachment_5963\" aria-describedby=\"caption-attachment-5963\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5963\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-6-21.png\" alt=\"Understanding MCU clock configuration Part-1\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-21-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5963\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. FreeRTOSConfig.h file.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now, let\u2019s go to the start-up code shown in Figure 7, and here you can find a reset handler written in assembly. The reset handler begins from line 42.<\/span><\/p>\n<figure id=\"attachment_5964\" aria-describedby=\"caption-attachment-5964\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5964\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-7-20.png\" alt=\"Understanding MCU clock configuration Part-1\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-20-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5964\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7. Startup code.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 25px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><b>FastBit Embedded Brain Academy Courses<\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 17px;\"><span style=\"font-weight: 400; color: #000000;\">click here: <\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"http:\/\/fastbitlab.com\/course1\"><span style=\"font-weight: 400;\">https:\/\/fastbitlab.com\/course1<\/span><\/a><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Exercise: Understanding MCU clock configuration Part-1 &nbsp; &nbsp; Before implementing any exercise, let\u2019s ask ourselves what exactly the clock speed of our microcontroller is. Now let\u2019s find out the clock speed of the microcontroller for our project. If you go to the FreeRTOSConfig.h of your project, there is one configurable item called&nbsp; configCPU_CLOCK_HZ, which [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5958,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[8],"tags":[19],"class_list":["post-5956","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-freertos-lectures","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>FreeRTOS Exercise: Mastering MCU Clock Configuration: Part 1<\/title>\n<meta name=\"description\" content=\"FreeRTOS Lecture 26 - Learn about configuring the clock speed of your microcontroller (MCU) &amp; dive into the details of clock sources, PLL\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FreeRTOS Exercise: Mastering MCU Clock Configuration: Part 1\" \/>\n<meta property=\"og:description\" content=\"FreeRTOS Lecture 26 - Learn about configuring the clock speed of your microcontroller (MCU) &amp; dive into the details of clock sources, PLL\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-20T08:59:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-02T10:36:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1917\" \/>\n\t<meta property=\"og:image:height\" content=\"1013\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"FreeRTOS Lecture 26 &#8211; Exercise: Understanding MCU clock configuration Part-1\",\"datePublished\":\"2021-05-20T08:59:05+00:00\",\"dateModified\":\"2023-09-02T10:36:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/\"},\"wordCount\":1099,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-34.png\",\"keywords\":[\"FreeRTOS Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/\",\"name\":\"FreeRTOS Exercise: Mastering MCU Clock Configuration: Part 1\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-34.png\",\"datePublished\":\"2021-05-20T08:59:05+00:00\",\"dateModified\":\"2023-09-02T10:36:47+00:00\",\"description\":\"FreeRTOS Lecture 26 - Learn about configuring the clock speed of your microcontroller (MCU) & dive into the details of clock sources, PLL\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-34.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-34.png\",\"width\":1917,\"height\":1013,\"caption\":\"Figure 1. FreeRTOSConfig.h file.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/exercise-understanding-mcu-clock-configuration-part-1\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FreeRTOS Lecture 26 &#8211; Exercise: Understanding MCU clock configuration Part-1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FreeRTOS Exercise: Mastering MCU Clock Configuration: Part 1","description":"FreeRTOS Lecture 26 - Learn about configuring the clock speed of your microcontroller (MCU) & dive into the details of clock sources, PLL","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:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/","og_locale":"en_US","og_type":"article","og_title":"FreeRTOS Exercise: Mastering MCU Clock Configuration: Part 1","og_description":"FreeRTOS Lecture 26 - Learn about configuring the clock speed of your microcontroller (MCU) & dive into the details of clock sources, PLL","og_url":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2021-05-20T08:59:05+00:00","article_modified_time":"2023-09-02T10:36:47+00:00","og_image":[{"width":1917,"height":1013,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"FreeRTOS Lecture 26 &#8211; Exercise: Understanding MCU clock configuration Part-1","datePublished":"2021-05-20T08:59:05+00:00","dateModified":"2023-09-02T10:36:47+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/"},"wordCount":1099,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34.png","keywords":["FreeRTOS Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/","url":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/","name":"FreeRTOS Exercise: Mastering MCU Clock Configuration: Part 1","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34.png","datePublished":"2021-05-20T08:59:05+00:00","dateModified":"2023-09-02T10:36:47+00:00","description":"FreeRTOS Lecture 26 - Learn about configuring the clock speed of your microcontroller (MCU) & dive into the details of clock sources, PLL","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-34.png","width":1917,"height":1013,"caption":"Figure 1. FreeRTOSConfig.h file."},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/exercise-understanding-mcu-clock-configuration-part-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FreeRTOS Lecture 26 &#8211; Exercise: Understanding MCU clock configuration Part-1"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/comments?post=5956"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5956\/revisions"}],"predecessor-version":[{"id":12713,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5956\/revisions\/12713"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/5958"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=5956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=5956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=5956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}