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
  • Hi Anders

    Can you confirm that you've increased the NRF_SDH_BLE_TOTAL_LINK_COUNT define to the number of links you'd like to have, as well as the NRF_SDH_BLE_CENTRAL_LINK_COUNT? You have set the RAM_START and RAM_SIZE to the values requested by the SoftDevice as well, correct?

    The reason you're not seeing debug messages is likely because you're using the RTT_backend (which the ble_app_uart example does by default). Try setting the NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED define to 0 in sdk_config.h and see if you're able to see the debug log that way?

    Best regards,

    Simon

Reply
  • Hi Anders

    Can you confirm that you've increased the NRF_SDH_BLE_TOTAL_LINK_COUNT define to the number of links you'd like to have, as well as the NRF_SDH_BLE_CENTRAL_LINK_COUNT? You have set the RAM_START and RAM_SIZE to the values requested by the SoftDevice as well, correct?

    The reason you're not seeing debug messages is likely because you're using the RTT_backend (which the ble_app_uart example does by default). Try setting the NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED define to 0 in sdk_config.h and see if you're able to see the debug log that way?

    Best regards,

    Simon

Children
No Data
Related