<?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>nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10604/nrf52-ble-uart-example-not-working-with-s132-ver-2-0-0-alpha</link><description>Hi, 
 the example ble_app_uart_s132 from the SDK 0.9.2 is not longer working with the new release of S132 ( s132_nrf52_2.0.0-7.alpha). I had to go back to s132_nrf52_1.0.0-3.alpha to get it working.
I am using Keil 5.17 and the lastest nrfGoStudio 1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Dec 2015 12:49:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10604/nrf52-ble-uart-example-not-working-with-s132-ver-2-0-0-alpha" /><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39508?ContentTypeID=1</link><pubDate>Wed, 16 Dec 2015 12:49:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c60cfde3-7908-492f-b04b-5f9c92433b8b</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;So you set app_ram_base to 0x20002368 and sd_ble_enable(..) returns NRF_ERROR_DATA_SIZE with app_ram_base still 0x20002368?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39507?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2015 16:17:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:298ae614-f6c6-4e1c-89b6-2e61d7cdb743</guid><dc:creator>Bret Foreman</dc:creator><description>&lt;p&gt;Yes, 0x20002368. It returns NRF_ERROR_DATA_SIZE regardless of what size I specify.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39502?ContentTypeID=1</link><pubDate>Mon, 14 Dec 2015 13:32:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:038384c9-3b84-411c-a398-3c96b497d1ef</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;You mean sd_ble_enable returns 0x20002368? Does it return error if app_ram_base is higher than this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39506?ContentTypeID=1</link><pubDate>Sat, 12 Dec 2015 00:34:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b48b136f-7828-4a14-bb21-b4ae7ebc12d2</guid><dc:creator>Bret Foreman</dc:creator><description>&lt;p&gt;I found that sd_ble_enable likes a ram size of 0x2368. At least, that&amp;#39;s the number it returns in the second argument. But it also always returns NRF_ERROR_DATA_SIZE, regardless of the size of app_ram_base.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39505?ContentTypeID=1</link><pubDate>Sat, 12 Dec 2015 00:10:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18c32398-0096-473e-ad63-aabfa756d784</guid><dc:creator>Bret Foreman</dc:creator><description>&lt;p&gt;I took a look at the start of the application region in nRFgo Studio and saw that it starts at 1C000, NOT 1B000. I chanced IROM1 to 1C000 and it loads.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39504?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2015 23:28:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:175da64c-c9e4-4501-8f50-cef576debac8</guid><dc:creator>Bret Foreman</dc:creator><description>&lt;p&gt;Where is __LINKER_APP_RAM_BASE defined?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39503?ContentTypeID=1</link><pubDate>Fri, 11 Dec 2015 21:44:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bf1b7b8-8d6b-4198-91a7-b0fbf1a9a073</guid><dc:creator>Bret Foreman</dc:creator><description>&lt;p&gt;I gave this method a try and I&amp;#39;m getting the following error message when I try to load:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Load &amp;quot;C:\\Nordic\\nRF51_SDK_10.0.0_dc26b5e\\examples\\Throughput_Central\\ble_app_uart_c\\pca10028\\s130\\arm5_no_packs\\_build\\nrf51422_xxac_s120.axf&amp;quot; 
Set JLink Project File to &amp;quot;C:\Nordic\nRF51_SDK_10.0.0_dc26b5e\examples\Throughput_Central\ble_app_uart_c\pca10028\s130\arm5_no_packs\JLinkSettings.ini&amp;quot;
* JLink Info: Device &amp;quot;NRF51422_XXAC&amp;quot; selected.
 
JLink info:
------------
DLL: V5.02e, compiled Sep 25 2015 18:24:14
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Aug 28 2015 19:26:24
Hardware: V1.00
S/N : 681440137 
 
* JLink Info: Found SWD-DP with ID 0x0BB11477
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl 0 @ F0000000
* JLink Info: ROMTbl 0 [0]: F00FF000, CID: B105100D, PID: 000BB471 ROM Table
* JLink Info: ROMTbl 1 @ E00FF000
* JLink Info: ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
* JLink Info: ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
* JLink Info: ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
* JLink Info: ROMTbl 0 [1]: 00002000, CID: B105900D, PID: 000BB9A3 ???
ROMTableAddr = 0xF0000003
 
Target info:
------------
Device: nRF51422_xxAC
VTarget = 3.300V
State of Pins: 
TCK: 0, TDI: 1, TDO: 1, TMS: 1, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints:          2
JTAG speed: 1000 kHz
 
Erase Failed!
Error: Flash Download failed  -  &amp;quot;Cortex-M0&amp;quot;
Flash Load finished at 13:41:57
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On thing: I don&amp;#39;t have a macro called APP_CODE_BASE in my project. What is it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39509?ContentTypeID=1</link><pubDate>Fri, 04 Dec 2015 08:45:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb9d3277-ec3c-4bed-b173-1c0831e357bc</guid><dc:creator>Johannes Lorenz</dc:creator><description>&lt;p&gt;Thank you very much Eric and Ole,&lt;/p&gt;
&lt;p&gt;your answers helped a lot to get a better understanding of the softdevice 123 ver. 2.x.&lt;/p&gt;
&lt;p&gt;Yours Johannes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39501?ContentTypeID=1</link><pubDate>Thu, 03 Dec 2015 13:12:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55463839-cbe5-4af7-8934-18521d12a644</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Hi Johannes,&lt;/p&gt;
&lt;p&gt;There are a couple of things that needs to be changed in the example to make it work with the newest alpha release of the SoftDevice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 05.01.2016&lt;/strong&gt;: There is now a migration document in the &lt;a href="http://www.nordicsemi.com/eng/nordic/download_resource/51469/6/19453586"&gt;zip folder&lt;/a&gt; of SD v2.0.0-8 alpha. This document explains in more depth what changes need to be made. For examples on how to use the new SoftDevice, check the SDK 11 examples ble_stack_init() function.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 09.12.2015&lt;/strong&gt;: The new alpha SoftDevices allows for configurable RAM size. This is calculated by the SoftDevice. sd_ble_enable will return error if the RAM size is too little. The way to do this is to run the code once to see how much RAM the SoftDevice uses with the configuration and then set this in the project. You can also set the RAM size to a higher value than what is required, this will only waste RAM. &lt;strong&gt;There will be a document describing this more in depth.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The SoftDevice headers need to be updated. Copy the files in &lt;code&gt;\s132_nrf52_2.0.0-7.alpha\s132_nrf52_2.0.0-7.alpha_API\include&lt;/code&gt; to &lt;code&gt;\nRF52_SDK_0.9.2\components\softdevice\s132\headers&lt;/code&gt; (copy and replace all files and folders)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change &lt;code&gt;ble_stack_init()&lt;/code&gt; to include the RAM base in the SoftDevice enable function, like this or similar:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; static void ble_stack_init(void)
 {
 uint32_t err_code;
 uint32_t app_ram_base;
 
 // Initialize SoftDevice.
 SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);

 // Enable BLE stack.
 ble_enable_params_t ble_enable_params;
 memset(&amp;amp;ble_enable_params, 0, sizeof(ble_enable_params));
 #if (defined(S130) || defined(S132))
     ble_enable_params.gatts_enable_params.attr_tab_size   = BLE_GATTS_ATTR_TAB_SIZE_DEFAULT;
 #endif
 ble_enable_params.common_enable_params.vs_uuid_count = 5;
 ble_enable_params.gatts_enable_params.service_changed = IS_SRVC_CHANGED_CHARACT_PRESENT;
 ble_enable_params.gap_enable_params.central_conn_count = 1;
 ble_enable_params.gap_enable_params.central_sec_count = 1;
 ble_enable_params.gap_enable_params.periph_conn_count = 1;
 app_ram_base = __LINKER_APP_RAM_BASE;
 err_code = sd_ble_enable(&amp;amp;ble_enable_params,app_ram_base);
 if(err_code == NRF_SUCCESS)
 {
 // Verify that __LINKER_APP_RAM_BASE matches the SD calculations 
 if(app_ram_base != __LINKER_APP_RAM_BASE)
     {
         uart_print(&amp;quot;Warning: unused memory: 0x%x&amp;quot;, __LINKER_APP_RAM_BASE - app_ram_base);
     }
 }
 else if(err_code == NRF_ERROR_DATA_SIZE)
 {
     // Not enough memory for the SoftDevice. place a breakpoint here or output app_ram_base
     uart_print(&amp;quot;Fatal: Not enough memory for the selected configuration. Required: 0x%x&amp;quot;, app_ram_base);
     ASSERT(0);
 }
 
 // Subscribe for BLE events.
 err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
 APP_ERROR_CHECK(err_code);
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The reason for this is explained in the link Eric sent you.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The &lt;code&gt;softdevice_assertion_handler(...)&lt;/code&gt; is changed in the new alpha release. Change it to something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; void softdevice_assertion_handler(uint32_t id, uint32_t pc, uint32_t info)
 {
     //error code
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The APP_CODE_BASE is changed to 0x1B000. Change ROM start to 0x1B000 and ROM size to 0x65000 in Keil (Options for target-&amp;gt;Target-&amp;gt;IROM1)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ole&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRf52: ble uart example not working with S132 ver. 2.0.0 alpha</title><link>https://devzone.nordicsemi.com/thread/39500?ContentTypeID=1</link><pubDate>Wed, 02 Dec 2015 17:27:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbbda1f3-c6be-4804-afb1-4b2529bf2119</guid><dc:creator>Eric Stutzenberger</dc:creator><description>&lt;p&gt;Hi jolo,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have 100% of the details to give you but in the download for version 2.0 is a new set of headers.  There are some additional parameters that need to be configured for the SoftDevice to run.&lt;/p&gt;
&lt;p&gt;See &lt;a href="https://devzone.nordicsemi.com/question/57142/s132_nrf52_200-4alpha-sd_ble_enable/"&gt;this&lt;/a&gt; question thread with more details on what to add.&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>