{"id":15046,"date":"2023-07-25T11:32:47","date_gmt":"2023-07-25T06:02:47","guid":{"rendered":"https:\/\/fastbitlab.com\/?p=15046"},"modified":"2023-08-18T09:49:32","modified_gmt":"2023-08-18T04:19:32","slug":"stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd","status":"publish","type":"post","link":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/","title":{"rendered":"STM32-LTDC, LCD-TFT, LVGL(MCU3) Lecture 45| Pixel writing in the case of STM32F407x+ External LCD"},"content":{"rendered":"<div class=\"boldgrid-section color4-background-color color-4-text-contrast bg-background-color\">\n<div class=\"container\">\n<div class=\"row\">\n<div class=\"col-lg-1 col-md-12 col-sm-12 col-xs-12\"><\/div>\n<div class=\"col-lg-10 col-md-12 col-xs-12 col-sm-12\">\n<p>&nbsp;<\/p>\n<h1 class=\"\" style=\"text-align: center; font-size: 35px; line-height: 50px; font-family: 'Roboto Slab'; font-weight: 400;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><strong><span style=\"color: #000080;\">Pixel writing in the case of STM32F407x+ External LCD<\/span><\/strong><\/h1>\n<div class=\"row bg-editor-hr-wrap\">\n<div class=\"col-lg-12 col-md-12 col-xs-12 col-sm-12\">\n<div>\n<div class=\"bg-hr bg-hr-16 color2-color\" style=\"border-style: solid; border-width: 0px 0px 2px; box-shadow: #cecece 0px 0px 0px 0px inset;\"><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #993300;\"><b>Pixel writing in the case of STM32F407x + external LCD<\/b> <\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">There are 2 methods.<\/span><\/p>\n<ol class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li><span style=\"font-weight: 400; color: #000000;\">Non-DMA based data write or pixel write over SPI(processor involved)<\/span>\n<ul>\n<li><span style=\"font-weight: 400; color: #000000;\">Check the function void bsp_lcd_write(uint8_t *buffer, uint32_t nbytes) in bsp_lcd.c.<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400; color: #000000;\">DMA based data write over SPI.<\/span>\n<ul>\n<li><span style=\"font-weight: 400; color: #000000;\">Check the function void bsp_lcd_write_dma(uint32_t src_addr, uint32_t nbytes) in bsp_lcd.c.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<ul class=\"\">\n<li style=\"list-style-type: none;\">&nbsp;<\/li>\n<\/ul>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">In the bsp_lcd.h, there is a flag called <\/span><b>USE_DMA <\/b><span style=\"font-weight: 400;\">(Figure 1). If you enable that flag, then the pixel writing will happen over DMA.&nbsp;<\/span><\/span><\/p>\n<figure id=\"attachment_15049\" aria-describedby=\"caption-attachment-15049\" style=\"width: 647px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-15049\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-1-4.png\" alt=\"Pixel writing in the case of STM32F407x+ External LCD\" width=\"647\" height=\"342\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-1-4.png 1439w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-1-4-300x159.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-1-4-1024x542.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-1-4-768x406.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-1-4-600x317.png 600w\" sizes=\"(max-width: 647px) 100vw, 647px\" \/><figcaption id=\"caption-attachment-15049\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 1. bsp_lcd.h file<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #993300;\"><b>Pixel buffer<\/b><\/span><\/p>\n<ul class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\">\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">In the case of&nbsp; STM32F407x+external LCD, you cannot use a screen sized frame buffer like in the case of STM32F429 disc board.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400; color: #000000;\">bsp_lcd.c uses non screen sized buffer of&nbsp; 10KB (Draw buffer)<\/span><\/li>\n<\/ul>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Let&#8217;s understand how pixel writing occurs in the case of a non-screen-sized buffer of 10KB (draw buffer).&nbsp;<\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Take a look at Figure 2, where there is a draw buffer of 10 kilobytes and a display device with built-in graphics RAM (GRAM). You fill this draw buffer with pixel data that represents the color yellow. First, you need to set the display area by sending commands to the display device. Essentially, you have to send the X1 and X2 numbers, as well as the Y1 and Y2 numbers, which means you have to provide the coordinates to the display device. There are specific commands to accomplish this.<\/span><\/p>\n<figure id=\"attachment_15050\" aria-describedby=\"caption-attachment-15050\" style=\"width: 637px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-15050\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-2-4.png\" alt=\"Pixel writing in the case of STM32F407x+ External LCD\" width=\"637\" height=\"288\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-2-4.png 1781w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-2-4-300x136.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-2-4-1024x463.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-2-4-768x347.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-2-4-600x271.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-2-4-1536x694.png 1536w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><figcaption id=\"caption-attachment-15050\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 2. Pixel writing to display device<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">After that, you need to perform LCD WRITE (refer to Figure 3), which can be done using either DMA or non-DMA based methods. All the pixel data will be written to the graphics RAM of the display device and displayed according to your display area setup.<\/span><\/p>\n<figure id=\"attachment_15051\" aria-describedby=\"caption-attachment-15051\" style=\"width: 708px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-15051 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-3-4.png\" alt=\"Figure 3. Pixel writing to display device\" width=\"708\" height=\"326\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-3-4.png 1789w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-3-4-300x138.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-3-4-1024x472.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-3-4-768x354.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-3-4-600x277.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-3-4-1536x708.png 1536w\" sizes=\"(max-width: 708px) 100vw, 708px\" \/><figcaption id=\"caption-attachment-15051\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 3. Pixel writing to display device<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Figure 4 illustrates the process of setting the display area. To accomplish this, you need to send two commands to the LCD. The first command is CASET, which stands for column address set command, while the second one is RASET, also known as the row address set command. Both CASET and RASET can also be referred to as page address set commands.<\/span><\/p>\n<figure id=\"attachment_15052\" aria-describedby=\"caption-attachment-15052\" style=\"width: 543px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15052\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-4-4.png\" alt=\"Pixel writing in the case of STM32F407x+ External LCD\" width=\"543\" height=\"386\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-4-4.png 1437w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-4-4-300x213.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-4-4-1024x728.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-4-4-768x546.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-4-4-600x426.png 600w\" sizes=\"(max-width: 543px) 100vw, 543px\" \/><figcaption id=\"caption-attachment-15052\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 4. lcd set display area<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">For RASET command you have to mention the Y numbers. <\/span><span style=\"font-weight: 400;\">Similarly, for the CASET command, you need to mention the X coordinates. To gain a better understanding of these commands, please refer to the<a href=\"https:\/\/cdn-shop.adafruit.com\/datasheets\/ILI9341.pdf\"> ILI9341 datasheet<\/a>. These functions can be found in bsp_lcd.c.<\/span><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">You can draw a red rectangle on the display area, as illustrated in Figure 5. To accomplish this, utilize the same draw buffer filled with pixel data representing the color red. The display area can be set by sending X1, X2, Y1, and Y2 coordinates using the CASET and RASET commands.<\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">Once the display area is set, then <\/span><span style=\"font-weight: 400;\">you can proceed with the LCD WRITE operation. It is important to note that the previous LCD Write operation will not be affected due to the presence of built-in graphics RAM. The graphics data will persist in the RAM until the display device is reset.<\/span><\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/p>\n<figure id=\"attachment_15053\" aria-describedby=\"caption-attachment-15053\" style=\"width: 678px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15053 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-5-4.png\" alt=\"Figure 5. Pixel writing to display device\" width=\"678\" height=\"302\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4.png 1813w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4-300x134.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4-1024x457.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4-768x343.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4-600x268.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4-1536x685.png 1536w\" sizes=\"(max-width: 678px) 100vw, 678px\" \/><figcaption id=\"caption-attachment-15053\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 5. Pixel writing to display device<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">If you want to paint or set the background color for the display, then you have to repeatedly send these draw buffers like this(Figure 6). That means, first you have to fully flush the draw buffer and then change Y1 and Y2, and then again flush and then again change Y1 and Y2, and again flush, like that.<\/span><\/p>\n<figure id=\"attachment_15054\" aria-describedby=\"caption-attachment-15054\" style=\"width: 642px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15054 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-6-3.png\" alt=\"Figure 6. Set the background color for the display\" width=\"642\" height=\"300\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-6-3.png 1159w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-6-3-300x140.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-6-3-1024x478.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-6-3-768x358.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-6-3-600x280.png 600w\" sizes=\"(max-width: 642px) 100vw, 642px\" \/><figcaption id=\"caption-attachment-15054\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 6. Set the background color for the display<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<div style=\"width: 1200px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-15046-1\" width=\"1200\" height=\"675\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Project.mp4?_=1\" \/><a href=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Project.mp4\">https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Untitled-Project.mp4<\/a><\/video><\/div>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">That&#8217;s how you paint the display.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">You can also use a dual buffering, where flushing and pixel value updates occur concurrently.&nbsp;<\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">In this case, you have to use the DMA to flush the contents of the draw buffer to the display device.<\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Take a look at Figure 7. There is a draw buffer, referred to as Draw Buffer-1, with a size of 10 kilobytes. And the DMA flushing is occurring towards the display. In this scenario, you can use another draw buffer to update the next pixel data. This means that the application doesn&#8217;t need to wait for the flush to complete before updating the next pixel data. The update can happen in parallel using a different buffer because the DMA handles it. Likewise, the processor can simultaneously update the next pixel data in a separate buffer.<\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">By the way, this DMA is memory to peripheral transfer. Peripheral in this case is SPI. It happens over SPI. So, it&#8217;s a memory to peripheral transfer<\/span><span style=\"font-weight: 400;\">.<\/span><\/span><\/p>\n<figure id=\"attachment_15056\" aria-describedby=\"caption-attachment-15056\" style=\"width: 627px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15056 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-7-2.png\" alt=\"Figure 7. Dual buffering\" width=\"627\" height=\"296\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-7-2.png 1819w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-7-2-300x142.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-7-2-1024x484.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-7-2-768x363.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-7-2-600x283.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-7-2-1536x725.png 1536w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><figcaption id=\"caption-attachment-15056\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 7. Dual buffering<\/span><\/figcaption><\/figure>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">To initiate the DMA transaction, you have to provide the Draw buffer address as the source address, and the destination address will be the SPI Data register. This means that the DMA direction is from memory to peripheral. And when the application updates Draw buffer-2, it can be utilized as a source address. Consequently, you can trigger another DMA transaction from this source address to the destination, which is the SPI. Moreover, the application can utilize Draw buffer-1 to update the subsequent pixel data, as shown in Figure 8.<\/span><\/p>\n<figure id=\"attachment_15057\" aria-describedby=\"caption-attachment-15057\" style=\"width: 655px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15057 \" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-8-2.png\" alt=\"Figure 8. Dual buffering\" width=\"655\" height=\"313\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-8-2.png 1851w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-8-2-300x143.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-8-2-1024x490.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-8-2-768x367.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-8-2-600x287.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-8-2-1536x734.png 1536w\" sizes=\"(max-width: 655px) 100vw, 655px\" \/><figcaption id=\"caption-attachment-15057\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 8. Dual buffering<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Here is a code to write data to the BSP without using DMA.&nbsp;<\/span><\/p>\n<figure id=\"attachment_15058\" aria-describedby=\"caption-attachment-15058\" style=\"width: 632px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15058\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-9-1.png\" alt=\"Pixel writing in the case of STM32F407x+ External LCD\" width=\"632\" height=\"347\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-9-1.png 1703w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-9-1-300x165.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-9-1-1024x562.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-9-1-768x422.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-9-1-600x329.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-9-1-1536x843.png 1536w\" sizes=\"(max-width: 632px) 100vw, 632px\" \/><figcaption id=\"caption-attachment-15058\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 9. Code<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"text-decoration: underline; color: #993300;\"><b>Testing background color STM32F407X+external LCD<\/b><\/span><\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000000;\"><span style=\"font-weight: 400;\">If you want to set the background color for an external LCD connected to the STM32F407 Discovery board, you can easily achieve this by utilizing the BSP function <\/span><span style=\"font-weight: 400;\">bsp_lcd_set_background_color<\/span><span style=\"font-weight: 400;\">. Simply set the color to RED.<\/span><\/span><\/p>\n<figure id=\"attachment_15059\" aria-describedby=\"caption-attachment-15059\" style=\"width: 687px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15059\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-10-1.png\" alt=\"Pixel writing in the case of STM32F407x+ External LCD\" width=\"687\" height=\"328\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-10-1.png 1857w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-10-1-300x143.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-10-1-1024x489.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-10-1-768x367.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-10-1-600x287.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-10-1-1536x734.png 1536w\" sizes=\"(max-width: 687px) 100vw, 687px\" \/><figcaption id=\"caption-attachment-15059\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 10. Code<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 17px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"font-weight: 400; color: #000000;\">Once you have made the necessary changes, proceed to compile the code and upload it to the hardware. After running the program, you will notice that the screen is now painted in the color red, as depicted in Figure 11.<\/span><\/p>\n<figure id=\"attachment_15060\" aria-describedby=\"caption-attachment-15060\" style=\"width: 781px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-15060\" src=\"https:\/\/fastbitlab.com\/wp-content\/uploads\/2023\/07\/Figure-11.png\" alt=\"Pixel writing in the case of STM32F407x+ External LCD\" width=\"781\" height=\"275\" srcset=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-11.png 1586w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-11-300x106.png 300w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-11-1024x360.png 1024w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-11-768x270.png 768w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-11-600x211.png 600w, https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-11-1536x540.png 1536w\" sizes=\"(max-width: 781px) 100vw, 781px\" \/><figcaption id=\"caption-attachment-15060\" class=\"wp-caption-text\"><span style=\"color: #000000;\">Figure 11. Output<\/span><\/figcaption><\/figure>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\">&nbsp;<\/p>\n<p class=\"\" style=\"font-family: 'Roboto Slab'; font-weight: 400; font-size: 20px; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #000080;\"><strong>FastBit Embedded Brain Academy Courses<\/strong><\/span><\/p>\n<p class=\"\" style=\"font-size: 17px; font-family: 'Roboto Slab'; font-weight: 400; line-height: 30px;\" data-font-family=\"Roboto Slab\" data-font-weight=\"400\" data-font-style=\"\"><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/fastbitlab.com\/course1\">https:\/\/fastbitlab.com\/course1<\/a><\/span><\/p>\n<p class=\"\">&nbsp;<\/p>\n<\/div>\n<div class=\"col-lg-1 col-md-12 col-sm-12 col-xs-12\" style=\"text-align: left;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Pixel writing in the case of STM32F407x+ External LCD &nbsp; Pixel writing in the case of STM32F407x + external LCD There are 2 methods. Non-DMA based data write or pixel write over SPI(processor involved) Check the function void bsp_lcd_write(uint8_t *buffer, uint32_t nbytes) in bsp_lcd.c. DMA based data write over SPI. Check the function void [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":15053,"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":[],"class_list":["post-15046","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","entry","has-media"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pixel Writing on STM32F407x+ External LCD: DMA vs. Non-DMA Methods<\/title>\n<meta name=\"description\" content=\"Pixel writing in the case of STM32F407x+ External LCD. There are 2 methods. Non-DMA based data write or pixel write over SPI. DMA based data\" \/>\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-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pixel Writing on STM32F407x+ External LCD: DMA vs. Non-DMA Methods\" \/>\n<meta property=\"og:description\" content=\"Pixel writing in the case of STM32F407x+ External LCD. There are 2 methods. Non-DMA based data write or pixel write over SPI. DMA based data\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/\" \/>\n<meta property=\"og:site_name\" content=\"FastBit EBA\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/fastbiteba\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-25T06:02:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-18T04:19:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1813\" \/>\n\t<meta property=\"og:image:height\" content=\"809\" \/>\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-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/\"},\"author\":{\"name\":\"FastBitLab\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#\\\/schema\\\/person\\\/e32b38e733a0d76ffa7e6bc998652e5d\"},\"headline\":\"STM32-LTDC, LCD-TFT, LVGL(MCU3) Lecture 45| Pixel writing in the case of STM32F407x+ External LCD\",\"datePublished\":\"2023-07-25T06:02:47+00:00\",\"dateModified\":\"2023-08-18T04:19:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/\"},\"wordCount\":1095,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Figure-5-4.png\",\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/\",\"name\":\"Pixel Writing on STM32F407x+ External LCD: DMA vs. Non-DMA Methods\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Figure-5-4.png\",\"datePublished\":\"2023-07-25T06:02:47+00:00\",\"dateModified\":\"2023-08-18T04:19:32+00:00\",\"description\":\"Pixel writing in the case of STM32F407x+ External LCD. There are 2 methods. Non-DMA based data write or pixel write over SPI. DMA based data\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Figure-5-4.png\",\"contentUrl\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Figure-5-4.png\",\"width\":1813,\"height\":809,\"caption\":\"Figure 5. Pixel writing to display device\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fastbitlab.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32-LTDC, LCD-TFT, LVGL(MCU3) Lecture 45| Pixel writing in the case of STM32F407x+ External LCD\"}]},{\"@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":"Pixel Writing on STM32F407x+ External LCD: DMA vs. Non-DMA Methods","description":"Pixel writing in the case of STM32F407x+ External LCD. There are 2 methods. Non-DMA based data write or pixel write over SPI. DMA based data","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-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/","og_locale":"en_US","og_type":"article","og_title":"Pixel Writing on STM32F407x+ External LCD: DMA vs. Non-DMA Methods","og_description":"Pixel writing in the case of STM32F407x+ External LCD. There are 2 methods. Non-DMA based data write or pixel write over SPI. DMA based data","og_url":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/","og_site_name":"FastBit EBA","article_publisher":"https:\/\/www.facebook.com\/fastbiteba\/","article_published_time":"2023-07-25T06:02:47+00:00","article_modified_time":"2023-08-18T04:19:32+00:00","og_image":[{"width":1813,"height":809,"url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4.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-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/#article","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/"},"author":{"name":"FastBitLab","@id":"https:\/\/fastbitlab.com\/blog\/#\/schema\/person\/e32b38e733a0d76ffa7e6bc998652e5d"},"headline":"STM32-LTDC, LCD-TFT, LVGL(MCU3) Lecture 45| Pixel writing in the case of STM32F407x+ External LCD","datePublished":"2023-07-25T06:02:47+00:00","dateModified":"2023-08-18T04:19:32+00:00","mainEntityOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/"},"wordCount":1095,"commentCount":0,"publisher":{"@id":"https:\/\/fastbitlab.com\/blog\/#organization"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4.png","articleSection":["Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/","url":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/","name":"Pixel Writing on STM32F407x+ External LCD: DMA vs. Non-DMA Methods","isPartOf":{"@id":"https:\/\/fastbitlab.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/#primaryimage"},"image":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/#primaryimage"},"thumbnailUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4.png","datePublished":"2023-07-25T06:02:47+00:00","dateModified":"2023-08-18T04:19:32+00:00","description":"Pixel writing in the case of STM32F407x+ External LCD. There are 2 methods. Non-DMA based data write or pixel write over SPI. DMA based data","breadcrumb":{"@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/#primaryimage","url":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4.png","contentUrl":"https:\/\/fastbitlab.com\/blog\/wp-content\/uploads\/2023\/07\/Figure-5-4.png","width":1813,"height":809,"caption":"Figure 5. Pixel writing to display device"},{"@type":"BreadcrumbList","@id":"https:\/\/fastbitlab.com\/blog\/stm32-ltdc-lcd-tft-lvglmcu3-lecture-45-pixel-writing-in-the-case-of-stm32f407x-external-lcd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fastbitlab.com\/blog\/"},{"@type":"ListItem","position":2,"name":"STM32-LTDC, LCD-TFT, LVGL(MCU3) Lecture 45| Pixel writing in the case of STM32F407x+ External LCD"}]},{"@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\/15046","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=15046"}],"version-history":[{"count":5,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/15046\/revisions"}],"predecessor-version":[{"id":15524,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/posts\/15046\/revisions\/15524"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media\/15053"}],"wp:attachment":[{"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/media?parent=15046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/categories?post=15046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fastbitlab.com\/blog\/wp-json\/wp\/v2\/tags?post=15046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}