<?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>Adding an 2nd UART to the BLE UART example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102624/adding-an-2nd-uart-to-the-ble-uart-example</link><description>I&amp;#39;m trying to get a second UART to work on my nRF52833. Following the advice of this post , I&amp;#39;ve tried merging the libuart example into the BLE peripheral example. I&amp;#39;ve added what seem to be the necessary drivers and libraries the the BLE example and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 10 Aug 2023 08:16:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102624/adding-an-2nd-uart-to-the-ble-uart-example" /><item><title>RE: Adding an 2nd UART to the BLE UART example</title><link>https://devzone.nordicsemi.com/thread/440652?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2023 08:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db7c70a7-c426-4c0b-92fd-72baebb128d2</guid><dc:creator>BBI</dc:creator><description>&lt;p&gt;Thank you, the code works now. I tested that the BLE still is able to connect and forward data over the UART, which still works fine. Hopefully this will be able to help someone else as well.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/UARTs-Working.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_uart_5F00_libuart_5F00_working.7z"&gt;devzone.nordicsemi.com/.../ble_5F00_uart_5F00_libuart_5F00_working.7z&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding an 2nd UART to the BLE UART example</title><link>https://devzone.nordicsemi.com/thread/440215?ContentTypeID=1</link><pubDate>Tue, 08 Aug 2023 05:40:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:157ca9ef-9565-41c9-af46-1d1b13a011d6</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Not at my end.&lt;br /&gt;I had to add nrfx_ppi.c and nrfx_timer.c to the project to make it compile.&lt;/p&gt;
&lt;p&gt;I see that after running your code on the board, there is an assert in nrfx_timer.c:72 where the code checks that you are not using NRF_TIMER0 for initializing the UARTE.&lt;/p&gt;
&lt;p&gt;So in the main.c:702, changing the&amp;nbsp;NRF_LIBUARTE_ASYNC_DEFINE to use TIMER2 instead of TIMER0 and enabling&amp;nbsp;TIMER2_ENABLED and&amp;nbsp;NRFX_TIMER2_ENABLED in sdk_config.h fixes the assert in your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding an 2nd UART to the BLE UART example</title><link>https://devzone.nordicsemi.com/thread/440103?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2023 12:13:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8582027b-5acf-4418-be65-665e4a9a8f66</guid><dc:creator>BBI</dc:creator><description>&lt;p&gt;I have rebuilt the same code and it compiles with 0 errors and 5 warnings. These warnings are from variables not being used, which are test variables I put into the code.&lt;br /&gt;&lt;br /&gt;Rebuild started: Project: ble_app_uart_pca10100_s140&lt;br /&gt;*** Using Compiler &amp;#39;V5.06 update 7 (build 960)&amp;#39;, folder: &amp;#39;C:\Keil_v5\ARM\ARM_Compiler_5.06u7\Bin&amp;#39;&lt;br /&gt;Rebuild target &amp;#39;nrf52833_xxaa&amp;#39;&lt;br /&gt;compiling utf.c...&lt;br /&gt;compiling ble_advdata.c...&lt;br /&gt;&lt;br /&gt;.........................&lt;br /&gt;&lt;br /&gt;..\..\..\..\..\..\components\libraries\libuarte\nrf_libuarte_async.c: 5 warnings, 0 errors&lt;br /&gt;compiling nrf_queue.c...&lt;br /&gt;compiling SEGGER_RTT_Syscalls_KEIL.c...&lt;br /&gt;compiling nrf_log_backend_serial.c...&lt;br /&gt;compiling nrf_libuarte_drv.c...&lt;br /&gt;compiling nrf_log_default_backends.c...&lt;br /&gt;compiling nrf_log_backend_rtt.c...&lt;br /&gt;compiling nrf_log_str_formatter.c...&lt;br /&gt;compiling nrf_log_frontend.c...&lt;br /&gt;assembling arm_startup_nrf52833.s...&lt;br /&gt;compiling SEGGER_RTT.c...&lt;br /&gt;compiling SEGGER_RTT_printf.c...&lt;br /&gt;compiling nrf_sdh.c...&lt;br /&gt;compiling nrf_sdh_soc.c...&lt;br /&gt;compiling nrf_sdh_ble.c...&lt;br /&gt;compiling system_nrf52.c...&lt;br /&gt;linking...&lt;br /&gt;Program Size: Code=40300 RO-data=4108 RW-data=592 ZI-data=7664 &amp;nbsp;&lt;br /&gt;FromELF: creating hex file...&lt;br /&gt;&amp;quot;.\_build\nrf52833_xxaa.axf&amp;quot; - 0 Error(s), 5 Warning(s).&lt;br /&gt;Build Time Elapsed:&amp;nbsp; 00:00:32&lt;br /&gt;&lt;br /&gt;I will retry porting/merging the code, so that it is in its simplest form.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding an 2nd UART to the BLE UART example</title><link>https://devzone.nordicsemi.com/thread/440091?ContentTypeID=1</link><pubDate>Mon, 07 Aug 2023 11:32:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:119ea135-fe11-4c93-9bb9-bd810e554d99</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I am not able to compile your code to be able check why it resets. Combing two samples is time consuming process in terms of finding out what configs and resources you need to enable and disable.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
7&amp;gt; Compiling ‘utf.c’
10&amp;gt; Compiling ‘ble_nus.c’
11&amp;gt; In file included from ../../../../../../components/libraries/util/sdk_common.h:61,
11&amp;gt;                  from ../../../../../../components/ble/common/ble_advdata.h:56,
11&amp;gt;                  from E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:60:
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_drv.h:176:28: error: &amp;#39;NRF_LIBUARTE_DRV_UARTE1&amp;#39; undeclared here (not in a function); did you mean &amp;#39;NRF_LIBUARTE_DRV_H&amp;#39;?
11&amp;gt; ../../../../../../components/libraries/util/app_util.h:242:62: note: in definition of macro &amp;#39;_SELECT_ASSERT_FUNC&amp;#39;
11&amp;gt; ../../../../../../components/libraries/util/app_util.h:258:25: note: in expansion of macro &amp;#39;STATIC_ASSERT_MSG&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_drv.h:176:5: note: in expansion of macro &amp;#39;STATIC_ASSERT&amp;#39;
11&amp;gt; ../../../../../../components/libraries/util/nordic_common.h:116:31: note: in expansion of macro &amp;#39;CONCAT_2_&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_drv.h:176:19: note: in expansion of macro &amp;#39;CONCAT_2&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:242:7: note: in expansion of macro &amp;#39;NRF_LIBUARTE_DRV_DEFINE&amp;#39;
11&amp;gt; E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:702:1: note: in expansion of macro &amp;#39;NRF_LIBUARTE_ASYNC_DEFINE&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_drv.h:176:28: error: expression in static assertion is not an integer
11&amp;gt; ../../../../../../components/libraries/util/app_util.h:242:62: note: in definition of macro &amp;#39;_SELECT_ASSERT_FUNC&amp;#39;
11&amp;gt; ../../../../../../components/libraries/util/app_util.h:258:25: note: in expansion of macro &amp;#39;STATIC_ASSERT_MSG&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_drv.h:176:5: note: in expansion of macro &amp;#39;STATIC_ASSERT&amp;#39;
11&amp;gt; ../../../../../../components/libraries/util/nordic_common.h:116:31: note: in expansion of macro &amp;#39;CONCAT_2_&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_drv.h:176:19: note: in expansion of macro &amp;#39;CONCAT_2&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:242:7: note: in expansion of macro &amp;#39;NRF_LIBUARTE_DRV_DEFINE&amp;#39;
11&amp;gt; E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:702:1: note: in expansion of macro &amp;#39;NRF_LIBUARTE_ASYNC_DEFINE&amp;#39;
11&amp;gt; ../../../../../../components/libraries/util/app_util.h:220:41: error: static assertion failed: &amp;quot;Timer instance not enabled&amp;quot;
11&amp;gt; ../../../../../../components/libraries/util/app_util.h:242:62: note: in definition of macro &amp;#39;_SELECT_ASSERT_FUNC&amp;#39;
11&amp;gt; ../../../../../../components/libraries/util/app_util.h:258:25: note: in expansion of macro &amp;#39;STATIC_ASSERT_MSG&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_drv.h:177:5: note: in expansion of macro &amp;#39;STATIC_ASSERT&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:242:7: note: in expansion of macro &amp;#39;NRF_LIBUARTE_DRV_DEFINE&amp;#39;
11&amp;gt; E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:702:1: note: in expansion of macro &amp;#39;NRF_LIBUARTE_ASYNC_DEFINE&amp;#39;
19&amp;gt; Compiling ‘nrf_sdh.c’
20&amp;gt; Compiling ‘nrf_sdh_ble.c’
1&amp;gt; Compiling ‘nrf_sdh_soc.c’
11&amp;gt; In file included from ../../../../../../modules/nrfx/nrfx.h:45,
11&amp;gt;                  from ../../../../../../modules/nrfx/hal/nrf_gpio.h:44,
11&amp;gt;                  from ../../../../../../components/boards/boards.h:43,
11&amp;gt;                  from ../../../../../../components/libraries/bsp/bsp.h:58,
11&amp;gt;                  from ../../../../../../components/libraries/bsp/bsp_btn_ble.h:60,
11&amp;gt;                  from E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:72:
11&amp;gt; ../../../../../../modules/nrfx/drivers/include/nrfx_timer.h:72:39: error: &amp;#39;NRFX_TIMER0_INST_IDX&amp;#39; undeclared here (not in a function); did you mean &amp;#39;NRFX_TIMER_INSTANCE&amp;#39;?
11&amp;gt; ../../../../../../modules/nrfx/drivers/nrfx_common.h:113:37: note: in definition of macro &amp;#39;NRFX_CONCAT_3_&amp;#39;
11&amp;gt; ../../../../../../modules/nrfx/drivers/include/nrfx_timer.h:72:25: note: in expansion of macro &amp;#39;NRFX_CONCAT_3&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_drv.h:181:18: note: in expansion of macro &amp;#39;NRFX_TIMER_INSTANCE&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:242:7: note: in expansion of macro &amp;#39;NRF_LIBUARTE_DRV_DEFINE&amp;#39;
11&amp;gt; E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:702:1: note: in expansion of macro &amp;#39;NRF_LIBUARTE_ASYNC_DEFINE&amp;#39;
11&amp;gt; In file included from E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:82:
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:280:28: warning: initialization of &amp;#39;void **&amp;#39; from incompatible pointer type &amp;#39;app_timer_t * const*&amp;#39; [-Wincompatible-pointer-types]
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:183:39: note: in definition of macro &amp;#39;LIBUARTE_ASYNC_DEBRACKET&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:210:5: note: in expansion of macro &amp;#39;__LIBUARTE_ASYNC_ARG_2_DEBRACKET&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:205:5: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL2&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:202:5: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL1&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:277:30: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:186:65: note: in expansion of macro &amp;#39;LIBUARTE_ASYNC_DEBRACKET&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:210:5: note: in expansion of macro &amp;#39;__LIBUARTE_ASYNC_ARG_2_DEBRACKET&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:205:5: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL2&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:202:5: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL1&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:279:23: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL&amp;#39;
11&amp;gt; E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:702:1: note: in expansion of macro &amp;#39;NRF_LIBUARTE_ASYNC_DEFINE&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:280:28: note: (near initialization for &amp;#39;libuarte.p_app_timer&amp;#39;)
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:183:39: note: in definition of macro &amp;#39;LIBUARTE_ASYNC_DEBRACKET&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:210:5: note: in expansion of macro &amp;#39;__LIBUARTE_ASYNC_ARG_2_DEBRACKET&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:205:5: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL2&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:202:5: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL1&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:277:30: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:186:65: note: in expansion of macro &amp;#39;LIBUARTE_ASYNC_DEBRACKET&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:210:5: note: in expansion of macro &amp;#39;__LIBUARTE_ASYNC_ARG_2_DEBRACKET&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:205:5: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL2&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:202:5: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL1&amp;#39;
11&amp;gt; ../../../../../../components/libraries/libuarte/nrf_libuarte_async.h:279:23: note: in expansion of macro &amp;#39;_LIBUARTE_ASYNC_EVAL&amp;#39;
11&amp;gt; E:\Downloads\customer_cases\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:702:1: note: in expansion of macro &amp;#39;NRF_LIBUARTE_ASYNC_DEFINE&amp;#39;
Build failed
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Can you please give me a project I am able to compile?&lt;br /&gt;I was testing ble_app_uart example from your attached compressed folder.&amp;nbsp;\nRF5_SDK_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>