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

FW works on nRF51 DK but when I flash in my target board it doesn't.

I developed an application based on ble_app_uart and it is working on my nRF51 DK. I can see the ports driven by my application responding and Bluetooth communication is working perfectly.

I generated the HEX file as "Additional output format" in the Linker option and flashed it on my target board using JLink.

Well, the controller of my target board just doesn't start!

Does the HEX file contain the Soft Device? What am I doing wrong?

  • Just a hint: the HEX file of my application is smaller than the softdevice, meaning that the code is not included.  Therefore I flashed the softdevice and my application separately but it still doesn't work.

    My application used nRF51822-QFAA controller but, as it is the same size as nRF51422 of the DK board, I think there is nothing I need to change. Also, I tried 2 samples so I believe a hardware problem is out of the question...

    I'm out of ideas. Anyone has some?

  • Hi,

    The nRF51 DK comes with a QFAC chip, with 32 kB RAM, while the QFAA chip of your board have only 16 kB. You should change the linker settings to reflect this.

    Do your board contain the 32.768 kHz LF crystal? If not, you should make sure that your firmware is configured to use the internal RC oscillator.

    Which SDK version are you using?

    Best regards,
    Jørgen

  • Hi.

    I'm not using 32.768kHz, instead I use 16MHz quartz. How can I config to use the internal oscillator or even better, the 16MHz quartz?

    I am using SDK12 and S130 softdevice. My code is based on ble_app_uart example.

    What changes do I need to make for the RAM size problem? Sorry, I'm new to Nordic...

    I can send you the schematic if you prefer...

  • See this post about changing clock source. The clock source is normally assigned in ble_stack_init() function in the SDK 12.x.0 BLE examples.

    Changing RAM settings depends on which IDE/compiler you are using. See this tutorial for more details.

  • This is the schematic of my application (I removed what was not interesting for the problem):

    SCH_01.pdf

    I changed pca10028.h to:

    #define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_RC, \
    .rc_ctiv = 16, \
    .rc_temp_ctiv = 2, \
    .xtal_accuracy = 0}

    It still doesn't work. I am using SES and I can see in Memory Usage that the RAM ends at 0x20003FFF which is correct. 

    Any idea?

    This might help you:

    - I have FLASH_START=0x1B000, SRAM_START=0x20002080, SRAM_SIZE=0x1F80

    - I cut SB1 on nRF51DK and the program still runs, meaning that the 32.768kHz crystal is out of the picture

    - The Memory usage shows:

         - Flash is used from 0x1B000 to 0x24157

         - RAM is used from 0x20002080 to 0x20002B5B and stack is 0x20003C00 to 0x20003FFF

    The code runs on the nRF51DK but not on my target (2 units). Note that the controller schematics has been used in 4 other units I designed (I didn't write FW for them!) with the same component values, so HW should be ok.

    Any ideas?

Related