nRF51822_xxaa SDK12 S130 v2.0.1 IROM and IRAM settings

We have a custom board with the nRF51822 xxaa chip on it. The board is completely functional and uses SDK8.0 and S110 as of now. We are porting the firmware to SDK12 and S130 SD. Following this blog [https://devzone.nordicsemi.com/blogs/723/rom-and-ram-management/], we tried the values of IROM and IRAM as follows in experimental_ble_app_blinky. The board doesn't show any signs of BLE advertising. Below are the IRAM and IRAM values that were used.

IRAM base - 0x20001870 IRAM size(16 kB RAM) - 0x2790

IROM base - 0x1B000 IROM size(256 kB Flash) - 0x25000

We also tried exprimental_ble_app_blinky from SDK11 with the above IROM and IRAM settings and it didn't work. But, when the below settings were tried, BLE started advertising.

IRAM base - 0x20002000 IRAM size(16 kB RAM) - 0x2000

IROM base - 0x1B000 IROM size(256 kB Flash) - 0x25000

We tried the same settings on SDK12 experimental_ble_app_binky and the board doesn't advertise.

If someone could get back to me with the IROM and IRAM settings for nRF51822 xxAA chip for SDK12 and SD S130 v2.0.1, it would be really helpful.

I also want to understand why 0x20001870 didn't work, while 0x20002000 worked on SDK11.

  • Hi,

    The IROM number is correct for S130 V2.0.1, The IRAM varies depending on how you configure the SoftDevice, how many services/characteristics you add, etc. For experimental_ble_app_blinky the default IRAM base should be 0x20001fe8 in SDK 12.1, if you add something extra to the default example, you need to increase the number.

    Regarding you last question,0x20001870 did not work because this is not enough RAM for the SoftDevice to work, but when you increased it to 0x20002000 this was enough for the SoftDevice. If you enable logging in SDK 12.1 (NRF_LOG_ENABLED set to 1 in sdk_config.h) the function softdevice_enable() will print the correct RAM settings if you have not allocated enough RAM to the SoftDevice.

  • I tried the experimental_ble_app_blinky in SDK12 without making any changes to the code with the following values. IRAM base - 0x20002000 IRAM size(16 kB RAM) - 0x2000 These values didn't get it working. When I tried reducing it to IRAM base - 0x20001FE8 IRAM size(16 kB RAM) - 0x2018, then as well I don't see it working. Is the 16KB RAM on nRF51822_xxAA version sufficient to support SDK12 or SDK12 needs a minimum of 32KB RAM?

  • 0
    25473 pts.
    in reply to Sigurd

    For the experimental_ble_app_blinky example the softdevice uses 1FE8(8168 bytes) RAM and the application with logging enabled uses 3920bytes (ZI-data + RW-data). That’s 11,8 kB RAM, so you have sufficient RAM with the nRF51 16kB RAM device for this example.


    Do you have an external LF crystal(32 kHz) on your custom board? If not use the RC oscillator instead

    #define NRF_CLOCK_LFCLKSRC      {.source        = NRF_CLOCK_LF_SRC_RC,            \
                                     .rc_ctiv       = 16,                                \
                                     .rc_temp_ctiv  = 2,                                \
                                     .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
    
  • That was a quick response! And thank you it worked. I tried to compile other applications like ble_app_proximity and the values of IROM and IRAM [IRAM base - 0x20001FE8 IRAM size(16 kB RAM) - 0x2018 and IROM base - 0x1B000 IROM size(256 kB Flash) - 0x25000] works perfectly fine. But, when I try to compile bootloader_secure for doing DFU with the following IROM and IRAM values, I get errors. IROM1 Start - 0x3AC00, Size - 0x5000 IRAM1 Start - 0x20002C00, Size - 0x1380

    The errors are as follows:

    linking... ._build\nrf51422_xxac_s130.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_conn_params.o(.bss).

    ._build\nrf51422_xxac_s130.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_conn_params.o(.data).

  • Continuing the errors due to lack of characters in the previous comment.

    ._build\nrf51422_xxac_s130.axf: Error: L6406E: No space in execution regions with .ANY selector matching softdevice_handler.o(.data).

    ._build\nrf51422_xxac_s130.axf: Error: L6406E: No space in execution regions with .ANY selector matching nrf_dfu_flash.o(fs_data).

    ._build\nrf51422_xxac_s130.axf: Error: L6406E: No space in execution regions with .ANY selector matching app_scheduler.o(.data).

    ._build\nrf51422_xxac_s130.axf: Error: L6406E: No space in execution regions with .ANY selector matching nrf_ble_dfu.o(.data).

    ._build\nrf51422_xxac_s130.axf: Error: L6406E: No space in execution regions with .ANY selector matching nrf_drv_rng.o(.bss).

Related