<?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>Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15909/beginner-question-sdk-ble-examples-not-working</link><description>Hello, I&amp;#39;m a beginner for nRF51822, now my status is sticking on those SDK_11.0.0 BLE examples, while I could successfully running non-BLE (such as examples of bsp/uart). 
 Setup: 
 
 Environment: Keil4 
 Board: Custom board with 32MHz and LF 32.768kHz</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 25 Aug 2016 07:39:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15909/beginner-question-sdk-ble-examples-not-working" /><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60706?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2016 07:39:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db5f3b14-76dc-4ece-97c7-9a69f94b789e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Great :) I didn&amp;#39;t know what not configuring the crystal would cause this behavior, but nice to know. I thought you had already configured the chip for 32MHz crystal, I guess I should&amp;#39;ve asked. Anyways, thanks for adding the solution.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60705?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2016 06:15:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2d02071-d6f2-4698-a722-294a5cd23d4f</guid><dc:creator>kei</dc:creator><description>&lt;p&gt;Thank you! Finally I found I need the settings according to the following post:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/33972/use-external-32mhz-crystal/"&gt;Question: use external 32MHz crystal&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60704?ContentTypeID=1</link><pubDate>Thu, 25 Aug 2016 01:31:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7244acfd-032d-4c37-9cff-19988dd6411d</guid><dc:creator>kei</dc:creator><description>&lt;p&gt;Please see the following links, thanks!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://s000.tinyupload.com/?file_id=77680406505637169045"&gt;nrf51422_xxac_s130.map&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://s000.tinyupload.com/?file_id=00006256766724859493"&gt;nrf51422_xxac_s130.plg&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://s000.tinyupload.com/?file_id=32926407679528763780"&gt;custom_board.h&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60698?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2016 10:25:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a487f7b-885f-4095-8771-da2ac6165fa5</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not sure what is causing this. Could you upload the complete log when you try to flash?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60696?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2016 08:50:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8b0c308-4c3c-4bd5-909a-9da5d26ba94b</guid><dc:creator>kei</dc:creator><description>&lt;p&gt;Yes, still got the message as follow&lt;/p&gt;
&lt;p&gt;&lt;a href="https://s13.postimg.org/8a2a6p6xz/n_RF51_ble_app_uart_Debug_4.png"&gt;Screen - Trace the last execution&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://s4.postimg.io/z0q926xn1/n_RF51_ble_app_uart_Debug_3.png"&gt;Screen - Branch to 0xFFFFFFFE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Moreover, when I unplug the 3V power and reconnect, I will see the UART terminal will repeatedly polling &amp;quot;UART Start&amp;quot; (I suspect the board is repeatedly restarting).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60695?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2016 08:43:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15753ac0-ea81-41bb-b2a3-eaae9bbf4a72</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Do you still get the warning?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60694?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2016 07:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b794bef-2f84-4d03-8504-0765a9e1c1b0</guid><dc:creator>kei</dc:creator><description>&lt;p&gt;Is that sd_app_evt_wait() will put the PC at 0xFFFFFFFE?&lt;/p&gt;
&lt;p&gt;And why I got the warning that JLink T-bit of XPSR is 0 but should be 1?&lt;/p&gt;
&lt;p&gt;In fact, I still cannot use nRF Toolbox app to discover it, I cannot figure out what happen because the debugger sticking on 0xFFFFFFFE with that warning. Please help~~&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60693?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2016 07:31:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7559afa-8207-4a3b-8648-8bbbdd61607f</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;No don&amp;#39;t change anything in Flash Download. RAM for algorithm should be Start: 0x20000000 Size: 0x2000. Programming Algorithm should be Start 0x00000000 Size: 0x00200000&lt;/p&gt;
&lt;p&gt;Do you still get the J-Link warning?&lt;/p&gt;
&lt;p&gt;It is supposed to wait when you call sd_app_evt_wait(). It waits for an application event. The function will return when that happens. If you don&amp;#39;t want this to happen comment it out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60703?ContentTypeID=1</link><pubDate>Wed, 24 Aug 2016 02:44:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2708871-5b32-4730-a2e5-dec64022a1ca</guid><dc:creator>kei</dc:creator><description>&lt;p&gt;Thank you Petter, now the program could pass softdevice_enable(), however, the new setting will make the program halt at power_manage(), not even generate an error_code, and gives a warning:&lt;/p&gt;
&lt;p&gt;&amp;quot; **JLink Warning: T-bit of XPSR is 0 but should be 1. Changed to 1. &amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://s4.postimg.org/z0q926xn1/n_RF51_ble_app_uart_Debug_3.png"&gt;Screen capture 1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The new target RAM setting like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://s10.postimg.org/i49y54id5/n_RF51_ble_app_uart_Target_setup_1.png"&gt;Screen capture 2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Note that I&amp;#39;ve set the RAM size to 0x1F80 as my chips only have 16kB.&lt;/p&gt;
&lt;p&gt;Moreover, should I need to make the same setting in J-link Utility Tags like this?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://s3.postimg.org/5f4x46uoj/n_RF51_ble_app_uart_Target_setup_2.png"&gt;Screen capture 3&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It seems that sd_app_evt_wait() will overwrite the memory inside SoftDevice, and triggered a hard halt.
What&amp;#39;s going wrong now? Many thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60702?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2016 10:25:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64e6ae8b-3715-433a-9751-a11c9888cbfc</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;The IRAM1 start and size in ble_app_uart is not 0x20000000 and 0x4000. It is 0x20002080 and 0x5F80. 0x00000000 is NRF_ERROR_NO_MEM. Which probably means that you haven&amp;#39;t given enough RAM to the SoftDevice. To see how much RAM the SoftDevice requires go into softdevice_enable() and put a breakpoint after sd_ble_enable() is called. The value of app_ram_base should be used as IRAM1 start.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60701?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2016 09:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59fb8e2f-51ce-4866-9ea8-0765fca87e79</guid><dc:creator>kei</dc:creator><description>&lt;p&gt;Thank you Petter, I changed RAM1 start because it was instructed by tutorial &amp;quot;ROM and RAM Management&amp;quot;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve put back RAM1 start 0x2000000 and size 0x4000, still no improvement, and result in warning &amp;quot;JLink Warning: T-bit of XPSR is 0 .........&amp;quot;, so I keep the previous settings.&lt;/p&gt;
&lt;p&gt;Now I&amp;#39;ve tried to put break point at here and got some findings:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = softdevice_enable(&amp;amp;ble_enable_params);

APP_ERROR_CHECK(err_code);  &amp;lt;---break point
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then I found the function return err_code = 0x0000004, and in turn this APP_ERROR_CHECK will reset the chip. Which means actually the program could enter main(), just got an error when running into softdevice_enable(), it seems that the situation also related to RAM allocation, isn&amp;#39;t it?&lt;/p&gt;
&lt;p&gt;&lt;a href="https://s14.postimg.org/4lnns19qp/n_RF51_ble_app_uart_Debug_2.png"&gt;Screen of return err_code&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://s16.postimg.org/q9198rj79/n_RF51_ble_app_uart_n_RFgo.png"&gt;Screen of nRFgo&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60700?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2016 06:45:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a741e42e-946c-48dc-b62c-8864c2b3fdc6</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Why did you change RAM1 start? Are you sure you flashed the S130 v2? Found in \components\softdevice\s130\hex? Could you set optimizations to Level 0, recompile and put a breakpoint in the start of main()? Do you hit it? Please upload a screenshot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60699?ContentTypeID=1</link><pubDate>Tue, 23 Aug 2016 01:31:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0de0b5b8-c61f-4533-bfa2-3d8b6bceedc7</guid><dc:creator>kei</dc:creator><description>&lt;p&gt;Thanks for your reply!&lt;/p&gt;
&lt;p&gt;Revision 3 - nRFgo studio show QFAAH00 (0x0072)&lt;/p&gt;
&lt;p&gt;Setting in Keil4 &amp;quot;options for target&amp;quot; &amp;gt; &amp;quot;on-chip&amp;quot; section:&lt;/p&gt;
&lt;p&gt;IROM1: Start:0x1B000 Size:0x25000&lt;/p&gt;
&lt;p&gt;IRAM1: Start:0x20001870 Size:0x2790&lt;/p&gt;
&lt;p&gt;&lt;a href="https://s13.postimg.org/4d7oahplj/n_RF51_ble_app_uart_Debug.png"&gt;Debug screen capture&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Beginner question: SDK BLE examples not working</title><link>https://devzone.nordicsemi.com/thread/60697?ContentTypeID=1</link><pubDate>Mon, 22 Aug 2016 17:23:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f052dc6e-3fcd-415c-ba2d-a58ec27c951b</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What revision of the nRF51822 chip do you have on your custom board? How have you changed the ROM/RAM settings?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>