<?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>code crash when starting lte comunication (power issue?)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66771/code-crash-when-starting-lte-comunication-power-issue</link><description>Greetings, 
 we have a custom pcb with nrf9160 and are using nrf-sdk v1.3.0 and mfw v1.2.0 
 Sometimes when connecting to lte the code crashes: 
 
 The code in question is as follows: 
 
 So, presumably, the crash happens after this line in w_lte_lc_connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Oct 2020 13:05:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66771/code-crash-when-starting-lte-comunication-power-issue" /><item><title>RE: code crash when starting lte comunication (power issue?)</title><link>https://devzone.nordicsemi.com/thread/273240?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 13:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7eaad7e-2258-4a89-b93e-36e6e05771a0</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Tjaz,&lt;br /&gt;There was been some rework in &lt;a href="https://github.com/nrfconnect/sdk-nrf/commit/3098d43ab8fd5c309cfc92a6ac6b60d30a93a236" rel="noopener noreferrer" target="_blank"&gt;the system mode handling&lt;/a&gt;&amp;nbsp;(not included v1.3.0), but it is included in master branch.&lt;br /&gt;So you could test this out by updating NCS:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;cd ncs/nrf
git checkout master
git pull
west update

#Then rebuild your project and flash it&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I would also recommend to maybe use &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/samples/nrf9160/mqtt_simple/src/main.c#L435" rel="noopener noreferrer" target="_blank"&gt;modem_configure&lt;/a&gt;() function in our NCS as reference.&lt;br /&gt;&lt;br /&gt;1. You could e.g. use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/bsdlib/doc/api.html?highlight=bsd_recoverable_error_handler#_CPPv429bsd_recoverable_error_handler8uint32_t" rel="noopener noreferrer" target="_blank"&gt;bsd_recoverable_error_handler &lt;/a&gt;function and add the necessary operations in that function. (e.g. in &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/master/samples/nrf9160/at_client/src/main.c#L13" rel="noopener noreferrer" target="_blank"&gt;at_client we have a print out&lt;/a&gt;)&lt;br /&gt;2. You could try to use&amp;nbsp;&lt;span&gt;bsd_shutdown() and then&amp;nbsp;bsd_init() for this reset functionality.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>