<?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 when writing/erasing flash unless RTT debugger active</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59146/hardfault-when-writing-erasing-flash-unless-rtt-debugger-active</link><description>Hi, I found one older question (7 months ago) with the same problem but that had no answer. Situation: 
 - SDK 15.3, s132 v6.1.1 - The softdevice has been enabled and ble stack initialized - Code needs to erase and write a flash page (settings) unless</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Mar 2020 11:44:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59146/hardfault-when-writing-erasing-flash-unless-rtt-debugger-active" /><item><title>RE: HardFault when writing/erasing flash unless RTT debugger active</title><link>https://devzone.nordicsemi.com/thread/240232?ContentTypeID=1</link><pubDate>Tue, 17 Mar 2020 11:44:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4670e09f-c1e9-4110-b5be-aa6eb75fdc20</guid><dc:creator>plippo</dc:creator><description>&lt;p&gt;That was it! Very big THANK YOU! (A simple debug print of BPROT config registers confirmed this)&lt;br /&gt;&lt;br /&gt;It looks like the default DFU bootloader marks all but the 0x7F000 page above bootloader start protected. We used to have a bootloader starting from 75000 so that debug version would fit. Unfortunately the DFU cannot change the bootloader start address when updating SD + BL, so now were stuck with it and had to use the 7D for our settings page.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;So all I have to do is to modify our bootloader code to not mark the needed pages protected and we&amp;#39;re good to go.&lt;br /&gt;&lt;br /&gt;Thank you for a swift solution!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HardFault when writing/erasing flash unless RTT debugger active</title><link>https://devzone.nordicsemi.com/thread/240140?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 22:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b105c0a3-2f6a-4b48-af1a-059e7a0a95e9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Maybe this page is&amp;nbsp;protected by the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/bprot.html#concept_gdr_qlx_vr"&gt;BPROT&lt;/a&gt;? The protection gets disabled by default in debug interface mode, which could explain the behavior you are seeing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HardFault when writing/erasing flash unless RTT debugger active</title><link>https://devzone.nordicsemi.com/thread/240018?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 13:14:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ef9235d-f615-4c67-b8ff-cffd6d669a6c</guid><dc:creator>plippo</dc:creator><description>&lt;p&gt;It&amp;#39;s a custom board (see: www.movesense.com).&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll try to setup the UART debugging and see what&amp;#39;s happening. Unfortunately we have communication protocol setup on top of UART so it may take some time to get it to work.&lt;br /&gt;&lt;br /&gt;If you have any idea what could be different in MCU when RTT connection is up, please let me know. I&amp;#39;m assuming it&amp;#39;s timing related but maybe not...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HardFault when writing/erasing flash unless RTT debugger active</title><link>https://devzone.nordicsemi.com/thread/240012?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 13:09:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7653767-c8d6-4610-9bfe-bbbae6b0ebab</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Does this occur on a development kit (DK) or a custom board? Also, application are you running on your board, is it based on one of the SDK examples?&lt;/p&gt;
&lt;p&gt;You can try to enable logging via UART if possible, that way you should be able to see the logs without being in debug mode.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HardFault when writing/erasing flash unless RTT debugger active</title><link>https://devzone.nordicsemi.com/thread/239990?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 12:20:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5611fbd4-3df1-4d3f-bc4d-50d7f05ef3b1</guid><dc:creator>plippo</dc:creator><description>&lt;p&gt;&lt;span&gt;The call to&amp;nbsp;erase flash is&amp;nbsp;nrf_fstorage_erase (1 page, address 0x7D000)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>