<?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 close and open(reinit)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68474/uart-close-and-open-reinit</link><description>Hello, I am using nrf52810 and S112 Softdevice. 
 After initializing uart, use uart close for uart sleep. 
 Then the uart close will be checked. 
 I want to make an uart init and bring it back to life. 
 What is the method? 
 Thank you.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Nov 2020 09:44:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68474/uart-close-and-open-reinit" /><item><title>RE: UART close and open(reinit)</title><link>https://devzone.nordicsemi.com/thread/281266?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2020 09:44:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b75e7a4-cab4-472b-a1fe-b3b6b04b7764</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Could you please let us know how you solved it after the vector catch so that others can be helped when they come across this thread?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART close and open(reinit)</title><link>https://devzone.nordicsemi.com/thread/281047?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 08:58:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43706d49-bc26-4481-9da5-882e765c5c0d</guid><dc:creator>mjr</dc:creator><description>&lt;p&gt;&lt;span&gt;I solved it. Thank you.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART close and open(reinit)</title><link>https://devzone.nordicsemi.com/thread/281014?ContentTypeID=1</link><pubDate>Fri, 20 Nov 2020 01:10:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7bcf3b0-d673-4de2-88a1-2bd86524f238</guid><dc:creator>mjr</dc:creator><description>&lt;p&gt;1.app_uart_close()&lt;br /&gt;2. nrf_drv_uart_uninit(&amp;amp;app_uart_inst);&lt;br /&gt;3. We don&amp;#39;t know what the nrf_drv_uart_uninit is doing after that.&lt;br /&gt;-&amp;gt; &amp;quot;stopped by vector catch&amp;quot; occurs and does not know where it is going.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know what to modify in app_uart_FIFO.....&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART close and open(reinit)</title><link>https://devzone.nordicsemi.com/thread/280866?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 11:51:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:383e5c96-ebbb-49c4-a245-c3f70edfae3b</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I see, What error do you get when you call the uart_init the second time? You should be able to start your application in the debugger and be able to see which function fails the second time.&lt;/p&gt;
&lt;p&gt;I think the app_uart_FIFO helper macros are not designed to aid the re-initialization part, if this is the case then&amp;nbsp;we need to edit the helper macros to make them work with the reinitialization.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please provide me exactly where the call for unit_init fails? and what error does app_uart_init gives when it called the second time during the reinit process?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART close and open(reinit)</title><link>https://devzone.nordicsemi.com/thread/280800?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 09:38:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f9692b3-61a6-4909-8bec-38e974650b8e</guid><dc:creator>mjr</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;PUBLIC void uart_init(void)
{
    U32                     err_code;
    UART_CONFIG_t* p_uart = get_uart_config();
    app_uart_comm_params_t const comm_params =
    {     
        .rx_pin_no    = p_uart-&amp;gt;RX_pin_no,
        .tx_pin_no    = p_uart-&amp;gt;TX_pin_no,
        .rts_pin_no   = p_uart-&amp;gt;RTS_pin_no,
        .cts_pin_no   = p_uart-&amp;gt;CTS_pin_no,        
        .flow_control = p_uart-&amp;gt;FlowCtrl,
        .use_parity   = p_uart-&amp;gt;ParityBit,
        .baud_rate    = p_uart-&amp;gt;BaudRate
    };

    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;This is my uart init code.&lt;br /&gt;I can&amp;#39;t come back to life if I initialize again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART close and open(reinit)</title><link>https://devzone.nordicsemi.com/thread/280790?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 09:22:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a7af349-b6c8-4797-a407-8ff2443453bc</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Then use the same&amp;nbsp;app_uart_init() function to reinit the same way the uart was initialized the first time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART close and open(reinit)</title><link>https://devzone.nordicsemi.com/thread/280780?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 08:51:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5287d5fc-d4ea-4513-8480-e05328f6d72a</guid><dc:creator>mjr</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I cut off uart communication using &amp;quot;app_uart_close()&amp;quot; provided by libraries / uart.&lt;/p&gt;
&lt;p&gt;I want the action to disconnect the uart and reconnect it.&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART close and open(reinit)</title><link>https://devzone.nordicsemi.com/thread/280771?ContentTypeID=1</link><pubDate>Thu, 19 Nov 2020 08:31:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1b3ae68-24c4-4366-a468-449b4cc1422c</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It is a bit unclear what you are trying to do here. Which library/driver or driver are you using to close the UART after a transaction? You do not need to reinit the UART between transactions, so I am bit confused why you intend to uninit the UART? There should be a need to reinit between transactions.&lt;/p&gt;
&lt;div style="left:-36px;top:5.62216px;"&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>