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

BLE Peripheral connected to multiple Central devices on nrf52840 DK and SDK V16.0.0 (revisited)

Hello.

I am running Segger studio 4.5 on Windows 10 and the ble_app_uart example project that works fine with one connected central device (i.e. iPhone with nRF Toolbox running UART).

Now I would like to have two such connections.

I found this exact question answered here:
https://devzone.nordicsemi.com/f/nordic-q-a/58710/ble-peripheral-nus-connected-to-multiple-central-devices-on-nrf52840-s140-and-sdk-v16-0-0/239409#239409 

And while that thread solved the problem that time, it does not work for me now...

I have changed RAM size and location as suggested, and BOTH link counts in sdk.config.h.
(Stopping at NRF_LOG_WARNING("Change the RAM start location... etc. and set the following in the project options:
RAM_START=0x2000002C
RAM_SIZE=0x3FFD4)

For some reason I get no output in the "Debug Terminal" window during debugging, even though I set this in config:
#define NRF_LOG_ENABLED 1
#define NRF_LOG_DEFAULT_LEVEL 4

However, the code crashes during ble_stack_init() in nrf_drv_clock.c::sd_state_evt_handler() when trying to do CRITICAL_REGION_EXIT.

I have also run the project that was kindly made available as a zip-file in the thread above, but it crashes at the exact same spot.

Any ideas what's going on?

Thanks,

Anders.

Parents
  • Where are you looking for this log output? You can download the J-Link RTT viewer for instance, which should print the debug log either way. You can also try changing the define to 1 if it's 0 already to see if that changes anything.

    I'm sorry. I keep mixing those defines up... Can you confirm that the CENTRAL_LINK_COUNT is set to 0 if the two others are set to 2? I thought you saw this issue when increasing the LINK_COUNT beyond 2?

    You can check out our guide on how to adjust RAM and Flash Memory according to the SoftDevice you're using.

    Best regards,

    Simon

Reply
  • Where are you looking for this log output? You can download the J-Link RTT viewer for instance, which should print the debug log either way. You can also try changing the define to 1 if it's 0 already to see if that changes anything.

    I'm sorry. I keep mixing those defines up... Can you confirm that the CENTRAL_LINK_COUNT is set to 0 if the two others are set to 2? I thought you saw this issue when increasing the LINK_COUNT beyond 2?

    You can check out our guide on how to adjust RAM and Flash Memory according to the SoftDevice you're using.

    Best regards,

    Simon

Children
No Data
Related