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

Running Template app on pca20006 Beacon

Hi,

I'm trying to run the Template app on a beacon but am not having much luck. So far I've been able to run it on the nRF51-Dongle but it appears dead on the beacon.

To run on the beacon, I've made the following changes:

  • Changing board to PCA20006 in the C/C++ Settings
  • Changing SOFTDEVICE_HANDLER_INIT to use the internal RC via NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION
  • Changing the ROM Start to 0x1600

This advertises fine with the Dongle but when loaded onto the Beacon I don't get any sign it's working. I've been able to use the same procedure to run the blinky app on the beacon.

I've even loaded the precompiled Softpack for the beacon onto the Dongle along with the internal RC and start address change and it works fine.

Are there other changes needed other than the internal RC to run on the Beacon vs the Dongle?

Thanks.

  • The root problem turned out to be that bsp_init() was failing when it was initializing button handlers. The 10031 Dongle which I had working has BUTTON_NUMBERS 0 in the board file while the beacon 20006 board file has 2 defined. This in turn fails on the beacon because GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS was set to one but needs to be two for the two beacon buttons. When the 2nd button was initialized an error would be generated.

    To recap, I was able to get the Template app to run on the beacon after changing the following:

    1. Changing board to BOARD_PCA20006 in the C/C++ Settings
    2. Changing the ROM Start to 0x1600 to match the s110 in the beacon and RAM to 0x20002000.
    3. #define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 2 in nrf_brd_config.h
    4. Init the SOFTDEVICE_HANDLER_INIT as follows in ble_stack_init()
    #if defined(BOARD_PCA20006)
    	    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_50_PPM, NULL);
    #elif defined(BOARD_PCA10028)
        SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL);
    #elif defined(BOARD_PCA10031)
        SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
    #endif
    
Related