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

Bootloader example on custom nRF52832 board

Hello.

I'm trying to get the example bootloader Segger project (secure_bootloader_ble_s132_pca10040) running on a custom board I have that uses the nRF52832 as its core.

Out of the box, I've got the bootloader example to work on the PCA10040 dev board so I can familiarize myself with the steps.

However, I am unable to get this to work with my customer board. So far, the main modifications I made were to change the BOOT button option in the sdk_config.h to the button I used for my board. Segger says the bootloader was downloaded to the device properly but when I scan for Bluetooth devices, DfuTarg doesn't show up as a device.

What are some other modifications I need to look into to get that part running? Am I missing some other configuration steps?

Parents
  • Hi Vidar,

    Thanks for the response. I completely forgot to consider the clock source for the SoftDevice. I'm currently using nRF SDK15.3 but modified the sdk_config according to the descriptions.

    This board currently does not use an external crystal, so I'm going off the internal RC oscillator. I made these modifications but I'm still not seeing it being advertised.

    While stepping through to debug and find the cause, I found that the device is hitting a HardFault Handler somewhere after nrf_dfu_settings_init()

    What should I be on the lookout for to prevent this from happening?

    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

Reply
  • Hi Vidar,

    Thanks for the response. I completely forgot to consider the clock source for the SoftDevice. I'm currently using nRF SDK15.3 but modified the sdk_config according to the descriptions.

    This board currently does not use an external crystal, so I'm going off the internal RC oscillator. I made these modifications but I'm still not seeing it being advertised.

    While stepping through to debug and find the cause, I found that the device is hitting a HardFault Handler somewhere after nrf_dfu_settings_init()

    What should I be on the lookout for to prevent this from happening?

    #ifndef NRF_SDH_CLOCK_LF_SRC
    #define NRF_SDH_CLOCK_LF_SRC 0
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
    #ifndef NRF_SDH_CLOCK_LF_RC_CTIV
    #define NRF_SDH_CLOCK_LF_RC_CTIV 16
    #endif
    
    // <o> NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
    // <i> How often (in number of calibration intervals) the RC oscillator shall be calibrated
    // <i>  if the temperature has not changed.
    
    #ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
    #endif
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

Children
Related