Jlink Debugger connection issue

Hello!

I have a very weird issue with the SD card slot when I’m connecting the jtag debugger.
Debugging itself works just fine, I’m able to use GDB and all.

The problem is that the connection is only stable when the cable is only partially inserted into the slot.
I have to very carefully wiggle it in so that it only barely touches the pins in the slot.
I I do a full insertion with a click - nothing works.

And the cable position where everything works is very consistent. So it’s not that big of a problem. I’m able to debug just fine. I just want to understand what could be going on.

I have little experience with hardware, so maybe I’m missing something.
I’ve tried 2 different types of sd card adapters, and it’s all the same problem.
I’ve tried it with and without a pull-up resistor (on the swdio channel). And I’ve tried different power sources.

Is there anything I can try? Does this sound like a familiar issue to anyone?

Sounds suspiciously like the functionality some rockchips have that switch between JTAG and SDMMC based on if the sdcard is inserted. GRF_SOC_CON7 (0xFF77e21c) has a grf_con_force_jtag bit (bit 12) that I believe controls that behavior, however I’m not sure how it interacts with the IOMUX selections.

2 Likes

haha, it was the IOMUX! I was doing all my experiments from uboot console to not let the os set weird register values, so the grf_con_force_jtag was already 1, but it did not occur to me that iomux could be a problem (since I accidentally made debugging work). So I though it was an electrical problem with either connection or pull-ups, or something else from the ee world.

I also thought that iomux bits would disable SWD in favour of sdmmc regardless of whether the card is inserted or not. Guess not :slight_smile:

Thanks very much!

2 Likes