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

RAM setting for nRF51822 AA

Hi,

I'm using nRF5 SDK V11、s130_nrf51_2.0.0_softdevice. My application has added the DFU service . I download application,softdevice and bootloader to nRF51822 AC, the code can run well. How ever,when I download them to nRF51822 AA, the code cann't be run. I have modified the IRAM1 setting on the keil as follow:

IRAM1:0x20002000(start) 0x4000(size).

Because the flash size of AA and AC is the same, so I just modify the IRAM setting. Besides, the size of my application as follow(From the .map file):

Total RO Size (Code + RO Data) 50108 ( 48.93kB) Total RW Size (RW Data + ZI Data) 9800 ( 9.57kB) Total ROM Size (Code + RO Data + RW Data) 50200 ( 49.02kB) I guess the reason is the size of the AA is not enough. Could anyone give me some advice? Thanks.

Parents
  • Your IRAM1 settings are incorrect as you only have 16kB (0x4000) RAM available, i.e. it should be set to

    IRAM1:0x20002000(start) 0x2000(size).
    

    and you say the total RAM usage is 9800 bytes, i.e. 0x2648 bytes, which is not enough.

    The minimum RAM usage for the S130 v2.0 SoftDevice is 0x200013C8, as stated here, but will change depending on your configuration, e.g. how many central and peripheral links.You can try to decrease the IRAM start address to the minimum and then see which minimum start address sd_ble_enable returns. You should also keep in mind that the application and the SoftDevice will share the call stack and the SoftDevice may use upto 1536 bytes .

    You can try to decrease the RAM usage by setting Optimization under Options for Target--> C/C++ set to Level 3 (-03) and that you have checked Use Cross-Module Optimization under Options for Target--> Target.

    If this does not work you will have to rewrite and optimize your application code.

    Best regards

    Bjørn

Reply
  • Your IRAM1 settings are incorrect as you only have 16kB (0x4000) RAM available, i.e. it should be set to

    IRAM1:0x20002000(start) 0x2000(size).
    

    and you say the total RAM usage is 9800 bytes, i.e. 0x2648 bytes, which is not enough.

    The minimum RAM usage for the S130 v2.0 SoftDevice is 0x200013C8, as stated here, but will change depending on your configuration, e.g. how many central and peripheral links.You can try to decrease the IRAM start address to the minimum and then see which minimum start address sd_ble_enable returns. You should also keep in mind that the application and the SoftDevice will share the call stack and the SoftDevice may use upto 1536 bytes .

    You can try to decrease the RAM usage by setting Optimization under Options for Target--> C/C++ set to Level 3 (-03) and that you have checked Use Cross-Module Optimization under Options for Target--> Target.

    If this does not work you will have to rewrite and optimize your application code.

    Best regards

    Bjørn

Children
No Data
Related