{"id":4309,"date":"2020-12-16T06:56:25","date_gmt":"2020-12-16T06:56:25","guid":{"rendered":"http:\/\/fastbitlab.com\/?p=4309"},"modified":"2023-09-06T16:08:12","modified_gmt":"2023-09-06T10:38:12","slug":"stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/","title":{"rendered":"STM32 I2C Lecture 29 -I2C transfer sequence diagram for master receiving data"},"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: 50px; 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; border-width: 0px; font-size: 35px; line-height: 50px;\"><span style=\"color: #000080;\">I2C transfer sequence diagram for master receiving data<\/span><\/h1>\n<div class=\"row bg-editor-hr-wrap\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<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<div class=\"row bg-editor-hr-wrap\">\n<hr>\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;\">In this article, let\u2019s understand the implementation of the I2C_MasterReceiveData API. Refer to the transfer sequence diagram for the master receiver (Figure 1) in the reference manual of the microcontroller before understanding how the master receives data from the slave.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_4311\" aria-describedby=\"caption-attachment-4311\" style=\"width: 686px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\" wp-image-4311\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2020\/12\/Figure-1-16.png\" alt=\"\" width=\"686\" height=\"307\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16.png 1735w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-300x134.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-768x343.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-1024x457.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-600x268.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-120x54.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-500x223.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-200x89.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-400x179.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-800x357.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16-1200x536.png 1200w\" sizes=\"(max-width: 686px) 100vw, 686px\" \/><figcaption id=\"caption-attachment-4311\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. Transfer sequence diagram for master receiver.<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-size: 22px; 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=\"color: #000080;\"><b>How does the reception happen?<\/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;\">Let\u2019s understand the master reception process with the help of Figure 1.<\/span><\/p>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Every I2C transaction begins with the start condition, which is generated by the master device.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">The EV5 happens, and event EV5 is nothing but the setting of the SB flag in the status register. This indicates that the start generation was successful. When SB is set, the SCL will be stretched. The SCL will be pulled to low until the SB flag is cleared.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Master performs the address phase. In the address phase master sends the 7-bit address and a read\/write bit. In this case, the read\/write bit is 1 since the master is receiving the data from the slave.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">The slave will send the ACK after receiving the address. The slave ACKs the address if the valid slave is present on the bus.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">If the address phase is successful, then EV6 will be set, which means the event EV6 will happen. Ev6 means the setting of the flag ADDR and clock will be stretched to low until the software clears the ADDR flag.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Once the software clears the ADDR flag, the data reception will happen. The shift register of the master will be getting filled with the data bits sent by the slave. That means the master will start receiving the data from the slave, and after receiving one complete byte in the shift register, the master will send Ack to the slave. This ACK is a master to slave ACK.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">After receiving the ACK, the RXNE flag will be set, or it becomes 1, and EV7 will occur, indicating that the receive buffer is not empty. The receive buffer is currently filled with the data byte received from the slave. When RXNE is set, it is the confirmation for the software to read the data byte from the receive buffer.&nbsp;<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Observe Figure 1. Even though the RXNE is set, the shift register is receiving the next byte from the slave. EV7 and Data2 are parallel, as shown in Figure 1. After receiving the second byte, the master will again send the ACK to the slave, and the software will read the data from the receive buffer.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">The master code should read from the data register of the I2C peripheral only if the RXNE flag is set. Otherwise, you cannot read the data.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">After receiving the last byte, the master sends NACK instead of ACK. When a slave receives NACK, it will understand that the master doesn\u2019t want more data. Remember that the NACK is the indication to the slave to stop sending data. Whenever a slave receives NACK, it stops sending data.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Then master generates the stop condition, and it also reads the last byte which is received.<\/span><\/li>\n<\/ul>\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;\">These are all the steps involved in master reception. It is necessary to pay attention to the flags which have the capacity to stretch the clock to low. Whenever the clock is stretched to low, both master and slave are in a wait state. <\/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;\">Remember that the ACK sent by the master is an indication for the slave to send one more byte. Therefore, Data2 comes after the ACK (Figure 1). If the master sends NACK after receiving Data1, then Data2 will not appear from the slave. <\/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;\">Remember one more thumb rule: read the data from the data register only when the RXNE flag is set. Otherwise, don\u2019t try to read the data register.<\/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 understand the master reception with some examples. Let\u2019s see how the master reception is achieved in the following cases:<\/span><\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: bold; color: #ff0000;\">1. Case 1: <\/span>Master receiving only one byte from the slave (Figure 2).<\/span><\/p>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Master generates the start condition.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Master code clears the start bit flag.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Master sends the address of the slave.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">The slave will send the ACK after receiving the address.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">ADDR flag is set. When the ADDR flag is set, the clock is stretched, and both master and slave are paused.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Before clearing the ADDR flag, disable the ACKing and then program the stop bit of the control register.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Clear the ADDR flag. When you make ADDR as zero, the clock will be released, and data reception begins. Since you have already programmed ACK is equal to zero, NACK will be sent to the slave, and it stops sending more data.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">The I2C hardware will automatically generate the stop condition since the stop bit is programmed to 1.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Confirm RXNE =1 and read the data from the data register.<\/span><\/li>\n<\/ul>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_4312\" aria-describedby=\"caption-attachment-4312\" style=\"width: 732px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-4312\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2020\/12\/Figure-2-14.png\" alt=\"I2C transfer sequence diagram for master receiving data\" width=\"732\" height=\"335\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14.png 1737w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-300x137.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-768x352.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-1024x469.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-600x275.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-120x55.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-500x229.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-200x92.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-400x183.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-800x366.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-2-14-1200x549.png 1200w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><figcaption id=\"caption-attachment-4312\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Transfer sequence diagram for Case 1.<\/span><\/figcaption><\/figure>\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;\">Be careful while controlling the ACK bit.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: bold; color: #ff0000;\">2. Case 2: <\/span>Master receiving more than one byte from the slave. Consider that the master wants to receive 6 bytes, so the length is equal to 6 bytes (Figure 3).<\/span><\/p>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Master generates the start condition.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Master sends the address of the slave.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">The slave will send the ACK after receiving the address.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">ADDR flag is equal to 1.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Once you clear the ADDR flag, the master receives the first byte and sends the ACK to the slave.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">The master code waits until RXNE is equal to one. When RXNE=1, the master code reads first data, i.e., Data1, and parallelly Data2 will be received from the master, and the ACK for that will be sent. Then the master reads the second byte from the data register.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Similarly, Data3 and Data4 will be received and read from the data register.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">In the software, you have to count the length. Before reading the data, initially, the length will be 6, and it is decremented by one after each byte transfer.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">After reading the Data4 from the data register, the length becomes 2. When length = 2, program the ACK=0 and STOP=1. This is a procedure to receive the last two bytes.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Read Data5. After reading Data5, the length will become 1, meaning that only one byte is pending.&nbsp;<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Since the ACK is programmed to zero when the length is equal to 2. For the last data byte or Data6, NACK will be sent instead of ACK.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Since the stop bit is programmed to 1, the stop condition will be generated by the master.<\/span><\/li>\n<\/ul>\n<ul 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=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">Read the last byte from the data register.<\/span><\/li>\n<\/ul>\n<p class=\"\">&nbsp;<\/p>\n<figure id=\"attachment_4313\" aria-describedby=\"caption-attachment-4313\" style=\"width: 679px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-4313\" src=\"http:\/\/fastbitlab.com\/wp-content\/uploads\/2020\/12\/Figure-3-15.png\" alt=\"I2C transfer sequence diagram for master receiving data\" width=\"679\" height=\"261\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15.png 1818w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-300x115.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-768x295.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-1024x394.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-600x231.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-120x46.png 120w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-500x192.png 500w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-200x77.png 200w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-400x154.png 400w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-800x308.png 800w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-3-15-1200x461.png 1200w\" sizes=\"(max-width: 679px) 100vw, 679px\" \/><figcaption id=\"caption-attachment-4313\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Transfer sequence diagram for Case 2.<\/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;\">When the master is receiving more than 1 byte, then if length = 2, make ACK = 0, STOP =1, and read the data. When you make ACK = 0, STOP =1, it sends NACK to the last data byte which is received. This is a thumb rule, and it states that sending the ACK for the last data byte received is wrong. <\/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 ACK is sent, the slave will try to send one more data that is not required for us. The length is 6 bytes here, so you should not receive more than 6 bytes from the slave. Therefore, don\u2019t provoke the slave by sending an ACK. Instead, send NACK.&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;\">The right point to reset the ACK bit of the control register is detected by the length variable which you manage in your code.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"border-width: 0px; font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\">In the following article, let&#8217;s do the Assignment:<\/span><span style=\"color: #0000ff;\"><a style=\"color: #0000ff; text-decoration: underline;\" href=\"http:\/\/fastbitlab.com\/assignment-i2c-master-receive-data-api-implementation\/\" target=\"_blank\" rel=\"noopener\"> I2C master receive data API implementation.<\/a>&nbsp;<\/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: 25px;\" 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;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\">Click here:<span style=\"color: #0000ff;\">&nbsp;<\/span><\/span><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; I2C transfer sequence diagram for master receiving data &nbsp; &nbsp; In this article, let\u2019s understand the implementation of the I2C_MasterReceiveData API. Refer to the transfer sequence diagram for the master receiver (Figure 1) in the reference manual of the microcontroller before understanding how the master receives data from the slave. &nbsp; &nbsp; How does [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4311,"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":[23],"class_list":["post-4309","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-stm32-i2c-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>I2C transfer sequence diagram for master receiving data<\/title>\n<meta name=\"description\" content=\"I2C transfer sequence diagram for master receiving data. Learn how the I2C master receives data from a slave and understand the sequence\" \/>\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-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"I2C transfer sequence diagram for master receiving data\" \/>\n<meta property=\"og:description\" content=\"I2C transfer sequence diagram for master receiving data. Learn how the I2C master receives data from a slave and understand the sequence\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/\" \/>\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=\"2020-12-16T06:56:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-06T10:38:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1735\" \/>\n\t<meta property=\"og:image:height\" content=\"775\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"FastBitLab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:site\" content=\"@fastbiteba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"FastBitLab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"STM32 I2C Lecture 29 -I2C transfer sequence diagram for master receiving data\",\"datePublished\":\"2020-12-16T06:56:25+00:00\",\"dateModified\":\"2023-09-06T10:38:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/\"},\"wordCount\":1281,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/Figure-1-16.png\",\"keywords\":[\"STM32 I2C Lectures\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/\",\"name\":\"I2C transfer sequence diagram for master receiving data\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/Figure-1-16.png\",\"datePublished\":\"2020-12-16T06:56:25+00:00\",\"dateModified\":\"2023-09-06T10:38:12+00:00\",\"description\":\"I2C transfer sequence diagram for master receiving data. Learn how the I2C master receives data from a slave and understand the sequence\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/Figure-1-16.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/Figure-1-16.png\",\"width\":1735,\"height\":775,\"caption\":\"Figure 1. Transfer sequence diagram for master receiver.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32 I2C Lecture 29 -I2C transfer sequence diagram for master receiving data\"}]},{\"@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":"I2C transfer sequence diagram for master receiving data","description":"I2C transfer sequence diagram for master receiving data. Learn how the I2C master receives data from a slave and understand the sequence","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-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/","og_locale":"en_US","og_type":"article","og_title":"I2C transfer sequence diagram for master receiving data","og_description":"I2C transfer sequence diagram for master receiving data. Learn how the I2C master receives data from a slave and understand the sequence","og_url":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2020-12-16T06:56:25+00:00","article_modified_time":"2023-09-06T10:38:12+00:00","og_image":[{"width":1735,"height":775,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16.png","type":"image\/png"}],"author":"FastBitLab","twitter_card":"summary_large_image","twitter_creator":"@fastbiteba","twitter_site":"@fastbiteba","twitter_misc":{"Written by":"FastBitLab","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"STM32 I2C Lecture 29 -I2C transfer sequence diagram for master receiving data","datePublished":"2020-12-16T06:56:25+00:00","dateModified":"2023-09-06T10:38:12+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/"},"wordCount":1281,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16.png","keywords":["STM32 I2C Lectures"],"articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/","url":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/","name":"I2C transfer sequence diagram for master receiving data","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16.png","datePublished":"2020-12-16T06:56:25+00:00","dateModified":"2023-09-06T10:38:12+00:00","description":"I2C transfer sequence diagram for master receiving data. Learn how the I2C master receives data from a slave and understand the sequence","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2020\/12\/Figure-1-16.png","width":1735,"height":775,"caption":"Figure 1. Transfer sequence diagram for master receiver."},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/stm32-i2c-lecture-29-i2c-transfer-sequence-diagram-master-receiving-data\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"STM32 I2C Lecture 29 -I2C transfer sequence diagram for master receiving data"}]},{"@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\/4309","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=4309"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/4309\/revisions"}],"predecessor-version":[{"id":12548,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/4309\/revisions\/12548"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/4311"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=4309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=4309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=4309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}