Problem programming custom PCBs on nrf51822

Hi, I tried my best to solve my problem via forum but unfortunately no success. I got nrf51 DK and played with it a lot. successfully program the samples and tweak them a bit. using SDK 5.1 and s110 v6.

The problem starts when I try custom boards. I have made one based on QFAAC0 for which:

I have same problem with a board I purchased online, PTR5528 which is based on CEAA . Can program blinky but no BLE.

Is there something that I am doing wrong. I did connect the board to 3 V and connected the segger programmer pins as explained in the forum (That's how I program without an error)

Thanks in advanced for your help, Ali

Parents
  • Well, tracked it down. It was the board I was using only had the 16Mhz xtal, no 32khz, so had to make a small change for it to work. Note that I'm using the latest SDK (5.2) and SD (6.0) with the QFAAC0 and it is ok for this application... YMMV..

    Modify the function below to use the NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM instead.. This was for a Xuntong board..

    static void ble_stack_init(void) { uint32_t err_code;

    // Initialize the SoftDevice handler module.
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, false);
    
    // Register with the SoftDevice handler module for BLE events.
    err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
    APP_ERROR_CHECK(err_code);
    
    // Register with the SoftDevice handler module for BLE events.
    err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
    APP_ERROR_CHECK(err_code);
    

    }

Reply
  • Well, tracked it down. It was the board I was using only had the 16Mhz xtal, no 32khz, so had to make a small change for it to work. Note that I'm using the latest SDK (5.2) and SD (6.0) with the QFAAC0 and it is ok for this application... YMMV..

    Modify the function below to use the NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM instead.. This was for a Xuntong board..

    static void ble_stack_init(void) { uint32_t err_code;

    // Initialize the SoftDevice handler module.
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM, false);
    
    // Register with the SoftDevice handler module for BLE events.
    err_code = softdevice_ble_evt_handler_set(ble_evt_dispatch);
    APP_ERROR_CHECK(err_code);
    
    // Register with the SoftDevice handler module for BLE events.
    err_code = softdevice_sys_evt_handler_set(sys_evt_dispatch);
    APP_ERROR_CHECK(err_code);
    

    }

Children
  • Just FYI, I've been told that without having an external 32 KHz crystal, the 2 viable options for running the stack are (a) the synthesized 32 KHz source (as in, synthesized from 16 MHz) or (b) the internal 32 KHz oscillator. My understanding is that the synthesized source may be more accurate but will use more power than the internal oscillator. Nordic says the internal oscillator is sufficiently accurate for the BLE stack. If power consumption is a concern, you may wish to investigate.

    Also, I found (the hard way) that when using the synth source, the RTC wasn't running, but with the int osc it does. YMMV.

    Synth: NRF_CLOCK_LFCLKSRC_SYNTH_250_PPM Int osc: NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION (there are other calibration interval options but allegedly this is accurate enough for the BLE stack)

  • Thanks for this! Saved me at the end of e very frustrating day bringing up a new board.

Related