{"id":6346,"date":"2021-06-08T05:24:24","date_gmt":"2021-06-08T05:24:24","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=6346"},"modified":"2023-09-04T11:43:46","modified_gmt":"2023-09-04T06:13:46","slug":"freertos-lecture-40-exercise-usage-of-taskyield-and-explanation","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/","title":{"rendered":"FreeRTOS Lecture 40 &#8211; Exercise: Usage of taskYIELD() and explanation"},"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: 30px; border-width: 0px; line-height: 50px;\"><span style=\"color: #000080;\">Exercise: Usage of taskYIELD() and explanation<\/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;\">Now let\u2019s go to task 1 and put one if condition. Let\u2019s create a flag called UART_ACCESS_KEY. If the UART_ACCESS_KEY is equal to available, then only execute the printf statement, i.e., printmsg (Figure 1).<\/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;\"> Once task 1 enters the if condition, then it makes UART_ACCESS_KEY equal to non-available, as shown in Figure 2. After that, once it completes printing the entire message, it makes UART_ACCESS_KEY is equal to available again.<\/span><\/p>\n<figure id=\"attachment_6348\" aria-describedby=\"caption-attachment-6348\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-6348\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-1-6.png\" alt=\"Figure 1. Code to check the availability of shared resources.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6348\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Code to check the availability of shared resources.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6349\" aria-describedby=\"caption-attachment-6349\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-6349\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-2-6.png\" alt=\"Figure 2. Making shared entities unavailable.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-2-6-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6349\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Making shared entities unavailable.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<pre class=\"color-neutral-text-contrast color-neutral-background-color\" style=\"box-shadow: #cecece 0px 0px 0px 0px inset; font-size: 12px;\"><span style=\"color: #800080;\"><strong>void <\/strong><\/span>vTask1_handler(<span style=\"color: #800080;\"><strong>void<\/strong><\/span> *params)\r\n{\r\n\r\n&nbsp; <strong><span style=\"color: #800080;\">while<\/span><\/strong>(1)\r\n   {\r\n&nbsp; &nbsp; <strong><span style=\"color: #800080;\">if<\/span><\/strong>(UART_ACCESS_KEY == AVAILABLE)\r\n&nbsp; &nbsp; {\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UART_ACCESS_KEY = NOT_AVAILABLE;\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printmsg(\"Hello-world: From Task-1\\r\\n\");\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<strong> UART_ACCESS_KEY = AVAILABLE;<\/strong>\r\n&nbsp; &nbsp; }\r\n\r\n&nbsp; }\r\n\r\n}<\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\">Making shared entities available<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Let\u2019s go to the global section and create a variable called UART_ACCESS_KEY and initialize it to AVAILABLE, as shown in Figure 3.<\/span><\/p>\n<pre class=\"color-neutral-text-contrast color-neutral-background-color\" style=\"padding-left: 40px; box-shadow: #cecece 0px 0px 0px 0px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"color: #008000;\">uint8_t<\/span> UART_ACCESS_KEY = AVAILABLE;<\/pre>\n<figure id=\"attachment_6351\" aria-describedby=\"caption-attachment-6351\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-6351\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-4-6.png\" alt=\"Figure 4. Creation of UART_ACCESS_KEY.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-4-6-1200x637.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6351\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Creation of UART_ACCESS_KEY.<\/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 create macros named AVAILABLE and NON_AVAILABLE, as shown in Figure 4.<\/span><\/p>\n<figure id=\"attachment_6352\" aria-describedby=\"caption-attachment-6352\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6352\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-5-6.png\" alt=\"Figure 5. Creation of macros.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-1024x545.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-800x426.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-5-6-1200x639.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6352\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. Creation of macros.<\/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;\">Same thing you have to implement for task 2 as well. When task 2 preempts task 1, if the key is not available, then it won\u2019t enter into task 2 handler. So, it won\u2019t corrupt the UART by trying to send its characters. That\u2019s how the UART is protected.<\/span><\/p>\n<pre class=\"color-neutral-text-contrast color-neutral-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"color: #800080;\">void<\/span> vTask2_handler(<span style=\"color: #800080;\">void<\/span> *params)\r\n{\r\n&nbsp; &nbsp;<span style=\"color: #800080;\">while<\/span>(1)\r\n&nbsp; &nbsp;{\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #800080;\">if<\/span>(UART_ACCESS_KEY == AVAILABLE)\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UART_ACCESS_KEY = NOT_AVAILABLE;\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printmsg(\"Hello-world: From Task-2\\r\\n\");\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UART_ACCESS_KEY = AVAILABLE;\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }\r\n&nbsp; &nbsp; &nbsp;}\r\n}<\/pre>\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 the UART is serialized by using UART_ACCESS_KEY. Let\u2019s build the project (Figure 5) to see how this project goes.<\/span><\/p>\n<figure id=\"attachment_6354\" aria-describedby=\"caption-attachment-6354\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6354\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-7-6.png\" alt=\"Figure 7. Building the project.\" width=\"744\" height=\"397\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6.png 1915w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-300x160.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-768x409.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-1024x546.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-600x320.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-500x267.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-200x107.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-800x427.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-7-6-1200x640.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6354\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. 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;\">Download the code into the chip (Figure 6). Then tick the reset after the program checkbox (Figure 7) and click ok.<\/span><\/p>\n<figure id=\"attachment_6355\" aria-describedby=\"caption-attachment-6355\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6355\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-8-6.png\" alt=\"Usage of taskYIELD() in FreeRTOS and explanation.\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-8-6-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6355\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. Downloading the code into the chip.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_6356\" aria-describedby=\"caption-attachment-6356\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6356\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-9-6.png\" alt=\"Usage of taskYIELD() in FreeRTOS and explanation\" width=\"744\" height=\"395\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-768x407.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-1024x543.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-600x318.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-500x265.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-800x424.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-9-6-1200x636.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6356\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7. Ticking reset after program option.<\/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 the code is downloaded. Press the reset button. Now, in Figure 8, you can see that the output looks good but here, you can see that only task 1 is executing. Task 2 is not at all executing.<\/span><\/p>\n<figure id=\"attachment_6357\" aria-describedby=\"caption-attachment-6357\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6357\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-10-5.png\" alt=\"Usage of taskYIELD() in FreeRTOS and explanation\" width=\"744\" height=\"393\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-300x158.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-768x405.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-1024x541.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-600x317.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-120x63.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-500x264.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-400x211.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-800x422.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-10-5-1200x633.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6357\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 8. Output on the serial monitor software.<\/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, task 2 is not getting a chance to enter into the if section shown in Figure 6. That may be because when task 1 was executing, it made the key unavailable and prevented task 2 from entering into sending characters to the UART. Task 1 completely executes the printmsg statement, which you see in Figure 8.<\/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;\">After that, it makes the key (UART_ACCESS_KEY) available. But that time, task 2 may not be preempting task 1. That\u2019s why it again closes and makes the access key not available. That\u2019s why task 1 is always getting the key, and the access key is always available for task 1, but for task 2, the key is not at all available. This is why task 2 may not get the chance to see UART_ACCESS_KEY as available, and the control will not enter into the if statement of task handler 2.<\/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 how to allow task 2 also enter into the if section to execute its print message. <\/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;\">One technique that you can use here is a cooperative method. When task 1 executes its printmsg, it makes the key available, and we can make task 1 leave the CPU. So, task 1 has completed printmsg, and we can force task 1 to leave the CPU so that it can give a chance to someone else waiting to execute, i.e., task 2, which also got the same priority and is waiting to execute. <\/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;\">Actually, task 2 is also executing, but it is not able to enter into the if section. So, you can make task 1 to give up the CPU. The way you can do that is, there is one macro in the FreeRTOS, i.e., taskYIELD(). Once task 1 makes the key as available, then it can leave the CPU.<\/span><\/p>\n<pre class=\"color-neutral-text-contrast color-neutral-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px inset;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"color: #800080;\"><strong>void <\/strong><\/span>vTask1_handler(<span style=\"color: #800080;\"><strong>void<\/strong><\/span> *params)\r\n{\r\n\r\n&nbsp; <strong><span style=\"color: #800080;\">while<\/span><\/strong>(1)\r\n  {\r\n&nbsp; &nbsp; <strong><span style=\"color: #800080;\">if<\/span><\/strong>(UART_ACCESS_KEY == AVAILABLE)\r\n&nbsp; &nbsp; {\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UART_ACCESS_KEY = NOT_AVAILABLE;\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printmsg(\"Hello-world: From Task-1\\r\\n\");\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UART_ACCESS_KEY = AVAILABLE;\r\n        <strong>  taskYIELD();<\/strong>\r\n&nbsp; &nbsp; }\r\n\r\n&nbsp; }\r\n\r\n}<\/pre>\n<p class=\"\" style=\"text-align: center;\"><span style=\"color: #000000;\">Call for taskYIELD() macro<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">The taskYIELD() (Figure 9) is a macro that triggers the context switching manually wherever you want.<\/span><\/p>\n<figure id=\"attachment_6359\" aria-describedby=\"caption-attachment-6359\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6359\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-12-4.png\" alt=\"Usage of taskYIELD() in FreeRTOS and explanation\" width=\"744\" height=\"394\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4.png 1919w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-768x406.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-1024x542.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-600x317.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-120x63.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-500x264.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-400x212.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-800x423.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-12-4-1200x635.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6359\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 9. Definition of taskYIELD() macro.<\/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;\">Same thing you can do for task 2 also. Now when task 2 runs, it makes the key available, and it leaves the CPU, as shown below.<\/span><\/p>\n<pre class=\"color-neutral-text-contrast color-neutral-background-color\" style=\"font-size: 12px; box-shadow: #cecece 0px 0px 0px 0px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\"><span style=\"color: #800080;\">void<\/span> vTask2_handler(<span style=\"color: #800080;\">void<\/span> *params)\r\n{\r\n&nbsp; &nbsp;<span style=\"color: #800080;\">while<\/span>(1)\r\n&nbsp; &nbsp;{\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style=\"color: #800080;\">if<\/span>(UART_ACCESS_KEY == AVAILABLE)\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UART_ACCESS_KEY = NOT_AVAILABLE;\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printmsg(\"Hello-world: From Task-2\\r\\n\");\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UART_ACCESS_KEY = AVAILABLE;\r\n                taskYIELD()\r\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }\r\n&nbsp; &nbsp; &nbsp;}\r\n}<\/pre>\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;\">Both the tasks are cooperating with each other in order to enter into the print over UART section. Now let\u2019s see how this project goes. Let\u2019s compile the code (Figure 10).<\/span><\/p>\n<figure id=\"attachment_6361\" aria-describedby=\"caption-attachment-6361\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6361\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-14-4.png\" alt=\"Usage of taskYIELD() in FreeRTOS and explanation\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-14-4-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6361\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 10. 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;\">After successfully compiling the code, download the code into the chip (Figure 11).<\/span><\/p>\n<figure id=\"attachment_6362\" aria-describedby=\"caption-attachment-6362\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6362\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-15-3.png\" alt=\"Usage of taskYIELD() in FreeRTOS and explanation\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-15-3-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6362\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 11. Downloading the 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 in Figure 12, you can see prints from both the tasks, i.e., task 1 as well as task 2.<\/span><\/p>\n<figure id=\"attachment_6363\" aria-describedby=\"caption-attachment-6363\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6363\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-16-3.png\" alt=\"Usage of taskYIELD() in FreeRTOS and explanation\" width=\"744\" height=\"396\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-768x408.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-1024x544.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-600x319.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-120x64.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-500x266.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-400x213.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-800x425.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-16-3-1200x638.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6363\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 12. Output on the serial monitor software.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 21px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 35px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline;\"><span style=\"color: #000080; text-decoration: underline;\"><b>Summary:<\/b><\/span><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">When task 1 was executed its printmsg, it made UART_ACCESS_KEY available, but it didn\u2019t go for another loop here. Instead, it left the CPU. The way task 1 left the CPU is by manually triggering the context switch.<\/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;\"> When the context switch is manually triggered, the next ready task of the same priority is selected. Since there is already one task is waiting, i.e., task 2, that is now allowed to run. Now task 2 got the chance to enter into the if section, and it printed. Then it left the CPU by using taskYIELD(). That\u2019s how both the tasks cooperate with each other to send their message over the UART.&nbsp;<\/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;\">All these activities you have to analyze by using a software called segger system view software (Figure 13), and it is freely available from segger. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">By using this software, you can trace the task execution, timings, visualize the interrupt timings, interrupt entry sequence. We can analyze when exactly the interrupt is triggering, how much time an ISR is consuming, how much time a task is consuming on the CPU, when the task is getting preempted. There are lots of other details we can obtain from this system view software.<\/span><\/p>\n<figure id=\"attachment_6364\" aria-describedby=\"caption-attachment-6364\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6364\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/06\/Figure-17-2.png\" alt=\"Usage of taskYIELD() and explanation\" width=\"744\" height=\"393\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2.png 1917w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-768x406.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-1024x541.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-600x317.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-120x63.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-500x264.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-200x106.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-400x211.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-800x423.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-17-2-1200x634.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-6364\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 13. Segger SystemView software.<\/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: #000080;\"><strong>FastBit Embedded Brain Academy<\/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=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/fastbitlab.com\/course1\">https:\/\/fastbitlab.com\/course1<\/a><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Exercise: Usage of taskYIELD() and explanation &nbsp; &nbsp; Now let\u2019s go to task 1 and put one if condition. Let\u2019s create a flag called UART_ACCESS_KEY. If the UART_ACCESS_KEY is equal to available, then only execute the printf statement, i.e., printmsg (Figure 1). Once task 1 enters the if condition, then it makes UART_ACCESS_KEY equal [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6348,"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-6346","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>Usage of taskYIELD() and explanation| FreeRTOS<\/title>\n<meta name=\"description\" content=\"Exercise: Usage of taskYIELD() and explanation in FreeRTOS . Learn how to use taskYIELD() in an RTOS environment to synchronize UART output\" \/>\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\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Usage of taskYIELD() and explanation| FreeRTOS\" \/>\n<meta property=\"og:description\" content=\"Exercise: Usage of taskYIELD() and explanation in FreeRTOS . Learn how to use taskYIELD() in an RTOS environment to synchronize UART output\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/\" \/>\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-06-08T05:24:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-04T06:13:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1919\" \/>\n\t<meta property=\"og:image:height\" content=\"1019\" \/>\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=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"FreeRTOS Lecture 40 &#8211; Exercise: Usage of taskYIELD() and explanation\",\"datePublished\":\"2021-06-08T05:24:24+00:00\",\"dateModified\":\"2023-09-04T06:13:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/\"},\"wordCount\":1040,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Figure-1-6.png\",\"keywords\":[\"FreeRTOS Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/\",\"name\":\"Usage of taskYIELD() and explanation| FreeRTOS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Figure-1-6.png\",\"datePublished\":\"2021-06-08T05:24:24+00:00\",\"dateModified\":\"2023-09-04T06:13:46+00:00\",\"description\":\"Exercise: Usage of taskYIELD() and explanation in FreeRTOS . Learn how to use taskYIELD() in an RTOS environment to synchronize UART output\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Figure-1-6.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/06\\\/Figure-1-6.png\",\"width\":1919,\"height\":1019,\"caption\":\"Figure 1. Code to check the availability of shared resources.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FreeRTOS Lecture 40 &#8211; Exercise: Usage of taskYIELD() and explanation\"}]},{\"@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":"Usage of taskYIELD() and explanation| FreeRTOS","description":"Exercise: Usage of taskYIELD() and explanation in FreeRTOS . Learn how to use taskYIELD() in an RTOS environment to synchronize UART output","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\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/","og_locale":"en_US","og_type":"article","og_title":"Usage of taskYIELD() and explanation| FreeRTOS","og_description":"Exercise: Usage of taskYIELD() and explanation in FreeRTOS . Learn how to use taskYIELD() in an RTOS environment to synchronize UART output","og_url":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2021-06-08T05:24:24+00:00","article_modified_time":"2023-09-04T06:13:46+00:00","og_image":[{"width":1919,"height":1019,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6.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":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"FreeRTOS Lecture 40 &#8211; Exercise: Usage of taskYIELD() and explanation","datePublished":"2021-06-08T05:24:24+00:00","dateModified":"2023-09-04T06:13:46+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/"},"wordCount":1040,"commentCount":3,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6.png","keywords":["FreeRTOS Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/","url":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/","name":"Usage of taskYIELD() and explanation| FreeRTOS","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6.png","datePublished":"2021-06-08T05:24:24+00:00","dateModified":"2023-09-04T06:13:46+00:00","description":"Exercise: Usage of taskYIELD() and explanation in FreeRTOS . Learn how to use taskYIELD() in an RTOS environment to synchronize UART output","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/06\/Figure-1-6.png","width":1919,"height":1019,"caption":"Figure 1. Code to check the availability of shared resources."},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/freertos-lecture-40-exercise-usage-of-taskyield-and-explanation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"FreeRTOS Lecture 40 &#8211; Exercise: Usage of taskYIELD() and explanation"}]},{"@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\/6346","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=6346"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/6346\/revisions"}],"predecessor-version":[{"id":15747,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/6346\/revisions\/15747"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/6348"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=6346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=6346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=6346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}