<?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 crash since uart/log disabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98906/nrf52832-crash-since-uart-log-disabled</link><description>Hi, we are facing a very strange problem on one of our product since the deployment of it&amp;#39;s last software release: 
 This product integrate an nrf52832 and unfortunately an old version of the softdevice S132 (v2.0 from sdk 11.0). 
 The problem seems to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Apr 2023 09:28:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98906/nrf52832-crash-since-uart-log-disabled" /><item><title>RE: nrf52832 crash since uart/log disabled</title><link>https://devzone.nordicsemi.com/thread/422230?ContentTypeID=1</link><pubDate>Tue, 25 Apr 2023 09:28:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c2a6862-47b2-435f-8cbd-16c7106e13ad</guid><dc:creator>opasutto</dc:creator><description>&lt;p&gt;Hi Einar, thank you for your answer.&lt;/p&gt;
&lt;p&gt;Yes all the devices are running the exact firmware, the majority don&amp;#39;t have any problem,&amp;nbsp;but&amp;nbsp;for those that have the problem, it is in the majority of the cases an easy to reproduce problem.&lt;/p&gt;
&lt;p&gt;At first I was also thinking that it could be a timing related problem. But now I think that it may be an hardware problem since I have removed all the logging in my test firmware and found that for the problematic devices, I only had&amp;nbsp;to initialize UART0&amp;nbsp;to have the problem, and to comment it to solve it. For the non problematic devices, this modification doesn&amp;#39;t have any consequence.&lt;/p&gt;
&lt;p&gt;I think it is more related to the UART controller having an influence on some other controllers as the initialisation of the RX and TX pins doesn&amp;#39;t change anything, it is really the following lines that makes all the difference:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_UART0-&amp;gt;TASKS_STARTTX = 1;
NRF_UART0-&amp;gt;TASKS_STARTRX = 1;&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Anyway, I think that I will stop investigating for the moment, I just hope that there is not some more hidden problems... Thank you again&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 crash since uart/log disabled</title><link>https://devzone.nordicsemi.com/thread/421950?ContentTypeID=1</link><pubDate>Mon, 24 Apr 2023 07:43:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8776810f-40e2-4c92-8ebb-f4d9f468801e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are the failing and non-failing devices&amp;nbsp;running the exact same firmware? Meaning the issue only occurs&amp;nbsp;in devices where you had disable logging in the firmware, but also only in a small portion of those devices?&lt;/p&gt;
&lt;p&gt;It is difficult to say what goes wrong in your firmware, but logging changes timing of the application, and the Raw UART even more so, as it is blocking. So if you have parts of your application that is sensitive to changes in timing, those issues could surface now. I am unfortunately not able to be more specific, but that is my best hypothesis.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 crash since uart/log disabled</title><link>https://devzone.nordicsemi.com/thread/421784?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 13:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5af0d3a6-77b7-4f69-9d8a-b2e83fa05235</guid><dc:creator>opasutto</dc:creator><description>&lt;p&gt;Hi, we have currently identified&amp;nbsp;about 30 devices with this issue out of several thousands. We are using the S132 2.0.0 (the one furnished with the SDK v11) and unfortunately, we aren&amp;#39;t able to update the softdevice part in our product...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On some problematic devices, it&amp;#39;s easy to reproduce the issue. For example, one one device,&amp;nbsp;the only operation needed is to connect to&amp;nbsp;it with the nRF connect mobile app, and instantanely, the connection is closed by the device:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1682083861865v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;Advertising is stopped, SPI is not responding and the only solution is to restart the device.&lt;/p&gt;
&lt;p&gt;One another device, after the power on I can observe that the advertising is started but only for 1 or 2 seconds, it is stopped without reasons.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So far for all the problematic devices, the solution to correct the problem is to add at the start of the program a call to the function log_raw_uart_init:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t log_raw_uart_init()
{
    // Disable UART
    NRF_UART0-&amp;gt;ENABLE = UART_ENABLE_ENABLE_Disabled;

    // Configure RX/TX pins
    nrf_gpio_cfg_output( TX_PIN_NUMBER );
    nrf_gpio_cfg_input(RX_PIN_NUMBER, NRF_GPIO_PIN_NOPULL);

    // Set a default baud rate of UART0_CONFIG_BAUDRATE
    NRF_UART0-&amp;gt;PSELTXD  = TX_PIN_NUMBER;
    NRF_UART0-&amp;gt;BAUDRATE = UART0_CONFIG_BAUDRATE;

    NRF_UART0-&amp;gt;PSELRTS  = 0xFFFFFFFF;
    NRF_UART0-&amp;gt;PSELCTS  = 0xFFFFFFFF;

    // Disable parity and interrupt
    NRF_UART0-&amp;gt;CONFIG   = (UART_CONFIG_PARITY_Excluded  &amp;lt;&amp;lt; UART_CONFIG_PARITY_Pos );
    NRF_UART0-&amp;gt;CONFIG  |= (UART_CONFIG_HWFC_Disabled    &amp;lt;&amp;lt; UART_CONFIG_HWFC_Pos   );

    // Re-enable the UART
    NRF_UART0-&amp;gt;ENABLE           = UART_ENABLE_ENABLE_Enabled;
    NRF_UART0-&amp;gt;INTENSET         = 0;
    NRF_UART0-&amp;gt;TASKS_STARTTX    = 1;
    NRF_UART0-&amp;gt;TASKS_STARTRX    = 1;

    return NRF_SUCCESS;
}&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And later, if I comment the line&amp;nbsp;NRF_UART0-&amp;gt;TASKS_STARTTX &amp;nbsp; &amp;nbsp;= 1; in this function,the problem reappears...&lt;/p&gt;
&lt;p&gt;So it seems that&amp;nbsp;there is a workaround to our problem, but we would like to understand what is going on, because maybe there are other problems not yet detected.&lt;/p&gt;
&lt;p&gt;Thank you again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52832 crash since uart/log disabled</title><link>https://devzone.nordicsemi.com/thread/421519?ContentTypeID=1</link><pubDate>Thu, 20 Apr 2023 13:24:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:92e0e919-74b0-4428-9abf-bad172d5f7a2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How many devices do you see this issue on? Have you been able to see a pattern for when it is triggered on the devices where you see it? If so, perhaps it is possible to find a way to reproduce the issue more easily so that it can be debugged.&lt;/p&gt;
&lt;p&gt;Which exact S132 2.0.x version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>