nRF52DK nRF5340 based DK (PCA10040 and PCA10056) Debug Out port clockspeed limited to 646 kHz

Hi

Seems like all new nRF DKs shipped with nRF5340 as interface mcu have limited speed on Debug Out. 

nrfjprog -r --clockspeed 646
Applying system reset.
Run.

nrfjprog -r --clockspeed 647
[error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 198 milliseconds with result -102
ERROR: Unable to connect to a debugger.
[error] [ Worker] - An unknown error.
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.
NOTE: For additional output, try running again with logging enabled (--log).
NOTE: Any generated log error messages will be displayed.

I tested this with PCA10040 (1050306391, 3.0.0 2023.22) and PCA10056 (1050242811 3.0.2 2023.21) with exactly the same result. All frequencies below 646 are successful, all above that fail. 

With old PCA10040 (based on some ATSAM chip) i can run --clockspeed 50000 with no problems. When the external cable is not connected, all 3 boards can flash onboard nRF chip with max speed (50000 kHz).

This seems to be firmware limitation. Is it somehow related to Segger licensing?
NCS images are much larger than old SDK, thus development of custom boards gets slowed down.. How to work around it?

Running on MacOS 13.6.7 M2 Pro.
nrfjprog version: 10.24.0 external
JLinkARM.dll version: 7.94a

  • I figured it out! Our custom board has 1nF capacitor on SWDIO line (it was added with pullup on SWDIO line and pullown on SWDCLK to reduce resets induced by nearby EMC events many years ago - maybe even to our first nRF51822 design). Removing the 1nF cap allows communications up to 50000kHz.

    Nevertheless older dev-kits with the ATSAM chip can handle the extra capacitance well, so older boards must drive pin harder to be able to still communicate at 50000 kHz regardless of filter cap. Probably nRF5340 is using standard drive on those SWD pins. Would it make sense to rebuild the DK firmware with High Drive on SWD pins?

    Is such filtering still needed for nRF52832 / nRF52840 in harsh environment, could we get rid of this legacy? The reference design doens't have it. The DK doesn't have it. FYI the reset pin is disabled.

    I am closing this, but still expecting comments on my questions here.

  • Hi,

    We always recommend to follow our reference designs as usual, for then the working is guaranteed. You don't need to introduce extra components to the SWD pins or any extra components in general to the nRF52 or later series.

    -Priyanka

Related