I'm programming an ATSAME51J20 micro on a custom board with a J-link Plus compact programmer using the SWD protocol. It is successful for small programs, but fails more frequently for larger programs. Here is a screen capture of the SWD in action.
The clock signal is in blue, and data is in yellow.
It looks like data is getting clocked in when the data line is in a floating state (as can be seen just to the right of the middle of the screen), which could account for programming the board being unsuccessful. I tried programming a dev board via SWD and didn't see any similar behavior there (and the dev board was programmed successfully every time).
The hardware connection on the custom board is the same as on the SAME54 Xplained Pro dev board, which uses a 1k pullup on the clock line and nothing on the data line.
I'm trying to think of things that could be causing the clock to be clocking in data when the data line isn't being driven high or low.
In the curved signal to the right of the middle of the screen, it seems like something is attempting to drive the data line high curing one of the clock cycles, but it is unsuccessful. Maybe whatever peripheral is responsible for driving the data line on the micro side isn't configured correctly, and thus isn't able to drive the data fully high or fully low?
Anyone have an idea as to what could be causing this?
EDIT: The J-link datasheet states that a 100k pull up is required on the SWDIO line. However the ATSAME datasheet makes not mention of this so I assume it's internal to the chip. It seems like this is supported by the fact that the SWDIO line floats up when it's not being driven, and the fact that the dev board doesn't have an external pull-up, and that one programs successfully.