<?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>nrf52840&amp;#39;s P0.21 cannot be used as libuarte&amp;#39;s uart RX？</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73847/nrf52840-s-p0-21-cannot-be-used-as-libuarte-s-uart-rx</link><description>Hello, Nordic &amp;amp; all: 
 I have a problem when use P0.21 as the libuarte&amp;#39;s uart RX( base on libuarte example/sdk17.0.2) for my custom nrf52840 board， I looked up the reference of nRF52840_PS and found the follow: 
 
 P0.08 have no recommend , P0.21 is recommended</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 May 2021 16:28:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73847/nrf52840-s-p0-21-cannot-be-used-as-libuarte-s-uart-rx" /><item><title>RE: nrf52840's P0.21 cannot be used as libuarte's uart RX？</title><link>https://devzone.nordicsemi.com/thread/308604?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 16:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:905eed27-2803-4135-992d-c18ae15d771f</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I am not sure what the problem is here, you would need to try and fail a bit.&lt;/p&gt;
&lt;p&gt;For instance finding out if it&amp;#39;s only P0.21 that is problematic may be a good point to start. It could for instance be that the example you are using have also enabled P0.21 to be used by another peripheral, so you may need to find if there are other drivers or libraries in your project that have (by default or accident) use the same pin P0.21.&lt;/p&gt;
&lt;p&gt;It could also be interesting to see if P0.21 can be used as TX, this could give some indication on whether it may be something driving the pin externally that prevent it to work as intended as RX (e.g. soldering).&lt;/p&gt;
&lt;p&gt;You can also try to add a pull-up on the P0.21 just to see if that make a difference, since a floating P0.21 can be interpreted as framing error, making the code to assert.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Overall, try and fail a bit, you will eventually find out why it does not work. Maybe you have done other changes to the example project that somehow prevent the application to work as intended, so going back to the default example project as-is from the nRF5 SDK, and only change the RX pin may be something to try.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840's P0.21 cannot be used as libuarte's uart RX？</title><link>https://devzone.nordicsemi.com/thread/308539?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 11:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d54a6ea1-ce23-4277-9785-aedf028190c4</guid><dc:creator>Chris_</dc:creator><description>&lt;p&gt;Kenneth:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for your reply,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Yes， I understand what you mean : the nrf52840DK can not use P0.21 as uart RX unless change its hardware；&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;However， I use my custom board, and It&amp;#39;s P0.21 wasn&amp;#39;t used for any external hardware, when I use it for libuarte， It didn&amp;#39;t work either.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840's P0.21 cannot be used as libuarte's uart RX？</title><link>https://devzone.nordicsemi.com/thread/308474?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 08:46:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:17dd3b25-0175-48dc-b3b0-896d0ecfad0e</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you flip the nRF52840-DK over, you can find the P0.21 is by default connected to memory. You need to change some solder bridges as shown on the back side of the nRF52840-DK.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840's P0.21 cannot be used as libuarte's uart RX？</title><link>https://devzone.nordicsemi.com/thread/308425?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 02:49:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6832c660-c9f5-4af4-9921-47999424ba46</guid><dc:creator>Chris_</dc:creator><description>&lt;p&gt;Hi, Kenneth：&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; I&amp;#39;m very sorry to reply so late because I was focus on another important thing that time；&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; According to your suggest， I verify this on nRF52840DK (SDK17.0.2) this via serial tool, and the result is：&lt;/p&gt;
&lt;p&gt;1、the default configure：TX=PIN6, RX=PIN8 , result is OK；&lt;/p&gt;
&lt;p&gt;2、custom configure：TX=PIN6， RX=PIN11， result is OK;&lt;/p&gt;
&lt;p&gt;3、custom configure：TX=PIN6， RX=PIN21, result is FAIL;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The follow is all my changed place :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//#define RX_PIN_NUMBER  8
#define RX_PIN_NUMBER  21
#define RX_PIN_NUMBER  11

#define TX_PIN_NUMBER  6
//#define TX_PIN_NUMBER  19
#define CTS_PIN_NUMBER 7
#define RTS_PIN_NUMBER 5
#define HWFC           true

//#define BSP_QSPI_SCK_PIN   19
#define BSP_QSPI_CSN_PIN   17
#define BSP_QSPI_IO0_PIN   20
//#define BSP_QSPI_IO1_PIN   21
#define BSP_QSPI_IO2_PIN   22
#define BSP_QSPI_IO3_PIN   23&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and the test log is：&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620269051380v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Can you test on your environment and verify？ why the pin21 can not used as the liburate RX?&lt;/p&gt;
&lt;p&gt;Thanks very much and look forward to your reply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840's P0.21 cannot be used as libuarte's uart RX？</title><link>https://devzone.nordicsemi.com/thread/304563?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 13:19:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba9d42ec-eed6-4a11-873d-40b263ade506</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Sorry, but it doesn&amp;#39;t make any sense, do you have a nRF52840-DK you can use for comparison?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840's P0.21 cannot be used as libuarte's uart RX？</title><link>https://devzone.nordicsemi.com/thread/304395?ContentTypeID=1</link><pubDate>Tue, 13 Apr 2021 03:08:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb2aea6b-6842-4750-80b2-6d9721167dfa</guid><dc:creator>Chris_</dc:creator><description>&lt;p&gt;Hi, Kenneth:&lt;/p&gt;
&lt;p&gt;Thanks for your quickly reply!&lt;/p&gt;
&lt;p&gt;Yes, I configured P0.21 as normal output pin to set(or clear ) the electric level, It can work fine.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52840's P0.21 cannot be used as libuarte's uart RX？</title><link>https://devzone.nordicsemi.com/thread/304255?ContentTypeID=1</link><pubDate>Mon, 12 Apr 2021 11:56:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8627b1fa-08f7-4312-bcdd-acf4911f5d29</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see any reason why P0.21 can&amp;#39;t be used as uart RX, if you are using the nRF52840-DK then the P0.21 is by default routed to external memory IC, so you need to cut and solder some solder bridges as indicated on the back of the nRF52840-DK in that case. However, if you are using your own board, then I don&amp;#39;t expect that is the problem. Are you able to toggle the P0.21 pin as a normal GPIO just to check it electrically?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>