<?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>Migration nRF51822 -&amp;gt; nRF52832</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17328/migration-nrf51822---nrf52832</link><description>Hi, 
 I have an old project running on nRF51822, with SoftDevice SDK v8 - S110 mode.
I&amp;#39;m trying to migrate the project to a nRF52832 with SoftDevice SDV v12 - S132 v3 mode. 
 I&amp;#39;m working with Segger Embedded Studio v3.10e 
 The device is a peripheral</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 31 Oct 2016 15:18:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17328/migration-nrf51822---nrf52832" /><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66592?ContentTypeID=1</link><pubDate>Mon, 31 Oct 2016 15:18:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e977579-8686-456d-b41b-779042606e34</guid><dc:creator>stunt_man</dc:creator><description>&lt;p&gt;As stated, here is how the aforementioned issues were solved.&lt;/p&gt;
&lt;p&gt;Configuration :
Hardware : PCA10040
Software : Segger Embedded Studio IDE using SoftDevice S132 v3 (Nordic’s SDK v12)&lt;/p&gt;
&lt;p&gt;Migration from a PCA10001 to a 10040 (hardware), from SoftDevice S110 (Nordic’s SDK v7) to SoftDevice S132 v3 (Nordic’s SDK v12)&lt;/p&gt;
&lt;p&gt;1/ Peer Manager&lt;/p&gt;
&lt;p&gt;The main issue were about the migration from device manger to the new peer manager.
Following Segger Embedded Studio tutorial in Nordic’s blog almost worked for me (&lt;a href="https://devzone.nordicsemi.com/blogs/1032/segger-embedded-studio-a-cross-platform-ide-w-no-c/)."&gt;devzone.nordicsemi.com/.../).&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Tutorial is made for ble_app_beacon example. This example does not require peer manager. So everything works fine.&lt;/p&gt;
&lt;p&gt;When adding peer manager some adjustments have to be made so the project can compile and run without any problem.&lt;/p&gt;
&lt;p&gt;First adjustement: Memory settings.
With SDK v12, the accurate configuration is the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;FLASH_START=0x1F000
FLASH_SIZE=0x61000
SRAM_START=0x20002128
SRAM_SIZE=0xDED8
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Second adjustment: Section
To make project compile and run without memory problem, just follow RK’s advice (&lt;a href="https://devzone.nordicsemi.com/question/68722/segger-embedded-studio-unplaced_sections-problem/)"&gt;devzone.nordicsemi.com/.../)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;flash_placement.xml has to be changed:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;MemorySegment name=&amp;quot;$(FLASH_NAME:FLASH)&amp;quot;&amp;gt;
....
    &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; load=&amp;quot;Yes&amp;quot; runin=&amp;quot;.fs_data_run&amp;quot; name=&amp;quot;.fs_data&amp;quot; /&amp;gt;
&amp;lt;/MemorySegment&amp;gt;

&amp;lt;MemorySegment name=&amp;quot;$(RAM_NAME:RAM);SRAM&amp;quot;&amp;gt;
....
    &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; load=&amp;quot;No&amp;quot; name=&amp;quot;.fs_data_run&amp;quot; address_symbol=&amp;quot;__start_fs_data&amp;quot;  end_symbol=&amp;quot;__stop_fs_data&amp;quot; /&amp;gt;
&amp;lt;/MemorySegment&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Same for thumb_crt0.s&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ldr r2, =__tdata_end__
bl memory_copy
# ADD HERE ... 
ldr r0, =__fs_data_load_start__
ldr r1, =__fs_data_start__
ldr r2, =__fs_data_end__
bl memory_copy
# TO HERE ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;At this point, the projet compiles and runs through Segger Embedded Studio!&lt;/p&gt;
&lt;p&gt;2/ BLE Services&lt;/p&gt;
&lt;p&gt;Some minor changes from SDK v7 to SDK v12 were made, inspired by Glucose-meter example (ble_app_gls). I recommend to have a deep look inside this example to write new services. No big changes, everything is pretty clear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66591?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 17:53:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6435fe85-abd8-4d5e-86d1-7e1125400e2c</guid><dc:creator>stunt_man</dc:creator><description>&lt;p&gt;I am happy to say a solution was found following RK comment [here] - unvaluable thread for SES users!
There was a problem with the sections the project. peer_manager() is now working (and now nrfjprog test gives the right answer)! Oh yeah! :-D&lt;/p&gt;
&lt;p&gt;Now, I&amp;#39;ll focus on the ble services.&lt;/p&gt;
&lt;p&gt;When everything is working, I&amp;#39;ll be writing a summary of what I&amp;#39;ve done.
Your help was really appreciated&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66590?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 14:08:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2803cfdc-bace-4156-a4b7-be640cd69e47</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Okay. After programming the softdevice and the firmware, there should be tag in flash, indicating where the bonding information should be stored. That tag starts with FDS_PAGE_TAG_MAGIC (0xDEADCODE). After programming the softdevice + fimware to the chip. Could you read page 0x7D000 and check if has the DEADCODE tag:&lt;/p&gt;
&lt;p&gt;nrfjprog -f nrf52 --memrd 0x7d000&lt;/p&gt;
&lt;p&gt;You could also double check that it works with one of the examples in the sdk, like ble_app_gls for instance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66589?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 13:48:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:075f0bb4-2cf8-48de-8ef3-85ee4b0898de</guid><dc:creator>stunt_man</dc:creator><description>&lt;p&gt;Yes, for each page (FDS_VIRTUAL_PAGES is set equal to 3 in sdk_config.h), the program goes to case FDS_PAGE_UNDEFINED&amp;quot; --&amp;gt; // Do not initialize or use this page.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66588?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 13:38:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e66232bc-4e28-4371-bdca-916a08e1cea2</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Yes, that looks correct.&lt;/p&gt;
&lt;p&gt;Where exactly in fds_init(..) -&amp;gt; pages_init(..): Where does the program &amp;quot;go&amp;quot;, does it go into any of the switch cases? Is it &amp;quot; case FDS_PAGE_UNDEFINED&amp;quot; --&amp;gt;  // Do not initialize or use this page. ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66587?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 13:10:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf427fc2-7beb-4893-b45b-9c30ee27e239</guid><dc:creator>stunt_man</dc:creator><description>&lt;p&gt;1/ Thx, I&amp;#39;ll have a look on this service&lt;/p&gt;
&lt;p&gt;2/ I use a PCA10040 v1.1.0&lt;/p&gt;
&lt;p&gt;Global settings for the device :
Flash: START_ADDRESS 0x0 / SIZE 0x00080000 (512 kb)
RAM: START_ADDRESS 0x20000000 / SIZE 0x00010000 (64 kb)&lt;/p&gt;
&lt;p&gt;Due to the fact that SoftDevice (SDK12 / S132 v3.0) will use part of this space, settings for the project are the following
Flash: START_ADDRESS 0x1F000 / SIZE 0x61000 (approximately 390 kb)
RAM: START_ADDRESS 0x20002128 / SIZE 0xDED8 (approximately 55 kb)&lt;/p&gt;
&lt;p&gt;Does it look right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66584?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 12:35:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0f28f36-6402-4f76-8572-c5386a283a3e</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;&lt;strong&gt;1)&lt;/strong&gt; The example ble_app_uart shows how to implement a custom service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2)&lt;/strong&gt; Which size/length do you use for the flash and RAM settings?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66586?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 11:53:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60fadfff-157e-4793-ba79-4dfd780d717a</guid><dc:creator>stunt_man</dc:creator><description>&lt;p&gt;#ifndef FDS_ENABLED
#define FDS_ENABLED 1
#endif
#if  FDS_ENABLED
//  FDS_OP_QUEUE_SIZE - Size of the internal queue.
#ifndef FDS_OP_QUEUE_SIZE
#define FDS_OP_QUEUE_SIZE 4
#endif&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// &amp;lt;o&amp;gt; FDS_CHUNK_QUEUE_SIZE - Determines how many @ref fds_record_chunk_t structures can be buffered at any time. 
#ifndef FDS_CHUNK_QUEUE_SIZE
#define FDS_CHUNK_QUEUE_SIZE 8
#endif

// &amp;lt;o&amp;gt; FDS_MAX_USERS - Maximum number of callbacks that can be registered. 
#ifndef FDS_MAX_USERS
#define FDS_MAX_USERS 8
#endif

#ifndef FDS_VIRTUAL_PAGES
#define FDS_VIRTUAL_PAGES 3
#endif

#ifndef FDS_VIRTUAL_PAGE_SIZE
#define FDS_VIRTUAL_PAGE_SIZE 1024
#endif
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Preprocessor definitions I added:
FDS_ENABLED
FSTORAGE_ENABLED
PEER_MANAGER_ENABLED&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66585?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 11:51:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6068a62-a276-4f83-bd68-9a560e8a993e</guid><dc:creator>stunt_man</dc:creator><description>&lt;p&gt;Hi Kristin, thank you for your reply.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1/ About service and characteristics&lt;/strong&gt;: same result with nRF Connect / Android or iOS (iOS is indeed making a service discovery). My guess is that it has something to do with the way I implement my custom services (initialization and event management). What worked with SDK 8 seems to be obsolete with SDK12 - S132. Do you know if there is an example where I can fin custom service implementation - currently analysing ble_hrs file?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2/ Concerning peer_manager&lt;/strong&gt; : as stated, error happens during pm_init().
To be precise, in pm_init(), a call is made to pds_init().
In pds_init(), everything is fine until fds_init(). Calling fds_init() returns a FDS_ERR_NO_PAGES error that causes the NRF_ERROR_NO_MEM.
Memory configuration is the following:
FLASH_START=0x1F000
SRAM_START=0x20002128
I paste my FDS settings in sdk_config.h in next comment&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Migration nRF51822 -&gt; nRF52832</title><link>https://devzone.nordicsemi.com/thread/66583?ContentTypeID=1</link><pubDate>Wed, 26 Oct 2016 11:19:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38352fbd-c4e2-491c-9174-f034c9a0057e</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Being able to see the services and characteristics is independent of the peer manager.&lt;/p&gt;
&lt;p&gt;I assume that the service and characteristics have been successfully added to the device?
If so, could you use the sniffer to check if the iOS device is doing a service discovery?   Could you try do delete all cached information on the iOS device about the nRF52? Does it work with nRF Connect (PC) or Android?&lt;/p&gt;
&lt;p&gt;Regarding pm_init()/fds_init() failing: If you run the chip in debug mode, where exactly is the error code being returned from? Which FDS settings do you use in sdk_config.h?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>