Application works on nRF51DK but not completely on custom board with nRF51822 QFAA

Hello Community!

I have had to purchase an nRF51DK to rewrite firmware for an old PCB. I have been facing some problems in running my development environment (nRF51DK. Bluetooth not working - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com) but I finally have a nice environment.

I have my application with BLE running OK on the nRF51DK, but BLE isn't working on my custom board with nRF51822. I know the application is almost working because I have a blinking LED, but the BLE is not advertising. Some of my discoveries:

1. I flash S130 SoftDevice + my hex with nRF Connect Programmer. It flashes fine.

2. Target configuration in Keil uVision5:
    IROM1: Start: 0x1B000, Size: 0x25000

    IRAM1: Start: 0x20002080, Size: 0x1F80

3. I am debugging the application with Keil but it stops working (or takes a lot of time) in SOFTDEVICE_HANDLER_INIT(&cic, NULL); where cic is NRF_CLOCK_LFCLKSRC.

If someone can give me some information where I can work on, I would be very thankful.

Regards,

David.

Parents Reply Children
  • Tai, thank you for your help. I'm going to study those links and I will update here with news.

    Regards,

    David. 

  • It's working now!

    The key point was:

    #define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_SYNTH, \
    .rc_ctiv = 0, \
    .rc_temp_ctiv = 0, \
    .xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}

    Now I have my custom board advertising.

    Thank you, Tai, for your help,

    David.

  • Yeah. Custom boards usually don't have external crystal, so we need to use the internal clock with the setup you posted above. Happy to help Relaxed