<?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>how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100835/how-to-change-uart0-when-running-not-at-early-boot-stages</link><description>the sample code Dynamic Pin Control (nRF), The Dynamic Pin Control (nRF) sample demonstrates how to change uart0 at early boot stages, depending on the input level on a pin connected to a push-button. 
 My question is how to change when in running, not</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Jun 2023 17:47:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100835/how-to-change-uart0-when-running-not-at-early-boot-stages" /><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/432119?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 17:47:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38c21619-206a-4b23-bfd3-a38286b81884</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You would likely need to compare api changes in the following folders between v2 and v2.4:&lt;/p&gt;
&lt;p&gt;\modules\hal\nordic\nrfx\drivers\include\&lt;br /&gt;&lt;span&gt;\modules\hal\nordic\nrfx\drivers\src\&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/432081?ContentTypeID=1</link><pubDate>Tue, 20 Jun 2023 14:49:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b86706ef-fb69-44cc-b70f-c9c55646054f</guid><dc:creator>Kavy</dc:creator><description>&lt;p&gt;Hey Kenn ,&lt;/p&gt;
&lt;p&gt;I was able to build it without any errors only when i changed&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;nrfx_uarte_tx&lt;/span&gt;&lt;span&gt;(&amp;amp;&lt;/span&gt;&lt;span&gt;uarte_inst&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;m_tx_buffer&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;sizeof&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;m_tx_buffer0&lt;/span&gt;&lt;span&gt;&lt;span&gt;), 0);&amp;nbsp;&lt;/span&gt;&lt;/span&gt;Line 133, main.c&amp;nbsp;&lt;/div&gt;
&lt;p&gt;to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;status&lt;/span&gt;&lt;span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span&gt;nrfx_uarte_tx&lt;/span&gt;&lt;span&gt;(&amp;amp;&lt;/span&gt;&lt;span&gt;uarte_inst&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;m_tx_buffer&lt;/span&gt;&lt;span&gt;,&amp;nbsp;&lt;/span&gt;&lt;span&gt;sizeof&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;m_tx_buffer0&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What changes would i have to do to get this working on v2.0.0&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-Kavya&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/431674?ContentTypeID=1</link><pubDate>Mon, 19 Jun 2023 07:28:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0f384a9-8996-40c5-bbe0-90d0437c848c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you try a newer nRF Connect SDK, e.g. 2.4 is the latest.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/431556?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2023 16:23:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1efca038-2a25-43b2-bc8c-9914544e8a7f</guid><dc:creator>Kavy</dc:creator><description>&lt;p&gt;Hey ken,,&amp;nbsp;&lt;br /&gt;I had build errors trying to nrfx_uarte sample.&amp;nbsp;&lt;br /&gt;Attached is the log file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[1/13] Building C object CMakeFiles/app.dir/main.c.obj
FAILED: CMakeFiles/app.dir/main.c.obj 
C:\ncs\toolchains\v2.0.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__PROGRAM_START -D__ZEPHYR__=1 -I../../../../common -IC:/ncs/v2.0.0/zephyr/include/zephyr -IC:/ncs/v2.0.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.0.0/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/ncs/v2.0.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.0.0/nrf/include -IC:/ncs/v2.0.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.0.0/modules/hal/nordic/nrfx -IC:/ncs/v2.0.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.0.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.0.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.0.0/modules/debug/segger/SEGGER -IC:/ncs/v2.0.0/modules/debug/segger/Config -IC:/ncs/v2.0.0/zephyr/modules/segger/. -isystem C:/ncs/v2.0.0/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include -isystem c:/ncs/toolchains/v2.0.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/include-fixed -isystem C:/ncs/v2.0.0/nrfxlib/crypto/nrf_cc310_platform/include -Os -imacros C:/Users/kxj0816/Downloads/hal_nordic-master/hal_nordic-master/nrfx/samples/src/nrfx_uarte/tx_rx_non_blocking/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros C:/ncs/v2.0.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/Users/kxj0816/Downloads/hal_nordic-master/hal_nordic-master/nrfx/samples/src/nrfx_uarte/tx_rx_non_blocking=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.0.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.0.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/main.c.obj -MF CMakeFiles\app.dir\main.c.obj.d -o CMakeFiles/app.dir/main.c.obj -c ../main.c
In file included from C:\ncs\v2.0.0\zephyr\include\zephyr\arch\arm\aarch32\irq.h:20,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\arch\arm\aarch32\arch.h:27,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\arch\cpu.h:19,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\kernel_includes.h:33,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\kernel.h:17,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\logging\log_ctrl.h:9,
                 from c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\common\nrfx_example.h:38,
                 from c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:34:
../main.c: In function &amp;#39;main&amp;#39;:
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:59:24: error: expected declaration specifiers or &amp;#39;...&amp;#39; before numeric constant
   59 | #define UARTE_INST_IDX 1
      |                        ^
C:\ncs\v2.0.0\zephyr\include\zephyr\sw_isr_table.h:62:39: note: in definition of macro &amp;#39;__MK_ISR_NAME&amp;#39;
   62 | #define __MK_ISR_NAME(x, y) __isr_ ## x ## _irq_ ## y
      |                                       ^
C:\ncs\v2.0.0\zephyr\include\zephyr\sw_isr_table.h:70:10: note: in expansion of macro &amp;#39;_MK_ISR_NAME&amp;#39;
   70 |   __used _MK_ISR_NAME(func, __COUNTER__) = \
      |          ^~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\include\zephyr\arch\arm\aarch32\irq.h:128:2: note: in expansion of macro &amp;#39;Z_ISR_DECLARE&amp;#39;
  128 |  Z_ISR_DECLARE(irq_p, ISR_FLAG_DIRECT, isr_p, NULL); \
      |  ^~~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\include\zephyr\irq.h:112:2: note: in expansion of macro &amp;#39;ARCH_IRQ_DIRECT_CONNECT&amp;#39;
  112 |  ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:122:5: note: in expansion of macro &amp;#39;IRQ_DIRECT_CONNECT&amp;#39;
  122 |     IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(UARTE_INST_IDX)), IRQ_PRIO_LOWEST,
      |     ^~~~~~~~~~~~~~~~~~
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:123:52: note: in expansion of macro &amp;#39;UARTE_INST_IDX&amp;#39;
  123 |                        NRFX_UARTE_INST_HANDLER_GET(UARTE_INST_IDX), 0);
      |                                                    ^~~~~~~~~~~~~~
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:123:66: error: pasting &amp;quot;)&amp;quot; and &amp;quot;_irq_&amp;quot; does not give a valid preprocessing token
  123 |                        NRFX_UARTE_INST_HANDLER_GET(UARTE_INST_IDX), 0);
      |                                                                  ^
C:\ncs\v2.0.0\zephyr\include\zephyr\sw_isr_table.h:62:39: note: in definition of macro &amp;#39;__MK_ISR_NAME&amp;#39;
   62 | #define __MK_ISR_NAME(x, y) __isr_ ## x ## _irq_ ## y
      |                                       ^
C:\ncs\v2.0.0\zephyr\include\zephyr\sw_isr_table.h:70:10: note: in expansion of macro &amp;#39;_MK_ISR_NAME&amp;#39;
   70 |   __used _MK_ISR_NAME(func, __COUNTER__) = \
      |          ^~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\include\zephyr\arch\arm\aarch32\irq.h:128:2: note: in expansion of macro &amp;#39;Z_ISR_DECLARE&amp;#39;
  128 |  Z_ISR_DECLARE(irq_p, ISR_FLAG_DIRECT, isr_p, NULL); \
      |  ^~~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\include\zephyr\irq.h:112:2: note: in expansion of macro &amp;#39;ARCH_IRQ_DIRECT_CONNECT&amp;#39;
  112 |  ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)
      |  ^~~~~~~~~~~~~~~~~~~~~~~
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:122:5: note: in expansion of macro &amp;#39;IRQ_DIRECT_CONNECT&amp;#39;
  122 |     IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(UARTE_INST_IDX)), IRQ_PRIO_LOWEST,
      |     ^~~~~~~~~~~~~~~~~~
In file included from C:\ncs\v2.0.0\zephyr\include\zephyr\arch\arm\aarch32\arch.h:27,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\arch\cpu.h:19,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\kernel_includes.h:33,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\kernel.h:17,
                 from C:\ncs\v2.0.0\zephyr\include\zephyr\logging\log_ctrl.h:9,
                 from c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\common\nrfx_example.h:38,
                 from c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:34:
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:122:44: warning: implicit declaration of function &amp;#39;NRF_UARTE_INST_GET&amp;#39;; did you mean &amp;#39;NRFX_UARTE_INSTANCE&amp;#39;? [-Wimplicit-function-declaration]
  122 |     IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(UARTE_INST_IDX)), IRQ_PRIO_LOWEST,
      |                                            ^~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.0\zephyr\include\zephyr\arch\arm\aarch32\irq.h:129:25: note: in definition of macro &amp;#39;ARCH_IRQ_DIRECT_CONNECT&amp;#39;
  129 |  z_arm_irq_priority_set(irq_p, priority_p, flags_p); \
      |                         ^~~~~
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:122:5: note: in expansion of macro &amp;#39;IRQ_DIRECT_CONNECT&amp;#39;
  122 |     IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(UARTE_INST_IDX)), IRQ_PRIO_LOWEST,
      |     ^~~~~~~~~~~~~~~~~~
C:\ncs\v2.0.0\modules\hal\nordic\nrfx\drivers\nrfx_common.h:248:41: note: in expansion of macro &amp;#39;NRFX_PERIPHERAL_ID_GET&amp;#39;
  248 | #define NRFX_IRQ_NUMBER_GET(base_addr)  NRFX_PERIPHERAL_ID_GET(base_addr)
      |                                         ^~~~~~~~~~~~~~~~~~~~~~
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:122:24: note: in expansion of macro &amp;#39;NRFX_IRQ_NUMBER_GET&amp;#39;
  122 |     IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(UARTE_INST_IDX)), IRQ_PRIO_LOWEST,
      |                        ^~~~~~~~~~~~~~~~~~~
c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:133:14: error: too many arguments to function &amp;#39;nrfx_uarte_tx&amp;#39;
  133 |     status = nrfx_uarte_tx(&amp;amp;uarte_inst, m_tx_buffer, sizeof(m_tx_buffer), 0);
      |              ^~~~~~~~~~~~~
In file included from c:\Users\kxj0816\Downloads\hal_nordic-master\hal_nordic-master\nrfx\samples\src\nrfx_uarte\tx_rx_non_blocking\main.c:35:
C:\ncs\v2.0.0\modules\hal\nordic\nrfx\drivers\include\nrfx_uarte.h:274:12: note: declared here
  274 | nrfx_err_t nrfx_uarte_tx(nrfx_uarte_t const * p_instance,
      |            ^~~~~~~~~~~~~
ninja: build stopped: subcommand failed.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I the api IRQ_DIRECT_CONNECT()&lt;/p&gt;
&lt;p&gt;,&amp;nbsp; NRF_UARTE_INST_GET() and NRFX_UARTE_INST_ANDLER_GET() have no reference in nrfx_uarte.h file.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kavya&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/431374?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 20:51:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cfa2085-345a-41db-80ab-db1d485381dd</guid><dc:creator>steveqin</dc:creator><description>&lt;p&gt;Ken,&lt;/p&gt;
&lt;p&gt;could you please give a sample code how to change from uart to adc with&amp;nbsp;&lt;span&gt;zephyr drivers?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Steve&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/431337?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 14:42:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad53c144-331e-4315-9433-f958927206f6</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;So in short start with:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_uarte/tx_rx_non_blocking"&gt;https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_uarte/tx_rx_non_blocking&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then disable UART and switch to ADC:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_saadc/simple_non_blocking"&gt;https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src/nrfx_saadc/simple_non_blocking&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/431327?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 14:31:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fd13809-3089-40f6-ad11-5ca9ce678cfc</guid><dc:creator>steveqin</dc:creator><description>&lt;p&gt;my goal is to use the same 2 pins at the beginning for uart, then after 20ms the same 2 pins are set as ADC pins.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/431313?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 14:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0151290-3273-44c6-8863-da48ba588e09</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Are you planning to use any zephyr drivers, or can you use the low level nrfx api layer directly in your application, ref for instance:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/boards/nrf/nrfx/README.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/boards/nrf/nrfx/README.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can find there are quite a lot of examples that show usage of nrfx here:&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src"&gt;https://github.com/zephyrproject-rtos/hal_nordic/tree/master/nrfx/samples/src&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So, it&amp;#39;s very simple to solve what you want to do if you can use nrfx directly.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/431288?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 13:33:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62d9329d-d11f-49b3-8559-d43a600db0dd</guid><dc:creator>steveqin</dc:creator><description>&lt;p&gt;Thank you Kenneth,&lt;/p&gt;
&lt;p&gt;my final goal is that I want to set 2 pins as uart at beginning, waiting for 20ms there to expect receiving &amp;quot;B&amp;quot;, if not received &amp;#39;B&amp;#39; in 20ms then change to ADC, do you think it is possible?&lt;/p&gt;
&lt;p&gt;thanks again,&lt;/p&gt;
&lt;p&gt;Steve&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to change uart0 when running? not at early boot stages.</title><link>https://devzone.nordicsemi.com/thread/431285?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2023 13:24:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05be7ab6-33c1-4d5f-9995-d953701982a0</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;This is not straight forward, but I have some suggestions.&lt;/p&gt;
&lt;p&gt;The main problem here is that it&amp;#39;s not possible to dynamically update the pin configuration, this is not directly supported in software, and it&amp;#39;s also not possible in hardware while a peripheral is enabled.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But there might be a way around this, at least for uart.&lt;/p&gt;
&lt;p&gt;If you use CONFIG_PM_DEVICE=y, then you have the option to call for instance pm_device_action_run(uart_dev, PM_DEVICE_ACTION_RESUME) and pm_device_action_run(uart_dev, PM_DEVICE_ACTION_SUSPEND).&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/pm/api/index.html#c.pm_device_action_run"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/pm/api/index.html#c.pm_device_action_run&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the above you can enable and disable the UART.&lt;/p&gt;
&lt;p&gt;Next step is to update the pins while it&amp;#39;s disabled (SUSPEND), it looks like you can use the pinctrl_apply_state() to do this:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/pinctrl/index.html#dynamic-pin-control"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/pinctrl/index.html#dynamic-pin-control&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the above will update the pins.&lt;/p&gt;
&lt;p&gt;There is now one final problem, when you now switch to RESUME the driver will automatically apply the default state, ref:&lt;br /&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/serial/uart_nrfx_uarte.c#LL1853C7-L1853C30"&gt;https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/serial/uart_nrfx_uarte.c#LL1853C7-L1853C30&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;However I can see from the above that it&amp;#39;s possible to avoid this by a kconfig option, for instance set:&lt;br /&gt;CONFIG_UART_0_GPIO_MANAGEMENT=n&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_UART_0_GPIO_MANAGEMENT"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_UART_0_GPIO_MANAGEMENT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>