How can I switch the existing code in order to run it with a different SoftDevice?

Hi,
I am using nRF5832 DK. Currently, I am using SoftDevice s132 to compile my code.
I want to compile it with a different SoftDevice (say s112). But it's not working.

Kindly, help me.
Thanks 

Merry Christmas in advance :)

Parents Reply
  • Thanks for the response, 

    I get it, I need to change the ROM and RAM settings if I want to flash my code with a different SoftDevice .hex file.
    Unfortunately, I couldn't find the RAM and ROM sizes for s112. 

    Also, the size given for s132 doesn't match with what I am using, for e.g, 
    I am using:

    for s132: 
     
    for s140:


    both of them are working normally.

    Kindly tell me what RAM and ROM sizes I should use for s112.

    Thanks

Children
  • Hi,

    For S122 the combined MBR and SoftDevice memory requirements are:

    • Flash: 100.0 kB (0x19000 bytes).
    • RAM: 3.7 kB (0xEB8 bytes). This is the minimum required memory. The actual requirements
      depend on the configuration chosen at sd_ble_enable() time.
    • Call stack: The SoftDevice uses a call stack combined with the application. The worst-case
      stack usage for the SoftDevice is 1.8 kB (0x700 bytes). Application writers should ensure that
      enough stack space is reserved to cover the worst-case SoftDevice call stack usage combined
      with the worst-case application call stack usage.

    You can find this in the release notes for the SoftDevice, which you get when you download the SoftDevice from here.

    There is also some other resources regarding this if you are interested, such as in the S112 specification: S112 Memory resource requirements and S112 Memory resource map and usage. You can also see Bootloader - Memory layout. This shows the memory layout for different chips and SoftDevices when using a bootloader. However, it can also be relevant if you are not using bootloader, to see the memory range of MBR, SoftDevice, and application (which will include the bootloader memory range in case of no bootloader). From this you can see that for S132 the application area starts at 0x26000, which corresponds with the ROM1 start in your picture, and the size is the size of the memory range 0x26000-0x80000.

    Best regards,

    Marte

Related