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

How to adjust BLE RAM Settings?

Hi

I am using nrf51-dk board along with the S130. I am getting the following message when I debug my code. The central link count is set to 0 while peripheral link count is set to 1. Do I need to adjust the RAM settings if I have added new custom services and characteristics in ble? How do I adjust the RAM settings?

0> RAM START ADDR 0x20001F00 should be adjusted to 0x20001E00 0> RAM SIZE should be adjusted to 0x6200 0> sd_ble_enable: RAM START at 0x20001F00 0> sd_ble_enable: app_ram_base should be adjusted to 0x20001E00 0> ram size should be adjusted to 0x6200

Parents
  • Hi soumil.

    when debuging, softdevice_enable() will tell you how much RAM the SoftDevice needs. The first 7680 (0x1E00) bytes are needed with your setup.

    So in this case, you actually have 100 bytes of gap in the RAM that will not be used by the SoftDevice nor by your application.

    You can go to the project options and reduce the ram start address from 0x20001F00 to 0x20001E00. (For Keil the menu is called "Options for Target" under "Project")

    Later, if you add more vendor specific services or perhaps more links, the Softdevice will need more RAM and you can use the debug feedback to adjust the project settings accordingly.

  • I'm getting similar messages, and I'm using the armgcc Makefile-based projects, so I edited ble_app_hrs_freertos_gcc_nrf52.ld, for instance, and set:

    RAM (rwx) :  ORIGIN = 0x20002080, LENGTH = 0xdf80
    

    to

    RAM (rwx) :  ORIGIN = 0x20001FE8, LENGTH = 0xe018
    

    And the warning messages go away.

Reply Children
No Data
Related