<?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 / nrf52840 NUS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96735/nrf52832-nrf52840-nus</link><description>Hi All, 
 
 I have been trying to implement NUS on my nrf52832/nrf52840. I have that application working on both of them. Recently I wanted to implement the same functionality (NUS) on another application. I have ported the code from my old application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Feb 2023 13:55:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96735/nrf52832-nrf52840-nus" /><item><title>RE: nrf52832 / nrf52840 NUS</title><link>https://devzone.nordicsemi.com/thread/410917?ContentTypeID=1</link><pubDate>Mon, 20 Feb 2023 13:55:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f137f65-7bc7-4453-9a67-3cc5525d5836</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Yes, it will return that.&lt;/p&gt;
&lt;p&gt;But what did the log say?&lt;/p&gt;
&lt;p&gt;Do you see the log output at all? If not, please let me know.&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 / nrf52840 NUS</title><link>https://devzone.nordicsemi.com/thread/410718?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 18:31:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8bb2c71-2ee6-4846-9c69-aa46ec5ae4a5</guid><dc:creator>nordicuser91</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;err_code = nrf_sdh_enable_request();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Return the error&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ERROR 8 [NRF_ERROR_INVALID_STATE]&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 / nrf52840 NUS</title><link>https://devzone.nordicsemi.com/thread/410566?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 09:32:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:811c563c-c667-42d9-b581-b2beffa812a9</guid><dc:creator>Edvin</dc:creator><description>[quote user="nordicuser91"]I am able to compile but when I run I get following error:[/quote]
&lt;p&gt;What function returns this? nrf_sdh_enable_request() or nrf_sdh_ble_enable()?&lt;/p&gt;
&lt;p&gt;Either way, I suggest you replace line 8 -&amp;gt; 15 with&amp;nbsp;nrf_sdh_ble_enable() from nrf_sdh_ble.c. This will print in the log what you need to change your RAM settings to. Again, I don&amp;#39;t know without having your entire application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 / nrf52840 NUS</title><link>https://devzone.nordicsemi.com/thread/410496?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 01:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c30bb9f-9c0c-476d-96e1-737ef6a2fb9b</guid><dc:creator>nordicuser91</dc:creator><description>&lt;p&gt;So I tried to printed out the RAM start address using the following but it doesn&amp;#39;t even cross&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;err_code = nrf_sdh_enable_request();&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The following function initializes my stack:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void ble_ud_stack_init(void)
{
    uint32_t err_code;
    uint32_t ram_start = 0;
    err_code = nrf_sdh_enable_request();
    APP_ERROR_CHECK(err_code);
    printf(&amp;quot;--------------------here1\n&amp;quot;);
    if (nrf_sdh_ble_default_cfg_set(APP_BLE_CONN_CFG_TAG, &amp;amp;ram_start) != NRF_SUCCESS)
        printf(&amp;quot;ud fail\n&amp;quot;);
    if (nrf_sdh_ble_enable(&amp;amp;ram_start) != NRF_SUCCESS)
    {
        printf(&amp;quot;ud memory fail\n&amp;quot;);
    }
    printf(&amp;quot;BLE Application RAM start address = %x\n&amp;quot;, ram_start);
    NRF_SDH_BLE_OBSERVER(m_ble_observer, APP_BLE_OBSERVER_PRIO, ble_ud_stack_evt_handler, NULL);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am able to compile but when I run I get following error:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;ERROR 8 [NRF_ERROR_INVALID_STATE]&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Currently I have the following macros for nrf52840:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;FLASH_PH_START=0x0
FLASH_PH_SIZE=0x100000
RAM_PH_START=0x20000000
RAM_PH_SIZE=0x40000
FLASH_START=0x27000
FLASH_SIZE=0xd9000
RAM_START=0x20003460
RAM_SIZE=0x3dd00&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 / nrf52840 NUS</title><link>https://devzone.nordicsemi.com/thread/410387?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 14:10:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e25484f3-f56c-4d39-b5ad-cc16881b2dde</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Try to turn on logging, and monitor the logs from inside nrf_sdh_ble_enable(). It should say what you need to adjust your RAM settings to. I can&amp;#39;t tell from your description, but it will calculate it for you, and display it in the log.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>