<?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 framing errors in serial_lte_modem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64277/how-to-disable-framing-errors-in-serial_lte_modem</link><description>I&amp;#39;m working with SDK 1.30 and the new application serial_lte_modem (moved from samples to applications in this SDK version). 
 However when my control hardware tries to communicate, it will auto-baud to get started. 
 This almost certainly causes Framing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Jul 2020 12:27:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64277/how-to-disable-framing-errors-in-serial_lte_modem" /><item><title>RE: How to disable framing errors in serial_lte_modem</title><link>https://devzone.nordicsemi.com/thread/262574?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2020 12:27:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d45962c-4820-4dee-887f-53f95e60b777</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="KeithC"]I figure Nordic may correct this in a future release, as I saw another question within the past week where this was mentioned (I can&amp;#39;t find it now), and that this is a known issue.&amp;nbsp;[/quote]
&lt;p&gt;Yes, you&amp;#39;re right! Thank you for investigating. I will add a link to your thread in the already made internal bug report.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable framing errors in serial_lte_modem</title><link>https://devzone.nordicsemi.com/thread/262431?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2020 13:38:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e51f8c9-a32f-4608-9f19-a3c9ee597c2a</guid><dc:creator>Caycee</dc:creator><description>&lt;p&gt;I&amp;#39;m using CR_MODE.&amp;nbsp; I didn&amp;#39;t bother with the other modes for the time being.&lt;/p&gt;
&lt;p&gt;I inserted that in cmd_send just prior to at_cmd_write.&amp;nbsp; It fixed the issue I was having when just a single &amp;#39;\r&amp;#39; being received caused an ignore-everything-else mode.&lt;/p&gt;
&lt;p&gt;I figure Nordic may correct this in a future release, as I saw another question within the past week where this was mentioned (I can&amp;#39;t find it now), and that this is a known issue.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable framing errors in serial_lte_modem</title><link>https://devzone.nordicsemi.com/thread/262338?ContentTypeID=1</link><pubDate>Thu, 30 Jul 2020 09:12:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:095af19f-2bde-42af-978e-dda7b13a0fc8</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="KeithC"]I still ought to be able to clear the error from user application and reset things so further communications are possible. Is there such a command in the API or is that all in the protected/secure area?[/quote]
&lt;p&gt;The driver should clear it for you when an error event is set:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/v2.3.0-rc1-ncs1/drivers/serial/uart_nrfx_uarte.c#L721"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/v2.3.0-rc1-ncs1/drivers/serial/uart_nrfx_uarte.c#L721&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;This function call essentially reads the NRF_UARTEx-&amp;gt;ERRORSRC register, and&amp;nbsp;writes &amp;#39;1&amp;#39; to the bits that are set (which clears the source)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="KeithC"]I also had to include the following code in cmd_send in slm_at_host.c to assure blank lines would not stop up the modem...though I&amp;#39;m not sure this is the best way to handle it.[/quote]
&lt;p&gt;&amp;nbsp;You insert this logic in slm_at_host.c::&lt;span&gt;cmd_send&lt;/span&gt;()? Which termination mode are you currently using? Does procedure lock up the device?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable framing errors in serial_lte_modem</title><link>https://devzone.nordicsemi.com/thread/262248?ContentTypeID=1</link><pubDate>Wed, 29 Jul 2020 17:02:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71184fdd-820a-47ce-b882-ed37dc411388</guid><dc:creator>Caycee</dc:creator><description>&lt;p&gt;Okay, that change does allow the modem to resume (often with an error on the next command).&lt;/p&gt;
&lt;p&gt;I still ought to be able to clear the error from user application and reset things so further communications are possible. Is there such a command in the API or is that all in the protected/secure area?&lt;/p&gt;
&lt;p&gt;I also had to include the following code in cmd_send in slm_at_host.c to assure blank lines would not stop up the modem...though I&amp;#39;m not sure this is the best way to handle it.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    if ((strlen(at_buf) == 1) &amp;amp;&amp;amp; (at_buf[0] == &amp;#39;\r&amp;#39;)) 
    {
        LOG_WRN(&amp;quot;CR_only&amp;quot;);
        at_buf[0] = 0;
        goto done;
    }
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to disable framing errors in serial_lte_modem</title><link>https://devzone.nordicsemi.com/thread/262187?ContentTypeID=1</link><pubDate>Wed, 29 Jul 2020 12:40:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:948e363f-bdb6-4939-a2bb-17b1103e7d3a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It looks like you have stumbled upon a bug on our side! My apologies for the inconvenience!&lt;/p&gt;
&lt;p&gt;When a framing error occurs, this sequence will be called:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/drivers/serial/uart_nrfx_uarte.c#L732-L733"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/master/drivers/serial/uart_nrfx_uarte.c#L732-L733&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However; the RX isn&amp;#39;t actually stopped when the callback is sent, but rather afterwards, which makes it quite hard for the application to recover. I&amp;#39;ll make an internal ticket on this, and propose that we do not stop the RX in uart_nrfx_uarte.c,&amp;nbsp;or change the order of the user-callback and the stopping of the UARTE RX, so that the application can start it again by calling uart_rx_enable(...) from the user-callback.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As I see it, you have two options here to work around the issue:&lt;/p&gt;
&lt;p&gt;1. Comment out the call to&amp;nbsp;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;uarte_nrfx_rx_disable&lt;/span&gt;&lt;span&gt;(dev);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;2. Change the ordering of the above linked two lines, and call uart_rx_enable() in your application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>