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

RAM addressing in SDK v12.2

We are developing a BLE Beacon using the SDK v12.2 and the softdevice s132 on a nRF52832 chip. The code works on the DevKit successfully but it doesn't work on our custom board. On the DevKit, however, we get this warning of sd_ble_enable: RAM address should be changed to 0x2000pqrs and the length should be changed to 0xmnop. I have tried changing the RAM address in the linker script (I use GCC) and the same error repeats? I even debugged with a breakpoint before the sd_ble_enable() function in the softdevice_handler.c and that is where the warning is originating from. (I assume the issue with the advertisement is the lack of sufficient RAM memory).

I have tried changing the RAM addresses and increasing the RAM size to get the Beacon to advertise but to no avail. Is there something I am doing wrong? Should I change the RAM address in some other file as well?

P.S: I noticed some others have posted the same question but I am not able to understand how they were able to solve theirs. In SDK v13, the whole set of API calls for initializing the BLE stack has been revamped. Is it an SDK issue? Do let us know.

Thanks,

Vijay   

Parents
  • Hi Vijay,

    Strange, so you are editing the ble_app_beacon_gcc_nrf52.ld file adjacent to the project Makefile and the changes are not reflected in the debug log? Please double check that you are editing the correct linker script. You can check out the LINKER_SCRIPT variable in the makefile to see which linker script it invokes for the build.

    Also note that the SDK examples are set up to use the optional LF crystal by default. Make sure to change the clock source to the internal RC if you don't have the crystal in your design. Otherwise the program will enter an infinite loop waiting for the crystal to start.

    // Low frequency clock source to be used by the SoftDevice
    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,            \
                                     .rc_ctiv       = 16,                             \
                                     .rc_temp_ctiv  = 2,                              \
                                     .xtal_accuracy = 0} //ignored when using RC

  • Hey Vidar, we have the low frequency - 32.768 kHz - crystal on our board. I was able to get all the defined examples in the SDK working perfectly. 

    Just a hunch - I have a twi sensor and we were using the nrf_delay function to provide delays while data sampling. We wanted low power and I implemented the delays using the app_timer module. Only after that, we have this problem. I'm using the RTC0 for the app_timer? Will it affect the RAM ? Is there any way to use RTC1 with the softdevice?

    I checked the makefile and the linker_script variable is correct. The very same code works perfectly on the devkit. 

    Thanks

    Vijay

  • Hi Vijay,

    I tried the ble_app_beacon example in sdk 12.2.0 with GCC. The default configuration allocates more RAM memory to the softdevice than what is needed, hence the warning. However, it is safe to ignore, it just let you know that you can free more RAM for the application code. The warning did not show after I adjusted RAM settings in the linker script.

    RTC0 is reserved for the softdevice, but app_timer should use RTC1 by default.Have you debugged you application and verified that your program reaches advertising_start()?

    Regards,

    Vidar 

  • Hi Vidar, thanks for the answer! I've got it to advertise. I am sorry I created the issue because the nrf_connect app on iOS doesn't recognize the beacon. I did a "hcitool lescan" on my RPi 3 and it showed up.

    This is an useful piece of information about RTC1. I will use the same RAM address on the linker script. 

    I don't know if I have to create another issue for this but my application involves BLE_advertising, a TWI sensor with an application timer. What are all the flags in sdk_config.h that need to be set for me to ensure the sleep mode current is under 100 uA ? 

  • I was able to discover the device programmed with "ble_app_beacon" on my iphone 7 with  nRF connect v.1.8.8. Are you using the same version of nRF connect? Old versions of nRF connect will not recognize beacons that are not iBeacon compliant.  

    The average power consumption depends on your application code. Basically how often you perform the sensor readout and the advertisement interval. You can use the online power profiler here to get an estimate. Note: estimates are based on a device with  DCDC enabled, 3V supply and LFXO as the low frequency clock source.

Reply
  • I was able to discover the device programmed with "ble_app_beacon" on my iphone 7 with  nRF connect v.1.8.8. Are you using the same version of nRF connect? Old versions of nRF connect will not recognize beacons that are not iBeacon compliant.  

    The average power consumption depends on your application code. Basically how often you perform the sensor readout and the advertisement interval. You can use the online power profiler here to get an estimate. Note: estimates are based on a device with  DCDC enabled, 3V supply and LFXO as the low frequency clock source.

Children
No Data
Related