<?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>Zephyr + Argon (nRF52840) + UART with interrupts</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64675/zephyr-argon-nrf52840-uart-with-interrupts</link><description>Howdy, 
 I&amp;#39;m trying to get Zypher up and running with the Particle Argon board using the nRF52840 chipset. The goal is to get both Bluetooth and UART working, but for now the question is, &amp;quot;How do I enable UART0 with interrupts&amp;quot;. 
 Background: I&amp;#39;m using</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 11 Aug 2020 17:20:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64675/zephyr-argon-nrf52840-uart-with-interrupts" /><item><title>RE: Zephyr + Argon (nRF52840) + UART with interrupts</title><link>https://devzone.nordicsemi.com/thread/264126?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 17:20:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31293e63-2029-4458-bcff-24113d831b64</guid><dc:creator>amcelroy</dc:creator><description>&lt;p&gt;Ok, so I figured it out. After reading the &lt;a href="https://docs.platformio.org/en/latest/frameworks/zephyr.html?highlight=zephyr#tutorials"&gt;PlatformIO docs on Zephyr&lt;/a&gt;, they require the prj.conf file in the Zephyr folder along with the CMakeLists.txt file. This is different than the Zephyr docs, as they request the prj.conf to be at the top level.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Secondly, any change to the prj.conf requires a Clean -&amp;gt; Build under PlatformIO. Not sure if this is a feature or a bug.&lt;/p&gt;
&lt;p&gt;The final prj.cong file UART settings that work are:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SERIAL=y
# CONFIG_UART_CONSOLE=n
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_ASYNC_API=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This unlocks all the uart functions as documented by Zephyr.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The clue was that the .config file compiled by Zephyr was not matching the prj.conf settings.&lt;/p&gt;
&lt;p&gt;Sorry for the trouble and hope this helps someone in the future.&lt;/p&gt;
&lt;p&gt;Austin&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit 1 - Thanks to Simon for confirming that the code worked on his end!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + Argon (nRF52840) + UART with interrupts</title><link>https://devzone.nordicsemi.com/thread/264088?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 13:20:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f503a844-ac67-4a27-aa9d-26f4f0ee0372</guid><dc:creator>amcelroy</dc:creator><description>&lt;p&gt;Hey Simon,&lt;/p&gt;
&lt;p&gt;Thank you for the quick response. I&amp;#39;ve updated the .conf file to read:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#CONFIG_DEBUG_OPTIMIZATIONS=y
#CONFIG_EXCEPTION_STACK_TRACE=y
#CONFIG_DEBUG_INFO=y

#BOARD_ADAFRUIT_FEATHER_NRF52840=n

#UART Config
CONFIG_SERIAL=y
# CONFIG_UART_CONSOLE=n
# CONFIG_SERIAL_SUPPORT_ASYNC=y
# CONFIG_SERIAL_SUPPORT_INTERRUPT=y

#CONFIG_UART_ASYNC_API=y
CONFIG_UART_INTERRUPT_DRIVEN=y
#CONFIG_UART_0_INTERRUPT_DRIVEN=y
CONFIG_UART_0_NRF_UARTE=y
#CONFIG_UART_ASYNC_API=y
#CONFIG_UART_NRF=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then, I tried to call&amp;nbsp;&lt;strong&gt;uart_irq_callback_set,&amp;nbsp;&lt;/strong&gt;but the compiler is still reporting, &amp;quot;undefined reference to `uart_irq_callback_set&amp;#39;&amp;quot;.&lt;/p&gt;
&lt;p&gt;Attached are the outputs of the &amp;quot;Packages&amp;quot; that Zephyr is using:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/particle_argon.html
PLATFORM: Nordic nRF52 4.4.0 &amp;gt; Particle Argon
HARDWARE: NRF52840 64MHz, 243KB RAM, 796KB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:
 - framework-zephyr 2.20300.200623 (2.3.0)
 - framework-zephyr-canopennode 0.0.0-alpha+sha.5c6b0566d5
 - framework-zephyr-civetweb 0.0.0-alpha+sha.99129c5efc
 - framework-zephyr-cmsis 0.0.0-alpha+sha.542b2296e6
 - framework-zephyr-fatfs 0.0.0-alpha+sha.9ee6b9b951
 - framework-zephyr-hal-nordic 0.0.0-alpha+sha.742d8fb839
 - framework-zephyr-libmetal 0.0.0-alpha+sha.3c3c9ec83b
 - framework-zephyr-littlefs 0.0.0-alpha+sha.0aefdda69d
 - framework-zephyr-loramac-node 0.0.0-alpha+sha.29e516ec58
 - framework-zephyr-lvgl 0.0.0-alpha+sha.74fc2e753a
 - framework-zephyr-mbedtls 0.0.0-alpha+sha.4bf099f125
 - framework-zephyr-mcuboot 0.0.0-alpha+sha.e88113bbeb 
 - framework-zephyr-mcumgr 0.0.0-alpha+sha.5885efb7ca
 - framework-zephyr-mipi-sys-t 0.0.0-alpha+sha.957d46bc3c
 - framework-zephyr-open-amp 0.0.0-alpha+sha.724f7e2a45
 - framework-zephyr-openthread 0.0.0-alpha+sha.a83d18cf18
 - framework-zephyr-segger 0.0.0-alpha+sha.6fcf61606d
 - framework-zephyr-tinycbor 0.0.0-alpha+sha.40daca97b4
 - framework-zephyr-tinycrypt 0.0.0-alpha+sha.3e9a49d267
 - framework-zephyr-trusted-firmware-m 0.0.0-alpha+sha.7de2daa196
 - tool-cmake 3.16.4
 - tool-dtc 1.4.7
 - tool-ninja 1.9.0
 - tool-sreccat 1.164.0 (1.64)
 - toolchain-gccarmnoneeabi 1.80201.190214 (8.2.1)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Zephyr + Argon (nRF52840) + UART with interrupts</title><link>https://devzone.nordicsemi.com/thread/264062?ContentTypeID=1</link><pubDate>Tue, 11 Aug 2020 12:54:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b55ab39d-a0ce-44a5-a1fd-e21e8b6f95d6</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I was able to make interrupt-based UART work by using&amp;nbsp;&lt;em&gt;uart_irq_callback_set(..)&amp;nbsp;&lt;/em&gt;which only requires CONFIG_UART_INTERRUPT_DRIVEN to be set to y (in addition to CONFIG_SERIAL, CONFIG_UART_&amp;lt;instance&amp;gt;_NRF_UARTE). Please tell me if this is sufficient for you or if you want to use the async API, then I&amp;#39;ll look into it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>