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

Concurrent connections ble_app_hrs issue

Arm Gcc (using Eclipse Neon) | SDK 13.0 | nrf52 DK (PCA10040) | tried soft device 4.0.2 and 4.0.4

I can successfully compile and run the example -ble peripheral- ble_app_hrs. Everything works as it should including bonding.

I want to add concurrent connections (nrf is peripheral - nrf has no central). I am referencing the experimental multiperipheral example (which works and compiles fine on its own - just no bonding or peer manager). When I change the following lines in the ble_app_hrs example, I get error 4 on softdevice_enable.

Under // Configure the maximum number of connections , I change the default to:

ble_cfg.gap_cfg.role_count_cfg.periph_role_count  = 2;

I think error 4 means a memory error. So I put some breakpoints in softdevice_handler.c where it throws error 4 and get the correct memory origin (original was 0x20002558, it now says it should be 0x20002c98. I change the linker to have the origin as 0x20002c98 instead of 0x20002558. I clean the project and erase the chip and recompile and flash and the program does not start. When I go to debug, I get an 0x0 error window open in the debugger and the program never starts.

What am I missing? Any help would be appreciated! Bryan

Parents
  • FormerMember
    0 FormerMember

    The RAM size is the amount of RAM available for the application. On the nRF52832, there is 64 kB of RAM = 0x10000. The RAM start address set in the application, is the first RAM address used by the application. All addresses below that one are reserved for the softdevice.

    Since the RAM region starts at address 0x20000000, the RAM start address indicated by the softdevice reflects the amount of RAM used by the softdevice. Therefore the application RAM size can be calculated the following way:

    RAM size = 0x10000 - (RAM start address - 0x20000000)

Reply
  • FormerMember
    0 FormerMember

    The RAM size is the amount of RAM available for the application. On the nRF52832, there is 64 kB of RAM = 0x10000. The RAM start address set in the application, is the first RAM address used by the application. All addresses below that one are reserved for the softdevice.

    Since the RAM region starts at address 0x20000000, the RAM start address indicated by the softdevice reflects the amount of RAM used by the softdevice. Therefore the application RAM size can be calculated the following way:

    RAM size = 0x10000 - (RAM start address - 0x20000000)

Children
Related