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

which SDK is compatible with S120 v2 ?

Hello,

I am trying to use the s120\multilink_central example, using SDK v6.1 and S120 v2.0. The probleme is that I get a hardfault handler. I think that the probleme is due to incompatibility between SDK and S120.

I indicate that in the nordic web site, it's mentioned that SDK v6.1 supports only S120 v0.8, which I could not find it.

Any suggestion please !

Parents
  • FormerMember
    0 FormerMember

    I have not tested S120 v2.0.0 with SDK 6.1.0, however, below are my suggestions on what you could try:

    What could result in a hard fault, is if the IRAM1 address is not correctly set in Keil, see this post.

    In addition, since the S120 v2.0.0 supports non-concurrent central and master, the role of your device should be set during stack initialization. It can for example be done the following way (tested in SDK 7.2.0 only..):

    static void ble_stack_central_init(void)
     {
        uint32_t err_code;
    
        ble_enable_params_t ble_enable_params;
    
        ble_enable_params.gap_enable_params.role = BLE_GAP_ROLE_CENTRAL;
        ble_enable_params.gatts_enable_params.service_changed = IS_SRVC_CHANGED_CHARACT_PRESENT;
    
        // Initialize the SoftDevice handler module.
        SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false);
    
        err_code = sd_ble_enable(&ble_enable_params);
       APP_ERROR_CHECK(err_code);
    
        // Register with the SoftDevice handler module for BLE events.
        err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
        APP_ERROR_CHECK(err_code);
    
        // Register with the SoftDevice handler module for System events.
        err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
        APP_ERROR_CHECK(err_code);
    }
    

    Also remember to change the header files for S120 that your project links to, to the header files for S120 v 2.0.0, in the following folder: C:\Keil\ARM\Device\Nordic\nrf51822\Include\s120

    If using SDK 7.2.0, the new header files should be placed in the following folder: C:\Keil\ARM\Device\Nordic\nRF51_SDK_7.2.0\components\softdevice\s120\headers

  • Hi,

    the HardFault is no longer taking place. I modified the IRAM1 address in keil like mentioned here

Reply Children
No Data
Related