<?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>nrf5340-dk: Unable to read serial output using printk as baud rates between 250kbps and 1Mbps</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81062/nrf5340-dk-unable-to-read-serial-output-using-printk-as-baud-rates-between-250kbps-and-1mbps</link><description>Hello, 
 I have an nrf5340-dk board and I am trying to play around with the different baud rates through changing the overlay file (as shown): 
 
 
 
 I am using teraterm to view the output data and I am not able to view the data with any of the available</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Oct 2021 11:09:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81062/nrf5340-dk-unable-to-read-serial-output-using-printk-as-baud-rates-between-250kbps-and-1mbps" /><item><title>RE: nrf5340-dk: Unable to read serial output using printk as baud rates between 250kbps and 1Mbps</title><link>https://devzone.nordicsemi.com/thread/336167?ContentTypeID=1</link><pubDate>Wed, 27 Oct 2021 11:09:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b73f01f-ada7-47dc-876a-35e6dbd3c2e7</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Matt,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The default clock source for the baudrate generator is the HFCLK, which can be sourced by a inaccurate RC oscillator or the external HFXO (which has a tolerance of nom. &amp;lt; 40 ppm):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/clock/doc/clock.html?cp=3_0_0_3_10"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/clock/doc/clock.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the clock source is inaccurate, the outcome is that the baudrate is also inaccurate. By starting the external HFXO source, you will then switch to a more accurate source.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Wrt. to the &amp;quot;BAUDRATE&amp;quot; register, the target and actual baud are both shown. For your chosen one it states:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;460800 baud (actual rate: 457143)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Meaning it is almost 4 kHz off its target, assuming a accurate clock source.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf5340-dk: Unable to read serial output using printk as baud rates between 250kbps and 1Mbps</title><link>https://devzone.nordicsemi.com/thread/336047?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 16:16:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd3f9d3d-4045-473d-b999-8952f0019287</guid><dc:creator>mattmacleod</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;H&amp;aring;kon,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Sorry I dont understand what I am looking at in the lines you shared in that example. Where are the baud settings?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Matt&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: nrf5340-dk: Unable to read serial output using printk as baud rates between 250kbps and 1Mbps</title><link>https://devzone.nordicsemi.com/thread/335938?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 11:28:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb524b8c-f44d-403e-8b30-9f7282c313fd</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;The actual rate, provided that you&amp;#39;re sourcing from the HFXO, is almost 4kHz off the target baud rate:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/uarte.html?cp=3_0_0_6_37_8_42#register.BAUDRATE"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf5340/uarte.html?cp=3_0_0_6_37_8_42#register.BAUDRATE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When running with the HFCLK internal RC oscillator, you will add a tolerance of several percent on top of the above mentioned frequency/baud rate. You can try to start the HFXO (see here for an example:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.7.0/samples/bluetooth/direct_test_mode/src/dtm.c#L497-L527"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v1.7.0/samples/bluetooth/direct_test_mode/src/dtm.c#L497-L527&lt;/a&gt;) and see if this improves the scenario, but in general; I would recommend avoiding 460k8 and 921k6 due to their actual rates.&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>