<?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>UARTE Callback not called (Using NRFX EasyDMA)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61262/uarte-callback-not-called-using-nrfx-easydma</link><description>Hi, I am a beginner, during my internship I need to evaluate the nRF9169 DK for cellular applications. 
 I successfully implemented the communication over serial by using the library &amp;quot;drivers/uart.h&amp;quot;. In order to get benefits of EasyDMA features, I decided</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 May 2020 12:34:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61262/uarte-callback-not-called-using-nrfx-easydma" /><item><title>RE: UARTE Callback not called (Using NRFX EasyDMA)</title><link>https://devzone.nordicsemi.com/thread/250440?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 12:34:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b37d72b-e15a-447a-86a3-c5baf4647990</guid><dc:creator>LucasD</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Hung,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks to your&amp;nbsp;comments, I made the changes and the callback (UARTE2) is now working, (I hadn&amp;#39;t understand that&amp;nbsp;the nrfx library is bypassing the Zephyr RTOS). Thank you for your help !&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Lucas&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE Callback not called (Using NRFX EasyDMA)</title><link>https://devzone.nordicsemi.com/thread/250434?ContentTypeID=1</link><pubDate>Mon, 18 May 2020 12:15:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f41dd78-f265-43cd-a031-0b887464561e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again Lucas,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If you have a look here:&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/1.9.0/kernel/other/interrupts.html"&gt;https://docs.zephyrproject.org/1.9.0/kernel/other/interrupts.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can find that you would need to use&amp;nbsp;&lt;span&gt;IRQ_DIRECT_CONNECT() to match the interrupt to the interrupt handler.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;But as you mentioned you can use UART2 I assume that you have modified the spm.conf to enable it in the non-secure domain ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I was testing with UART1 and here what I added to make the interrupt works:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;in prj.conf:&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NRFX_UARTE1=y
CONFIG_UART_1_NRF_UARTE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_1_INTERRUPT_DRIVEN=y
CONFIG_UART_1_NRF_FLOW_CONTROL=n&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note: both&amp;nbsp;CONFIG_UART_INTERRUPT_DRIVEN and&amp;nbsp;CONFIG_UART_1_INTERRUPT_DRIVEN are used.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And in main.c I called this:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;IRQ_DIRECT_CONNECT(UARTE1_SPIM1_SPIS1_TWIM1_TWIS1_IRQn, 0, nrfx_uarte_1_irq_handler,0);
irq_enable(UARTE1_SPIM1_SPIS1_TWIM1_TWIS1_IRQn);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The nrfx library is bypassing the Zephyr RTOS, so it&amp;#39;s why you need to use&amp;nbsp;&lt;span&gt;IRQ_DIRECT_CONNECT()&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE Callback not called (Using NRFX EasyDMA)</title><link>https://devzone.nordicsemi.com/thread/250250?ContentTypeID=1</link><pubDate>Fri, 15 May 2020 15:57:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4064109d-b451-4006-855c-a30152ff34b4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Lucas,&amp;nbsp;&lt;br /&gt;I did a quick check here and can see the same issue as you. I will check with the team and get back to you on Monday.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE Callback not called (Using NRFX EasyDMA)</title><link>https://devzone.nordicsemi.com/thread/250152?ContentTypeID=1</link><pubDate>Fri, 15 May 2020 10:56:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd021561-4c52-4557-b206-b5366042670a</guid><dc:creator>LucasD</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I followed your advices and I now toggle the led 1 when the callback is called. But still no results (the debugger never reach the breakpoint I set in the callback). I have the feeling that the cause is the configuration of the project (&amp;quot;prj.conf&amp;quot;), is there any guide that explains how to setup the configuration to use easyDMA on UART ?&lt;/p&gt;
&lt;p&gt;In the same time I worked on the timers (nrfx_timers.h) and I created an example that periodically call a function. I noticed that we need to call the function IRQ_CONNECT in order to make &amp;quot;enable&amp;quot; the interrupt. I don&amp;#39;t use this function in the uarte example,&amp;nbsp; could it be the problem ?&lt;br /&gt;&lt;br /&gt;I attached to this message the updated uarte and timers examples I made :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1qOYnxOO4wu0h6lejDumBVljWkgC8MIKH/view?usp=sharing"&gt;https://drive.google.com/file/d/1qOYnxOO4wu0h6lejDumBVljWkgC8MIKH/view?usp=sharing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1cEPeXJPlD7RkpkETcM0fyT-xciviYAUB/view?usp=sharing"&gt;https://drive.google.com/file/d/1cEPeXJPlD7RkpkETcM0fyT-xciviYAUB/view?usp=sharing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Thanks&lt;/p&gt;
&lt;p&gt;Lucas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UARTE Callback not called (Using NRFX EasyDMA)</title><link>https://devzone.nordicsemi.com/thread/249698?ContentTypeID=1</link><pubDate>Wed, 13 May 2020 11:39:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96d7605f-0692-44b6-a115-f1de8a51084b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Lucas,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I had a look at your code. I don&amp;#39;t see you use called variable in any function other than&amp;nbsp;my_uart_callback() so it&amp;#39;s most likely it will be optimized out by the compiler and you won&amp;#39;t be able to see the&amp;nbsp;my_uart_callback() being called. Instead you can try to toggle a GPIO pin for example. Or you can use RTT log to print out some logging when it get into the handler.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>