<?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>UART issuses on nRF Connect SDK 1.5.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74806/uart-issuses-on-nrf-connect-sdk-1-5-1</link><description>Hello Nordic Team, 
 
 I am having issues with the peripheral_uart firmware for the nRF52833. 
 1.I can use UART_init() or nrf_drv_uart_uninit() in nRF52-SDK to enable or disable UART. How can I do that in NCS? 
 2.I changed the baud rate to 921600bps</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 May 2021 06:18:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74806/uart-issuses-on-nrf-connect-sdk-1-5-1" /><item><title>RE: UART issuses on nRF Connect SDK 1.5.1</title><link>https://devzone.nordicsemi.com/thread/310013?ContentTypeID=1</link><pubDate>Tue, 18 May 2021 06:18:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66ba40df-ecdf-4870-a0f5-3f3a9b7d0346</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Stanley,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am glad to hear that you found a solution to the problem, and thank you very much for updating this thread with the solution!&lt;/p&gt;
&lt;p&gt;I hope you have a nice day!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART issuses on nRF Connect SDK 1.5.1</title><link>https://devzone.nordicsemi.com/thread/309934?ContentTypeID=1</link><pubDate>Mon, 17 May 2021 03:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0e76b08-cbc2-4f29-b429-be15f1124863</guid><dc:creator>Stanley</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I found that the GPIO level of my demo board is not 3.3V.&lt;/span&gt;&lt;span style="font-family:inherit;"&gt; It was correct after I changed it to 3.3V.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I forgot that I was using nRF52833, I am very sorry.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void gpio_output_voltage_setup(uint32_t UICR_REGOUT0_VOUT)
{
if ((NRF_UICR-&amp;gt;REGOUT0 &amp;amp; UICR_REGOUT0_VOUT_Msk) !=
(UICR_REGOUT0_VOUT &amp;lt;&amp;lt; UICR_REGOUT0_VOUT_Pos))
{
NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Wen;
while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}

NRF_UICR-&amp;gt;REGOUT0 = (NRF_UICR-&amp;gt;REGOUT0 &amp;amp; ~((uint32_t)UICR_REGOUT0_VOUT_Msk)) |
(UICR_REGOUT0_VOUT &amp;lt;&amp;lt; UICR_REGOUT0_VOUT_Pos);

NRF_NVMC-&amp;gt;CONFIG = NVMC_CONFIG_WEN_Ren;
while (NRF_NVMC-&amp;gt;READY == NVMC_READY_READY_Busy){}

NVIC_SystemReset();
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In addition, I found that the settings of the external or internal 32.768k crystal oscillator can be modified in mpsl_lib_init().&lt;br /&gt;All problems have been resolved.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stanley&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART issuses on nRF Connect SDK 1.5.1</title><link>https://devzone.nordicsemi.com/thread/309416?ContentTypeID=1</link><pubDate>Wed, 12 May 2021 08:53:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9a6bbf8-5474-4321-b749-4909ec11aae9</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Stanley,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I added some prints in the uart callback &amp;quot;uart_cb&amp;quot;. I&amp;#39;m not able to get the program to fault, but it does print a warning at my end:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;wrn&amp;gt; peripheral_uart: Not able to allocate UART receive buff&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This in combination with event type &amp;quot;UART_RX_STOPPED&amp;quot; indicates that an ERRORSRC has occurred, atleast on my end.&lt;/p&gt;
&lt;p&gt;I think the baudrate is causing this error, as it has a higher tolerance with 921k6 baud:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html?cp=4_2_0_34_9_10#register.BAUDRATE"&gt;https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html?cp=4_2_0_34_9_10#register.BAUDRATE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try a baudrate that matches the expected baud, like 1M?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART issuses on nRF Connect SDK 1.5.1</title><link>https://devzone.nordicsemi.com/thread/309167?ContentTypeID=1</link><pubDate>Tue, 11 May 2021 09:43:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82a84543-8126-4936-8ca9-fcfa95c5221c</guid><dc:creator>Stanley</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;H&amp;aring;kon,&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;get&amp;nbsp;some error messages in&amp;nbsp;UART console.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620723698824v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I use arm-none-eabi-addr2line to resolv the addresses.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620724068036v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620725142730v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I think it happened in the line k_free(buf).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1620726083861v4.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Stanley&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART issuses on nRF Connect SDK 1.5.1</title><link>https://devzone.nordicsemi.com/thread/309121?ContentTypeID=1</link><pubDate>Tue, 11 May 2021 07:33:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:739d0661-8da1-46ca-aad6-40f03bfa873f</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Stanley20150727"]2.I set CONFIG_BT_NUS_THREAD_STACK_SIZE to 4096, but the problem still exists.[/quote]
&lt;p&gt;Could you use arm-none-eabi-addr2line to resolv the addresses to actual functions in the faulting output?&lt;/p&gt;
&lt;p&gt;arm-none-eabi-addr2line -e build/zephyr/zephyr.elf 0xFAULTING_ADDR&lt;/p&gt;
&lt;p&gt;In your initial screenshot, it would be 0x1410, 0x270f0, 0x16549.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You could also check the .map file and see which thread is running at 0x20001e48.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that addresses change for each time you change your program.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Stanley20150727"]3.I want to save the setting value in flash memory and load it at startup to decide whether to use the internal or external crystal oscillator. What should I do?[/quote]
&lt;p&gt;Unfortunately, this configuration isnt dynamic. It must be set in kconfig.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART issuses on nRF Connect SDK 1.5.1</title><link>https://devzone.nordicsemi.com/thread/309102?ContentTypeID=1</link><pubDate>Tue, 11 May 2021 03:12:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd6fb3fe-7299-4357-b5bc-9ed5d16d7e40</guid><dc:creator>Stanley</dc:creator><description>&lt;p&gt;1.Now I can use the power management API to turn the UART on and off.&lt;/p&gt;
&lt;p&gt;2.I set CONFIG_BT_NUS_THREAD_STACK_SIZE to 4096, but the problem still exists.&lt;/p&gt;
&lt;p&gt;3.I want to save the setting value in flash memory and load it at startup to decide whether to use the internal or external crystal oscillator. What should I do?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART issuses on nRF Connect SDK 1.5.1</title><link>https://devzone.nordicsemi.com/thread/308699?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 10:25:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1c8bd60-f456-4ea0-838f-826170ae8c8e</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]1.I can use&amp;nbsp;UART_init() or nrf_drv_uart_uninit() in nRF52-SDK to enable or disable UART. How can I do that in NCS?[/quote]
&lt;p&gt;&amp;nbsp;The serial component does not have a uninit API unfortunately.&lt;/p&gt;
&lt;p&gt;You can use the power management API, like mentioned in this thread:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/68857/low-power-mode-in-zephyr/282929#282929"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/68857/low-power-mode-in-zephyr/282929#282929&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Or you can disable the peripheral on a register level.&lt;/p&gt;
&lt;p&gt;This must currently be done by stopping the TX/RX, then disable the peripheral on a register level (&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/53906/nrf9160-multiplex-uart-and-other-peripherals/219096#219096"&gt;similar to what is shown here&lt;/a&gt;)&lt;/p&gt;
[quote user=""]2.I changed the baud rate to 921600bps. An error occurred that caused the system to reset. I found that it is caused by k_free (buf) in ble_write_thread (). How can I solve it?[/quote]
&lt;p&gt;&amp;nbsp;It sounds like the thread needs a bit more memory. Could you try adjusting&amp;nbsp;CONFIG_BT_NUS_THREAD_STACK_SIZE and see if this helps?&lt;/p&gt;
[quote user=""]3.Can I use firmware to configure an external or internal 32.768k crystal oscillator?[/quote]
&lt;p&gt;&amp;nbsp;You can set this in kconfig, as a static parameter:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/choice_327.html#choice-327"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/choice_327.html#choice-327&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>