<?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>nrf52-mesh-light-switch-client-server-proxy-master add uart module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40944/nrf52-mesh-light-switch-client-server-proxy-master-add-uart-module</link><description>HI 
 I use SDK nrf52-mesh-light-switch-client-server-proxy-master with nrf52840 PDK。 
 I need uart module，so I add include path，c file to the project. 
 add header file ， uart_init function and uart event handle dunction to main.c . 
 set SDKconfig.h</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jul 2019 12:45:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40944/nrf52-mesh-light-switch-client-server-proxy-master-add-uart-module" /><item><title>RE: nrf52-mesh-light-switch-client-server-proxy-master add uart module</title><link>https://devzone.nordicsemi.com/thread/200772?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2019 12:45:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9433617b-96ea-4a33-b1e3-fdf3eab0ccf2</guid><dc:creator>Kamo</dc:creator><description>&lt;p&gt;Hi Enzo.&lt;/p&gt;
&lt;p&gt;Am strugle with the same issue.&lt;/p&gt;
&lt;p&gt;Looking at the one, you are quite succes.&lt;/p&gt;
&lt;p&gt;Could you attache project file (am guess in SES)?&lt;/p&gt;
&lt;p&gt;Thanks forward,&lt;/p&gt;
&lt;p&gt;Kamo.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52-mesh-light-switch-client-server-proxy-master add uart module</title><link>https://devzone.nordicsemi.com/thread/160056?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 16:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc7b6ad7-7222-4253-97ee-3ae63d9776c2</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;What is the value of data field of the app_uart event? From app_uart.h :&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Struct containing events from the UART module.
 *
 * @details The app_uart_evt_t is used to notify the application of asynchronous events when data
 * are received on the UART peripheral or in case an error occured during data reception.
 */
typedef struct
{
    app_uart_evt_type_t evt_type; /**&amp;lt; Type of event. */
    union
    {
        uint32_t error_communication; /**&amp;lt; Field used if evt_type is: APP_UART_COMMUNICATION_ERROR. This field contains the value in the ERRORSRC register for the UART peripheral. The UART_ERRORSRC_x defines from nrf5x_bitfields.h can be used to parse the error code. See also the \nRFXX Series Reference Manual for specification. */
        uint32_t error_code;          /**&amp;lt; Field used if evt_type is: NRF_ERROR_x. Additional status/error code if the error event type is APP_UART_FIFO_ERROR. This error code refer to errors defined in nrf_error.h. */
        uint8_t  value;               /**&amp;lt; Field used if evt_type is: NRF_ERROR_x. Additional status/error code if the error event type is APP_UART_FIFO_ERROR. This error code refer to errors defined in nrf_error.h. */
    } data;
} app_uart_evt_t;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Non-blocking means that you continue executing code when you wait for a state change instead of blocking execution:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;change_state();

while(!state_changed); // Blocking function 

do_stuff();

do_other_stuff(); // Blocked function

-------------------------- VS ----------------------------

change_state();
do_other_stuff(); // Not blocked


void some_event_handler(bool state_changed) 
{
    if(state_changed)
    {
        do_stuff();
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52-mesh-light-switch-client-server-proxy-master add uart module</title><link>https://devzone.nordicsemi.com/thread/159853?ContentTypeID=1</link><pubDate>Mon, 03 Dec 2018 02:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b9e6610-0a33-45e7-b30d-c7962df076a4</guid><dc:creator>Enzo</dc:creator><description>&lt;p&gt;sorry for the later reply.&lt;/p&gt;
&lt;p&gt;&amp;quot;a mistake&amp;quot; means the error&amp;nbsp;&lt;span&gt;APP_UART_COMMUNICATION_ERROR as same as this question.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;my example used the uart with easyDMA but I don&amp;#39;t know much about non-blocking&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52-mesh-light-switch-client-server-proxy-master add uart module</title><link>https://devzone.nordicsemi.com/thread/159521?ContentTypeID=1</link><pubDate>Thu, 29 Nov 2018 10:08:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bc54025-023e-414b-ab96-deb7dc41fd49</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I need you to define &amp;quot;a mistake&amp;quot;,&amp;nbsp; I can not help you if I do not know the nature of your problem.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;One thing that might solve your problems is using the&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/uarte.html?cp=2_0_0_5_33"&gt;UARTE — Universal asynchronous receiver/transmitter with EasyDMA&lt;/a&gt;&amp;nbsp;peripheral with the&amp;nbsp;&lt;a title="UARTE driver" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__nrfx__uarte.html?cp=4_0_0_6_9_0_31_0"&gt;UARTE driver&lt;/a&gt;&amp;nbsp;in non-blocking mode with DMA. That way your UART communication is almost completely independent from the CPU.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52-mesh-light-switch-client-server-proxy-master add uart module</title><link>https://devzone.nordicsemi.com/thread/159342?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2018 06:05:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fc23287-0277-4925-980d-b5bf03c5b979</guid><dc:creator>Enzo</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;got something new.&lt;/p&gt;
&lt;p&gt;I tried to modify FIFO BUFFER SIZE RX and TX to a maximum of 2048. I found that if sent and received 5 bytes per 200 ms. There will be no mistakes. But more than 5 bytes will make a mistake.&lt;br /&gt;In addition, I tried to modify the priority parameter in the function uart_init() to be high priority. There was no error every 200 ms when the test received and sent 20 bytes. The question now is whether changing priorities will have any other impact.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;APP_IRQ_PRIORITY_LOWEST--&amp;gt;APP_IRQ_PRIORITY_HIGH&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52-mesh-light-switch-client-server-proxy-master add uart module</title><link>https://devzone.nordicsemi.com/thread/159331?ContentTypeID=1</link><pubDate>Wed, 28 Nov 2018 02:57:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e8e5264-182e-42f1-886b-f835a6d91809</guid><dc:creator>Enzo</dc:creator><description>&lt;p&gt;Hi haakonsh.&lt;/p&gt;
&lt;p&gt;thanks for your reply.&lt;/p&gt;
&lt;p&gt;I found these defines,&lt;/p&gt;
&lt;p&gt;/* Bit 3 : Break condition */&lt;br /&gt;#define UART_ERRORSRC_BREAK_Pos (3UL) /*!&amp;lt; Position of BREAK field. */&lt;br /&gt;#define UART_ERRORSRC_BREAK_Msk (0x1UL &amp;lt;&amp;lt; UART_ERRORSRC_BREAK_Pos) /*!&amp;lt; Bit mask of BREAK field. */&lt;br /&gt;#define UART_ERRORSRC_BREAK_NotPresent (0UL) /*!&amp;lt; Read: error not present */&lt;br /&gt;#define UART_ERRORSRC_BREAK_Present (1UL) /*!&amp;lt; Read: error present */&lt;/p&gt;
&lt;p&gt;/* Bit 2 : Framing error occurred */&lt;br /&gt;#define UART_ERRORSRC_FRAMING_Pos (2UL) /*!&amp;lt; Position of FRAMING field. */&lt;br /&gt;#define UART_ERRORSRC_FRAMING_Msk (0x1UL &amp;lt;&amp;lt; UART_ERRORSRC_FRAMING_Pos) /*!&amp;lt; Bit mask of FRAMING field. */&lt;br /&gt;#define UART_ERRORSRC_FRAMING_NotPresent (0UL) /*!&amp;lt; Read: error not present */&lt;br /&gt;#define UART_ERRORSRC_FRAMING_Present (1UL) /*!&amp;lt; Read: error present */&lt;/p&gt;
&lt;p&gt;/* Bit 1 : Parity error */&lt;br /&gt;#define UART_ERRORSRC_PARITY_Pos (1UL) /*!&amp;lt; Position of PARITY field. */&lt;br /&gt;#define UART_ERRORSRC_PARITY_Msk (0x1UL &amp;lt;&amp;lt; UART_ERRORSRC_PARITY_Pos) /*!&amp;lt; Bit mask of PARITY field. */&lt;br /&gt;#define UART_ERRORSRC_PARITY_NotPresent (0UL) /*!&amp;lt; Read: error not present */&lt;br /&gt;#define UART_ERRORSRC_PARITY_Present (1UL) /*!&amp;lt; Read: error present */&lt;/p&gt;
&lt;p&gt;/* Bit 0 : Overrun error */&lt;br /&gt;#define UART_ERRORSRC_OVERRUN_Pos (0UL) /*!&amp;lt; Position of OVERRUN field. */&lt;br /&gt;#define UART_ERRORSRC_OVERRUN_Msk (0x1UL &amp;lt;&amp;lt; UART_ERRORSRC_OVERRUN_Pos) /*!&amp;lt; Bit mask of OVERRUN field. */&lt;br /&gt;#define UART_ERRORSRC_OVERRUN_NotPresent (0UL) /*!&amp;lt; Read: error not present */&lt;br /&gt;#define UART_ERRORSRC_OVERRUN_Present (1UL) /*!&amp;lt; Read: error present */&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for&amp;nbsp;your suggestion, I will try.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52-mesh-light-switch-client-server-proxy-master add uart module</title><link>https://devzone.nordicsemi.com/thread/159211?ContentTypeID=1</link><pubDate>Tue, 27 Nov 2018 11:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96083450-3f28-48df-9531-9b588ab9f239</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;&lt;span&gt;APP_UART_COMMUNICATION_ERROR&lt;br /&gt;&lt;br /&gt;From&amp;nbsp;&lt;a title="app_uart_evt_t" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/structapp__uart__evt__t.html?cp=4_0_0_6_11_57_3"&gt;app_uart_evt_t&lt;/a&gt; :&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="1" rowspan="1"&gt;uint32_t app_uart_evt_t::error_communication&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;Field used if evt_type is: APP_UART_COMMUNICATION_ERROR. This field contains the value in the ERRORSRC register for the UART peripheral. The UART_ERRORSRC_x defines from nrf5x_bitfields.h can be used to parse the error code. See also the nRF5 Series Reference Manual for specification.&lt;/p&gt;
&lt;p&gt;I need you to share the value of the UARTs ERRORSRC register.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I suggest using HW Flow Control, or the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.ps/uarte.html?cp=2_0_0_5_33"&gt;UARTE — Universal asynchronous receiver/transmitter with EasyDMA&lt;/a&gt; peripheral with&amp;nbsp;&lt;a title="UARTE driver" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__nrfx__uarte.html?cp=4_0_0_6_9_0_31_0"&gt;UARTE driver&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>