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

Using BLE Nano2 with nRF5 SDK, soft device and JLink

I made up a prototype board with BLE Nano2, connected via a JLink. I'm using armgcc. JLink is needed to support RTT as I need the UART for another purpose.

My board file is in this earlier post. devzone.nordicsemi.com/.../ I have used the config/sdk_config file taken from pca10040.

I want to test this with the blue_app_uart example that works fine on the pca10040.

It compiles ok with my board file. Make flash_softdevice and make flash appear to work correctly.

Examples that do not use soft device run ok. But this ble_app_uart example crashes on startup while trying to initialise BLE.

So what's different? They both use the nRF52832 SoC. The Jlink connections are the same and seem to be working.

My guess is that there is some piece of config that needs to be changed? e.g. something that is preventing the main program and soft device from talking nicely.

Here's my linker script (I hope correctly adapted for the nRF52832:

/* Linker script to configure memory regions. */

SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)

MEMORY
{
  FLASH (rx) : ORIGIN = 0x1f000, LENGTH = 0x61000
  RAM (rwx) :  ORIGIN = 0x20002128, LENGTH = 0xded8	
}

SECTIONS
{
  .fs_data :
  {
    PROVIDE(__start_fs_data = .);
    KEEP(*(.fs_data))
    PROVIDE(__stop_fs_data = .);
  } > RAM
  .pwr_mgmt_data :
  {
    PROVIDE(__start_pwr_mgmt_data = .);
    KEEP(*(.pwr_mgmt_data))
    PROVIDE(__stop_pwr_mgmt_data = .);
  } > RAM
} INSERT AFTER .data;

INCLUDE "nrf5x_common.ld"

Any suggestions appreciated.

  • Which sdk and which softdevice are you testing with?

  • Like HF and LF clock sources are different on nRF52 DK and your board? Or power stage with DC/DC vs. LDO? These setting if used in SW can through SD API cause some hard fault (which by your or Nordic code can end up by SW reset). Other then that it should at least boot the same on both boards if chi version/revision is identical.

  • SDK is 12.2 and soft device is s132. I recall that I could get it working by concatenating the 2 binaries and loading with (redbear) MK-20 (not Jlink). I'll try that again to verify.

  • OK (after correcting the Flash addresses above) I got the BLE Nano to work by concatenating the 2 hex files (with srec_cat) and using the MK-20 to load the resulting hex. This means I'm still looking for some kind of a config error as there's no reason why the JLink could not do what the MK-20 does.

  • Yes, that sounds strange. Have you tried nrfjprog or nRFgo Studio? These tools are using SEGGER J-Link DLL so if they work SEGGER tools should as well.

1 2