<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reading application area of flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/95856/reading-application-area-of-flash</link><description>I am trying to implement BLE DFU protocol on my nrf52840 MCU to FOTA the nrf52 devices nearby. I was able to do firmware update by reading the firmware hex stored in RAM and updating the nearby devices by doing device-to-device BLE DFU. I now want to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Jan 2023 20:41:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/95856/reading-application-area-of-flash" /><item><title>RE: Reading application area of flash</title><link>https://devzone.nordicsemi.com/thread/405750?ContentTypeID=1</link><pubDate>Thu, 19 Jan 2023 20:41:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d60780e-5720-4ad3-8fba-3b20a7dd3588</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You can read the flash directly, simply by&amp;nbsp;creating a const pointer with a value in the flash address region (0x0-0x100000) and dereferencing the pointer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Small example:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Copy 16 words from flash into RAM, starting at flash address 0x10000
const uint32_t *flash_ptr = 0x10000;
uint32_t data_from_flash[16];
for(int i = 0; i &amp;lt; 16; i++)
{
    data_from_flash[i] = *flash_ptr++;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>