<?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>UART pin should not use AIN pin</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38001/uart-pin-should-not-use-ain-pin</link><description>Hi, 
 I init the UART pin with the AIN pin such as P0.05, but the program will run into __WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) every time. Is there anyone experience this problem, any suggestion or response is appreciated</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Sep 2018 08:39:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38001/uart-pin-should-not-use-ain-pin" /><item><title>RE: UART pin should not use AIN pin</title><link>https://devzone.nordicsemi.com/thread/147116?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 08:39:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28b21480-4ce8-4886-99d7-375e71b90a30</guid><dc:creator>vernon</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Thank you very much for your answer, I follow the&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting"&gt;debug &lt;/a&gt;steps and trace the error code, it seems that the error code number is&amp;nbsp;NRF_ERROR_DATA_SIZE(Invalid Data size), see the below shot, can you point out what&amp;#39;s wrong with the data size in my code?&amp;nbsp; and I attached the zip files which is used for uart1 application.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/app_5F00_uart1.zip"&gt;devzone.nordicsemi.com/.../app_5F00_uart1.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1536049650488v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define UART_TX_BUF_SIZE                256                                         /**&amp;lt; UART TX buffer size. */
#define UART_RX_BUF_SIZE                256                                         /**&amp;lt; UART RX buffer size. */



static void uart1_init(void)
{
uint32_t err_code;
app_uart1_comm_params_t const comm_params =
{
.rx_pin_no = 5,//14,
.tx_pin_no = 6,//16,
.rts_pin_no = 255,
.cts_pin_no = 255,
.flow_control = APP_UART1_FLOW_CONTROL_DISABLED,
.use_parity = false,
#if defined (UART_PRESENT)
.baud_rate = NRF_UART_BAUDRATE_115200
#else
.baud_rate = NRF_UARTE_BAUDRATE_115200
#endif
};

APP_UART1_FIFO_INIT(&amp;amp;comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart1_event_handle,
APP_IRQ_PRIORITY_LOWEST,
err_code);
APP_ERROR_CHECK(err_code);
}

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define UART_TX_BUF_SIZE                256                                         /**&amp;lt; UART TX buffer size. */
#define UART_RX_BUF_SIZE                256                                         /**&amp;lt; UART RX buffer size. */

static void uart_init(void)
{
uint32_t err_code;
app_uart_comm_params_t const comm_params =
{
.rx_pin_no = RX_PIN_NUMBER,
.tx_pin_no = TX_PIN_NUMBER,
.rts_pin_no = RTS_PIN_NUMBER,
.cts_pin_no = CTS_PIN_NUMBER,
.flow_control = APP_UART_FLOW_CONTROL_DISABLED,
.use_parity = false,
#if defined (UART_PRESENT)
.baud_rate = NRF_UART_BAUDRATE_115200
#else
.baud_rate = NRF_UARTE_BAUDRATE_115200
#endif
};

APP_UART_FIFO_INIT(&amp;amp;comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_event_handle,
APP_IRQ_PRIORITY_LOWEST,
err_code);
APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int main(void)
{
bool erase_bonds;

// Initialize.
uart_init();
uart1_init();
log_init();
timers_init();
buttons_leds_init(&amp;amp;erase_bonds);

}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART pin should not use AIN pin</title><link>https://devzone.nordicsemi.com/thread/146534?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 13:34:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df0bcad9-5689-4931-bf03-fbeef3ebbf85</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Vernon,&lt;/p&gt;
&lt;p&gt;Could you try to &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;debug&lt;/a&gt;&amp;nbsp;the application, and see what information the app_error_fault_handler gives out.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=uP8RYgYGRvI&amp;amp;index=7&amp;amp;list=PLx_tBuQ_KSqGHmzdEL2GWEOeix-S5rgTV" target="_blank" rel="noopener noreferrer"&gt;Debugging in Segger IDE&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Are you running this on the nrf52840 DK?&lt;/p&gt;
&lt;p&gt;Which SDK version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART pin should not use AIN pin</title><link>https://devzone.nordicsemi.com/thread/146476?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 10:11:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6feb642a-041d-4d3d-8606-f0a6fc806c1b</guid><dc:creator>vernon</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;I have tried to use the low-frequency-IO as the UART PIN, when configuring all of these IO, the program also ran into the&amp;nbsp;&lt;span&gt;&amp;nbsp;__WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info), P0.00 and P0.01 also does. &lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART pin should not use AIN pin</title><link>https://devzone.nordicsemi.com/thread/146473?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 09:25:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d4e9da8-f910-4bf7-80e6-3b4d2fea509b</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Vernon,&lt;/p&gt;
&lt;p&gt;Please keep in mind nrf52840 has only 1 UART so as a second peripheral you can use UARTE.&lt;/p&gt;
&lt;p&gt;See this&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/25173/nrf52840-uart1-not-working-in-sdk-14#post-id-168360"&gt; thread for more information.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;(&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34835/p0-06-is-always-high-level-on-the-pca10040-board/133765#133765"&gt;could also be interesting&lt;/a&gt;)&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART pin should not use AIN pin</title><link>https://devzone.nordicsemi.com/thread/146472?ContentTypeID=1</link><pubDate>Thu, 30 Aug 2018 02:53:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c6ba509-69e9-4b30-bcd3-af0eb4346c03</guid><dc:creator>vernon</dc:creator><description>&lt;p&gt;Hi Martin,&lt;/p&gt;
&lt;p&gt;Thank you very much for the reply, it seems that it is OK when RX connect to&amp;nbsp; P0.06 and TX connect to P0.05, but it will run into&amp;nbsp;__WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info) when RX connect to P0.05 and TX connect to P0.06. and for your information,&amp;nbsp; I am trying to use uart0 and uart1 at the same time and caused that problem.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;int main(void)&lt;br /&gt;{&lt;br /&gt; bool erase_bonds;&lt;/p&gt;
&lt;p&gt;bg96_at_app_init();&lt;br /&gt; &lt;br /&gt; // Initialize.&lt;br /&gt; uart_init();&lt;br /&gt; uart1_init();&lt;br /&gt; log_init();&lt;br /&gt; timers_init();&lt;br /&gt; buttons_leds_init(&amp;amp;erase_bonds);&lt;/p&gt;
&lt;p&gt;.....&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Vernon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART pin should not use AIN pin</title><link>https://devzone.nordicsemi.com/thread/146471?ContentTypeID=1</link><pubDate>Wed, 29 Aug 2018 13:23:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77dc111e-3667-4d45-9907-cdcbbced55cb</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Vernon,&lt;/p&gt;
&lt;p&gt;Are you sure that you are not using the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52840.ps%2Fpin.html&amp;amp;resultof=%22Pin%22%20%22pin%22%20%22assignments%22%20%22assign%22%20" target="_blank" rel="noopener noreferrer"&gt;p0.05 pin&lt;/a&gt;&amp;nbsp;for anything else?&lt;/p&gt;
&lt;p&gt;How is your defines set in BOARD_PCA10056.h ?&lt;/p&gt;
&lt;p&gt;Are you able to get out some more information &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.gs.ses%2Fdita%2Fgs%2Fdeveloping%2Fdebug.html&amp;amp;cp=1_1_0_10" target="_blank" rel="noopener noreferrer"&gt;through debugging?&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Martin L.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>