<?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>nRF52832 reinitialize the UART</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/54461/nrf52832-reinitialize-the-uart</link><description>Hello. 
 I am working on ble project and using uart communication between bluetooth and stm32. I need to reinitialize uart module in case of any error in event handler but I don&amp;#39;t know how to do. I found an example that was used serial_dfu_transport_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Nov 2019 12:15:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/54461/nrf52832-reinitialize-the-uart" /><item><title>RE: nRF52832 reinitialize the UART</title><link>https://devzone.nordicsemi.com/thread/221060?ContentTypeID=1</link><pubDate>Wed, 20 Nov 2019 12:15:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e30d515c-946b-443e-83b3-32db27d583e5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;You should probably try to figure out why the errors happen in the first place.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you get regular errors from the UART driver it is pointing to some issue on the bus itself, or in the configuration of the two devices, that leads to signalling issues.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you checked the UART lines with a scope to see if you can actually spot the issue on the bus?&lt;/p&gt;
&lt;p&gt;What UART settings are you using?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 reinitialize the UART</title><link>https://devzone.nordicsemi.com/thread/220740?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 08:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51eff2f9-9eb9-44fc-8db1-d5fe37d2cbff</guid><dc:creator>Maud</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;That&amp;#39;s what i try to learn. What happens in case of any error? What should i do? I am confused.&lt;/p&gt;
&lt;p&gt;Best regards&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 reinitialize the UART</title><link>https://devzone.nordicsemi.com/thread/220728?ContentTypeID=1</link><pubDate>Tue, 19 Nov 2019 08:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08460fc3-7f37-4fb7-b305-8d701195378a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That seems overkill, you shouldn&amp;#39;t have to run all that code in case of an error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What happens if you leave the event handler empty?&lt;br /&gt;Does the UART stop functioning?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 reinitialize the UART</title><link>https://devzone.nordicsemi.com/thread/220605?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2019 13:58:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddcac17c-4e9c-4d70-91c1-ccb9ea6f73ae</guid><dc:creator>Maud</dc:creator><description>&lt;p&gt;I am using UART0 and i don&amp;#39;t use dfu. I wrote the code below.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if (p_event-&amp;gt;type == NRF_DRV_UART_EVT_ERROR) {&lt;br /&gt; /* Clear all events. */&lt;br /&gt; nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_TXDRDY);&lt;br /&gt; nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXDRDY);&lt;br /&gt; nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_RXTO);&lt;br /&gt; nrf_uart_event_clear(NRF_UART0, NRF_UART_EVENT_ERROR); &lt;br /&gt; /* Uninitialize the UART driver. */&lt;br /&gt; nrf_drv_uart_uninit(&amp;amp;uart);&lt;br /&gt; /* Initialize the UART. */&lt;br /&gt; uart_init();&lt;br /&gt; }&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 reinitialize the UART</title><link>https://devzone.nordicsemi.com/thread/220575?ContentTypeID=1</link><pubDate>Mon, 18 Nov 2019 13:03:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0d59c42-5d4a-48b6-b154-aec31072dbf5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which UART driver are you using?&lt;/p&gt;
&lt;p&gt;It shouldn&amp;#39;t be necessary to re-initialize the UART in the cause of a UART error, it is just meant as a notification to the application that there might be issues on the UART bus.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Using the serial_dfu_transport library in place of one of the regular UART drivers is not recommended, unless you want to use DFU over UART.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>