<?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>Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64696/projects-for-writing-into-flash-memory-does-not-work-on-nrf52840-dongle</link><description>I am using nRF52840 dongle and nRF SDK version nRF5_SDK_17.0.0_9d13099. 
 When I am trying to debug the application it gives an error. 
 
 using your example project on nRF52840 dongle 
 nRF5_SDK_17.0.0_9d13099\examples\peripheral\flash_fds\pca10056\s140</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Aug 2020 08:46:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64696/projects-for-writing-into-flash-memory-does-not-work-on-nrf52840-dongle" /><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/265019?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 08:46:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9565d69-89e6-45ee-b401-3853b76ce9e8</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Shailesh,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Great to know you find the root cause.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;-Amanda H.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/265002?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 07:57:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03454859-f63b-4342-8dd0-e09e225c5093</guid><dc:creator>shaileshbc</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;My main purpose is solved in writing data into Flash memory and sending it as advertising data.&lt;/p&gt;
&lt;p&gt;Yesterday I come to know that the error which I was getting while debugging is due to the time taken to check the variable value and not related to coding.&lt;/p&gt;
&lt;p&gt;It depends where I had added a breakpoint and how much time it takes to check and resume the execution of code.&lt;/p&gt;
&lt;p&gt;if I take more time, then the error &lt;span&gt;NRF_FAULT_ID_SD_ASSERT&amp;nbsp;&lt;/span&gt;is raised.&lt;/p&gt;
&lt;p&gt;You may close this ticket.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Shailesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264985?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2020 06:50:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:472622a0-d1fe-40a5-9118-eddebadd01ff</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Shailesh,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;According to this&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fgroup___n_r_f___n_v_i_c___i_s_e_r___d_e_f_i_n_e_s.html&amp;amp;anchor=gaf5d0e819980db5a60b98b5b3d7d1949f"&gt;softdevice specification&lt;/a&gt;&lt;span&gt;, peripheral Id 30-&amp;gt; NVMC is a restricted peripheral when the softdevice is enabled. Therefore, it only happened to the nrf_nvmc_write_bytes function which is after your ble_stack_init().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264791?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 08:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b58ad791-e388-4b12-b979-64f2cc36140d</guid><dc:creator>shaileshbc</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;In that case, it should also raise memory fault when I am running nrf_nvmc_write_bytes function, just after flash_page_init(), but it didn&amp;#39;t raise any fault.&lt;/p&gt;
&lt;p&gt;Fault is raised only, when i call nrf_nvmc_write_bytes function, after advertising_start() function in the example.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Shailesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264769?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 08:13:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69947ed3-f883-49fc-b844-8308d64e7e54</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Shailesh,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;According to this&amp;nbsp;&lt;/span&gt;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fgroup___n_r_f___n_v_i_c___i_s_e_r___d_e_f_i_n_e_s.html&amp;amp;anchor=gaf5d0e819980db5a60b98b5b3d7d1949f"&gt;softdevice specification&lt;/a&gt;&lt;span&gt;, peripheral Id 30-&amp;gt; NVMC is a restricted peripheral when the softdevice is enabled. That means that it is not allowed to access NVMC registers directly from the application as those registered are inside access protected areas. And you can see in the implementation of nrf_nvmc_write_bytes that it is accessing NVMC registers directly, hence the memory fault. This &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/36079/nrf_nvmc_write_word-throws-nrf_fault_id_app_memacc/139024#139024"&gt;post &lt;/a&gt;might help.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264746?ContentTypeID=1</link><pubDate>Mon, 17 Aug 2020 07:29:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f026cdbc-a645-4ace-b164-0c3912e309fe</guid><dc:creator>shaileshbc</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Amanda&amp;nbsp;,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I had modified main.c file of ble_app_blinky_pca10059_s140.emProject located at &lt;br /&gt;nRF5_SDK_17.0.0_9d13099\examples\ble_peripheral\ble_app_blinky\pca10059\s140\ses.&lt;/p&gt;
&lt;p&gt;Added code from nRF5_SDK_17.0.0_9d13099\examples\peripheral\flashwrite\main.c&lt;/p&gt;
&lt;p&gt;I am able to write data into flash memory successfully when i executes write command after calling&lt;br /&gt;flash_page_init() function, but it fails if i execute write function after advertising_start() function.&lt;br /&gt;following error occurs&lt;br /&gt;id = NRF_FAULT_ID_APP_MEMACC&lt;br /&gt;pc = 0x0002ef0e&lt;br /&gt;info = 0x40000000&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/013055.main.c"&gt;devzone.nordicsemi.com/.../013055.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am using nrf52840 dongle.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;shailesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264473?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2020 12:51:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85b6a0b2-5d87-447c-bbd7-3f8cbe6b7d1d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi Shailesh,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you modify the example? If so, &lt;span&gt;I would suspect you are running into the same issue as in&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/40088/sd_flash_write-cause-nrf_fault_id_sd_assert"&gt;this post&lt;/a&gt;&lt;span&gt;. The proposed workaround, for now, is to split&amp;nbsp;&lt;/span&gt;&lt;span&gt;long writes into multiple shorter&amp;nbsp;writes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Besides that, it is hard to say what causes this without some logs or which functions that are triggering this assert.&amp;nbsp;&lt;/span&gt;Is it possible to provide any logs?&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It seems like you got &amp;quot;id&amp;quot; also along with &amp;quot;PC&amp;quot;. Since you narrowed the hardfault id to be&amp;nbsp;NRF_FAULT_ID_SD_ASSERT.&amp;nbsp;The line number and file name of the assert is located inside the info structure in app_error.h file&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;typedef struct
{
uint16_t line_num; /**&amp;lt; The line number where the error occurred. */
uint8_t const * p_file_name; /**&amp;lt; The file in which the error occurred. */
} assert_info_t;&lt;/pre&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span&gt;Check if you have some valid structure here, if not then something is wrong. Are you seeing these values in a log or in a debug window? If it is the debug window, then I would suggest you to compile the code with no optimizations (and hope that the timing has not changed to be able to reproduce this error.) If you use the segger, you can compile with debug mode.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c5adffaaf6904284a24065d8f89b3071/pastedimage1597330840859v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;More info regarding&amp;nbsp;the assert, something within the SoftDevice was not finished within the required timing constraints. You may get this error if interrupts have been disabled, if you use the timeslot API and do not release the timeslot in time, if you run application code at an interrupt level higher than or equal to the highest level of the SoftDevice, or if you pause program execution in a debug session (i.e. single stepping, breakpoints, etc.).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Might be helpful to have a look at&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.0.0/md_doc_introduction_mesh_interrupt_priorities.html?cp=7_6_3_0_4" rel="noopener noreferrer" target="_blank"&gt;this&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264434?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2020 11:11:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ca646d7-5579-41d0-b535-11025ed8b8bb</guid><dc:creator>shaileshbc</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;As per your suggestion, I added a breakpoint in&amp;nbsp;&lt;span&gt;app_error_fault_handler(), it gives an error&amp;nbsp;NRF_FAULT_ID_SD_ASSERT, when I used the project&amp;nbsp;nRF5_SDK_17.0.0_9d13099\examples\peripheral\flash_fstorage&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;and&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;nRF5_SDK_17.0.0_9d13099\examples\peripheral\flash_fds\pca10056\s140\ses.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I couldn&amp;#39;t found which function is returning that error code, as after each execution of the command, return code is zero.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Shailesh&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264359?ContentTypeID=1</link><pubDate>Thu, 13 Aug 2020 06:54:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efb26be8-794f-4a4c-8678-9409f094255c</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Shailesh,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry to cause the misunderstand.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The&amp;nbsp;&lt;a title="Flash Data Storage Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/fds_example.html?cp=7_1_4_6_9"&gt;Flash Data Storage Example&lt;/a&gt;&amp;nbsp;needs to&amp;nbsp;establish a UART connection to test the command,&amp;nbsp;but the &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52840-Dongle"&gt;nRF52840-Dongle&lt;/a&gt;&amp;nbsp;there is no UART connected to the PC. If you will use write command in the UART to write flash, I would suggest you use the nRF52840DK. If you just write the flash with the function, it should be fine.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""]app_error_weak.c file , Line no. 100[/quote]
&lt;p&gt;&lt;span&gt;You should add the define DEBUG in your Preprocessor(Project -&amp;gt; Edit Options -&amp;gt; Preprocessor -&amp;gt; Preprocessor Definitions), then add a breakpoint on app_error_fault_handler() to see which error you get.&amp;nbsp;You will see which error you get and which function is returning this error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]When trying to write hex file into the dongle, it does not allow to add softdevice hex file, stating that the hex file is overlapping.[/quote]
&lt;p&gt;You should give the flash start address&amp;nbsp;FLASH_START=0x27000 to the&amp;nbsp;&lt;span&gt;flashwrite_pca10056.hex. You can refer to the setting in the flash_fstorage_s140_pca10056.emProject by right-click the project -&amp;gt; options -&amp;gt; Linker -&amp;gt; Section Placement Macro.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c5adffaaf6904284a24065d8f89b3071/254508.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
[quote user=""]if&amp;nbsp;I try to write hex file&amp;nbsp;flashwrite_pca10056.hex, it gives an error, log of the programmer is&amp;nbsp; &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-c5adffaaf6904284a24065d8f89b3071/2020_2D00_08_2D00_11T07_5F00_59_5F00_13.264Z_2D00_log.txt"&gt;2020-08-11T07_59_13.264Z-log.txt&lt;/a&gt;[/quote]
&lt;p&gt;&amp;nbsp;Are you able to write other hex files like&amp;nbsp;softdevice_s132.hex? If you still get the error, run &amp;quot;nrfjprog --recover&amp;quot; with&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download"&gt;nRF-Command-Line-Tools&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264259?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 12:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28d8a9d9-0177-4872-92e3-1d86b0340ef9</guid><dc:creator>shaileshbc</dc:creator><description>&lt;p&gt;Hi Amanda,&lt;/p&gt;
&lt;p&gt;Do you mean that if I do not establish a UART connection, I can&amp;#39;t write in Flash Memory?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Shailesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Projects for Writing into Flash Memory does not work on nRF52840 dongle</title><link>https://devzone.nordicsemi.com/thread/264153?ContentTypeID=1</link><pubDate>Wed, 12 Aug 2020 06:09:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c605c04-a024-4a47-a4e1-0ac10ef2605d</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a title="Flash Data Storage Example" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.0/fds_example.html?cp=7_1_4_6_9"&gt;Flash Data Storage Example&lt;/a&gt;&amp;nbsp;needs to&amp;nbsp;&lt;span&gt;establish a UART connection, but t&lt;/span&gt;he nRF52840 dongle there is no UART connected to the PC, other than the virtual COM port that is used for programming via Serial DFU (USB).&lt;/p&gt;
&lt;p&gt;You should consider the nRF52840 DK instead if you want to develop firmware for the nRF52840. The nRF52840 dongle is primarily intended to be used together with nRF Connect for desktop and is not well suitable as a development board. This is primarily because it lacks an onboard debugger.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>