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

Does the S130 bootloader require SD_MBR_COMMAND_INIT_SD?

For the S310 stack the bootloader does not set a SD_MBR_COMMAND_INIT_SD command. What needs to be done for the S130?

#ifndef S310_STACK                                                                                                      
    sd_mbr_command_t com = {SD_MBR_COMMAND_INIT_SD, };                                                                  
                                                                                                                        
    err_code = sd_mbr_command(&com);                                                                                    
    APP_ERROR_CHECK(err_code);                                                                                          
                                                                                                                        
    err_code = sd_softdevice_vector_table_base_set(BOOTLOADER_REGION_START);                                            
    APP_ERROR_CHECK(err_code);                                                                                          
#endif // S310_STACK

If this should be called for the S130, which file should I use? The header file nrf_mbr.h only exists for the S110 and the S120 version so it seems.

Parents
  • With the S130 you indeed not to call these functions. Copy the nrf_mbr.h file to the S130 include folder:

    cp /opt/softdevices/s120_nrf51822_1.0.0_API/include/nrf_mbr.h /opt/softdevices/s130_nrf51822_0.5.0-1.alpha_API/include/
    

    Adjust of course for /opt/softdevices with your local install path.

    The nrf_sdm.h file of S110 has a sd_softdevice_vector_table_base_set function, while you also can encounter the sd_softdevice_forward_to_application function (with e.g. the S130). This is exactly the same function (at least the ones with the uint32_t address argument. So use either one.

Reply
  • With the S130 you indeed not to call these functions. Copy the nrf_mbr.h file to the S130 include folder:

    cp /opt/softdevices/s120_nrf51822_1.0.0_API/include/nrf_mbr.h /opt/softdevices/s130_nrf51822_0.5.0-1.alpha_API/include/
    

    Adjust of course for /opt/softdevices with your local install path.

    The nrf_sdm.h file of S110 has a sd_softdevice_vector_table_base_set function, while you also can encounter the sd_softdevice_forward_to_application function (with e.g. the S130). This is exactly the same function (at least the ones with the uint32_t address argument. So use either one.

Children
No Data
Related