<?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>nRF9160 AT client UART0 pins reassignment issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63506/nrf9160-at-client-uart0-pins-reassignment-issue</link><description>Hi, I have a custom board based on nRF9160 for which I created custom .dts following porting guide. It seems TX isn&amp;#39;t sending anything (stay close to 0V) - config I have is: tx-pin = &amp;lt;8&amp;gt;; rx-pin = &amp;lt;9&amp;gt;; for &amp;amp;uart0, no handshake, reset level at 2.7V. Checked</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jul 2020 18:39:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63506/nrf9160-at-client-uart0-pins-reassignment-issue" /><item><title>RE: nRF9160 AT client UART0 pins reassignment issue</title><link>https://devzone.nordicsemi.com/thread/260229?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 18:39:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:690ca7d3-2793-4ee9-acc1-9ae1b9fd1356</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you try to configure the UART according to&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/README.html#external-mcu-configuration"&gt;External MCU configuration&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;It says that flow control should be used, so you could try to either add RTS and CTS in your custom board folder or through an overlay file.&lt;/p&gt;
&lt;p&gt;You could test it with an nRF52 DK first, to make sure it&amp;#39;s working, then swap it with your external MCU.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 AT client UART0 pins reassignment issue</title><link>https://devzone.nordicsemi.com/thread/259795?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 06:42:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc85520d-223e-4d05-9b0d-29d9c7c3e519</guid><dc:creator>Smart.Enrg</dc:creator><description>&lt;p&gt;Hi Simon,&lt;br /&gt;&lt;br /&gt;Following Erase All in nRF connect/ programmer - do I need to flash modem f/w, before flashing my app (SLM or AT client) hex?&lt;br /&gt;&lt;br /&gt;Best,&lt;br /&gt;SE&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 AT client UART0 pins reassignment issue</title><link>https://devzone.nordicsemi.com/thread/259776?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 01:57:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c301d939-159c-4789-8cc5-a6e716d9cbb7</guid><dc:creator>Smart.Enrg</dc:creator><description>&lt;p&gt;Here are some more inputs -- I think this might explain how failing (stopped) RX could hold back TX (missing response to AT command). Not sure what&amp;#39;s the root cause of these warnings emanating from uart_callback()&lt;/p&gt;
&lt;p&gt;Guess the question is - what might cause this to happen, what&amp;#39;s different in my (custom .dts) case compared&amp;nbsp; to DK/ profile?&lt;/p&gt;
&lt;p&gt;Please advise.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1594691621477v1.png" /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 AT client UART0 pins reassignment issue</title><link>https://devzone.nordicsemi.com/thread/259585?ContentTypeID=1</link><pubDate>Sun, 12 Jul 2020 15:44:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76dd463b-e1ef-4eda-827d-489ceeb69888</guid><dc:creator>Smart.Enrg</dc:creator><description>&lt;p&gt;Thanks Simon,&lt;br /&gt;&lt;br /&gt;The Tx, Rx pin settings reflected in various config/ build files that you pointed to - they all seem to check out ok in my case.&lt;br /&gt;Still no luck sending data; so couple of follow-up questions:&amp;nbsp;&lt;br /&gt;1) When I try this same SLM app on nRF9160-DK (v0.9.0), built with its own (nrf9160dk_nrf9160_common.dts) profile.&lt;br /&gt;&amp;nbsp; &amp;nbsp; It works well. Though what I noticed, there I need to select COM15 in Link Monitor (VCOM14,15,16 associated with this&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; DK). Is VCOM15 associated with/ mapped to UART0 or UART1 on nRF9160-SiP? BTW my prj.conf for this build too, is&lt;br /&gt;&amp;nbsp; &amp;nbsp; calling for UART0. Also, what does &amp;quot;CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2&amp;quot; (i.e. Async and Timer=2) mean?&lt;br /&gt;2) UART0 in&amp;nbsp;&amp;nbsp;&lt;span&gt;nrf9160dk_nrf9160_common.dts specify RTS, CTS, which I don&amp;#39;t use in my custom profile (.dts). Could that&amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; mean original SLM app (DK build) is calling for/ require handshaking? which I&amp;#39;m not using - that will explain unable to&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; send too.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Tried your suggestion about setting breakpoints inside&amp;nbsp;&lt;em&gt;uart_rx_handler() from&lt;/em&gt; slm_at_host.c. One breakpoint set right after entering rx handler and another right after &amp;quot;send:&amp;quot; label. None of the break points are hit when I send a simple AT\r\n. So, I&amp;nbsp;&lt;br /&gt;am trying to trace where it&amp;#39;s lost? I can see/ by probing P0.09 of nRF9160-SiP from an external USB serial connection that&amp;nbsp;&lt;br /&gt;correct command stream does hit rx-pin (P0.09) = 0x41 0x54 0x0D 0x0A. Now the only things left to suspect is TX signal level (2.6V) that&amp;#39;s connected to rx-pin (P0.09) - it should be valid (VIH) level for proper rx-pin detection, but please confirm&amp;nbsp;&lt;br /&gt;that for me. As mentioned the external processor I am using to interface with nRF9160-SiP - IO levels on that are 2.7v nominal. I do have a level shifter on nRF91 tx-pin so as to not violate 2.7V rx input on the external processor host.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Please advise. Thanks again.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Best,&lt;br /&gt;SE&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 AT client UART0 pins reassignment issue</title><link>https://devzone.nordicsemi.com/thread/259564?ContentTypeID=1</link><pubDate>Sat, 11 Jul 2020 19:30:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06c86ff3-e49e-4c32-a245-66edb6b9aebd</guid><dc:creator>Simon</dc:creator><description>[quote user="SmartEnrg"]Am I supposed to modify any other file (other than the .dts attached)? I read somewhere about overlay file -&amp;nbsp;&lt;br /&gt;what does that do?[/quote]
&lt;p&gt;The overlay file can be used to overwrite the fields of the DTS nodes in the board folder (e.g. the rx and tx pins of uart0). However, it shouldn&amp;#39;t be necessary in your case, since the tx and rx pin are set to the desired values.&lt;/p&gt;
[quote user="SmartEnrg"]Also, for config changes - am I supposed to change prj.conf or menuconfig/ defconfig?[/quote]
&lt;p&gt;&amp;nbsp;Since you&amp;#39;re using uart0, make sure&amp;nbsp;CONFIG_SLM_CONNECT_UART_0=y and CONFIG_SLM_CONNECT_UART_2=n, you can confirm that the configurations are set correctly by checking the file&amp;nbsp;&lt;em&gt;ncs\v1.3.0\nrf\applications\serial_lte_modem\build\zephyr\include\generated\autoconf.h&amp;nbsp;&lt;/em&gt;(you have to build your application first).&amp;nbsp;&lt;/p&gt;
[quote user="SmartEnrg"]Another observation, - I see nrf9160dk_nrf9160ns.overlay in \ncs\v1.3.0\nrf\applications\serial_lte_modem&amp;nbsp;&lt;br /&gt;but I don&amp;#39;t see one for my custom board profile. Should there be one?[/quote]
&lt;p&gt;I looked inside the file&amp;nbsp;&lt;em&gt;ncs\v1.3.0\nrf\applications\serial_lte_modem\nrf9160dk_nrf9160ns.overlay&amp;nbsp;&lt;/em&gt;and saw that it only configured uart2. You are using uart0, and it&amp;nbsp;is already configured in the file&amp;nbsp;&lt;em&gt;nrf9160_nRFstamp91_common_dts.txt&lt;/em&gt;, so I don&amp;#39;t think you need to add an overlay file for your board.&lt;/p&gt;
&lt;p&gt;One way to check if the fields for uart0 is set correctly is to look inside the file&amp;nbsp;&lt;em&gt;ncs\v1.3.0\nrf\applications\serial_lte_modem\build\zephyr\include\generated\devicetree_unfixed.h. &lt;/em&gt;Check if&amp;nbsp;DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin (I think that is the correct name) is equal to 8.&lt;/p&gt;
&lt;p&gt;A cleaner approach is to run&amp;nbsp;printk(&amp;quot;TX pin: %d\n&amp;quot;DT_PROP(DT_NODELABEL(uart0), tx_pin)) in &lt;em&gt;ncs\v1.3.0\nrf\applications\serial_lte_modem/src/main.c--&amp;gt;main().&lt;/em&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;Could you check one thing?&amp;nbsp;The application slm_at_host.c won&amp;#39;t send data (use tx pin), until it has received&amp;nbsp;(use rx pin) a complete AT command in &lt;em&gt;uart_rx_handler()&lt;/em&gt;,&amp;nbsp;submitted a work queue item which triggers cmd_send(), sent it to the modem, received a response from the modem. Then it will send the response (use the tx pin).&lt;/p&gt;
&lt;p&gt;Could you set a breakpoint or add some logging at the bottom of&amp;nbsp;&lt;span&gt;static&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;uart_rx_handler&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;..&lt;/span&gt;&lt;span&gt;):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;tatic void uart_rx_handler(u8_t character)
{
    .
    .
    .
send:
    //Check if it goes here
	uart_rx_disable(uart_dev);
	k_work_submit(&amp;amp;cmd_send_work);
	at_buf_len = cmd_len;
	cmd_len = 0;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You could also do some debugging in&amp;nbsp;&lt;/span&gt;cmd_send() and check if&amp;nbsp;rsp_send() runs.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 AT client UART0 pins reassignment issue</title><link>https://devzone.nordicsemi.com/thread/259312?ContentTypeID=1</link><pubDate>Fri, 10 Jul 2020 04:21:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa70f38e-508f-4d66-8fd9-6001668faba8</guid><dc:creator>Smart.Enrg</dc:creator><description>&lt;p&gt;Thanks Simon,&lt;br /&gt;&lt;br /&gt;Please see .dts and prj,conf attached - had to change file extensions to get rid of file upload errors here to this &lt;br /&gt;ticket. Also note my software setup details and key pin measurements:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Software/ Firmware version/ settings:&amp;nbsp;&lt;br /&gt;* modem f/w v1.2.0 - programmed first (after erase all) using nRF Connect desktop (v3.4.1)/ Programmer (v1.4.3)&lt;br /&gt;* after modem f/w - next I flash Erase/ Write serial_link_modem from nrf connect sdk (ncs) v1.3.0. This hex built&amp;nbsp;&lt;br /&gt;&amp;nbsp; using SES and custom dts (attached).&lt;/p&gt;
&lt;p&gt;Key pin measurements:&amp;nbsp;&lt;br /&gt;* VDD 3.3V&lt;br /&gt;* Reset pin (driven from external processor) 2.7V&lt;br /&gt;&lt;br /&gt;The problem I&amp;#39;m facing, despite correct (uart0) settings in .config - nRF9160 doesn&amp;#39;t seem to drive tx-pin (8).&lt;br /&gt;Am I supposed to modify any other file (other than the .dts attached)? I read somewhere about overlay file -&amp;nbsp;&lt;br /&gt;what does that do? Also, for config changes - am I supposed to change prj.conf or menuconfig/ defconfig?&lt;/p&gt;
&lt;p&gt;Another observation, - I see nrf9160dk_nrf9160ns.overlay in \ncs\v1.3.0\nrf\applications\serial_lte_modem&amp;nbsp;&lt;br /&gt;but I don&amp;#39;t see one for my custom board profile. Should there be one?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/prj_5F00_conf.txt"&gt;devzone.nordicsemi.com/.../prj_5F00_conf.txt&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf9160_5F00_nRFstamp91_5F00_common_5F00_dts.txt"&gt;devzone.nordicsemi.com/.../nrf9160_5F00_nRFstamp91_5F00_common_5F00_dts.txt&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best,&lt;br /&gt;SE&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 AT client UART0 pins reassignment issue</title><link>https://devzone.nordicsemi.com/thread/259054?ContentTypeID=1</link><pubDate>Wed, 08 Jul 2020 22:38:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a85e41b4-9297-458c-b73f-56eb2052d4d3</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Could you upload your sample or a simplified version of it? Then I&amp;#39;ll test it myself and see if there is something wrong with the DTS files or the configuration.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>