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
  • 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