{"id":1708,"date":"2023-04-23T05:34:10","date_gmt":"2023-04-23T05:34:10","guid":{"rendered":"https:\/\/blog.embeddedexpert.io\/?p=1708"},"modified":"2023-04-23T05:34:13","modified_gmt":"2023-04-23T05:34:13","slug":"reading-from-internal-flash-of-stm32fxxx","status":"publish","type":"post","link":"https:\/\/blog.embeddedexpert.io\/?p=1708","title":{"rendered":"Reading From internal Flash of STM32Fxxx"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-1024x768.jpeg\" alt=\"\" class=\"wp-image-1709\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-1024x768.jpeg 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-300x225.jpeg 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-768x576.jpeg 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-1536x1152.jpeg 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-2048x1536.jpeg 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-1150x863.jpeg 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-750x563.jpeg 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-400x300.jpeg 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/AdobeStock_64788699-250x188.jpeg 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>In this guide, we shall see how to read data from the internal flash storage of STM32Fxxx (tested on STM32F1 and F4).<\/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>Internal Flash Storage of STM32F411.<\/li><li>Develop the driver.<\/li><li>Code.<\/li><li>Results.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Internal Flash Storage of STM32F411:<\/h2>\n\n\n\n<p>The Flash memory interface manages CPU AHB I-Code and D-Code accesses to the Flash memory. It implements the erase and program Flash memory operations and the read and write protection mechanisms.<\/p>\n\n\n\n<p>The Flash memory interface accelerates code execution with a system of instruction prefetch and cache lines.<\/p>\n\n\n\n<p>Main features<\/p>\n\n\n\n<p>\u2022 Flash memory read operations<\/p>\n\n\n\n<p>\u2022 Flash memory program\/erase operations<\/p>\n\n\n\n<p>\u2022 Read \/ write protections<\/p>\n\n\n\n<p>\u2022 Prefetch on I-Code<\/p>\n\n\n\n<p>\u2022 64 cache lines of 128 bits on I-Code<\/p>\n\n\n\n<p>\u2022 8 cache lines of 128 bits on D-Code<\/p>\n\n\n\n<p>Figure below shows the Flash memory interface connection inside the system architecture.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"692\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-1024x692.png\" alt=\"\" class=\"wp-image-1710\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-1024x692.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-300x203.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-768x519.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-1536x1039.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-1150x778.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-750x507.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-400x271.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM-250x169.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.10.29-AM.png 1736w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The Flash memory has the following main features:<\/p>\n\n\n\n<p>\u2022 Capacity up to 512 KBytes for STM32F411xC\/E<\/p>\n\n\n\n<p>\u2022 128 bits wide data read<\/p>\n\n\n\n<p>\u2022 Byte, half-word, word and double word write<\/p>\n\n\n\n<p>\u2022 Sector and mass erase<\/p>\n\n\n\n<p>\u2022 Memory organization The Flash memory is organized as follows:<\/p>\n\n\n\n<p>\u2013 A main memory block divided into 4 sectors of 16 KBytes, 1 sector of 64 KBytes, 3 sectors of 128 Kbytes (STM32F411xC\/E).<\/p>\n\n\n\n<p>\u2013 System memory from which the device boots in System memory boot mode<\/p>\n\n\n\n<p>\u2013 512 OTP (one-time programmable) bytes for user data The OTP area contains 16 additional bytes used to lock the corresponding OTP data block.<\/p>\n\n\n\n<p>\u2013 Option bytes to configure read and write protection, BOR level, watchdog software\/hardware and reset when the device is in Standby or Stop mode.<\/p>\n\n\n\n<p>\u2022 Low-power modes (for details refer to the Power control (PWR) section of the reference manual)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Figure below shows the flash storage organization within STM32F411:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-1024x536.png\" alt=\"\" class=\"wp-image-1711\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-1024x536.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-300x157.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-768x402.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-1536x804.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-1150x602.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-750x393.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-400x209.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM-250x131.png 250w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.13.01-AM.png 1742w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Developing the Driver:<\/h2>\n\n\n\n<p>We start off by creating new source and header file with name of flash.c and flash.h respectively.<\/p>\n\n\n\n<p>Within the header, include stdint 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;}\">#include &quot;stdint.h&quot;<\/pre><\/div>\n\n\n\n<p>Declare the following function:<\/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;}\">void flash_read32(uint32_t addrs, uint32_t *rd32, uint32_t len);<\/pre><\/div>\n\n\n\n<p>The function takes three arguments:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The address to be read.<\/li><li>pointer to hold the read address.<\/li><li>Length to be read.<\/li><\/ul>\n\n\n\n<p>And the function returns nothing.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Within source code, include the flash.h and stm32f4xx.h header files 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;}\">#include &quot;Flash.h&quot;\n#include &quot;stm32f4xx.h&quot;<\/pre><\/div>\n\n\n\n<p>For the function to read from flash:<\/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;}\">void flash_read32(uint32_t addrs, uint32_t *rd32, uint32_t len)\n{<\/pre><\/div>\n\n\n\n<p>Within the function:<\/p>\n\n\n\n<p> Store the passed address into temporary variable:<\/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;}\">uint32_t tempAddrs = addrs;<\/pre><\/div>\n\n\n\n<p>Declare a for loop starts from 0 to the length:<\/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;}\">for(uint32_t i=0; i&lt;len; i++)<\/pre><\/div>\n\n\n\n<p>Within the 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;}\">rd32[i] = *(__IO uint32_t*) tempAddrs;<\/pre><\/div>\n\n\n\n<p>convert the temporary variable into pointer then dereference the pointer and store the read memory location into rd32 array.<\/p>\n\n\n\n<p>Increment the address by 4 since the datawidth is 4byte:<\/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;}\">tempAddrs+=4;<\/pre><\/div>\n\n\n\n<p>close the function:<\/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;}\">}<\/pre><\/div>\n\n\n\n<p>Hence, the function 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;}\">void flash_read32(uint32_t addrs, uint32_t *rd32, uint32_t len)\n{\n  \/\/Read data can be accessed straight away\n  uint32_t tempAddrs = addrs;\n\n  for(uint32_t i=0; i&lt;len; i++)\n  {\n    rd32[i] = *(__IO uint32_t*) tempAddrs;\n    tempAddrs+=4;\n  }\n}<\/pre><\/div>\n\n\n\n<p>Within main.c file:<\/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;}\">#include &quot;stdio.h&quot;\n#include &quot;delay.h&quot;\n#include &quot;flash.h&quot;\n#include &quot;uart.h&quot;\n\nuint32_t flash_data[4];\n\n\nint main(void)\n{\n\tuart2_tx_init(115200,16000000);\n\tsystick_init_ms(16000000);\n\tflash_read32(0x08000000,flash_data,4);\n\tprintf(&quot;First 4 word data in flash are:\\r\\n&quot;);\n\tfor (int i=0;i&lt;4;i++)\n\t{\n\t\tprintf(&quot;%d -&gt; 0x%x\\r\\n&quot;,i,flash_data[i]);\n\t}\n\n\twhile(1)\n\t{\n\n\n\n\t}\n}\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Code:<\/h2>\n\n\n\n<p>You may download the entire source code from here:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/FLASH_Read.zip\">FLASH_Read<\/a><a href=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/FLASH_Read.zip\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Results:<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"668\" src=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-1024x668.png\" alt=\"\" class=\"wp-image-1713\" srcset=\"https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-1024x668.png 1024w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-300x196.png 300w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-768x501.png 768w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-1536x1003.png 1536w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-2048x1337.png 2048w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-1150x751.png 1150w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-750x490.png 750w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-400x261.png 400w, https:\/\/blog.embeddedexpert.io\/wp-content\/uploads\/2023\/04\/Screenshot-2023-04-23-at-8.31.46-AM-250x163.png 250w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Successfully Read the first 16 Bytes of the flash storage.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Happy coding \ud83d\ude42<\/p>\n\n\n\n<p> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, we shall see how to read data from the internal flash storage of STM32Fxxx (tested on STM32F1 and F4). In this guide, we shall cover the following: Internal Flash Storage of STM32F411. Develop the driver. Code. Results. 1. Internal Flash Storage of STM32F411: The Flash memory interface manages CPU AHB I-Code and [&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-1708","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\/1708"}],"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=1708"}],"version-history":[{"count":1,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/1708\/revisions"}],"predecessor-version":[{"id":1714,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=\/wp\/v2\/posts\/1708\/revisions\/1714"}],"wp:attachment":[{"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.embeddedexpert.io\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}