<?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>CONFIDENCE &amp;amp; CONFIG Settings</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119079/confidence-config-settings</link><description>Each time I attempt to use a Zephyr API on my NORDIC device, I face the mystery of what CONFIG setting are required to go with it. For example: 
 To make the Async UART API work, I consulted the Nordic&amp;#39;s API page: docs.nordicsemi.com/.../group_uart_async</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Aug 2025 18:59:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119079/confidence-config-settings" /><item><title>RE: CONFIDENCE &amp; CONFIG Settings</title><link>https://devzone.nordicsemi.com/thread/546661?ContentTypeID=1</link><pubDate>Mon, 25 Aug 2025 18:59:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cefd7170-54f0-49cf-ba43-5531d679fd7e</guid><dc:creator>Jim Logsdon</dc:creator><description>&lt;p&gt;please close this ticket&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIDENCE &amp; CONFIG Settings</title><link>https://devzone.nordicsemi.com/thread/525080?ContentTypeID=1</link><pubDate>Thu, 27 Feb 2025 13:49:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a6673fb-6b18-4bba-b40c-61803969165a</guid><dc:creator>Jim Logsdon</dc:creator><description>&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIDENCE &amp; CONFIG Settings</title><link>https://devzone.nordicsemi.com/thread/523753?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2025 15:51:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76644888-3b68-4f12-ab2e-43cf95d7d08c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For the device that you use, which seems to be a nRF52832, that only has one UART instance, it will automatically select that instance if this is set:&lt;/p&gt;
[quote user=""]&lt;span&gt;CONFIG_UART_ASYNC_API&lt;/span&gt;&lt;span&gt;=y&lt;/span&gt;[/quote]
&lt;p&gt;Then this is default y:&lt;/p&gt;
[quote user=""]CONFIG_UART_0_ASYNC=y[/quote]
&lt;p&gt;However, these are not default y:&lt;/p&gt;
[quote user=""]&lt;div&gt;&lt;span&gt;CONFIG_UART_0_NRF_HW_ASYNC=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2&lt;/span&gt;&lt;/div&gt;[/quote]
&lt;p&gt;As the first one does not have a default &amp;#39;y&amp;#39; in its definition:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_UART_0_NRF_HW_ASYNC"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_UART_0_NRF_HW_ASYNC&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nor does the async timer instance:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_UART_0_NRF_HW_ASYNC_TIMER"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/kconfig/index.html#CONFIG_UART_0_NRF_HW_ASYNC_TIMER&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, why is there multiple configurations here? The problem lies with the NRF_UARTE peripheral itself.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/uarte.html#d955e183"&gt;https://docs.nordicsemi.com/bundle/ps_nrf52832/page/uarte.html#d955e183&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It does not give you the &amp;quot;on-going&amp;quot; amount of bytes received directly in hardware (nRF54L-series gives this in the UARTE.RX.CURRENTAMOUNT register), so to be able to count the amount of bytes you&amp;#39;re receiving, you need to use the byte-for-byte event RXDRDY.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;By looking at the configuration for the &amp;quot;_HW_ASYNC&amp;quot; feature, it uses dedicated hardware peripherals (PPI and TIMER instance) to count the incoming bytes as compared to using k_timer instance(s) for timeout.&lt;/p&gt;
&lt;p&gt;The UARTE hardware peripheral on nRF52832 will effectively be able to count each incoming byte with the RXDRDY event, and using a TIMER to count + PPI will be more efficient (and accurate)&amp;nbsp;as compared to manually incrementing a byte-counter variable in a ISR.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have a TIMER instance available, the best option is to enable:&lt;/p&gt;
[quote user=""]&lt;div&gt;&lt;span&gt;CONFIG_UART_0_NRF_HW_ASYNC=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_UART_0_NRF_HW_ASYNC_TIMER=2&lt;/span&gt;&lt;/div&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I agree with your conclusion:&lt;/p&gt;
[quote user=""]My point is that I&amp;#39;m &amp;quot;guessing&amp;quot; at CONFIG settings, hoping that they are correct.&amp;nbsp; That is not engineering.&amp;nbsp;[/quote]
&lt;p&gt;The choices that you are presented with are not explained properly, which I will bring up internally.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>