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

nrf_sdh_enable_request takes quite a long time to end (S132 6.1.1)

Hello,

I'm working on nRF52832 and i'm porting the SDK15.3.0 (i was currently working with SDK14.2.0) but i'm facing something strange with the function : "ble_stack_init" 

Indeed, it is very long to end compared to the one in SDK14 and i don't know why. I know this function enables the softDevice but why it is so long. I tried to add more RAM to the softdevice but i didn't change anything. I'm using the softDevice S132 6.1.1.

This function takes around 2 or 3 seconds

Thank you in advance,

Best regards,

Aurélien

Parents Reply Children
  • Hello,

    Here is my sdk_config, but actually it is the one from the project example.

    6746.sdk_config.h

    My definitions are made in the app_config.h file that is included by sdk_config : 

    #define NRF_BLE_QWR_ENABLED                   0
    #define NRF_BLE_SCAN_SCAN_DURATION            400
    #define NRF_BLE_SCAN_SCAN_WINDOW              160
    #define BLE_NUS_C_ENABLED                     1
    #define BLE_NUS_ENABLED                       1
    #define NRFX_CLOCK_CONFIG_LF_SRC              0
    #define NRFX_RTC_DEFAULT_CONFIG_IRQ_PRIORITY  7
    #define NRFX_WDT_CONFIG_BEHAVIOUR             0 // wdt pause in SLEEP and HALT 
    #define NRFX_WDT_CONFIG_RELOAD_VALUE          40000
    #define CLOCK_CONFIG_LF_SRC                   0 // RC oscillator
    #define SAADC_ENABLED                         1
    #define SAADC_CONFIG_RESOLUTION               2
    #define SAADC_CONFIG_LP_MODE                  1
    #define SAADC_CONFIG_IRQ_PRIORITY             7
    #define TWI_ENABLED                           1
    #define TWI_DEFAULT_CONFIG_FREQUENCY          104857600
    #define TWI_DEFAULT_CONFIG_HOLD_BUS_UNINIT    1
    #define TWI_DEFAULT_CONFIG_IRQ_PRIORITY       7
    #define TWI0_ENABLED                          1
    #define WDT_ENABLED                           1
    #define WDT_CONFIG_BEHAVIOUR                  0
    #define WDT_CONFIG_RELOAD_VALUE               40000
    #define APP_SCHEDULER_ENABLED                 0
    #define APP_TIMER_CONFIG_RTC_FREQUENCY        0
    #define LOW_POWER_PWM_ENABLED                 1
    #define NRF_SORTLIST_ENABLED                  0
    #define NRF_LOG_BACKEND_RTT_ENABLED           1
    #define NRF_LOG_BACKEND_RTT_TEMP_BUFFER_SIZE  128
    #define NRF_LOG_BACKEND_UART_ENABLED          0
    #define NRF_SDH_BLE_TOTAL_LINK_COUNT          2
    #define NRF_SDH_BLE_GAP_EVENT_LENGTH          10
    #define NRF_SDH_BLE_GATT_MAX_MTU_SIZE         32
    #define NRF_SDH_BLE_VS_UUID_COUNT             1
    #define NRF_SDH_DISPATCH_MODEL                2
    #define NRF_SDH_CLOCK_LF_SRC                  0
    #define NRF_SDH_CLOCK_LF_RC_CTIV              31
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV         31
    #define NRF_SDH_CLOCK_LF_ACCURACY             1
    #define FDS_VIRTUAL_PAGES                     3     // Total size of FDS : 3*1024*4 = 12kB
    
    #define PPI_ENABLED                           1
    #define GPIOTE_ENABLED                        1
    #define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 1
    
    #define APP_UART_ENABLED                      0
    #define RETARGET_ENABLED                      0
    
    #define RTC_ENABLED                           1
    #define RTC2_ENABLED                          1

    I think your issue could come from the LF clock source or RTC source.

    Regards,

    Aurélien

  • Hi,

    Even though I replaced clock sources, it is taking ~50ms for ble_stack_init to complete.

  • Maybe someone from the Nordic team could be more useful than me for this issue, im sorry i dont have any clue 

Related