<?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>Libuarte ppi linker errors</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105570/libuarte-ppi-linker-errors</link><description>My app is similar to BLE UART example. I have some UART errors when data is ent too fast so I&amp;#39;m trying to move to LIBUARTE as described in this ticket but I&amp;#39;m getting linker errors as below. 
 
 I&amp;#39;m sure this is simple but I&amp;#39;m hitting a wall... can you</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 13 Nov 2023 10:14:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105570/libuarte-ppi-linker-errors" /><item><title>RE: Libuarte ppi linker errors</title><link>https://devzone.nordicsemi.com/thread/455259?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 10:14:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36ababc5-aa98-40c3-94f4-3348d3af7de5</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;I was using APP_IRQ_PRIORITY_LOWEST for the uart, which was the setting originally in the ble_app_uart example. I had to change it because nrf_libuarte_async_init specifically checks it and returns an invalid parameter error.&lt;/p&gt;
&lt;p&gt;Anyway you may as well close this ticket as I need retarget and it is starting to look lile a rabbit hole. I have managed to tighten my UART event handler enough and tweak code to mitigate against buffer overruns (for context, uart is only used for a CLI here. Errors happened when the CLI commands come from a host running a script. This is maintenance of an exisiting project so I want to minimise the work I need to do on it).&lt;/p&gt;
&lt;p&gt;I would like to know how one can recover from a buffer overrun, but I&amp;#39;ll raise a seperate ticket for that if I can&amp;#39;t find an answer.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Libuarte ppi linker errors</title><link>https://devzone.nordicsemi.com/thread/455253?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2023 09:54:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6214257-f208-49ea-b417-cb52048bcc9d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Nick_RA"]OK I found out why that was failing. I needed to increase the IRQ level when initialising nrf_libuarte_async_config for whatever reason.[/quote]
&lt;p&gt;Which priority are you using now? It would be interesting to know which other interrupts and priorities you&amp;nbsp;have in the system and if you were able to figure out why you needed to increase the priority.&lt;/p&gt;
[quote user="Nick_RA"]Now I can build OK. However when I run, only the 1st 16 bytes of the text string is transmitted during the uart_int routine. (error code is 0).[/quote]
&lt;p&gt;Is it always 16 bytes? And does that depend on other parts of your application (what if you comment out/remove most other parts if that is possible, for a test). I ask because it is difficult to see where that limitation comes from (the nRF52840 has a 8 bit DMA length field, so the maximum size that can be sent in one go i 255 bytes. Can you define DEBUG_NRF and test again, as that will enable the asserts?&lt;/p&gt;
[quote user="Nick_RA"]Also printf doesn&amp;#39;t work anymore. I have retarget enabled and it was working fine before I changed over to this new uart method. I notice printf isn&amp;#39;t used in the modified example I mentioned in my OP, should it work with this library?[/quote]
&lt;p&gt;Retarget does not work with libuarte out of the box. You&amp;nbsp;will need to modify the retarget implementation, as&amp;nbsp;described in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71384/printf-uart0-and-libuarte/293335"&gt;this post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Libuarte ppi linker errors</title><link>https://devzone.nordicsemi.com/thread/455168?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2023 18:11:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0f714df-769c-4553-9d13-d180f663128f</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;OK I found out why that was failing. I needed to increase the IRQ level when initialising nrf_libuarte_async_config for whatever reason.&lt;/p&gt;
&lt;p&gt;Now I can build OK. However when I run, only the 1st 16 bytes of the text string is transmitted during the uart_int routine. (error code is 0).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    static uint8_t text[] = &amp;quot;ble_app_libUARTE example started.\r\n&amp;quot;;
    static uint8_t text_size = sizeof(text);

    err_code = nrf_libuarte_async_tx(&amp;amp;libuarte, text, text_size);
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also printf doesn&amp;#39;t work anymore. I have retarget enabled and it was working fine before I changed over to this new uart method. I notice printf isn&amp;#39;t used in the modified example I mentioned in my OP, should it work with this library?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Libuarte ppi linker errors</title><link>https://devzone.nordicsemi.com/thread/455150?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2023 15:07:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f741401-7069-4b7f-b7a2-417c2b736584</guid><dc:creator>Nick_RA</dc:creator><description>&lt;p&gt;Thanks, it was PPI_ENABLED I&amp;#39;d missed.&lt;/p&gt;
&lt;p&gt;I can build now but nrf_libuarte_async_init is now failing with error 0x07. The docs only say possible error codes are NRF_SUCCESS or NRF_ERROR_INTERNAL which doesn&amp;#39;t really help. any ideas?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void uart_init(void)
{
    uint32_t                     err_code;

    nrf_libuarte_async_config_t nrf_libuarte_async_config = {
            .tx_pin     = UART_TX,
            .rx_pin     = UART_RX,
            .baudrate   = NRF_UARTE_BAUDRATE_115200,
            .parity     = NRF_UARTE_PARITY_EXCLUDED,
            .hwfc       = NRF_UARTE_HWFC_DISABLED,
            .timeout_us = 100,
            .int_prio   = APP_IRQ_PRIORITY_LOW
    };

    err_code = nrf_libuarte_async_init(&amp;amp;libuarte, &amp;amp;nrf_libuarte_async_config, uart_event_handle, (void *)&amp;amp;libuarte);
    //ERROR 0x07 HERE&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Libuarte ppi linker errors</title><link>https://devzone.nordicsemi.com/thread/455113?ContentTypeID=1</link><pubDate>Fri, 10 Nov 2023 12:50:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27bec149-8be7-4fb7-a5ab-d9298db0d34e</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you set&amp;nbsp;NRFX_PPI_ENABLED and PPI_ENABLED to 1 in your sdk_config.h? (If you don&amp;#39;t have the legacy configs in the file you don&amp;#39;t need the latter, but if you do just set both)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>