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,

    Thanks for the reply. 

    Do you have the optional 32KHz crystal mounted on your custom board?

    No, we do not have this. 

    In custom_board.h, I had set like this 

    #define NRF_CLOCK_LFCLKSRC      {.source       = NRF_CLOCK_LF_SRC_RC,      \
                                     .rc_ctiv      = 16,                          \
                                     .rc_temp_ctiv = 2,                          \
                                     .accuracy     = NRF_CLOCK_LF_ACCURACY_20_PPM}

    But, I made the changes like you mentioned. But, flashing is successful but device doesn't turn on after flashing softdevice and bootloader.

    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.

    Okay.

    If I define buttons and choose to enter bootloader mode through pressing buttons, than i can see LED on after I flash the softdevice and while flashing bottloader and doesn't advertise as well above settings. But, when I choose buttonless, I can't even see LED on.

    Could you please guide me further?

    Regards,
    Nagarjun CS

Reply
  • Hi Vidar,

    Thanks for the reply. 

    Do you have the optional 32KHz crystal mounted on your custom board?

    No, we do not have this. 

    In custom_board.h, I had set like this 

    #define NRF_CLOCK_LFCLKSRC      {.source       = NRF_CLOCK_LF_SRC_RC,      \
                                     .rc_ctiv      = 16,                          \
                                     .rc_temp_ctiv = 2,                          \
                                     .accuracy     = NRF_CLOCK_LF_ACCURACY_20_PPM}

    But, I made the changes like you mentioned. But, flashing is successful but device doesn't turn on after flashing softdevice and bootloader.

    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.

    Okay.

    If I define buttons and choose to enter bootloader mode through pressing buttons, than i can see LED on after I flash the softdevice and while flashing bottloader and doesn't advertise as well above settings. But, when I choose buttonless, I can't even see LED on.

    Could you please guide me further?

    Regards,
    Nagarjun CS

Children
No Data
Related