{"id":5360,"date":"2021-03-04T09:45:12","date_gmt":"2021-03-04T09:45:12","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=5360"},"modified":"2022-11-24T15:26:00","modified_gmt":"2022-11-24T09:56:00","slug":"stm32-usart-lecture-8-usart-baud-rate-calculation-part-2","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/","title":{"rendered":"STM32 USART Lecture 8 : USART Baud rate calculation Part-1"},"content":{"rendered":"<div class=\"boldgrid-section\" style=\"background-image: linear-gradient(to left, #eeeeee, #eeeeee);\" data-bg-color-1=\"#EEEEEE\" data-bg-color-2=\"#EEEEEE\" data-bg-direction=\"to left\">\n<div class=\"container\">\n<div class=\"row\" style=\"padding-top: 50px; 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: 45px;\"><strong><span style=\"color: #000080;\">USART Baud rate calculation Part-1<\/span><\/strong><\/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 understand the USART baud rate calculation. The formula to calculate the baud rate is shown in Figure 1.<\/span><\/p>\n<figure id=\"attachment_5363\" aria-describedby=\"caption-attachment-5363\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-5363\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-1-5.png\" alt=\"USART Baud rate calculation\" width=\"744\" height=\"278\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5.png 1681w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-300x112.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-768x287.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-1024x383.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-600x225.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-120x45.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-500x187.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-200x75.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-400x150.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-800x299.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5-1200x449.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5363\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Baud rate calculation formula.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Remember that whenever the word USART is used, we are talking about the asynchronous mode of USART peripheral, i.e., UART. <\/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;\">There are two formulas to calculate the baud rate based upon the value of the OVER8 parameter. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">If OVER8=1, that means we are using an oversampling by 8, and the receiver block of the peripheral takes 8 samples to understand a bit. <\/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 first formula in Figure 1 is used to calculate the baud rate if you are using oversampling by 8, and the second formula is used if you are using oversampling by 16. <\/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;\">Here the USARTDIV is the divide factor to generate different baud rates, and the minimum value for this is 1. You have to vary the USARTDIV value based on your baud rate requirements. You know that the minimum value of USARTDIV will be 1. Therefore, the maximum baud rate you can generate out of the peripheral that uses oversampling by 8 will be peripheral clock divide by 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;\">If the oversampling by 16 is used, then the maximum baud rate generated out of the peripheral will be peripheral clock divided by 16.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<blockquote class=\"\" style=\"background-color: #093861;\">\n<p class=\"\" style=\"border-width: 0px; font-size: 17px;\"><span style=\"color: #000000;\"><span style=\"color: #ff6600;\"><b>Note: <\/b><\/span><span style=\"font-weight: 400; color: #ffff00;\">The baud rate for the receiver and transmitter (Rx and Tx) are both set to the same value as programmed in the Mantissa and Fraction values of USARTDIV.&nbsp;<\/span><\/span><\/p>\n<\/blockquote>\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 two USART peripherals are communicating, both should communicate with the same baud rate. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">For example, while communicating between your PC and microcontroller board over the serial port communication, remember that the baud rate you program in your computer and the baud rate configured in the microcontrollers UART peripherals must be the same.<\/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 generic formula for baud rate calculation is as shown in Figure 2, where the OVER8 value can be either 0 or 1.<\/span><\/p>\n<figure id=\"attachment_5364\" aria-describedby=\"caption-attachment-5364\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-5364\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-2-5.png\" alt=\"USART Baud rate calculation\" width=\"744\" height=\"266\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5.png 1321w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-300x107.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-768x274.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-1024x365.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-600x214.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-120x43.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-500x178.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-200x71.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-400x143.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-800x285.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-2-5-1200x428.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5364\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Generic formula for baud rate calculation.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 25px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 31px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #000080;\"><b>Examples:<\/b><\/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 discuss some examples for baud rate calculation.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Let\u2019s say you want to generate the baud rate of 9600 bits per second. So, here the desired baud rate is 9600. Let\u2019s consider the peripheral clock is 16MHz, and the oversampling by 16 is used. <\/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;\">What will you do now?<\/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;\">You have to use the formula,<\/span><\/p>\n<p class=\"\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-5365\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-5-2.png\" alt=\"\" width=\"492\" height=\"35\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-2.png 492w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-2-300x21.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-2-120x9.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-2-200x14.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-5-2-400x28.png 400w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/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;\">In this example Tx\/Rx baud = 9600bps and FPCLK = 16MHz. Now you have to calculate the division factor. For that first, substitute Tx\/Rx baud and FPCLK values in equation 1.<\/span><\/p>\n<p class=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-5367\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-6-2.png\" alt=\"\" width=\"373\" height=\"37\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-2.png 373w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-2-300x30.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-2-120x12.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-6-2-200x20.png 200w\" sizes=\"(max-width: 373px) 100vw, 373px\" \/><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now you have to calculate the division factor (USARTDIV), which is then stored into the USART_BRR register or baud rate generation register. If you solve equation 2, you will get the USARTDIV value as follows:<\/span><\/p>\n<p class=\"\" style=\"text-align: center; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 25px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">USARTDIV = 16M\/ (8 * 2 * 9600)<\/span><\/p>\n<p class=\"\" style=\"text-align: center; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">= 104.17<\/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;\">After that, you have to program the calculated value of USART DIV, i.e., 104.17 into the UART BRR register.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 23px; 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; color: #000080;\"><strong>Steps to program the USARTDIV value into the USART_BRR register:<\/strong><\/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;\">First of all, you have to convert the USARTDIV value into hex and then program the USART_BRR register to achieve the desired baud rate. <\/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 USART_BRR register contains two sections.<\/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 is a fraction part of 4-bits, and another is a mantissa part of 12 bits, as shown in Figure 3.<\/span><\/p>\n<figure id=\"attachment_5368\" aria-describedby=\"caption-attachment-5368\" style=\"width: 744px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5368\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-3-4.png\" alt=\"USART Baud rate calculation\" width=\"744\" height=\"164\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4.png 1761w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-300x66.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-768x169.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-1024x225.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-600x132.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-120x26.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-500x110.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-200x44.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-400x88.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-800x176.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-3-4-1200x264.png 1200w\" sizes=\"(max-width: 744px) 100vw, 744px\" \/><figcaption id=\"caption-attachment-5368\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Sections of USART_BRR.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">In 104.1875, 1875 is a fractional part, and 104 is a mantissa part. <\/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 see how to program these parts. <\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">If you look into the USART_BRR register, there are two sections, as shown in Figure 4. <\/span><span style=\"font-weight: 400; color: #000000;\">One is for fraction and another for the mantissa. <\/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;\">Fraction bits are only four bits from 0 to 3, whereas the mantissa is from 4 to 15, which is of total 11 bits.<\/span><\/p>\n<figure id=\"attachment_5369\" aria-describedby=\"caption-attachment-5369\" style=\"width: 743px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-5369\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2021\/03\/Figure-4-2.png\" alt=\"USART Baud rate calculation\" width=\"743\" height=\"364\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2.png 1723w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-300x147.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-768x376.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-1024x501.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-600x294.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-120x59.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-500x245.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-200x98.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-400x196.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-800x391.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-4-2-1200x587.png 1200w\" sizes=\"(max-width: 743px) 100vw, 743px\" \/><figcaption id=\"caption-attachment-5369\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. Baud rate register.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"padding-left: 30px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">1.&nbsp;<span style=\"font-weight: 400;\">Take the fraction part, i.e., 0.1875, and then multiply it by 16 because we are using oversampling by 16. After multiplication, you will get the value as follows:<\/span><\/span><\/p>\n<p class=\"\" style=\"text-align: center; 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;\">DIV_Fraction = 0.1875 *16<\/span><\/p>\n<p class=\"\" style=\"text-align: center; 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;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 3<\/span><\/p>\n<p class=\"\" style=\"padding-left: 30px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">2.&nbsp;<span style=\"font-weight: 400;\">You know that the mantissa part is 104 and convert that into hex i.e., 0x68.<\/span><\/span><\/p>\n<p class=\"\" style=\"padding-left: 30px; border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">3. <span style=\"font-weight: 400;\">Therefore, now the USARTDIV value will be 0x683. You have to program the value 0x683 into the USART_BRR register to generate a baud rate of 9600bps. The fraction part should be programmed into the fraction part of the USART_BRR register, and the mantissa part you have to program into the mantissa section of the baud rate register.<\/span><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Now let\u2019s take another example of generating a baud rate of 115200bps. Let\u2019s consider the peripheral clock of 16MHz and oversampling by 8.<\/span><\/p>\n<p class=\"\" style=\"text-align: left; padding-left: 30px; 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 have to calculate the USARTDIV,<\/span><\/p>\n<p class=\"\" style=\"text-align: left; padding-left: 30px; 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;\">USARTDIV = 16M \/ (115200 * 8)<\/span><\/p>\n<p class=\"\" style=\"text-align: left; padding-left: 30px; 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;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 17.361<\/span><\/p>\n<p class=\"\" style=\"text-align: left; padding-left: 30px;\">&nbsp;<\/p>\n<p class=\"\" style=\"text-align: left; padding-left: 30px; 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;\">Therefore, 17.361 is a value of USARTDIV.<\/span><\/p>\n<p class=\"\" style=\"text-align: left; padding-left: 30px; 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;\">First, let\u2019s calculate the fraction as follows:<\/span><\/p>\n<p class=\"\" style=\"text-align: left; padding-left: 30px; 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;\">DIV_Fraction = 0.361 * 8<\/span><\/p>\n<p class=\"\" style=\"text-align: left; padding-left: 30px; 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;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 2.88<\/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;\">After multiplication, DIV_Fraction will be 2.88, which you can consider as 3.<\/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;\">Then convert the mantissa part into hex, i.e., 0x11. Therefore, now the USARTDIV value will be 0x113. You have to program 3 into the fraction part and 0x11 into the mantissa part of USART_BRR register. When you do this, the peripheral can generate a baud rate of 115200bps.<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">In the next article, let&#8217;s continue<\/span> <span style=\"font-weight: 400; color: #000000;\"><span style=\"color: #ff6600;\"><strong><a style=\"color: #ff6600; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/stm32-usart-lecture-9-usart-baud-rate-calculation-part-2\/\" target=\"_blank\" rel=\"noopener\">USART baud rate calculation<\/a><\/strong><\/span>.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 26px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><b>FastBit Embedded Brain Academy Courses<\/b><\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 25px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">Click here:<\/span>&nbsp;<span style=\"color: #0000ff;\"><a style=\"color: #0000ff; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/course1\" target=\"_blank\" rel=\"noopener\">https:\/\/fastbitlab.com\/course1<\/a><\/span><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; USART Baud rate calculation Part-1 &nbsp; &nbsp; Now let\u2019s understand the USART baud rate calculation. The formula to calculate the baud rate is shown in Figure 1. &nbsp; Remember that whenever the word USART is used, we are talking about the asynchronous mode of USART peripheral, i.e., UART. There are two formulas to calculate [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5363,"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":[24],"class_list":["post-5360","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-stm32-usart-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>STM32 USART Lecture 8 : USART Baud rate calculation Part-1<\/title>\n<meta name=\"description\" content=\"USART Baud rate calculation Part-1. Now let\u2019s understand the USART baud rate calculation. The formula to calculate the baud rate is shown\" \/>\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\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STM32 USART Lecture 8 : USART Baud rate calculation Part-1\" \/>\n<meta property=\"og:description\" content=\"USART Baud rate calculation Part-1. Now let\u2019s understand the USART baud rate calculation. The formula to calculate the baud rate is shown\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/\" \/>\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-04T09:45:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-24T09:56:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1681\" \/>\n\t<meta property=\"og:image:height\" content=\"629\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"STM32 USART Lecture 8 : USART Baud rate calculation Part-1\",\"datePublished\":\"2021-03-04T09:45:12+00:00\",\"dateModified\":\"2022-11-24T09:56:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/\"},\"wordCount\":911,\"commentCount\":14,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-5.png\",\"keywords\":[\"STM32 USART Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/\",\"name\":\"STM32 USART Lecture 8 : USART Baud rate calculation Part-1\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-5.png\",\"datePublished\":\"2021-03-04T09:45:12+00:00\",\"dateModified\":\"2022-11-24T09:56:00+00:00\",\"description\":\"USART Baud rate calculation Part-1. Now let\u2019s understand the USART baud rate calculation. The formula to calculate the baud rate is shown\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-5.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Figure-1-5.png\",\"width\":1681,\"height\":629,\"caption\":\"Figure 1. Baud rate calculation formula.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32 USART Lecture 8 : USART Baud rate calculation Part-1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"name\":\"FastBit EBA\",\"description\":\"Your Online Academy of Embedded Systems\",\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\",\"name\":\"FastBit EBA\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/logo-EzNrEnyr.png\",\"width\":640,\"height\":640,\"caption\":\"FastBit EBA\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/fastbiteba\\\/\",\"https:\\\/\\\/x.com\\\/fastbiteba\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/fastbit-embedded-brain-academy-b3167b124\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCa1REBV9hyrzGp2mjJCagBg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\",\"name\":\"FastBitLab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g\",\"caption\":\"FastBitLab\"},\"description\":\"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"STM32 USART Lecture 8 : USART Baud rate calculation Part-1","description":"USART Baud rate calculation Part-1. Now let\u2019s understand the USART baud rate calculation. The formula to calculate the baud rate is shown","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\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/","og_locale":"en_US","og_type":"article","og_title":"STM32 USART Lecture 8 : USART Baud rate calculation Part-1","og_description":"USART Baud rate calculation Part-1. Now let\u2019s understand the USART baud rate calculation. The formula to calculate the baud rate is shown","og_url":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2021-03-04T09:45:12+00:00","article_modified_time":"2022-11-24T09:56:00+00:00","og_image":[{"width":1681,"height":629,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"STM32 USART Lecture 8 : USART Baud rate calculation Part-1","datePublished":"2021-03-04T09:45:12+00:00","dateModified":"2022-11-24T09:56:00+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/"},"wordCount":911,"commentCount":14,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5.png","keywords":["STM32 USART Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/","url":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/","name":"STM32 USART Lecture 8 : USART Baud rate calculation Part-1","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5.png","datePublished":"2021-03-04T09:45:12+00:00","dateModified":"2022-11-24T09:56:00+00:00","description":"USART Baud rate calculation Part-1. Now let\u2019s understand the USART baud rate calculation. The formula to calculate the baud rate is shown","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2021\/03\/Figure-1-5.png","width":1681,"height":629,"caption":"Figure 1. Baud rate calculation formula."},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/stm32-usart-lecture-8-usart-baud-rate-calculation-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"STM32 USART Lecture 8 : USART Baud rate calculation Part-1"}]},{"@type":"WebSite","@id":"https:\/\/fastbitlab.com\/blog\/#website","url":"https:\/\/fastbitlab.com\/blog\/","name":"FastBit EBA","description":"Your Online Academy of Embedded Systems","publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fastbitlab.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fastbitlab.com\/blog\/#organization","name":"FastBit EBA","url":"https:\/\/fastbitlab.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2026\/04\/logo-EzNrEnyr.png","width":640,"height":640,"caption":"FastBit EBA"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/fastbiteba\/","https:\/\/x.com\/fastbiteba","https:\/\/www.linkedin.com\/in\/fastbit-embedded-brain-academy-b3167b124\/","https:\/\/www.youtube.com\/channel\/UCa1REBV9hyrzGp2mjJCagBg"]},{"@type":"Person","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d","name":"FastBitLab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9230d0f9bdef28b63a01e7ca274ee7b2e8ed9abe932ee564af8809caaf52a0c8?s=96&d=mm&r=g","caption":"FastBitLab"},"description":"The FastBit Embedded Brain Academy uses the power of internet to bring the online courses related to the field of embedded system programming, Real time operating system, Embedded Linux systems, etc at your finger tip with very low cost. Backed with strong experience of industry, we have produced lots of courses with the customer enrolment over 3000+ across 100+ countries."}]}},"_links":{"self":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5360","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=5360"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5360\/revisions"}],"predecessor-version":[{"id":12663,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/5360\/revisions\/12663"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/5363"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=5360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=5360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=5360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}