<?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>NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93330/nrfx-uarte-tx-failure-using-nrf-connect-sdk-v2-1-0</link><description>I am trying to implement a simple uart echo test using nRF21540 DB board, but I always get NRFX_ERROR_FORBIDDEN when trying to transmit. 
 This is the initialization code: 
 
 then trying to transmit using this call, is always returning error: 
 
 Is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 02 Nov 2022 11:38:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93330/nrfx-uarte-tx-failure-using-nrf-connect-sdk-v2-1-0" /><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393627?ContentTypeID=1</link><pubDate>Wed, 02 Nov 2022 11:38:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a30c60c5-05f3-4388-99e6-c288d1162da5</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I can not see anything that should cause this behavior from the prj.conf alone.&lt;br /&gt;Would it be possible for you to send me a minimal version of this project that replicates this behavior, so that I may take a look at this myself?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393474?ContentTypeID=1</link><pubDate>Tue, 01 Nov 2022 13:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7554e3d4-cb2d-4030-969f-73aead1f9fff</guid><dc:creator>Hugo.Dev</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Attached my proj.conf&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;# Enabling assert
CONFIG_ASSERT=y

# Logger configuration
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n

# Enable temperature sensor
CONFIG_NRFX_TEMP=y

# Enable DC/DC Support
CONFIG_NRFX_POWER=y

# Enable RNG
CONFIG_NRFX_RNG=y
# Use XOROSHIRO PRNG
CONFIG_XOROSHIRO_RANDOM_GENERATOR=y

# Enable Timer
CONFIG_NRFX_TIMER2=y

# Enabling radio driver
CONFIG_NRF_802154_RADIO_DRIVER=y

# Allow sharing the RTC between IEEE 802.15.4 and Zephyr
CONFIG_NRF_RTC_TIMER_USER_CHAN_COUNT=2

# Workaround for a bug in the MPSL Glue Layer (not required for nRF52840)
CONFIG_BT=y

# Enable ring buffers
CONFIG_RING_BUFFER=y

# Set temperature sensor update period in ms
CONFIG_NRF_802154_TEMPERATURE_UPDATE_PERIOD=10000

CONFIG_NRF_802154_ENCRYPTION=n

# Shell configuration
CONFIG_SHELL=y
CONFIG_SHELL_PROMPT_UART=&amp;quot;&amp;gt;&amp;quot;
CONFIG_SHELL_VT100_COLORS=n

#enable qspi
CONFIG_NRFX_QSPI=y

#enable spi
CONFIG_NRFX_SPI0=y

#enable uart
CONFIG_NRFX_UARTE1=y

# Debug configuration
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_DEBUG_THREAD_INFO=y

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then, I dont have any custom overlay file.&lt;/p&gt;
&lt;p&gt;My project is using the default nrf52840dk_nrf52840.dts located at&amp;nbsp;ncs\v2.1.0\zephyr\boards\arm\nrf52840dk_nrf52840&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393464?ContentTypeID=1</link><pubDate>Tue, 01 Nov 2022 12:44:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9cac4fe-613d-45cc-bfcd-ce58d0156ba8</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Hugo.Dev"]Providing handler, it halts everything when trying to TX. Shell thread got unresponsive.[/quote]
&lt;p&gt;Halts, without any returned error codes?&lt;br /&gt;Do you have a minimal example that demonstrates this behavior, that you could share with me, in its entirety, so that I may take a look?&lt;/p&gt;
[quote user="Hugo.Dev"]I am not sure about the power management, the only I can see enabled in proj.conf is&amp;nbsp;CONFIG_NRFX_POWER=y[/quote]
&lt;p&gt;Could you share with me your entire prj.conf, and any other overlays that are active in the build configuration here?&lt;br /&gt;The Power management I referenced in my previous comment is governed by &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_PM"&gt;the CONFIG_PM Kconfig&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393274?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 14:19:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:523cd153-2e3b-49c6-aec9-676d5b434363</guid><dc:creator>Hugo.Dev</dc:creator><description>&lt;p&gt;Providing handler, it halts everything when trying to TX. Shell thread got unresponsive.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am not sure about the power management, the only I can see enabled in proj.conf is&amp;nbsp;CONFIG_NRFX_POWER=y&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393271?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 14:08:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70c57769-c500-4d93-a065-ebeb3ea041a6</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="Hugo.Dev"]I am trying to use it in blocking mode. But tried providing handler too and it is failing in a different way.[/quote]
&lt;p&gt;Could you elaborate on how it fails in this case?&lt;/p&gt;
[quote user="Hugo.Dev"]Talking about blocking mode, I am not triggering TXSTOP. And yes, it happens every time, the call to&amp;nbsp;&lt;strong&gt;nrf_uarte_event_check(p_instance-&amp;gt;p_reg, NRF_UARTE_EVENT_TXSTOPPED)&lt;/strong&gt; returns always true[/quote]
&lt;p&gt;Are you using the power manager in your application?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393269?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 14:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5607f69a-6039-4a50-b8cc-f0ede136e9c2</guid><dc:creator>Hugo.Dev</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;I am trying to use it in blocking mode. But tried providing handler too and it is failing in a different way.&lt;/p&gt;
&lt;p&gt;Talking about blocking mode, I am not triggering TXSTOP. And yes, it happens every time, the call to&amp;nbsp;&lt;strong&gt;nrf_uarte_event_check(p_instance-&amp;gt;p_reg, NRF_UARTE_EVENT_TXSTOPPED)&lt;/strong&gt; returns always true.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am using SPI0 and QSPI (afaik there is only one, just enabling it with CONFIG_NRFX_QSPI=y)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393250?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2022 13:21:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4a110bc-552a-44df-8a5a-6b3767920d85</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
[quote user="Hugo.Dev"]thanks for your answer[/quote]
&lt;p&gt;No problem, I am happy to help! :)&amp;nbsp;&lt;/p&gt;
[quote user="Hugo.Dev"]&lt;p&gt;This is the log where I get the error code:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;Function: nrfx_uarte_tx, error code: NRFX_ERROR_FORBIDDEN.failed!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;am checking the error code returned by&amp;nbsp;nrfx_uarte_tx, that´s where I get the error.&lt;/p&gt;
&lt;p&gt;I am using QSPI, SPI and a couple of GPIOs. Then zephyr shell uart is enabled, using UART0.&lt;/p&gt;[/quote]
&lt;p&gt;Thank you for elaborating. &lt;br /&gt;Which instances are you using for the QSPI/SPI?&lt;br /&gt;The call to nrfx_uarte_tx fails with NRFX_ERROR_FORBIDDEN when you have not provided a handler to your UARTE peripheral during initialization, which means you are using it in blocking mode, and then triggering a TXSTOP task before the call to TX has completed.&lt;br /&gt;Are you triggering this manually &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/uarte.html"&gt;elsewhere in the code, perhaps to reduce power consumption&lt;/a&gt;?&lt;br /&gt;If not, does this happen every time you attempt to call nrfx_uarte_tx? Does &lt;a href="https://github.com/NordicSemiconductor/nrfx/blob/23fb4437c08a9edfdf6d34f002322f693a15e8fe/drivers/src/nrfx_uarte.c#L434"&gt;the call to nrf_uarte_event_check always return true&lt;/a&gt;&amp;nbsp;when you debug this issue?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393018?ContentTypeID=1</link><pubDate>Fri, 28 Oct 2022 12:23:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8af21fa-6b41-4201-b0b1-a5904e763f87</guid><dc:creator>Hugo.Dev</dc:creator><description>&lt;p&gt;Hi, thanks for your answer&lt;/p&gt;
&lt;p&gt;This is the log where I get the error code:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;strong&gt;Function: nrfx_uarte_tx, error code: NRFX_ERROR_FORBIDDEN.failed!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;am checking the error code returned by&amp;nbsp;nrfx_uarte_tx, that&amp;acute;s where I get the error.&lt;/p&gt;
&lt;p&gt;I am using QSPI, SPI and a couple of GPIOs. Then zephyr shell uart is enabled, using UART0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRFX UARTE TX failure (using nRF connect SDK v2.1.0)</title><link>https://devzone.nordicsemi.com/thread/393013?ContentTypeID=1</link><pubDate>Fri, 28 Oct 2022 12:12:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cadfc763-30ab-4f6c-9a5e-98ec2b73a241</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Could you please show the entire log where you receive the error code?&lt;br /&gt;I notice that the nrfx_uarte_tx call does not check its return value. Is this the exact section of the code that returns the error, or could it be returned elsewhere?&lt;br /&gt;What other peripherals are you using concurrently in your project, are there any other serial interfaces enabled when this happens? If so, which, and which instances are they running on?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>