This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

What modules do I need to retain if using only SoftDevice, Flash Memory, and a time clock

Developing on the nrf51822

Have working code for the nRF52840 Dongle using the pc-ble-driver therefore all Bluetooth work is done using sd_* calls. The PC provides easy to use time,  file storage, and semaphore functions.

So I would like to port this code over to the DK supporting the nRF51822 using the latest SoftDevice supported (s130 I believe).

I started with the thermometer example code using the SDK 12.3.0 as that provides all the spin up code needed to initialize the chip. The replacement of the Bluetooth work done by the SDK to the sd_* only calls used in my pc-ble-driver examples was relatively easy. There was some effort needed to replace the semaphores since there is no way to support such functionality on the nRF51822. I tested my work-a-round on the pc-ble-driver code and it worked. (Have not tested it on the DK yet.)

Since I started with the example, I have a huge number of files due to the SDK. I would like to whittle out all those files that are no longer needed. I started by clearing those modules I clearly did not need in the sdk_config.h file. However, there are number of options that are not Bluetooth related I don't really know how to deal with.

So what I am asking is what modules do I need to retain if

  1. Using the SoftDevice
  2. Need to read/write pairing/bonding/stored measurement data to and from flash (to handle power cycles) - I believe that I can use SoftDevice flash calls to handle this but have not tested yet
  3. Need to generate time stamps (thus will need some type of RTC that I can use that does NOT conflict with SoftDevice.) This part appears to be extraordinarily complex.

Everything else I would like to toss out in attempt to make the project appear as simple as it can be - make it more appealing to developers. In the end the implementation will be for a new generic low energy health device standard such that one profile and service and thus one set of code will handle all personal health devices. Note that this has already been done on using pc-ble-driver (soft device).

Related