<?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>(Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10621/solved-help-with-wgt51822-s2-module</link><description>Hi, 
 I have been developing using some development modules from WaveShare (based on the nRF51822 QFAC) and they work fine. 
 However, I&amp;#39;m now trying to use a module better suited small scale deployment, which I sourced from AliExpress 
 www.aliexpress</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Dec 2015 10:12:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10621/solved-help-with-wgt51822-s2-module" /><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39617?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2015 10:12:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6012d94-7af0-40c2-a899-b94259725dae</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Sorry for not replying sooner.&lt;/p&gt;
&lt;p&gt;The issue was definitely because these modules don&amp;#39;t have the 32kHz crystal and most example code is setup to require the 32kHz crystal&lt;/p&gt;
&lt;p&gt;To prove this, I found a 32kHz crystal, and soldered it to the module and all my example code now works fine.&lt;/p&gt;
&lt;p&gt;BTW.
I found out the module is actually a Wireless-tag.com WGT51822-S2, but was this was not shown in the AliExpress listing.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure how to mark this thread as resolved, so please mark this question as answered if you can&lt;/p&gt;
&lt;p&gt;Thankyou again for all your help&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Roger Clark&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39616?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2015 09:20:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc0423fe-dfc6-4c6c-9b8b-245f0aa113ee</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;I am happy to help Roger. Feel free to accept the answer if you feel the issue is resolved :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39614?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2015 10:16:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e211d8c-f525-47ac-8a84-e55c0d48e9b5</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Thanks Torbjørn&lt;/p&gt;
&lt;p&gt;I have managed to get the module working using mbed (online), by using the &amp;quot;platform&amp;quot; of the &amp;quot;Switch Science HFM1017&amp;quot; - which I know does not have a 32khz crystal.
If I download the hex file from mbed and flash using that. It all works.&lt;/p&gt;
&lt;p&gt;So, I have exported all the files so that I can compare with the local set I had been using (which were originally exported from mbed by RedBearLabs some time ago)&lt;/p&gt;
&lt;p&gt;I have the SDK and I had Eclipse setup on one machine, but I&amp;#39;m now using a new PC, so I have to set it up all over again :-(&lt;/p&gt;
&lt;p&gt;I think I need to read the nRF51 programming manual, as I thought I had made all the necessary changes to use the RC osciallator instead of the Crystal oscillator, but I must have missed something&lt;/p&gt;
&lt;p&gt;Anyway. Thanks again for your help.
Cheers&lt;/p&gt;
&lt;p&gt;Roger&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39608?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2015 10:04:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2a943fe-82fa-4018-ab78-cbafb9482a2a</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;It should be possible to change the LF clock source in mbed, but I am not very familiar with the online mbed compiler and haven&amp;#39;t been able to figure out where to change it...
You can also download the official SDK, which has several BLE examples supporting Eclipse/GCC, and allow you to set the LF clock source to either external or internal (with calibration).
The SDK can be downloaded here:
&lt;a href="http://developer.nordicsemi.com/nRF51_SDK/"&gt;developer.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39615?ContentTypeID=1</link><pubDate>Sat, 05 Dec 2015 20:27:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f043258b-ae26-48f0-8278-00783744aed8</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;I still have not managed to get these modules to work.&lt;/p&gt;
&lt;p&gt;However I have identified them as a Wireless-tag WT51822-S4AT, which is the same as the
WT51822-S2 except comes preflashed with some AT command firmware, which i have erased&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.wireless-tag.com/index.php/Product/dis/26.html"&gt;www.wireless-tag.com/.../26.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I checked the mbed codebase I&amp;#39;m using and I changed the #define so that the module would use the RC oscillator, however it seemed to make no difference, and the module seems to fail to start up.&lt;/p&gt;
&lt;p&gt;Unfortunately I cant seem to find any example code for this module.&lt;/p&gt;
&lt;p&gt;Does anyone have any example code for Eclipse / Gcc for modules without the 32khz crystal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39606?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 09:38:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2472a7f6-bd30-48b3-b039-8b1cc12b1d0a</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;@Torbjørn&lt;/p&gt;
&lt;p&gt;Yes.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using the S130 soft device from the Version 9 SDK&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll need to track down where in the code this is currently getting setup. I did a quick search through the codebase I&amp;#39;m using, (mostly from mbed) and I can&amp;#39;t see anything like SOFTDEVICE_HANDLER_INIT&lt;/p&gt;
&lt;p&gt;Sorry if I seem vague about this,but I&amp;#39;m using a modified version of the RedBearLab&amp;#39;s firmware for the Arduino IDE, as it compiles under GCC.&lt;/p&gt;
&lt;p&gt;And I&amp;#39;m not currently familiar with how the code is structured.&lt;/p&gt;
&lt;p&gt;I am however very familiar with embedded development as I am webmaster on www.stm32duino.com and host the Arduino_STM32 repo&amp;#39;s on my github account.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39607?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 09:23:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75071711-3baa-447e-b583-73003bc3c94d</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;A quick comment:
If you are using a BLE example with a SoftDevice, and you need to change the 32k clock source, you need to change the following line in main.c:&lt;br /&gt;
SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);&lt;/p&gt;
&lt;p&gt;To use the internal 32k source change the clock parameter to something like this instead:
NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_8000MS_CALIBRATION&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39613?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 05:41:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20b5ae1c-5d74-4adb-99c1-b031d8a6735b</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;It looks like the mbed file I&amp;#39;m using has been updated since I took snapshot (another long story)&lt;/p&gt;
&lt;p&gt;So it now appears to include a timeout on the startup check (which my file doesnt have)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/cmsis/TARGET_NORDIC/TARGET_MCU_NRF51822/system_nrf51.c"&gt;github.com/.../system_nrf51.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In fact, the newer version of the file has been refactored, and looks like it has other improvements&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll need to contact the original author of the code - who took the snapshot of the mbed cmsis and ask him whether he thinks I can just grab the latest cmsis from mbed or whether he made some changes&lt;/p&gt;
&lt;p&gt;I suspect he just took a snapshot, and copied the files rather than using the github submodule system&lt;/p&gt;
&lt;p&gt;But I won&amp;#39;t be able to contact him until tomorrow as he is in Canada and they will be asleep by now&lt;/p&gt;
&lt;p&gt;Anyway, I think you have solved this mystery.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Roger&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39612?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 05:31:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99d2da1c-dc6b-4aad-84ed-dfe8035ea408</guid><dc:creator>frogofmagic</dc:creator><description>&lt;p&gt;I&amp;#39;m not familiar mbed, but if you don&amp;#39;t have 32K crystal, you can set the clock source to 16M.
I saw the link you posted, it might be help.
NRF_CLOCK-&amp;gt;LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos);&lt;/p&gt;
&lt;p&gt;to..&lt;/p&gt;
&lt;p&gt;NRF_CLOCK-&amp;gt;LFCLKSRC = (CLOCK_LFCLKSRC_SRC_RC &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos);&lt;/p&gt;
&lt;p&gt;or to..&lt;/p&gt;
&lt;p&gt;NRF_CLOCK-&amp;gt;LFCLKSRC = (CLOCK_LFCLKSRC_SRC_SYNTH &amp;lt;&amp;lt; CLOCK_LFCLKSRC_SRC_Pos);&lt;/p&gt;
&lt;p&gt;Maybe you can try it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39611?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 05:23:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50d73fdc-7415-40dd-8ee0-90d61e8d55fe</guid><dc:creator>frogofmagic</dc:creator><description>&lt;p&gt;The program is MDK-ARM uVision V5.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39610?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 05:21:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95cc0cdd-4cd4-4a08-b614-a6aa27d993bf</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Umm&lt;/p&gt;
&lt;p&gt;Looks like this may be the issue&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.mbed.org/forum/repo-44668-mbed_blinky-community/topic/5151/?page=1#comment-25346"&gt;developer.mbed.org/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;i.e there is code which waits for both the 16Mhz and 32khz clocks to start but the 32khz without any form of timeout (in the mbed cmsis ) :-(&lt;/p&gt;
&lt;p&gt;There wasn&amp;#39;t an answer to that question on the mbed forum, so I guess I&amp;#39;ll need to manually work out what mbed uses the 32khz clock for and whether its necessary or whether there is a work around&lt;/p&gt;
&lt;p&gt;i.e is the 32khz clock normally essential ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39609?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 05:18:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c366374e-82eb-455a-a822-1f5afae02299</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Which program did the screengrab come from?&lt;/p&gt;
&lt;p&gt;I&amp;#39;m building just using Make rather than using a GUI build (long story).&lt;/p&gt;
&lt;p&gt;I know that the AC and AA have different build settings, because of the difference in the size of RAM, but I was not aware of any other differences.&lt;/p&gt;
&lt;p&gt;In fact as far as I was aware my build target was set for 16k RAM&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using this WaveShare development board which uses this module&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.waveshare.com/product/modules/wireless/bluetooth/core51822.htm"&gt;www.waveshare.com/.../core51822.htm&lt;/a&gt;, (actually I have 3 RF modules like this and they are all QFAC)&lt;/p&gt;
&lt;p&gt;Looking at the schematic, it has a 32KHz osc&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.waveshare.com/w/upload/5/57/Core51822-Schematic.pdf"&gt;www.waveshare.com/.../Core51822-Schematic.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have a schematic for the module from AliExpress, but I can only see what looks like the 16Mhz crystal and not a 32khz osc&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll need to look through my code (a lot of which came from mbed) to see if there is a dependency on the 32khz osc&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Solved) Help with WGT51822-S2 module</title><link>https://devzone.nordicsemi.com/thread/39605?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 04:51:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5773305e-222e-41a5-ac93-f2527429ec0f</guid><dc:creator>frogofmagic</dc:creator><description>&lt;p&gt;1.The module you post from AliExpress, it seems no 32.768 crystal.
Did you check it?&lt;/p&gt;
&lt;p&gt;2.The AC and AA need different build option, make sure you change to right one.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/AC.png" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>