<?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>how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83656/how-to-disable-sdh-in-ant-demo</link><description>I&amp;#39;m using Ant sdh,I want to make system enter sleep,how to disable nrf_sdh_ant? 
 I usd this function to enable sdh,but can&amp;#39;t disable sdh to enter sleep,how to use? 
 static void softdevice_setup(void) { ret_code_t err_code = nrf_sdh_enable_request();</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Jan 2022 07:37:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83656/how-to-disable-sdh-in-ant-demo" /><item><title>RE: how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/thread/348179?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 07:37:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2464c058-0da5-4f16-ad93-85f7ec5efd43</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Please see the API documentation for&amp;nbsp;sd_flash_write():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Flash Write
*
* Commands to write a buffer to flash
*
* If the SoftDevice is enabled:
*  This call initiates the flash access command, and its completion will be communicated to the
*  application with exactly one of the following events:
*      - @ref NRF_EVT_FLASH_OPERATION_SUCCESS - The command was successfully completed.
*      - @ref NRF_EVT_FLASH_OPERATION_ERROR   - The command could not be started.
*
* If the SoftDevice is not enabled no event will be generated, and this call will return @ref NRF_SUCCESS when the
 * write has been completed
*
* @note
*      - This call takes control over the radio and the CPU during flash erase and write to make sure that
*        they will not interfere with the flash access. This means that all interrupts will be blocked
*        for a predictable time (depending on the NVMC specification in the device&amp;#39;s Product Specification
*        and the command parameters).
*      - The data in the p_src buffer should not be modified before the @ref NRF_EVT_FLASH_OPERATION_SUCCESS
*        or the @ref NRF_EVT_FLASH_OPERATION_ERROR have been received if the SoftDevice is enabled.
*      - This call will make the SoftDevice trigger a hardfault when the page is written, if it is
*        protected.
*
*
* @param[in]  p_dst Pointer to start of flash location to be written.
* @param[in]  p_src Pointer to buffer with data to be written.
* @param[in]  size  Number of 32-bit words to write. Maximum size is the number of words in one
*                   flash page. See the device&amp;#39;s Product Specification for details.
*
* @retval ::NRF_ERROR_INVALID_ADDR   Tried to write to a non existing flash address, or p_dst or p_src was unaligned.
* @retval ::NRF_ERROR_BUSY           The previous command has not yet completed.
* @retval ::NRF_ERROR_INVALID_LENGTH Size was 0, or higher than the maximum allowed size.
* @retval ::NRF_ERROR_FORBIDDEN      Tried to write to an address outside the application flash area.
* @retval ::NRF_SUCCESS              The command was accepted.
*/
SVCALL(SD_FLASH_WRITE, uint32_t, sd_flash_write(uint32_t * p_dst, uint32_t const * p_src, uint32_t size));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;As you see, the second parameter (p_src) is the source address (pointer to the data you are reading from). The first parameter is the destination address (location in flash where the data is to be written). Both these addresses needs to be word aligned, meaning they must be divisible by 4. And of corse they must be valid addresses, meaning within the memory regions of the device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/thread/348146?ContentTypeID=1</link><pubDate>Tue, 18 Jan 2022 00:47:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53fb511d-58fd-4fba-867f-86530d139a43</guid><dc:creator>jwx</dc:creator><description>&lt;p&gt;&lt;span&gt;sd_flash_write() fails，what is the source address?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/thread/347967?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 10:00:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8aae02a-b595-4510-b3aa-cb3742e081f3</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Is it so that&amp;nbsp;sd_flash_page_erase() succeeds and&amp;nbsp;sd_flash_write() fails?&lt;/p&gt;
&lt;p&gt;The error code 0x10 is&amp;nbsp;NRF_ERROR_INVALID_ADDR. According to the API documentation for&amp;nbsp;sd_flash_write() you will get this when &amp;quot;&lt;em&gt;Tried to write to a non existing flash address, or p_dst or p_src was unaligned&lt;/em&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;What is the value of&amp;nbsp;address, is that also&amp;nbsp;0x77800? If yes, that is no problem, as this is word aligned. But what about the source address?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/thread/347906?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 06:39:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28d145d3-c75e-4a88-855f-6c9ae8c661d0</guid><dc:creator>jwx</dc:creator><description>&lt;p&gt;ret_code_t err_code=sd_flash_page_erase(page_address/0x1000);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;ret_code_t err_code = sd_flash_write(&amp;amp;address,&amp;amp;value,1);&lt;br /&gt; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;when write flash,err_code return 0x10,how to&amp;nbsp;fix it?page_address=0x77800&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/thread/347691?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 08:18:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:483a72a6-a968-48bf-9475-1beaf94adb36</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You cannot call&amp;nbsp;nrf_nvmc_page_erase() when using a SoftDevice. In that case, you should use&amp;nbsp;sd_flash_page_erase() instead, which does the exact same thing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/thread/347689?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 08:04:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6aa267a-7de8-473b-835d-5ca345f032d1</guid><dc:creator>jwx</dc:creator><description>&lt;p&gt;and error code&amp;nbsp; &amp;nbsp;id&amp;nbsp; &amp;nbsp;is&amp;nbsp; 1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/thread/347688?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 08:03:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24b0b1af-56ab-449e-957f-35ad7e0d75e4</guid><dc:creator>jwx</dc:creator><description>&lt;p&gt;when call the function &amp;quot;nrf_nvmc_page_erase&amp;quot;,the system will jump to &amp;quot;NRF_BREAKPOINT_COND;&amp;quot; then died&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to disable sdh in ANT demo?</title><link>https://devzone.nordicsemi.com/thread/347683?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 07:43:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:752297ac-9996-453c-984a-d46a93120476</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no need to disable SDH in order to enter sleep. Normally, the SoftDevice and the SoftDevice handler library are enabled at startup, and never disabled. Are you sure you need to / want to disable the SoftDevice and SDH? If so, why? If you really do, then you have the&amp;nbsp;nrf_sdh_disable_request().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>