{"id":5886,"date":"2021-03-25T10:41:10","date_gmt":"2021-03-25T10:41:10","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=5886"},"modified":"2023-09-02T14:18:03","modified_gmt":"2023-09-02T08:48:03","slug":"understanding-systemcoreclock-variable","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/","title":{"rendered":"FreeRTOS Lecture 20 &#8211; Understanding &#8220;SystemCoreClock&#8221; variable"},"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: 35px; 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: 32px; border-width: 0px; line-height: 46px;\"><span style=\"color: #000000;\"><span style=\"color: #000080;\">Understanding &#8220;SystemCoreClock&#8221; variable<\/span>&nbsp;<\/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;\">While building the project, we faced the issue &#8220;SystemCoreClock&#8221; undeclared (Figure 1). That is actually there in the FreeRTOSConfig.h, which you included.<\/span><\/p>\n<figure id=\"attachment_5888\" aria-describedby=\"caption-attachment-5888\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-5888\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-1-29.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29-1200x639.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5888\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Error encountered while building the project.<\/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 in Figure 2, you can see SystemCoreClock, which is a symbol. If you trace this symbol, it will take you to the microcontroller-specific file, i.e., system_stm32f4xx.c (Figure 3) given by the ST. <\/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;\">The system_stm32f4xx.c file contains some initialization functions in order to initialize the microcontroller clock and some other microcontroller-specific features. You can find this file under the source (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;\">The SystemCoreClock is initialized to 180MHz, as shown in Figure 5. We will discuss more on this later.<\/span><\/p>\n<figure id=\"attachment_5889\" aria-describedby=\"caption-attachment-5889\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-5889\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-2-29.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"398\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-768x410.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-1024x547.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-600x321.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-29-1200x641.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5889\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. SystemCoreClock symbol in FreeRTOSConfig.h.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_5890\" aria-describedby=\"caption-attachment-5890\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-5890\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-3-25.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-25-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5890\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. system_stm32f4xx.c file given by the ST.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_5891\" aria-describedby=\"caption-attachment-5891\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5891\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-4-21.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-21-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5891\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. system_stm32f4xx.c file in the source.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_5892\" aria-describedby=\"caption-attachment-5892\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5892\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-5-21.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"398\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21.png 1911w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-768x410.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-1024x547.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-600x321.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-400x214.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-21-1200x641.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5892\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. Initializing SystemCoreClock to 180MHz.<\/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;\">But the problem we are facing here is, you have to extern the SystemCoreClock variable in FreeRTOSConfig.h because that variable is defined in the system_stm32f4xx.c file. So, you have to extern the SystemCoreClock variable, which we already did, as shown in Figure 6. <\/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 just copy the extern statement shown in Figure 7 and paste it, as shown in Figure 8.<\/span><\/p>\n<figure id=\"attachment_5893\" aria-describedby=\"caption-attachment-5893\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5893\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-6-19.png\" alt=\"Making SystemCoreClock variable as extern\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-19-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5893\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. Making SystemCoreClock variable as extern.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_5894\" aria-describedby=\"caption-attachment-5894\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5894\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-7-19.png\" alt=\"Copying the extern statement\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-7-19-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5894\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7. Copying the extern statement.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_5895\" aria-describedby=\"caption-attachment-5895\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5895\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-8-16.png\" alt=\"Pasting extern statement in declaration section\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-8-16-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5895\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 8. Pasting extern statement in declaration section.<\/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;\">After that, try to rebuild the project (Figure 9).<\/span><\/p>\n<figure id=\"attachment_5896\" aria-describedby=\"caption-attachment-5896\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5896\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-9-14.png\" alt=\"Building the project\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-9-14-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5896\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 9. Building the project.<\/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;\">This time there are no compiler errors, but the linker is giving some errors, as shown in Figure 10. That is an undefined reference to vApplicationTickHook and an undefined reference to vApplicationStackOverflowHook.<\/span><\/p>\n<figure id=\"attachment_5897\" aria-describedby=\"caption-attachment-5897\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5897\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-10-12.png\" alt=\"Linker errors encountered while building the project\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-10-12-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5897\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 10. Linker errors encountered while building the project.<\/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;\">vApplicationTickHook and vApplicationStackOverflowHook are the hook functions of the FreeRTOS, which you need to implement in the main.c. This error can be easily solved by going into the FreeRTOSConfig.h and switching off that feature. Now let\u2019s switch off that feature, causing an error.<\/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 FreeRTOSConfig.h, you will find various macros in order to configure the FreeRTOS source code.<\/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 Figure 11, you can see various macros that start from the word config, which is actually a configurable item. configUSE_PREEMPTION is a configurable item to configure the preemption. If you make it 1, then preemption will be enabled. If you make it 0, preemption will be disabled.&nbsp;<\/span><\/p>\n<figure id=\"attachment_5899\" aria-describedby=\"caption-attachment-5899\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5899\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-11-11.png\" alt=\"Various macros to configure the FreeRTOS source code\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-11-11-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5899\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 11. Various macros to configure the FreeRTOS source 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: 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 use this hook configurable items. While building, we are facing an issue that is an undefined reference to ApplicationTickHook. <\/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 understand the meaning of this error. This error is actually telling us that please implement a function called a vApplicationTickHook in your main.c.<\/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;\">But our main.c is empty (Figure 12). We have not implemented any hook functions. Because we don\u2019t need that for the HelloWorld application, so let\u2019s make the tick hook and idle hook macro as zero, as shown in Figure 13.<\/span><\/p>\n<figure id=\"attachment_5900\" aria-describedby=\"caption-attachment-5900\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5900\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-12-10.png\" alt=\"main.c file\" width=\"744\" height=\"394\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-12-10-1200x636.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5900\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 12. main.c file.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_5901\" aria-describedby=\"caption-attachment-5901\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5901\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-13-10.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"397\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-768x410.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-1024x546.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-13-10-1200x640.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5901\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 13. Initializing idle hook and tick hook.<\/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;\">After that, we are facing an issue with a stack overflow. Check for stack overflow. Its initial value is 2 (Figure 14). Now let\u2019s change that into 0 (Figure 15).<\/span><\/p>\n<figure id=\"attachment_5902\" aria-describedby=\"caption-attachment-5902\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5902\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-14-9.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"397\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-768x410.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-1024x546.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-14-9-1200x640.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5902\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 14. Initial value of stack overflow.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_5903\" aria-describedby=\"caption-attachment-5903\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5903\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-15-8.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"393\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-300x158.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-768x405.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-1024x541.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-600x317.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-120x63.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-500x264.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-400x211.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-800x422.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-15-8-1200x633.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5903\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 15. Modified stack overflow value.<\/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;\">Let\u2019s build the project. Now the project is built successfully (Figure 16). You have successfully built a project, which consists of FreeRTOS source code.<\/span><\/p>\n<figure id=\"attachment_5904\" aria-describedby=\"caption-attachment-5904\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5904\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-16-7.png\" alt=\"Understanding &quot;SystemCoreClock&quot; variable\" width=\"744\" height=\"397\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-1024x546.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-16-7-1200x640.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5904\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 16. Result of building project.<\/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 you can use your main.c in order to create various threads or tasks to take the benefits of FreeRTOS services like task management, task creation, task deletion, queue management, semaphores, Mutexes, etc.<\/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 you can implement all these things from main.c, and you can play with the FreeRTOS source code.<\/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=\"\">In the following article, let&#8217;s see <span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"http:\/\/fastbitlab.com\/what-is-the-tasks\/\" target=\"_blank\" rel=\"noopener\">what is the task<\/a><\/span>.<\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-size: 19px; line-height: 25px;\"><b><span style=\"color: #000000;\">FastBit Embedded Brain Academy Courses<\/span>&nbsp;<\/b><\/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; Understanding &#8220;SystemCoreClock&#8221; variable&nbsp; &nbsp; &nbsp; While building the project, we faced the issue &#8220;SystemCoreClock&#8221; undeclared (Figure 1). That is actually there in the FreeRTOSConfig.h, which you included. &nbsp; Now in Figure 2, you can see SystemCoreClock, which is a symbol. If you trace this symbol, it will take you to the microcontroller-specific file, i.e., [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5888,"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-5886","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 Lecture 20 - Understanding &quot;SystemCoreClock&quot; variable<\/title>\n<meta name=\"description\" content=\"Understanding &quot;SystemCoreClock&quot; variable. While building the project, we faced the issue SystemCoreClock undeclared. In the FreeRTOS\" \/>\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\/understanding-systemcoreclock-variable\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FreeRTOS Lecture 20 - Understanding &quot;SystemCoreClock&quot; variable\" \/>\n<meta property=\"og:description\" content=\"Understanding &quot;SystemCoreClock&quot; variable. While building the project, we faced the issue SystemCoreClock undeclared. In the FreeRTOS\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/\" \/>\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-03-25T10:41:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-02T08:48:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1917\" \/>\n\t<meta property=\"og:image:height\" content=\"1021\" \/>\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=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"FreeRTOS Lecture 20 &#8211; Understanding &#8220;SystemCoreClock&#8221; variable\",\"datePublished\":\"2021-03-25T10:41:10+00:00\",\"dateModified\":\"2023-09-02T08:48:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/\"},\"wordCount\":784,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-29.png\",\"keywords\":[\"FreeRTOS Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/\",\"name\":\"FreeRTOS Lecture 20 - Understanding \\\"SystemCoreClock\\\" variable\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-29.png\",\"datePublished\":\"2021-03-25T10:41:10+00:00\",\"dateModified\":\"2023-09-02T08:48:03+00:00\",\"description\":\"Understanding \\\"SystemCoreClock\\\" variable. While building the project, we faced the issue SystemCoreClock undeclared. In the FreeRTOS\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-29.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-29.png\",\"width\":1917,\"height\":1021,\"caption\":\"Figure 1. Error encountered while building the project.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/understanding-systemcoreclock-variable\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FreeRTOS Lecture 20 &#8211; Understanding &#8220;SystemCoreClock&#8221; variable\"}]},{\"@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 Lecture 20 - Understanding \"SystemCoreClock\" variable","description":"Understanding \"SystemCoreClock\" variable. While building the project, we faced the issue SystemCoreClock undeclared. In the FreeRTOS","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\/understanding-systemcoreclock-variable\/","og_locale":"en_US","og_type":"article","og_title":"FreeRTOS Lecture 20 - Understanding \"SystemCoreClock\" variable","og_description":"Understanding \"SystemCoreClock\" variable. While building the project, we faced the issue SystemCoreClock undeclared. In the FreeRTOS","og_url":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2021-03-25T10:41:10+00:00","article_modified_time":"2023-09-02T08:48:03+00:00","og_image":[{"width":1917,"height":1021,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29.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":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"FreeRTOS Lecture 20 &#8211; Understanding &#8220;SystemCoreClock&#8221; variable","datePublished":"2021-03-25T10:41:10+00:00","dateModified":"2023-09-02T08:48:03+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/"},"wordCount":784,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29.png","keywords":["FreeRTOS Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/","url":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/","name":"FreeRTOS Lecture 20 - Understanding \"SystemCoreClock\" variable","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29.png","datePublished":"2021-03-25T10:41:10+00:00","dateModified":"2023-09-02T08:48:03+00:00","description":"Understanding \"SystemCoreClock\" variable. While building the project, we faced the issue SystemCoreClock undeclared. In the FreeRTOS","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-29.png","width":1917,"height":1021,"caption":"Figure 1. Error encountered while building the project."},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/understanding-systemcoreclock-variable\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FreeRTOS Lecture 20 &#8211; Understanding &#8220;SystemCoreClock&#8221; variable"}]},{"@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\/5886","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=5886"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5886\/revisions"}],"predecessor-version":[{"id":12702,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5886\/revisions\/12702"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/5888"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=5886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=5886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=5886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}