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

nRF52832 Custom board not advertising after flashing Custom Bootloader (Buttonless)

Hi, 

I followed this page, downloaded SDK 15.1.0 and I was able to compile and build Custom bootloader (after adding custom board, also changed in makefile as well) for Custom board of nRF52832 in the provided secure bootloader option using arm gcc.

But, after successfully flashing softdevice and bootloader on the board using nRF gostudio, nRF52832 stops advertising, but i can see the led on. But, I can't see my device in nRF connect. I also tried flashing softdevice, bootloader and application in the respective order, all were successfully flashed but no advertisement as well and I can see led on only after holding buttonpress.

My plan is to implement buttonless feature for the bootloader and hence have disabled NRF_BL_DFU_ENTER_METHOD_BUTTON and enabled NRF_BL_DFU_ENTER_METHOD_BUTTONLESS in sdk_config.h and have set "enter_buttonless_dfu" in nrf_dfu_settings_init() of nrf_dfu_settings.c.  Also, I want to know even though I have disabled NRF_BL_DFU_ENTER_METHOD_BUTTON, why do I have to define NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN (I get error if I don't define) ?

Could anyone guide further regarding the issue and let me know, if I am doing something wrong?

Regards,

Nagarjun CS

Parents
  • Hi,

    Do you have the optional 32KHz crystal mounted on your custom board? If not, please make sure you have selected the internal RC oscillator as the low-frequency clock source in sdk_config (default is xtal):

    // </h> 
    //==========================================================
    
    // <h> Clock - SoftDevice clock configuration
    
    //==========================================================
    // <o> NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
     
    // <0=> NRF_CLOCK_LF_SRC_RC 
    // <1=> NRF_CLOCK_LF_SRC_XTAL 
    // <2=> NRF_CLOCK_LF_SRC_SYNTH 
    
    #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 8
    #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
    
    // <o> NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
     
    // <0=> NRF_CLOCK_LF_ACCURACY_250_PPM 
    // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM 
    // <2=> NRF_CLOCK_LF_ACCURACY_150_PPM 
    // <3=> NRF_CLOCK_LF_ACCURACY_100_PPM 
    // <4=> NRF_CLOCK_LF_ACCURACY_75_PPM 
    // <5=> NRF_CLOCK_LF_ACCURACY_50_PPM 
    // <6=> NRF_CLOCK_LF_ACCURACY_30_PPM 
    // <7=> NRF_CLOCK_LF_ACCURACY_20_PPM 
    // <8=> NRF_CLOCK_LF_ACCURACY_10_PPM 
    // <9=> NRF_CLOCK_LF_ACCURACY_5_PPM 
    // <10=> NRF_CLOCK_LF_ACCURACY_2_PPM 
    // <11=> NRF_CLOCK_LF_ACCURACY_1_PPM 
    
    #ifndef NRF_SDH_CLOCK_LF_ACCURACY
    #define NRF_SDH_CLOCK_LF_ACCURACY 1
    #endif

    Otherwise, the Softdevice will enter an infinite loop waiting for the non-existent crystal to start up.

    Also, I want to know even though I have disabled NRF_BL_DFU_ENTER_METHOD_BUTTON, why do I have to define NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN (I get error if I don't define) ?

     That's an oversight from us, which we have fixed in SDK 17.0.0. It should have been possible to compile the bootloader without defining any buttons.

    Regards,

    Vidar

  • Hi Vidar,

    I re-verified my settings and changes I made in nrf_bootloader.c. Now, it advertises (but only button press method) with above changes in sdk_config.h and later i flash my application .zip package using nrf connect. And, board did not restart after button. So, when I checked I had to adjust RAM size.



    I adjusted these in .ld file and now settings looks like this.

    MEMORY
    {
      FLASH (rx) : ORIGIN = 0x26000, LENGTH = 0x52000
      RAM (rwx) :  ORIGIN = 0x200038D8, LENGTH = 0xC728
    }
    


    And still I get error,
    <debug> nrf_sdh_ble: RAM starts at 0x200038D8 
    <error> app: Fatal error

    I am using Softdevice 132 6.1.0. Could you help me out what am I doing wrong?

    Regards,
    Nagarjun CS

  • "RAM start location can be adjusted to" is outputted when the start address of the application is higher than it must be i.e it's not necessarily  a critical error as when there is less RAM available to the application than what is needed. I see that you get an error from sd_ble_cfg_set(), what does it return?

Reply Children
Related