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.

Parents
  • Yes. I'm using the supplied Makefile which drives the JLink using nrfjprog. Now I found something significant: the example works if I have a UART connected. Evidently something in the UART library causes problems if the RX and TX pins are open circuit. I verified this by patching the example so that calls to the UART library are replaced with calls to RTT. Now works as I had hoped. BTW. I'm not sure why the above UART problem includes crashing the whole example.

Reply
  • Yes. I'm using the supplied Makefile which drives the JLink using nrfjprog. Now I found something significant: the example works if I have a UART connected. Evidently something in the UART library causes problems if the RX and TX pins are open circuit. I verified this by patching the example so that calls to the UART library are replaced with calls to RTT. Now works as I had hoped. BTW. I'm not sure why the above UART problem includes crashing the whole example.

Children
No Data
Related