<?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>SoftDevice Assert Issue in nRF52 Mesh SDK 5.0 with UART Communication</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118782/softdevice-assert-issue-in-nrf52-mesh-sdk-5-0-with-uart-communication</link><description>Dear Nordic Support Team, 
 I am encountering an issue with the nRF52 SDK for Mesh v5.0 and nRF52 SDK v17.0.2 while running the serial example. The system runs for a while, but then it crashes with a SoftDevice assert error. After the error occurs, the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Feb 2025 14:32:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118782/softdevice-assert-issue-in-nrf52-mesh-sdk-5-0-with-uart-communication" /><item><title>RE: SoftDevice Assert Issue in nRF52 Mesh SDK 5.0 with UART Communication</title><link>https://devzone.nordicsemi.com/thread/523076?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2025 14:32:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c8f3e40-1d5d-45f5-8d84-414d69f84804</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I thought it would do so on it&amp;#39;s own, but probably not. You need to start the HFCLK. Try running:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED=0;

NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART=1;
while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED==0)
{
    // Wait...
}
// Now the HFCLK should be running. &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But:&lt;/strong&gt; Why do you want to use the NRF_CLOCK_LF_SRC_SYNTH? This will synthesize the LFCLK using the HFCLK. It will cause the current consumption to increase quite a bit, because the HFCLK needs to be running all the time.&amp;nbsp;&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><item><title>RE: SoftDevice Assert Issue in nRF52 Mesh SDK 5.0 with UART Communication</title><link>https://devzone.nordicsemi.com/thread/522745?ContentTypeID=1</link><pubDate>Wed, 12 Feb 2025 23:08:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:305b7800-604d-4b3b-970a-f651125a5957</guid><dc:creator>duanpv</dc:creator><description>&lt;p data-start="125" data-end="142"&gt;&lt;strong data-start="125" data-end="140"&gt;Dear Edvin,&lt;/strong&gt;&lt;/p&gt;
&lt;p data-start="144" data-end="276"&gt;After changing &lt;code data-start="159" data-end="190"&gt;NRF_SDH_CLOCK_LF_RC_TEMP_CTIV&lt;/code&gt; from 16 to 2, the assert issue seems to be resolved. Thank you for your suggestion!&lt;/p&gt;
&lt;p data-start="278" data-end="386"&gt;However, I am now trying to switch to &lt;strong data-start="316" data-end="342"&gt;NRF_CLOCK_LF_SRC_SYNTH&lt;/strong&gt; by modifying my configuration as follows:&lt;/p&gt;
&lt;p data-start="278" data-end="386"&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define NRF_SDH_CLOCK_LF_SRC 2  // Use synthesized clock  
#define NRF_SDH_CLOCK_LF_RC_CTIV 0  
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 0  
#define NRF_SDH_CLOCK_LF_ACCURACY 1 &lt;/pre&gt;&lt;/p&gt;
&lt;p data-start="576" data-end="710"&gt;With this setup, the system does &lt;strong data-start="609" data-end="629"&gt;not start at all&lt;/strong&gt;. Do I need to change anything else to properly use &lt;strong data-start="681" data-end="707"&gt;NRF_CLOCK_LF_SRC_SYNTH&lt;/strong&gt;?&lt;/p&gt;
&lt;p data-start="712" data-end="741" data-is-last-node=""&gt;Best regards,&lt;/p&gt;
&lt;p data-start="712" data-end="741" data-is-last-node=""&gt;duanpv&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice Assert Issue in nRF52 Mesh SDK 5.0 with UART Communication</title><link>https://devzone.nordicsemi.com/thread/522472?ContentTypeID=1</link><pubDate>Tue, 11 Feb 2025 14:38:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a84f2941-d7d9-4400-ab83-e75508a7428f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Can you please try to set NRF_SDH_CLOCK_LF_RC_TEMP_CTIV to 2? This is required to get the 500ppm accuracy that you are setting using NRF_SDH_CLOCK_LF_ACCURACY 1.&lt;/p&gt;
&lt;p&gt;Does that change anything regarding the assert?&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><item><title>RE: SoftDevice Assert Issue in nRF52 Mesh SDK 5.0 with UART Communication</title><link>https://devzone.nordicsemi.com/thread/522317?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2025 23:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a347a87-cdf4-4ba1-9829-69537caf74e0</guid><dc:creator>duanpv</dc:creator><description>&lt;p&gt;&lt;strong&gt;Dear Edvin,&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Thank you for your response.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Due to &lt;/span&gt;&lt;strong&gt;specific hardware constraints&lt;/strong&gt;&lt;span&gt; on my &lt;/span&gt;&lt;strong&gt;custom PCB&lt;/strong&gt;&lt;span&gt;, I had to &lt;/span&gt;&lt;strong&gt;adjust certain configurations&lt;/strong&gt;&lt;span&gt; in the serial example. Therefore, I &lt;/span&gt;&lt;strong&gt;cannot test with the unmodified example&lt;/strong&gt;&lt;span&gt;. The modifications I made are &lt;/span&gt;&lt;strong&gt;necessary&lt;/strong&gt;&lt;span&gt; to match my hardware design, including:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. UART pin configuration&lt;/strong&gt; (in &lt;code&gt;pca10040.h&lt;/code&gt;):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define RX_PIN_NUMBER  30  
#define TX_PIN_NUMBER  29  
#define CTS_PIN_NUMBER 7  
#define RTS_PIN_NUMBER 5  
#define HWFC           false  
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;&lt;strong&gt;Disabled ECDH offloading&lt;/strong&gt;&lt;span&gt; (in &lt;/span&gt;&lt;code&gt;main.c&lt;/code&gt;&lt;span&gt;):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;ERROR_CHECK(mesh_opt_prov_ecdh_offloading_set(false));
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3.&amp;nbsp;&lt;strong&gt;Changed LF clock source to internal RC oscillator&lt;/strong&gt; (in &lt;code&gt;sdk_config.h&lt;/code&gt;):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define NRF_SDH_CLOCK_LF_SRC 0  
#define NRF_SDH_CLOCK_LF_RC_CTIV 16  
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 16  
#define NRF_SDH_CLOCK_LF_ACCURACY 1  &lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;4.&amp;nbsp;&lt;strong&gt;Adjusted mesh configuration parameters&lt;/strong&gt; (in &lt;code&gt;nrf_mesh_config_app.h&lt;/code&gt;):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define DSM_SUBNET_MAX 8  
#define DSM_APP_MAX 8  
#define DSM_DEVICE_MAX 48  
#define DSM_VIRTUAL_ADDR_MAX 1  
#define DSM_NONVIRTUAL_ADDR_MAX 64  
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;5.&amp;nbsp;&lt;/span&gt;&lt;strong&gt;Enabled PA/LNA&lt;/strong&gt;&lt;span&gt; using GPIOs (configured in &lt;/span&gt;&lt;code&gt;main.c&lt;/code&gt;&lt;span&gt;):&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;Configured sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &amp;amp;ble_pa_lna_opts);
Enabled mesh_pa_lna_gpiote_enable(&amp;amp;m_pa_lna_params);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Configured &lt;code&gt;sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &amp;amp;ble_pa_lna_opts);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;Enabled &lt;code&gt;mesh_pa_lna_gpiote_enable(&amp;amp;m_pa_lna_params);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Aside from these &lt;strong&gt;hardware-required changes&lt;/strong&gt;, the code remains the &lt;strong&gt;same as the original serial example&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The issue does &lt;strong&gt;not happen immediately&lt;/strong&gt; but occurs &lt;strong&gt;randomly after a few minutes or even several hours&lt;/strong&gt; of operation. I would appreciate your insights into what might be causing this issue.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;duanpv&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice Assert Issue in nRF52 Mesh SDK 5.0 with UART Communication</title><link>https://devzone.nordicsemi.com/thread/522236?ContentTypeID=1</link><pubDate>Mon, 10 Feb 2025 14:33:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d3961c1-2022-4528-b9ff-3b78821cd3c6</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Does this also happen in the unmodified sample applications?&lt;/p&gt;
&lt;p&gt;Do you have anything particular in your application? Do you use any peripherals other than UART? What interrupt priorities are you using? I believe that you need to have all your peripherals using the same interrupt priority, and that it needs to be the same priority as the Mesh stack. Can you please make sure that they are?&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>