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

BLE runs only while debugging on custom board (probably RTT issue)

I have problems with my custom board.

I developed the firmware with the nrf52840-PDK and there the firmware runs standalone (with RTT connected and without) or when debugged via eclipse.

Both boards (nrf52840-PDK and my custom board) have the nrf52840 QIAAAA and I'm working with Softdevice 140 and SDK 14.2.

If I run the firmware from my own custom board, everything seems to work when debugging via eclipse or when RTT is not connected. The advertising starts and the device can be found from e.g. nrf-connect and connected.

Usually I use RTT for debugging (on nrf52840-PDK) and everything works fine. The custom board is programmed via jlink from an external nrf52 DK.

If I connect via RTT to my custom board, the advertising does not work correctly. Without RTT, it works.

The power profile (with PPK) looks the same if connected with RTT and without, the advertising seems to have started but nrf-Connect can't receive advertising packets.

Could it be some timing/crystal issue? What are the differences when connected via RTT and when not?

I changed NRF_SDH_CLOCK_LF_SRC from NRF_CLOCK_LF_SRC_XTAL to NRF_CLOCK_LF_SRC_SYNTH and the behaviour is the same. So the 32khz crystal should not be the problem.

It seems to have something to do with the hardware as I can't see this behaviour on the nrf52840-PDK.

21.03.18 Updated LF test, updated to clarify the problem. There was another connection problem but it seems they are different issues (see https://devzone.nordicsemi.com/f/nordic-q-a/32590/error-133-0x85-gatt-error-with-htc-u11-life)

Related