<?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 baud rate 512</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46025/uart-baud-rate-512</link><description>Is it possibe to configure uart with baud rate of 512 on nrf52832? 
 
 I tried to configure the uart with this baud rate, but I am not able to get the uart communication working</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Oct 2022 08:18:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46025/uart-baud-rate-512" /><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/389140?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2022 08:18:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bf2f72c-a8ed-473c-8beb-eb1eaeed18a4</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Magnus,&lt;/p&gt;
&lt;p&gt;That is right. The formula from the old post (describing the UART peripheral in the nRF51 series) is not entirely&amp;nbsp;valid, as&amp;nbsp;is also stated in the post - &amp;quot;&lt;em&gt;this formula is simplified&lt;/em&gt;&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/389138?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2022 08:14:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9a6ce26-01ca-4dad-b4a9-b60f18dc65c6</guid><dc:creator>MagnusPersson</dc:creator><description>&lt;p&gt;OK, thanks. One more question: Does this mean that the formula suggested in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/391/uart-baudrate-register-values/2046#2046"&gt;this ancient post&lt;/a&gt; linked above to calculate the values for the BAUDRATE register and the actual baud rate is actually not valid?&lt;/p&gt;
&lt;p&gt;Anyway, I guess the difference should be within the fault tolerance of any system using start and stop bits properly.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;-Magnus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/389128?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2022 07:37:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08efef15-b561-43ca-bdc3-74dfebabe963</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Magnus,&lt;/p&gt;
[quote user="MagnusPersson"]It would be interesting to get a background to the numbers in the Product Specification.[/quote]
&lt;p&gt;This has to do with the way the different frequencies are generated within the nRF (derived from the HF clock), and the provided values are the closest you can get. I cannot comment on the implementation details, unfortunately.&lt;/p&gt;
[quote user="MagnusPersson"]Would also be interesting to know why the register numbers for UART and UARTE differs in the Product Specification.[/quote]
&lt;p&gt;There are some implementation differences between those peripherals (though they share a lot and in fact overlap physically), but this is not publicly documented and I cannot comment on the details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/389064?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 17:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:182074d6-945b-4aec-bbd0-55993d4c1ab0</guid><dc:creator>MagnusPersson</dc:creator><description>&lt;p&gt;Thanks a lot. so if I understand your tables I have calculated correctly and the Nordic quoted numbers in the code and Product Specification differ from our understanding.&lt;/p&gt;
&lt;p&gt;It would be interesting to get a background to the numbers in the Product Specification.&lt;/p&gt;
&lt;p&gt;Would also be interesting to know why the register numbers for UART and UARTE differs in the Product Specification.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;-Magnus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/389050?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 15:49:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94a53637-0be2-4d4b-8c84-5d70c7592682</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;There is a 2% error in the documented baud rate for 921600 baud:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// Quoted values from nRF52832 v1.4 datasheet - 16 correct, 10 incorrect
static BaudCheck_t BaudCheck[] = {
//  -------Documentation---------   -------Calculated---------
//  Register    Required   Actual    Register    Actual    Ok?      Index
//  ==========  ========   ======   ==========   ======   ====      =====
   {0x0004F000,     1200,    1205,  0x0004F000,    1205, &amp;quot; Ok&amp;quot;},  //  0
   {0x0009D000,     2400,    2396,  0x0009D000,    2395, &amp;quot; Ok&amp;quot;},  //  1
   {0x0013B000,     4800,    4808,  0x0013B000,    4806, &amp;quot; Ok&amp;quot;},  //  2
   {0x00275000,     9600,    9598,  0x00275000,    9597, &amp;quot; Ok&amp;quot;},  //  3
   {0x003AF000,    14400,   14401,  0x003B0000,   14404, &amp;quot;  -&amp;quot;},  //  4
   {0x004EA000,    19200,   19208,  0x004EA000,   19195, &amp;quot; Ok&amp;quot;},  //  5
   {0x0075C000,    28800,   28777,  0x0075F000,   28793, &amp;quot;  -&amp;quot;},  //  6
   {0x009D0000,    38400,   38369,  0x009D5000,   38406, &amp;quot;  -&amp;quot;},  //  7
   {0x00EB0000,    57600,   57554,  0x00EBF000,   57601, &amp;quot;  -&amp;quot;},  //  8
   {0x013A9000,    76800,   76923,  0x013A9000,   76797, &amp;quot; Ok&amp;quot;},  //  9
   {0x01D60000,   115200,  115108,  0x01D7E000,  115203, &amp;quot;  -&amp;quot;},  // 10
   {0x03B00000,   230400,  231884,  0x03AFB000,  230392, &amp;quot;  -&amp;quot;},  // 11
   {0x04000000,   250000,  250000,  0x04000000,  250000, &amp;quot; Ok&amp;quot;},  // 12
   {0x07400000,   460800,  457143,  0x075F7000,  460800, &amp;quot;  -&amp;quot;},  // 13
   {0x0F000000,   921600,  941176,  0x0EBEE000,  921600, &amp;quot;  -&amp;quot;},  // 14
   {0x10000000,  1000000, 1000000,  0x10000000, 1000000, &amp;quot; Ok&amp;quot;},  // 15
// Extra and changed values from nRF52840 Product Specification
   {0x003B0000,    14400,   14414,  0x003B0000,   14404, &amp;quot; Ok&amp;quot;},  // 16
   {0x0075F000,    28800,   28829,  0x0075F000,   28793, &amp;quot; Ok&amp;quot;},  // 17
   {0x00800000,    31250,   31250,  0x00800000,   31250, &amp;quot; Ok&amp;quot;},  // 18
   {0x009D5000,    38400,   38462,  0x003B0000,   38406, &amp;quot; Ok&amp;quot;},  // 19
   {0x00E50000,    56000,   55944,  0x00E56000,   55999, &amp;quot;  -&amp;quot;},  // 20
   {0x00EBF000,    57600,   57762,  0x00EBF000,   57601, &amp;quot; Ok&amp;quot;},  // 21
   {0x01D7E000,   115200,  115942,  0x01D7E000,  115203, &amp;quot; Ok&amp;quot;},  // 22
   {0x03AFB000,   230400,  231884,  0x03AFB000,  230392, &amp;quot; Ok&amp;quot;},  // 23
   {0x075F7000,   460800,  470588,  0x075F7000,  460800, &amp;quot; Ok&amp;quot;},  // 24
   {0x0EBED000,   921600,  941176,  0x0EBEE000,  921600, &amp;quot;  -&amp;quot;}}; // 25
#define NUM_BAUD_TESTS (sizeof(BaudCheck)/sizeof(BaudCheck[0]))
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This link shows my calculations:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/43280/technical-question-regarding-uart-baud-rate-generator-baudrate-register-offset-0x524/169171#169171"&gt;uart-baud-rate-generator&lt;/a&gt;&amp;nbsp;which can be used to get 512 baud&lt;/p&gt;
&lt;p&gt;Updated for v1.7 datasheet&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/84204/framing-error-and-noisy-data-when-using-uarte-at-high-baud-rate/350747"&gt;framing-error-and-noisy-data-when-using-uarte-at-high-baud-rate&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/388972?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 11:19:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4665ad86-76c5-4baa-a9f1-27dbb28f706d</guid><dc:creator>MagnusPersson</dc:creator><description>&lt;p&gt;Sorry about digging up an old post here.&lt;/p&gt;
&lt;p&gt;With regards to the values in the UART_BAUDRATE register I have a hard time match the &amp;quot;actual rate&amp;quot; in the nrf52_bitfields.h with the formula given.&lt;/p&gt;
&lt;div style="background-color:#1e1e1e;color:#d4d4d4;font-family:Consolas, &amp;#39;Courier New&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:#c586c0;"&gt;#define&lt;/span&gt;&lt;span style="color:#569cd6;"&gt; UART_BAUDRATE_BAUDRATE_Baud921600 (0x0EBED000UL)&lt;/span&gt;&lt;span style="color:#6a9955;"&gt; /*!&amp;lt; 921600 baud (actual rate: 941176) */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;0x0EBED000 * 16000000 / 2^32 = 921585&lt;/p&gt;
&lt;p&gt;Did I miscalculate or misunderstand anything?&lt;/p&gt;
&lt;p&gt;Thx,&lt;/p&gt;
&lt;p&gt;-Magnus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/181538?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 10:44:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6666390e-eb7e-42b7-8764-026f7fcd5084</guid><dc:creator>awneil</dc:creator><description>[quote userid="2137" url="~/f/nordic-q-a/46025/uart-baud-rate-512/181341"]On 52832 side I am not able to receive a single byte. There happens nothing[/quote]
&lt;p&gt;So what testing / debugging / investigation have you done to find out why?&lt;/p&gt;
&lt;p&gt;Again, do you see any activity at all when you transmit from the nRF? If so, is the baud rate correct?&lt;/p&gt;
&lt;p&gt;If your external MCU is using such a weird baud rate, is it also doing other weird things - like inverting the data, or using a weird frame format ...?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div class="content full threaded-reply-content user-defined-markup"&gt;
&lt;div class="content"&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="edit-form"&gt;&lt;/div&gt;
&lt;div class="actions meta default"&gt;
&lt;div class="navigation-list"&gt;
&lt;div class="container"&gt;
&lt;ul&gt;
&lt;li class="navigation-list-item vote"&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/181536?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 10:40:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c319484-5302-4386-9f41-46b8e18ae61c</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;At such a low baud rate, a software (bit-banged) UART may be practical ... ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/181535?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 10:37:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de9f8af3-b01d-474e-9d09-27f4fd4ed313</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;512 is not a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uarte.html?cp=2_1_0_34_9_10#register.BAUDRATE"&gt;supported baud rate&lt;/a&gt;. You can always try to play with the&amp;nbsp;BAUDRATE register but using anything other than the listed baud rates may or may not work. You can refer to &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/391/uart-baudrate-register-values/2046#2046"&gt;this ancient post&lt;/a&gt;&amp;nbsp;to see an explanation on the BAUDRATE register (it is the same for the UARTE peripheral on the nRF52 series).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/181341?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 13:17:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d59e87d0-4f2a-4913-be9f-53afa24fd8c6</guid><dc:creator>Fritz Kendeffy-Hermann</dc:creator><description>&lt;p&gt;I am not able to change the FW of the device&amp;nbsp;where the nrf52832 is connected to. So I need go get it work with baud rate 512.&lt;/p&gt;
&lt;p&gt;The uart communication (same code) was working before with normal baud rate in another project.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I connect TX of the connected mcu via serial adapter to my PC, I am able to monitor what it is sending.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;On 52832 side I am not able to receive a single byte. There happens nothing&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Uart baud rate 512</title><link>https://devzone.nordicsemi.com/thread/181331?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 12:50:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b08685ed-d1b8-44b2-a167-f0cb130df203</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Have you checked in the &lt;strong&gt;Product Specification&lt;/strong&gt; ?&lt;/p&gt;
&lt;p&gt;512 is not a&amp;nbsp;&amp;quot;normal&amp;quot; baud rate - why do you need that, specifically?&lt;/p&gt;
&lt;p&gt;Have you verified that your setup works with a &amp;quot;normal&amp;quot; baud rate?&lt;/p&gt;
[quote userid="2137" url="~/f/nordic-q-a/46025/uart-baud-rate-512"]I tried to configure the uart with this baud rate, but I am not able to get the uart communication working[/quote]
&lt;p&gt;So what, exactly, did you do?&lt;/p&gt;
&lt;p&gt;And what, exactly, was the result?&lt;/p&gt;
&lt;p&gt;Do you see any activity at all on transmit?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>