{"id":2707,"date":"2024-08-03T15:15:03","date_gmt":"2024-08-03T15:15:03","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=2707"},"modified":"2024-08-03T15:15:06","modified_gmt":"2024-08-03T15:15:06","slug":"cache-in-arm-cortex-m7-cache-handling","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=2707","title":{"rendered":"Cache in ARM Cortex M7: Cache Handling"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"586\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1-1024x586.webp\" alt=\"\" class=\"wp-image-2708\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1-1024x586.webp 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1-300x172.webp 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1-768x440.webp 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1-1150x658.webp 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1-750x429.webp 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1-400x229.webp 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1-250x143.webp 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/fig2.png-1.webp 1310w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>In this guide, we shall see how to deal with the cache coherency of STM32H7 when dealing with the DMA.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In this guide, we shall cover the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Project creation.<\/li><li>DMA transfer without cache handling.<\/li><li>DMA transfer with cache handling.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">8. Project Creation:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>First, start STM32CubeIDE and select your workspace.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-1024x572.jpg\" alt=\"\" class=\"wp-image-2709\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-1024x572.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-300x167.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-768x429.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-1536x857.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-1150x642.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-750x419.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-400x223.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1-250x141.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-01-26_06-24-03-2048x1143-1.jpg 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Select your STM32H7 based MCU, in my case STM32H747XI.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Give a name to the project like cache or any other name.<\/p>\n\n\n\n<p>From System Core, select Cortex_M7 and enable both D and I cache.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"493\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-1024x493.jpg\" alt=\"\" class=\"wp-image-2710\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-1024x493.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-300x144.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-768x369.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-1536x739.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-2048x985.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-1150x553.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-750x361.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-400x192.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-09-52-250x120.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Next, from the DMA, add M2M (Memory to Memory) DMA as following:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"494\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-1024x494.jpg\" alt=\"\" class=\"wp-image-2711\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-1024x494.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-300x145.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-768x371.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-1536x741.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-2048x989.jpg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-1150x555.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-750x362.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-400x193.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-10-43-250x121.jpg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Keep the setting as default.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Save the project and this will generate the code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">9. DMA Transfer without Cache Handling:<\/h2>\n\n\n\n<p>In CM7 (Applied only to dual core based) project, open main.c source file.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In user code begin PV, declare the following variables:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">#define dataSize 10\n\nuint8_t txData[dataSize];\nuint8_t rxData[dataSize];\n\n\nuint8_t counter;<\/pre><\/div>\n\n\n\n<p>The define state to indicate the data size, 10 in this case.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>tx and rx data buffer of size 10 so the DMA can read\/write to those array.<\/p>\n\n\n\n<p>Counter to keep the data changes.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Within while loop, in user code begin 3:<\/p>\n\n\n\n<p>Fill the tx buffer:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  \/*CPU writes to SRAM1*\/\n\t  for (int i=0;i&lt;dataSize;i++)\n\t  {\n\t\t  txData[i]=counter;\n\t  }<\/pre><\/div>\n\n\n\n<p>Start the DMA:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  \/*Start DMA*\/\n\t  HAL_DMA_Start(&amp;hdma_memtomem_dma1_stream0, (uint32_t)txData, (uint32_t)rxData, dataSize);<\/pre><\/div>\n\n\n\n<p>wait a little bit before aborting the DMA:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  \/*Wait a little bit before aborting DMA*\/\n\t  HAL_Delay(100);<\/pre><\/div>\n\n\n\n<p>Abort the DMA transfer:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  \/*Abort the DMA*\/\n\t  HAL_DMA_Abort(&amp;hdma_memtomem_dma1_stream0);<\/pre><\/div>\n\n\n\n<p>Increment the counter and delay by 100ms as following:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  \/*Increment the counter and delay*\/\n\t  counter++;\n\t  HAL_Delay(100);\n<\/pre><\/div>\n\n\n\n<p>Save the project and start debug session:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"31\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-1024x31.jpg\" alt=\"\" class=\"wp-image-2712\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-1024x31.jpg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-300x9.jpg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-768x23.jpg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-1536x46.jpg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-1150x34.jpg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-750x22.jpg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-400x12.jpg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02-250x7.jpg 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/2024-08-03_17-53-02.jpg 1872w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Add both tx and rx data to the live expression.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Run the project and notice the rxData, it doesn&#8217;t update as shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"677\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/ezgif-5-1b335839b8.gif\" alt=\"\" class=\"wp-image-2713\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Due to cache coherency issue, the DMA won&#8217;t be able to transfer the correct data.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">10. DMA Transfer with Cache Handling:<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>In order to solve the coherency issue of the cache, we need to clean the data cache of ARM Cortex M7 before the data is read by the DMA and invalidate the cache after the DMA has written the data to the SRAM.<\/p>\n\n\n\n<p>After the buffer is filled with the new data, clean the data cache by address as following:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  \/*Clean Dcache before the DMA reads from SRAM*\/\n\t  SCB_CleanDCache_by_Addr((uint32_t*)txData, dataSize);<\/pre><\/div>\n\n\n\n<p>This will clean the cache related to txData in the cache.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>In order to invalidate the cache, we need to do this after the DMA has been aborted as following:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  \/*Invalidate the DCache after the DMA writes to SRAM1*\/\n\t  SCB_InvalidateDCache_by_Addr((uint32_t*)rxData, dataSize);<\/pre><\/div>\n\n\n\n<p>Hence the new while loop:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre class=\"CodeMirror\" data-setting=\"{&quot;showPanel&quot;:true,&quot;languageLabel&quot;:&quot;language&quot;,&quot;fullScreenButton&quot;:true,&quot;copyButton&quot;:true,&quot;mode&quot;:&quot;clike&quot;,&quot;mime&quot;:&quot;text\/x-csrc&quot;,&quot;theme&quot;:&quot;dracula&quot;,&quot;lineNumbers&quot;:false,&quot;styleActiveLine&quot;:false,&quot;lineWrapping&quot;:false,&quot;readOnly&quot;:true,&quot;fileName&quot;:&quot;&quot;,&quot;language&quot;:&quot;C&quot;,&quot;maxHeight&quot;:&quot;400px&quot;,&quot;modeName&quot;:&quot;c&quot;}\">\t  \/*CPU writes to SRAM1*\/\n\t  for (int i=0;i&lt;dataSize;i++)\n\t  {\n\t\t  txData[i]=counter;\n\t  }\n\n\t  \/*Clean Dcache before the DMA reads from SRAM*\/\n\t  SCB_CleanDCache_by_Addr((uint32_t*)txData, dataSize);\n\n\t  \/*Start DMA*\/\n\t  HAL_DMA_Start(&amp;hdma_memtomem_dma1_stream0, (uint32_t)txData, (uint32_t)rxData, dataSize);\n\n\t  \/*Wait a little bit before aborting DMA*\/\n\t  HAL_Delay(100);\n\n\t  \/*Abort the DMA*\/\n\t  HAL_DMA_Abort(&amp;hdma_memtomem_dma1_stream0);\n\n\t  \/*Invalidate the DCache after the DMA writes to SRAM1*\/\n\t  SCB_InvalidateDCache_by_Addr((uint32_t*)rxData, dataSize);\n\n\t  \/*Increment the counter and delay*\/\n\t  counter++;\n\t  HAL_Delay(100);<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>Build and debug the project and run it, this time, the rxData is being updated using the DMA.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"672\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2024\/08\/ezgif-5-9283a28761.gif\" alt=\"\" class=\"wp-image-2715\" \/><\/figure>\n\n\n\n<p>These steps are mandatory when dealing with DMA in ARM Cortex M7.<\/p>\n\n\n\n<p>Clean the cache before the DMA reads the data.<\/p>\n\n\n\n<p>Invalidate the cache after the DMA has written the data to the SRAM.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This is applicable to Memory to Peripheral and vice versa.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>happy coding \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we shall see how to deal with the cache coherency of STM32H7 when dealing with the DMA. In this guide, we shall cover the following: Project creation. DMA transfer without cache handling. DMA transfer with cache handling. 8. Project Creation: First, start STM32CubeIDE and select your workspace. Select your STM32H7 based MCU, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,11,12],"tags":[],"class_list":["post-2707","post","type-post","status-publish","format-standard","hentry","category-embedded-systems","category-peripheral-drivers","category-stm32"],"_links":{"self":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2707"}],"collection":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2707"}],"version-history":[{"count":2,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2707\/revisions"}],"predecessor-version":[{"id":2716,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/2707\/revisions\/2716"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2707"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2707"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2707"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}