<?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>nRF51822-QFAC custom board with wrong baudrate</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24849/nrf51822-qfac-custom-board-with-wrong-baudrate</link><description>Story and Official Code Test Passed 
 I am trying to integrate BLE into Smart-Lock and LoRa Terminal . So I build a custom board with off-the-thelf modules to evalute and integration. In both projects, nRF51822 may connect to a host micro via UART. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Sep 2017 04:06:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24849/nrf51822-qfac-custom-board-with-wrong-baudrate" /><item><title>RE: nRF51822-QFAC custom board with wrong baudrate</title><link>https://devzone.nordicsemi.com/thread/97864?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2017 04:06:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:319f96e0-607f-468e-acf9-308ad9d728d5</guid><dc:creator>allankliu</dc:creator><description>&lt;p&gt;Hi, Jørn&lt;/p&gt;
&lt;p&gt;Thanks for your support and follow up. With my new RF module, I did more labs. Now TXD works well after disable HWFC in CONFIG in the source file. Well, set HWFC to false is not enough at all, since this Macro is not used in source file anyway. I put my labs &lt;a href="https://devzone.nordicsemi.com/question/166822/baremetal-uart-txd-blocked-due-to-hwfc-regardless-macro-definition/"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, baremetal UART demo works, I am going to test BLE/UART demo this afternoon. I will turn to your help if I ran into other issues. :)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The BLE UART demo works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822-QFAC custom board with wrong baudrate</title><link>https://devzone.nordicsemi.com/thread/97863?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2017 13:36:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dcbfa26-e900-4c30-8b90-479c4fac03a6</guid><dc:creator>J&amp;#248;rn</dc:creator><description>&lt;p&gt;I think it might be necessary to see the schematics and layout of your custom board to see if anything there might be the issue. If your project is not confidential you can upload it to your original question here. If it is confidential you can create a mypage ticket at &lt;a href="http://www.nordicsemi.com/"&gt;nordicsemi.com&lt;/a&gt; and refer to this case.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822-QFAC custom board with wrong baudrate</title><link>https://devzone.nordicsemi.com/thread/97865?ContentTypeID=1</link><pubDate>Tue, 05 Sep 2017 12:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06fb820b-816e-46c5-b0fb-ecb717d7ce2b</guid><dc:creator>allankliu</dc:creator><description>&lt;p&gt;I changed to another prototype board, it seems the situation is the same. BLE works, UART doesn&amp;#39;t, baremetal UART doesn&amp;#39;t work too.&lt;/p&gt;
&lt;p&gt;I am confused, it is a hardware issue or firmware issue ? Is it anything to do with differences between nRF51822 and nRF51422? Or should I take care the GPIO pull-up/sink current?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822-QFAC custom board with wrong baudrate</title><link>https://devzone.nordicsemi.com/thread/97862?ContentTypeID=1</link><pubDate>Sat, 02 Sep 2017 01:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55b7915e-6197-44f5-bb00-5e334919928f</guid><dc:creator>allankliu</dc:creator><description>&lt;p&gt;Thanks Jørn,&lt;/p&gt;
&lt;p&gt;This is not the final custom board, I designed it for evaluation and development, if BLE works, than I will wire RX/TX to my LoRa/Sub-1GHz radio board. I am a software engineer, so I want a platform to develop my firmware, rather than PCB debug and RF tuning.&lt;/p&gt;
&lt;p&gt;Here are my answers for your questions.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Keypad stands for Key Matrix in NORDIC_Toolbox/UART_APP.&lt;/li&gt;
&lt;li&gt;In the circuit, I used a off-the-thelf nRF modules instead of nRF51822 silicon, there are 16MHz and 32.768KHz crystal oon board.&lt;/li&gt;
&lt;li&gt;I actually used the same project defined for PCA10028, only custom_board.h and Preprocessor are altered.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Since BLE communication is quite successful, I think crystal is good enough for BLE and UART. since baudrate is much lower than 16MHz, even crystal&amp;#39;s PPM is good enough, if we slow down the baudrate, it should be stable.&lt;/p&gt;
&lt;p&gt;Regarding the baremetal example lab, I have done that already before going to this post, as I mentioned in the very beginning. But I will double confirm with latest SDK.&lt;/p&gt;
&lt;p&gt;I ordered two more kits (nRf51822/nRF52832) from another local supplier as cross-checking, because I doubt if there is anything wrong related to the module itself. It is strange, that I run into so many issues although I have bought may kits, several are phased out due to silicon version. Serveral are not official boards.&lt;/p&gt;
&lt;p&gt;If these kits are not working well, It will be helpful If your local branch in China can arrange a kit for my evalution, I will return it back to your local office.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822-QFAC custom board with wrong baudrate</title><link>https://devzone.nordicsemi.com/thread/97861?ContentTypeID=1</link><pubDate>Fri, 01 Sep 2017 13:57:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fcdbe0b-e1a0-423a-ab97-0ccdec873591</guid><dc:creator>J&amp;#248;rn</dc:creator><description>&lt;p&gt;Hello allankliu&lt;/p&gt;
&lt;p&gt;I will need some additional information from you.&lt;/p&gt;
&lt;p&gt;You say you press the &amp;quot;keypad&amp;quot;, I assume you mean keypad on your phone? The circuit in the picture you posted would not be capable of BLE so I assume it is not of your current custom board.
Are you using the same project on your custom board, as you did on the pca10028? Other than the custom_board.h file, have you altered the project in any way?&lt;/p&gt;
&lt;p&gt;Regarding the pictures you posted:&lt;/p&gt;
&lt;p&gt;I see you do not have a crystal for the nRF51822, which means you are using the internal RC oscillator. The internal oscillator has, according to the nRF51822 specification, a frequency tolerance of +/- 1-5 %. It is this clock that generates the UART clock.&lt;/p&gt;
&lt;p&gt;From what I have found the CH340G uses a 12MHz crystal. I have not found anything about clock accuracy. However the datasheet states&lt;/p&gt;
&lt;p&gt;Transmitter baud rate error is less than 0.3%, receiver baud rate error tolerance is at most 2%&lt;/p&gt;
&lt;p&gt;You are not using any hardware flow control, which means you are very dependent on accurate clocks at both ends (you are anyway but even more so without HWFC). The baud rate error tolerance of the CH340G is stricter than the accuracy of the nRF51822 16MHz RC oscillator, this could possibly cause problems.&lt;/p&gt;
&lt;p&gt;If you are sending your data via BLE on your custom board then you must have a 16/32MHz crystal, as the radio wouldn&amp;#39;t work without it. This should eliminate this as the crystal oscillator has a higher accuracy.&lt;/p&gt;
&lt;p&gt;I would recommend you try to get serial communication between the nRF and the CH340G working &lt;strong&gt;without&lt;/strong&gt; BLE first. You can find the hardware example at SDK_Folder/examples/peripheral/uart, or if you want a bare-metal example you can look &lt;a href="https://github.com/andenore/NordicSnippets/tree/master/examples/uart"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Jørn Frøysa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>