<?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>HardFault Error after calling nrf_nvmc_page_erase</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/57770/hardfault-error-after-calling-nrf_nvmc_page_erase</link><description>Hello Support 
 When calling the function nrf_nvmc_page_erase(0xF7000) (In nrf_nvmc.c) I immediately get a Hardfault error when the code reaches the line where it calls wait_for_flash_ready(); which reads the NRF_NVMC-&amp;gt;READY register. 
 This is my setup</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Feb 2020 11:22:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/57770/hardfault-error-after-calling-nrf_nvmc_page_erase" /><item><title>RE: HardFault Error after calling nrf_nvmc_page_erase</title><link>https://devzone.nordicsemi.com/thread/235931?ContentTypeID=1</link><pubDate>Mon, 24 Feb 2020 11:22:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e959a0fa-67d1-4ba0-ba35-0474533fdd2e</guid><dc:creator>Dexterity</dc:creator><description>&lt;p&gt;Hello Sigurd. I solved the issue by using your hint that ACL is in use. It was indeed the ACL block that prohibited me to write at the area I had designed to use for a proprietary data.&lt;/p&gt;
&lt;p&gt;So my bootloader called&amp;nbsp;nrf_bootloader_app_start_final which again called&amp;nbsp;nrf_bootloader_flash_protect(BOOTLOADER_START_ADDR, BOOTLOADER_SIZE + NRF_MBR_PARAMS_PAGE_SIZE, NRF_BOOTLOADER_READ_PROTECT);&lt;/p&gt;
&lt;p&gt;So I solved the issue by decreasing the BOOTLOADER_SIZE value thereby allowing my application to erase the data at 0xF7000 where my proprietary data resides.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HardFault Error after calling nrf_nvmc_page_erase</title><link>https://devzone.nordicsemi.com/thread/234751?ContentTypeID=1</link><pubDate>Mon, 17 Feb 2020 18:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3750fb8e-6c7d-4090-8dc0-67651ba53727</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What data are you trying to erase at&amp;nbsp;&lt;span&gt;0xF7000 ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are you sure that your bootloader is at&amp;nbsp;0xE0000 ? If yes, how big is the bootloader ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you are using the bootloader variant pca10056_s140_ble_debug, it will by default occupy the flash at 0xF7000, and since the bootloader is using &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/acl.html?cp=4_0_0_5_2"&gt;ACL&lt;/a&gt; to protect itself&amp;nbsp;from being overwritten(&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__nrf__bootloader__app.html?cp=7_1_6_11_7_2_1#ga849e2ccb509bf1415662c33cf3ab085a"&gt;nrf_bootloader_flash_protect&lt;/a&gt;), a busfault will happen if you try to erase&amp;nbsp;0xF7000, or any other page that is protected by ACL.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>