{"id":14477,"date":"2023-04-22T10:40:53","date_gmt":"2023-04-22T05:10:53","guid":{"rendered":"https:\/\/fastbitlab.com\/?p=14477"},"modified":"2023-09-07T12:49:38","modified_gmt":"2023-09-07T07:19:38","slug":"setup-ahb-and-apb-clocks-code","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/","title":{"rendered":"STM32-LTDC, LCD-TFT, LVGL (MCU3) Lecture 19| Setting up main system clock code implementation part-3"},"content":{"rendered":"<div class=\"boldgrid-section color4-background-color color-4-text-contrast bg-background-color\">\n<div class=\"container\">\n<div class=\"row color4-background-color color-4-text-contrast bg-background-color\">\n<div class=\"col-lg-1 col-md-12 col-sm-12 col-xs-12 color4-background-color color-4-text-contrast bg-background-color\"><\/div>\n<div class=\"col-lg-10 col-md-12 col-xs-12 col-sm-12\">\n<p class=\"\">&nbsp;<\/p>\n<h1 class=\"\" style=\"text-align: center; font-size: 38px;\"><span style=\"color: #000080;\"><b>Setting up main system clock code implementation part-3<\/b><\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<div class=\"bg-hr bg-hr-16 color2-color\" style=\"border-style: solid; border-width: 0px 0px 2px;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"\" style=\"font-size: 25px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><strong><span style=\"text-decoration: underline; color: #000080;\">Setup of the main system clock<\/span><\/strong><\/p>\n<p class=\"\" style=\"font-size: 17px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Below code snippets shows the completed setting up LCD_CLK using the PLLSAI block.<\/span><\/p>\n<pre class=\"color-5-text-contrast color5-background-color\" style=\"box-shadow: #cecece 0px 0px 0px 0px inset;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"color: #008000;\">\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/This step is only required if you are using RGB interface \/\/\/\/\/\/\/\/\/\/\/\/<\/span>\r\n<span style=\"color: #008000;\">\/\/Setting up LCD_CLK using PLLSAI block<\/span>\r\nREG_SET_VAL(pRCC-&gt;<span style=\"color: #99ccff;\">PLLSAICFGR<\/span>,50U,0x1FFU,RCC_PLLSAICFGR_PLLSAIN_Pos);<span style=\"color: #008000;\"> \/*PLLSAI_N*\/<\/span>\r\nREG_SET_VAL(pRCC-&gt;<span style=\"color: #99ccff;\">PLLSAICFGR<\/span>,0x02U,0x7U,RCC_PLLSAICFGR_PLLSAIR_Pos); <span style=\"color: #008000;\">\/*PLLSAI_R*\/<\/span>\r\n\/*LCD_CLK = 6.25MHz*\/\r\nREG_SET_VAL(pRCC-&gt;<span style=\"color: #99ccff;\">DCKCFGR<\/span>,0x08U,0x3U,RCC_DCKCFGR_PLLSAIDIVR_Pos); <span style=\"color: #008000;\">\/*DIV*\/<\/span>\r\n<span style=\"color: #008000;\">\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/span><\/pre>\n<p class=\"\" style=\"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;\">Please note that you don&#8217;t have to do this step if you are not using the RGB interface.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"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 our third hardware combination, which is the one with the external LCD, we are not using the RGB interface. These steps are not required.&nbsp;&nbsp;<\/span><\/p>\n<p class=\"\" style=\"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;\">Here line 50, as you can see I have modified the PLLSAICFGR register, and the value of PLLSAI_N is 50. And the value of PLLSAI_R is 0x02.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"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;\">After that, I use the divider, the divider to divide the PLLLCDCLK clock. For that, I&#8217;m using the DCKCFGR register, and RCC_DCKCFGR_PLLSAIDIVR_Pos this bit position you have to touch. This is the 16-bit position in that register.<\/span><\/p>\n<p class=\"\" style=\"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;\">And I&#8217;m using 0x08. 50 divided by 8, which gives me LCD_CLK as 6.25MHz. That would be sufficient to drive the LCD module with the ILI9341 chip.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"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;\">We have partially completed the setup of the main system clock. The setting up of the main system clock is not at over, because we have not turned on the PLL and we have to switch the PLL as the main system clock, so we&#8217;ll see that in the upcoming article.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 25px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><b>Setup AHB and APB clocks<\/b><\/span><\/p>\n<p class=\"\" style=\"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;\">This is the third step.<\/span><\/p>\n<p class=\"\" style=\"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;\">Here we discuss this step with respect to the STM32F429 microcontroller, but you can apply it to any STM32 microcontroller. So, the concept is the same.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"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;\">Here, we are now getting the system clock as 180MHz. There are 3 buses in the microcontroller. The main bus, which is also called AHB bus, hosts many peripherals. Those are called high-speed peripherals. So, the high-speed peripherals are connected to the AHB bus. The clock of the AHB bus is called HCLK.&nbsp;<\/span><\/p>\n<figure id=\"attachment_14482\" aria-describedby=\"caption-attachment-14482\" style=\"width: 648px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-14482 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/04\/Figure-2-10.png\" alt=\"Figure 2. Setup AHB and APBx clocks(STM32F429)\" width=\"648\" height=\"295\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10.png 1747w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10-300x137.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10-1024x466.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10-768x349.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10-600x273.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10-1536x699.png 1536w\" sizes=\"(max-width: 648px) 100vw, 648px\" \/><figcaption id=\"caption-attachment-14482\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Setup AHB and APBx clocks(STM32F429)<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"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;\">There are two other peripheral buses.<\/span><\/p>\n<ol class=\"\" style=\"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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">APB1 bus<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">APB2 bus.&nbsp;<\/span><\/li>\n<\/ol>\n<p class=\"\" style=\"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;\">And you have to set up the clocks for these buses as well.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"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 PCLK1 is called as APB1 bus clock. PCLK2 is the APB2 bus clock.<\/span><\/p>\n<p class=\"\" style=\"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;\">Many peripherals are connected to the APB2 bus, and many peripherals are connected to the APB1 bus. All those peripherals will draw a clock from these clocks.<\/span><\/p>\n<p class=\"\" style=\"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 this microcontroller, the HCLKs speed should not exceed 180MHz, and PCLK1 frequency should not cross 45MHz, and the PCLK2 frequency or bus speed should not cross 90MHz.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"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;\">This information we get from a <\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.st.com\/resource\/en\/reference_manual\/dm00031020-stm32f405-415-stm32f407-417-stm32f427-437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf\"><span style=\"font-weight: 400;\">reference manual<\/span><\/a><\/span><span style=\"font-weight: 400;\">. So you have to check the reference manual.&nbsp;<\/span><\/span><\/p>\n<p class=\"\" style=\"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;\">They have been mentioned here. The high-speed APB(APB2) and the low-speed APB(APB1). The maximum frequency of the AHB domain is 180 MHz. The maximum allowed frequency of the high-speed APB2 domain is 90MHz. The maximum allowed frequency of the low-speed APB1 domain is 45MHz. So, check your <\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.st.com\/resource\/en\/reference_manual\/dm00031020-stm32f405-415-stm32f407-417-stm32f427-437-and-stm32f429-439-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdf\"><span style=\"font-weight: 400;\">reference manual<\/span><\/a><\/span><span style=\"font-weight: 400;\"> to see these numbers.<\/span><\/span><\/p>\n<figure id=\"attachment_14483\" aria-describedby=\"caption-attachment-14483\" style=\"width: 736px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-14483 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/04\/Figure-3-8.png\" alt=\"Figure 3. Reference manual\" width=\"736\" height=\"347\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-3-8.png 1821w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-3-8-300x142.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-3-8-1024x483.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-3-8-768x362.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-3-8-600x283.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-3-8-1536x725.png 1536w\" sizes=\"(max-width: 736px) 100vw, 736px\" \/><figcaption id=\"caption-attachment-14483\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Reference manual<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"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: #ff0000;\"><strong>How do you slow down the clock?&nbsp;&nbsp;<\/strong><\/span><\/p>\n<p class=\"\" style=\"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;\">Here, SYSCLK is 180MHz, and the clocks for all these different domains are derived from the main system clock(SYSCLK). That means you have to slow down the main system clock. To slow down the main system clock they have given different dividers here, also called as prescalers.<\/span><\/p>\n<p class=\"\" style=\"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;\">Here, for AHB prescaler you have to set it to 1, divided by 1. Basically, there is no division, so&nbsp; HCLK will be 180MHz.<\/span><\/p>\n<p class=\"\" style=\"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 configure the PLL in such a way that SYSCLK is 360MHz, then you have to use this prescaler to match this HCLK to 180MHz.<\/span><\/p>\n<figure id=\"attachment_14484\" aria-describedby=\"caption-attachment-14484\" style=\"width: 851px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-14484 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/04\/Figure-4-8.png\" alt=\"Figure 4. Setup AHB and APBc clocks(STM32F429)\" width=\"851\" height=\"375\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-4-8.png 1781w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-4-8-300x132.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-4-8-1024x451.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-4-8-768x339.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-4-8-600x264.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-4-8-1536x677.png 1536w\" sizes=\"(max-width: 851px) 100vw, 851px\" \/><figcaption id=\"caption-attachment-14484\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Setup AHB and APBc clocks(STM32F429)<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"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;\">And the clocks for the APB domains are derived from HCLK as you can see here(Figure 4). You must not let the clock exceed 45MHz in APB1. That&#8217;s why you have to use the prescaler 4 here. 180 divided by 4, which is 45.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"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;\">And in APB2 you have to use 2, that is 180 divided by 2, which is 90MHz.&nbsp;<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"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;\">Our next task is, Configure all these prescaler values in the RCC register.&nbsp;<\/span><\/p>\n<figure id=\"attachment_14485\" aria-describedby=\"caption-attachment-14485\" style=\"width: 801px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14485 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/04\/Figure-5-5.png\" alt=\"Figure 5. Setup AHB and APB clocks(STM32F429)\" width=\"801\" height=\"351\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-5-5.png 1302w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-5-5-300x131.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-5-5-1024x448.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-5-5-768x336.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-5-5-600x263.png 600w\" sizes=\"(max-width: 801px) 100vw, 801px\" \/><figcaption id=\"caption-attachment-14485\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. Setup AHB and APB clocks(STM32F429)<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"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;\">And please check your MCU&#8217;s reference manual to know the maximum speed of HCLK, PCLK1, and PCLK2.&nbsp; <\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 29px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"text-decoration: underline; color: #993300;\"><b>Task:<\/b><\/span><span style=\"font-weight: 400;\"> you have to program these values(1, 4, 2) into the prescaler fields of the RCC register. Now, let&#8217;s see which RCC register.<\/span><\/span><\/p>\n<p><span style=\"font-weight: 400;\">&nbsp;<\/span><\/p>\n<p class=\"\" style=\"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;\">You have to check the RCC clock configuration register. Here you see, these fields are PPRE2, PPRE1, and HPRE.<\/span><\/p>\n<p class=\"\" style=\"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, you have to use these 3 fields. Here, you store the prescaler value for AHB, APB1, and APB2.&nbsp;<\/span><\/p>\n<figure id=\"attachment_14486\" aria-describedby=\"caption-attachment-14486\" style=\"width: 741px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-14486 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/04\/Figure-6-6.png\" alt=\"Figure 6. RCC clock configuration register(RCC_CFGR)\" width=\"741\" height=\"361\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-6-6.png 1759w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-6-6-300x146.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-6-6-1024x499.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-6-6-768x374.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-6-6-600x292.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-6-6-1536x748.png 1536w\" sizes=\"(max-width: 741px) 100vw, 741px\" \/><figcaption id=\"caption-attachment-14486\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. RCC clock configuration register(RCC_CFGR)<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 17px; line-height: 30px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #0000ff;\"><span style=\"color: #800080;\"><b>Get the Full Course on STM32-LTDC, LCD-TFT, LVGL (MCU3)<\/b><\/span><a style=\"color: #0000ff;\" href=\"https:\/\/www.udemy.com\/course\/mastering-microcontroller-stm32-ltdc-lcd-tft-lvgl\/\"> <b>Here.<\/b><\/a><\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><b>FastBit Embedded Brain Academy Courses<\/b><\/span><\/p>\n<p class=\"\" style=\"font-size: 17px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">Click here:&nbsp;<span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/fastbitlab.com\/course1\" target=\"_blank\" rel=\"noopener\">https:\/\/fastbitlab.com\/course1<\/a><\/span><\/p>\n<\/div>\n<div class=\"col-lg-1 col-md-12 col-sm-12 col-xs-12 color4-background-color color-4-text-contrast bg-background-color\">\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Setting up main system clock code implementation part-3 &nbsp; Setup of the main system clock Below code snippets shows the completed setting up LCD_CLK using the PLLSAI block. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/This step is only required if you are using RGB interface \/\/\/\/\/\/\/\/\/\/\/\/ \/\/Setting up LCD_CLK using PLLSAI block REG_SET_VAL(pRCC-&gt;PLLSAICFGR,50U,0x1FFU,RCC_PLLSAICFGR_PLLSAIN_Pos); \/*PLLSAI_N*\/ REG_SET_VAL(pRCC-&gt;PLLSAICFGR,0x02U,0x7U,RCC_PLLSAICFGR_PLLSAIR_Pos); \/*PLLSAI_R*\/ \/*LCD_CLK = 6.25MHz*\/ REG_SET_VAL(pRCC-&gt;DCKCFGR,0x08U,0x3U,RCC_DCKCFGR_PLLSAIDIVR_Pos); [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":14482,"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":"enable","ocean_disable_heading":"default","ocean_post_title":"Setting up main system clock code implementation part-3","ocean_post_subheading":"","ocean_post_title_style":"solid-color","ocean_post_title_background_color":"#0060af","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":"off","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":[],"class_list":["post-14477","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","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>Setup AHB and APB clocks |STM32-LTDC, LCD-TFT, LVGL(MCU)<\/title>\n<meta name=\"description\" content=\"Learn how to efficiently configure the main system clock, setup AHB and APB clocks for STM32 microcontrollers. This guide covers PLLSAI setup\" \/>\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\/setup-ahb-and-apb-clocks-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setup AHB and APB clocks |STM32-LTDC, LCD-TFT, LVGL(MCU)\" \/>\n<meta property=\"og:description\" content=\"Learn how to efficiently configure the main system clock, setup AHB and APB clocks for STM32 microcontrollers. This guide covers PLLSAI setup\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/\" \/>\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=\"2023-04-22T05:10:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-07T07:19:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1747\" \/>\n\t<meta property=\"og:image:height\" content=\"795\" \/>\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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"STM32-LTDC, LCD-TFT, LVGL (MCU3) Lecture 19| Setting up main system clock code implementation part-3\",\"datePublished\":\"2023-04-22T05:10:53+00:00\",\"dateModified\":\"2023-09-07T07:19:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/\"},\"wordCount\":855,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/Figure-2-10.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/\",\"name\":\"Setup AHB and APB clocks |STM32-LTDC, LCD-TFT, LVGL(MCU)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/Figure-2-10.png\",\"datePublished\":\"2023-04-22T05:10:53+00:00\",\"dateModified\":\"2023-09-07T07:19:38+00:00\",\"description\":\"Learn how to efficiently configure the main system clock, setup AHB and APB clocks for STM32 microcontrollers. This guide covers PLLSAI setup\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/Figure-2-10.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/Figure-2-10.png\",\"width\":1747,\"height\":795,\"caption\":\"Figure 2. Setup AHB and APBx clocks(STM32F429)\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/setup-ahb-and-apb-clocks-code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32-LTDC, LCD-TFT, LVGL (MCU3) Lecture 19| Setting up main system clock code implementation part-3\"}]},{\"@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":"Setup AHB and APB clocks |STM32-LTDC, LCD-TFT, LVGL(MCU)","description":"Learn how to efficiently configure the main system clock, setup AHB and APB clocks for STM32 microcontrollers. This guide covers PLLSAI setup","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\/setup-ahb-and-apb-clocks-code\/","og_locale":"en_US","og_type":"article","og_title":"Setup AHB and APB clocks |STM32-LTDC, LCD-TFT, LVGL(MCU)","og_description":"Learn how to efficiently configure the main system clock, setup AHB and APB clocks for STM32 microcontrollers. This guide covers PLLSAI setup","og_url":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2023-04-22T05:10:53+00:00","article_modified_time":"2023-09-07T07:19:38+00:00","og_image":[{"width":1747,"height":795,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"STM32-LTDC, LCD-TFT, LVGL (MCU3) Lecture 19| Setting up main system clock code implementation part-3","datePublished":"2023-04-22T05:10:53+00:00","dateModified":"2023-09-07T07:19:38+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/"},"wordCount":855,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/","url":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/","name":"Setup AHB and APB clocks |STM32-LTDC, LCD-TFT, LVGL(MCU)","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10.png","datePublished":"2023-04-22T05:10:53+00:00","dateModified":"2023-09-07T07:19:38+00:00","description":"Learn how to efficiently configure the main system clock, setup AHB and APB clocks for STM32 microcontrollers. This guide covers PLLSAI setup","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/04\/Figure-2-10.png","width":1747,"height":795,"caption":"Figure 2. Setup AHB and APBx clocks(STM32F429)"},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/setup-ahb-and-apb-clocks-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"STM32-LTDC, LCD-TFT, LVGL (MCU3) Lecture 19| Setting up main system clock code implementation part-3"}]},{"@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\/14477","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=14477"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/14477\/revisions"}],"predecessor-version":[{"id":15851,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/14477\/revisions\/15851"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/14482"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=14477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=14477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=14477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}