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

Unable to run "BLE Blinky" on an Fanstel BM832A but can run non-BLE examples

I'm sure the mistake is mine but I would appreciate some suggestions on where to look for my mistake.

I have a custom board with a Fanstel BM832A module.  I also have an NRF52 dev kit for comparison.

I can run basic non-bluetooth peripheral code on the board so I know I have good SWD programming.

I am starting from the example at nRF5_SDK_17.0.2_d674dde\examples\ble_peripheral\ble_app_blinky\pca10040e\s112\armgcc.  I am using the same version of GCC as that version of the SDK's makefile specifies.

Building that example runs exactly as expected on the NRF52.  I can change the name of the device and interact with it over bluetooth.

However, I am so far unable to successfully modify the makefile to run on my "real" NRF52810.

Here's what I have tried without luck:

  1. Defined a custom board.  I could have button and LED pins wrong but I can't see anything on BLE so I don't think a mistake here would explain that.
  2. Removed "CFLAGS += -DDEVELOP_IN_NRF52832" (and the same ASMFLAGS)
  3. Removed "CFLAGS += -DNRF52_PAN_74" (and the same ASMFLAGS)
  4. Removed "CFLAGS += -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=3" (and the same ASMFLAGS)

execute make, make flash, make flash_softdevice and I see nothing on BLE.  

Any suggestions of what to try next?  

Thank you,

David

Parents Reply Children
  • Still searching for an answer.  Found https://devzone.nordicsemi.com/f/nordic-q-a/40247/can-t-change-clock-source-from-nrf_lf_src_xtal-to-nrf_lf_src_rc/156345#156345 which led me to tweak the sdk_config.h again

    Put NRFX_CLOCK_CONFIG_LF_SRC and CLOCK_CONFIG_LF_SRC back to their default values of 1.

    Changed NRF_SDH_CLOCK_LF_RC_CTIV from 0 to 16

    Changed NRF_SDH_CLOCK_LF_RC_TEMP_CTIV from 0 to 2.

    But still not seeing anything on BLE.

    So to refine my question, does anyone have a list of changes for GCC (or SES for that matter) to go from a working example PCA10040e to a BM832A?  

    Thanks in advance...

    David

  • I use this code in sdk_config.h when no 32kHz crystal is available; it's on a nRF52832 module but I think the same applies for the nRF52810:

    #if 1//defined(FEATURE_NO_32_KHZ_CRYSTAL_FITTED)
    #define NRFX_CLOCK_CONFIG_LF_SRC         0
    #define CLOCK_CONFIG_LF_SRC              0
    #define NRF_SDH_CLOCK_LF_SRC             0
    #define NRF_SDH_CLOCK_LF_RC_CTIV        16
    #define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV    2
    #define NRF_SDH_CLOCK_LF_ACCURACY        1 // <1=> NRF_CLOCK_LF_ACCURACY_500_PPM
    #endif

    This must be placed at the start of sdk_config.h. I also have this code called at startup:

    static void init_bsp(void)
    {
       APP_ERROR_CHECK(nrf_drv_clock_init());
       nrf_drv_clock_lfclk_request(NULL);
    #if defined(FEATURE_NO_32_KHZ_CRYSTAL_FITTED)
    //   while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) ;
    //   for (volatile uint32_t i = 0; i < 1000000; i++) ;
    #endif
       APP_ERROR_CHECK(app_timer_init());
    }

    This function must be invoked before ble init stuff

Related