<?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 revision 1: Development environment</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111026/nrf51822-revision-1-development-environment</link><description>I have a number of BLE modules I bought from various distributors (yes, Aliexpress was one...) to test and set up a reasonable development environment for creating fairly basic BLE devices. 
 One of them is a WT51822-S4AT module with an NRF51822 which</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 May 2024 05:15:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111026/nrf51822-revision-1-development-environment" /><item><title>RE: NRF51822 revision 1: Development environment</title><link>https://devzone.nordicsemi.com/thread/483147?ContentTypeID=1</link><pubDate>Tue, 14 May 2024 05:15:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bea1ab73-4f85-4309-a9cb-25154c11601e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Scott,&lt;/p&gt;
&lt;p&gt;Great, I&amp;#39;m glad to hear that it worked. I just want to add that the nRF51 series is not recommended for new designs, in case anyone else is reading this.&amp;nbsp;It&amp;#39;s also not possible to qualify new designs with Bluetooth SIG using &lt;span style="text-decoration:line-through;"&gt;this series&amp;nbsp;&lt;/span&gt;silicon revision 1:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/what-impact-does-the-deprecation-and-withdrawal-of-bluetooth-core-specification-v4-0-and-v4-1-have-on-your-current-and-future-products"&gt;What impact does the deprecation and withdrawal of Bluetooth Core specification v4.0 and v4.1 have on your current and future products?&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
[quote userid="133590" url="~/f/nordic-q-a/111026/nrf51822-revision-1-development-environment"]The others&amp;nbsp;are NRF52 based[/quote]
&lt;p&gt;&amp;nbsp;For these you can use our online power profiler at&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;Online Power Profiler for Bluetooth LE&lt;/a&gt;&amp;nbsp;if you want to estimate the expected current consumption for your configuration.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Vidar&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51822 revision 1: Development environment</title><link>https://devzone.nordicsemi.com/thread/483126?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 19:46:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f645989b-ed4a-472b-abd1-d419bdf31cae</guid><dc:creator>BuriedCode</dc:creator><description>[quote userid="4240" url="~/f/nordic-q-a/111026/nrf51822-revision-1-development-environment/482931"]The Softdevice will request the 32K clock source when it is enabled through BLE_STACK_HANDLER_INIT(), and the source is set to the crystal oscillator by default. You can change this to the internal RC oscillator with the NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION symbol.[/quote]
&lt;p&gt;Ahhs, eys, I read about this in other threads, but wasn&amp;#39;t sure where to actually change the clocksource - or if it had to be done in multiple files - but the pointer you gave meant I could just search for the handler.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote userid="4240" url="~/f/nordic-q-a/111026/nrf51822-revision-1-development-environment/482931"]Please note that the hex file generated by the build does not include the Softdevice binary. The Softdevice needs to be flashed separately.[/quote]
&lt;p&gt;I had done this - flashed the softdevice (s110, v5.2.1) - but... I think when I flashed the application, I had &amp;quot;Erase Full Chip&amp;quot; set in the Keil&amp;#39;s STLinkV2 debugger settings, so it was wiped when the application was flashed. &lt;/p&gt;
&lt;p&gt;Changed that to &amp;quot;Erase Sectors&amp;quot;, used openocd and the STLinkV2 to flash the softdevice again, then keil for the HID application.&amp;nbsp; After making slight modification to the button/LED GPIO numbers, I now have that up and running - tested on Android and Windows 10!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So that&amp;#39;s pretty much everything I wanted to achieve, and I can now play about with the examples for different functionality, as well as make a jig for (accurately) testing current consumption for optimising power usage.&lt;/p&gt;
&lt;p&gt;Thanks again for your help, wouldn&amp;#39;t have known where to start without it!&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;Scott&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51822 revision 1: Development environment</title><link>https://devzone.nordicsemi.com/thread/482931?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 06:42:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb22abc9-da0f-4a86-a54f-e2faaf1b5a33</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for the update. It&amp;#39;s&amp;nbsp;good to hear that you were able to build with Keil uVision5. This SDK did not include Keil v5 project files, so I assumed that Keil v4 would be required.&lt;/p&gt;
[quote user="BuriedCode"]GCC ARM v4_7-2014q2 (as backup, as yet untested in hardware, but seems to compile if linker script and include paths are added to Keil project options. [/quote]
&lt;p&gt;I have not tried to use GCC with Keil, I&amp;#39;ve only used it with the Makefiles. One important difference is that they use different startup files.&lt;/p&gt;
[quote user="BuriedCode"]Produced a &amp;#39;hex&amp;#39; but only with the HID example, which didn&amp;#39;t work, but that could easily be hardware&amp;nbsp; as this module has no 32kHz xtal)[/quote]
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;The Softdevice will request the 32K clock source when it is enabled through BLE_STACK_HANDLER_INIT(), and the source is set to the crystal oscillator by default. You can change this to the internal RC oscillator with the NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION symbol.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;e.g.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for initializing the BLE stack.
 *
 * @details Initializes the SoftDevice and the BLE event interrupt.
 */
static void ble_stack_init(void)
{
    BLE_STACK_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION,
                           BLE_L2CAP_MTU_DEF,
                           ble_evt_dispatch,
                           false);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Please note that the hex file generated by the build does not include the Softdevice binary. The Softdevice needs to be flashed separately.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51822 revision 1: Development environment</title><link>https://devzone.nordicsemi.com/thread/482918?ContentTypeID=1</link><pubDate>Sun, 12 May 2024 20:40:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d15017d-5851-45a7-a1a4-2eaafa53d9ee</guid><dc:creator>BuriedCode</dc:creator><description>&lt;p&gt;Thanks for the prompt reply, and apologies for my late response - was googling around trying to download the relevant software and messing about with revisions to see what works.&amp;nbsp; With the version you pointed to I was able to use Keil uVision 5 (community license) too get the blink example working with the WT51822-S4AT module - its on my bench right now with a nice lightshow.&amp;nbsp; Used a cheap STLinkv2 clone as the debugger.&lt;/p&gt;
&lt;p&gt;Along with:&lt;/p&gt;
&lt;p&gt;NRF SDK 4.4.2&lt;/p&gt;
&lt;p&gt;ARM compiler V5.06u7 (used for the blinky example, it seems all examples are made for this compiler, works out the box)&lt;/p&gt;
&lt;p&gt;GCC ARM v4_7-2014q2 (as backup, as yet untested in hardware, but seems to compile if linker script and include paths are added to Keil project options. The file structure of the examples is odd and I had to manually add lots of paths to the project for it to pick up the header files required. Produced a &amp;#39;hex&amp;#39; but only with the HID example, which didn&amp;#39;t work, but that could easily be hardware&amp;nbsp; as this module has no 32kHz xtal)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This was all just to verify I could compile and flash the target chip - revision 1 QFAA CA/C0 - so hopefully, I can move on to actual BLE apps/examples.&amp;nbsp; &amp;nbsp;I included all the details, revision numbers here so others can find this thread in search if they happen to get this module or another module with this revision chip.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF51822 revision 1: Development environment</title><link>https://devzone.nordicsemi.com/thread/482799?ContentTypeID=1</link><pubDate>Fri, 10 May 2024 12:40:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4117fd61-fc7d-4fdc-9ec1-811162c86b9d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;nrf51 SDK 4.4.2 supports IAR, GNU Make, and Keil4 uVision for building (Only selected projects can be built with GCC/IAR.) However, I&amp;#39;m not sure if you will find a version of IAR or Keil old enough to be compatible with this SDK available for download. The ARM GCC toolchain can be downloaded at&amp;nbsp;&lt;a href="https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update"&gt;https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>