<?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 works only debug mode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/73252/uart-works-only-debug-mode</link><description>Hi, 
 I am using own hardware board based on https://www.raytac.com/product/ins.php?index_id=24 module, it uses nRF52840. 
 I 
 I am facing an strange issue that UART is not working in normal mode but it is transferring a char when i add break point and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 07 Apr 2021 10:22:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/73252/uart-works-only-debug-mode" /><item><title>RE: UART works only debug mode</title><link>https://devzone.nordicsemi.com/thread/303433?ContentTypeID=1</link><pubDate>Wed, 07 Apr 2021 10:22:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7048eed3-96a3-4a5d-af95-48c1239351b2</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;Sorry about the late reply, but we&amp;#39;re currently catching up with the backlog from the Easter vacation here in Norway.&lt;/p&gt;
&lt;p&gt;Can you upload your project from one step up in the hierarchy (...\SDK_FOLDER\examples\peripheral\&lt;strong&gt;uart&lt;/strong&gt;)so the main file is added as well? This way I should be able to reproduce it on a DK on my side to see if the problem persists there.&lt;/p&gt;
&lt;p&gt;Are you able to run the unmodified&amp;nbsp;&lt;span&gt;\&lt;strong&gt;peripheral\uart&amp;nbsp;&lt;/strong&gt;example on your module at all (in normal mode)? Are you able to use the RTT viewer to see log messages when your application is running in normal mode, so that we can get any information of where the application runs into problems?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In our experience, live debugging sessions over screen sharing/meetings are generally not very effective, so I would suggest sticking to the forum.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART works only debug mode</title><link>https://devzone.nordicsemi.com/thread/302813?ContentTypeID=1</link><pubDate>Wed, 31 Mar 2021 19:04:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a4c245b-c12d-466b-b3f3-0831bb7ed2d8</guid><dc:creator>r2n</dc:creator><description>&lt;p&gt;Simonr,&lt;/p&gt;
&lt;p&gt;Thanks for your suggestions again.&lt;/p&gt;
&lt;p&gt;It didn&amp;#39;t work , i have corrected the clock source to RC i.e 0 and disabled log to UART part.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;A simple program runs where I am sending single char to uart inside while with a delay of 500ms. When I run it with out debug mode i am not seeing any character coming out from UART. When I put break point while sending a char to UART , and run it in debug i am able to see the char everytime when press run button since it comes to break point on every click.&lt;/p&gt;
&lt;p&gt;Do you have any option to help me through remote screen sharing or meeting ? I have to go for productions because of this simple UART issue everything stuck.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART works only debug mode</title><link>https://devzone.nordicsemi.com/thread/302296?ContentTypeID=1</link><pubDate>Mon, 29 Mar 2021 07:44:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00a24ee5-be42-4de3-a3a8-aee5ae695fcc</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;1. What kind of output do you see when using the UART in debug mode? From the sdk_config.h file you attached I see that you&amp;#39;re using both the NRF_LOG_BACKEND_RTT and BACKEND_UART. Please try setting&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED to 0 to allow your application to use the UART peripheral instead of the logging module.&lt;/p&gt;
&lt;p&gt;2. Setting the&amp;nbsp;NRF_LOG_BACKEND_UART_ENABLED to 0 should let you see the RTT log. When both are set to 1 there will be conflicts in the logging module regarding which one should be used, and that is likely causing problems for you&lt;/p&gt;
&lt;p&gt;3. I see that you have not edited the NRF_SDH_CLOCK_LF_SRC,&amp;nbsp;NRF_SDH_CLOCK_LF_RC_CTIV, NRF_SDH_CLOCK_LF_RC_TEMP_CTIV, or&amp;nbsp;NRF_SDH_CLOCK_LF_ACCURACY in the sdk_config.h file you attached. Setting&amp;nbsp;&lt;span&gt;NRF_SDH_CLOCK_LF_SRC is what defines what clock source you&amp;#39;re using, so if you set this to 0, the internal RC oscillator will be used instead of the XTAL.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART works only debug mode</title><link>https://devzone.nordicsemi.com/thread/302223?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 18:36:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8df87cb8-3970-443e-9aa8-b212592ef887</guid><dc:creator>r2n</dc:creator><description>&lt;p&gt;Simonr,&lt;/p&gt;
&lt;p&gt;Thanks for the suggestions,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1. I have configured above macro with sdk config and still not seeing any output with uart.&lt;br /&gt;2. I have enabled log and RTT log but it is not showing any log with swd debugger. Please review my attached sdk_config.h&lt;br /&gt;now&amp;nbsp; I have taken ble blinky example and trying to test nRF log option first.&amp;nbsp;&lt;br /&gt;I can understand i am doing wrong, please correct me.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;3. If internal RC enabled how to veri&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3108.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../3108.sdk_5F00_config.h&lt;/a&gt;fy it is running with internal RC ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART works only debug mode</title><link>https://devzone.nordicsemi.com/thread/302149?ContentTypeID=1</link><pubDate>Fri, 26 Mar 2021 13:45:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a617fc87-e4d6-4ee4-9fd9-afdbdab7c901</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you provide the&amp;nbsp;return of the UART callback function and debug log so we can get some more details as to what&amp;#39;s going on here?&lt;/p&gt;
&lt;p&gt;A common mistake in custom boards is that the 32.768kHz crystal is soldered on the wrong way (90 degrees off), so&amp;nbsp;a malfunctioning 32kHz crystal may indeed be your problem.&lt;/p&gt;
&lt;p&gt;Please try changing the following defines in your sdk_config.h file to enable the internal RC oscillator and the correct calibration interval.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_ACCURACY_20_PPM 
// &amp;lt;8=&amp;gt; NRF_CLOCK_LF_ACCURACY_10_PPM 
// &amp;lt;9=&amp;gt; NRF_CLOCK_LF_ACCURACY_5_PPM 
// &amp;lt;10=&amp;gt; NRF_CLOCK_LF_ACCURACY_2_PPM 
// &amp;lt;11=&amp;gt; NRF_CLOCK_LF_ACCURACY_1_PPM 

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>