<?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>nRF52832 flash write problem.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38677/nrf52832-flash-write-problem</link><description>Hi, I have a problem when write data to flash on nRF52832. my code is like below: 
 err_code = nrf_drv_clock_init(); APP_ERROR_CHECK(err_code); // Activate deep sleep mode. SCB-&amp;gt;SCR |= SCB_SCR_SLEEPDEEP_Msk; fds_init(); ble_stack_init(); timers_init(</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Sep 2018 09:17:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38677/nrf52832-flash-write-problem" /><item><title>RE: nRF52832 flash write problem.</title><link>https://devzone.nordicsemi.com/thread/150426?ContentTypeID=1</link><pubDate>Wed, 26 Sep 2018 09:17:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6bfdd99d-3f13-4d62-aa12-eb5ac12edf64</guid><dc:creator>nero</dc:creator><description>&lt;p&gt;That&amp;#39;s right ! Generally I ignore the SVC call, but nrf52832 just use it to call api from softdevice!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 flash write problem.</title><link>https://devzone.nordicsemi.com/thread/150414?ContentTypeID=1</link><pubDate>Wed, 26 Sep 2018 08:38:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35229ebd-fe9d-48cf-90c4-f9137fc8f2fb</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;&lt;span&gt;configMAX_SYSCALL_INTERRUPT_PRIORITY&amp;nbsp;needs to be lower in priority than the SVC priority which is set to 4 in nRF52 devices. If you set the priority&amp;nbsp; of configMAX_SYSCALL_INTERRUPT_PRIORITY&amp;nbsp; higher than SVC call then any sd_xxx call that converts to SVC call will hardfault.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 flash write problem.</title><link>https://devzone.nordicsemi.com/thread/149860?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 13:58:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d889cd0-f88b-4783-9a3c-49a18bf301bf</guid><dc:creator>nero</dc:creator><description>&lt;p&gt;Thank for attention.&amp;nbsp;Accturally, I am developing nrf52832 with freertos, and I found the api of flash must be used the fstorge_sd type when softdevice is present. But I want to use nvmc type. So I must stop ble stack with the sd_adv_stop first. When I ereaser or write flash in a task, it will lead to a hardfault. Finally, I change the&amp;nbsp;priority of&amp;nbsp;configMAX_SYSCALL_INTERRUPT_PRIORITY to APP_LOWEST, and it worked. So I wonder if there is some handle in&amp;nbsp;&lt;span&gt;sd_adv_stop could lead to hardfault when I make the interrupt was controlled by RTOS?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards, Nero&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 flash write problem.</title><link>https://devzone.nordicsemi.com/thread/149848?ContentTypeID=1</link><pubDate>Fri, 21 Sep 2018 13:25:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc6c6663-fa02-4b73-afa9-85fb71fe66e5</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;If you look at&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fgroup__nrf__fstorage.html&amp;amp;anchor=ga23f2e5019d0e6cbf6e45a51713dd5b1a"&gt;nrf_fstorage_erase(...)&lt;/a&gt;&amp;nbsp;in the infocenter and the explantion for the argument &lt;em&gt;len&lt;/em&gt;, it says the following:&lt;em&gt; &amp;quot;Number of pages to erase.&amp;quot;.&amp;nbsp;&lt;/em&gt;Thus you have to input the number of pages, not the size in bytes.&lt;/p&gt;
&lt;p&gt;A single page in the nRF52832 is of size 4096 bytes (=0x1000 bytes), and setting&amp;nbsp;the &lt;em&gt;len&lt;/em&gt; input to 1 instead, will erase 4*1024 bytes.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards, Simon.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>