A low cost platform for getting familiar with the TRACE capabilities of the ULINKpro debugger is the Nordic nRF52832 based PCA10040 development kit. Since TRACE requires four additional data lines and a clock line to connect the ETM signals to the ULINKpro, a special adapter board must be made as they aren’t easily available. In this post, I’ll show you how to make this adapter. This adapter could also be used on any other ARM based board which supports ETM TRACE. Modifications must be made to two adapter boards to pass the ETM signals from the development board to the ULINKpro.
If interested, you can get more information on the ETM signals that we need to route to the debugger here.
The pins of interest are 12, 14, 16, 18 and 20.
Here is what you need to make the ETM adapter:
- ADAFRUIT JTAG to SWD adapter board
- Keil HPI-0195C 20 pin ETM+SWD to 20 pin adapter – this comes with the Keil ULINKpro debugger
First, we will make the mods to the ADAFRUIT adapter. The main goal here is to disconnect 5 pins which are connected to ground, and isolate them so the 5 ETM signals can be passed from the processor to the ULINKpro debugger.
Steps 1 and 2: Remove the black shell from the larger 20 pin male connector, and then de-solder the the 5 pins as shown below. Keep the pins as they must be re-used in another step.
Step 3: Attach some thin tape to the board as shown, to insulate the pads below from the pins which will be re-used. Kapton tape is ideal for this application, but I had to use what was handy.
Step 4: insert the 5 pins which were removed previously and solder a small segment of 0.1″ female header to the 5 pins. I used a segment with 7 pins, but those 2 other pins are not used. You can remove the connectors from those 2 positions.
Step 5: Put the plastic shell back on to the connector, and the mods to the ADAFRUIT adapter are complete. It would be a good idea to add a small amount of hot glue to each end of the plastic shell where it meets the board to secure it. You will see that I did that in a later picture.
The 5 ETM signals from the development board will come into the new adapter we added, and instead of being grounded, they will be available on the 5 pins so they can pass on to the Keil HPI-1095C adapter board.
When I made the changes to the Keil adapter board, I didn’t take any good pictures of each step, but the few pictures I took later should help. The 5 pins which were connected to ground must be lifted, and then connected to the 5 ETM lines on the J1 connector as shown below.
Step 1: de-solder the 5 pins shown above the green tape. They only need to be lifted up a few mm. and then slide the tape under them as shown.
Step 2: solder 5 small wires (I used wire-wrap) as shown. Start by connecting the far right pin on the large connector to the far left front pin on the small connector, this connects pin 20 on each connector together. Then continue to connect wires to bridge pins 18, 16, 14 and 12.
Now the Keil adapter must be inserted into the ADAFRUIT adapter as shown below:
Finally, here is a picture showing the adapter connected to a Nordic nRF52832 development board (PCA10040) and it also shows the 5 ETM signals from the PCA10040. The large ribbon cable is connected to the ULINKpro debugger. The small ribbon connector passes the SWD signals from the debugger to the target board, it’s an ADAFRUIT part which is available from Digi-Key.
In a future post, I’ll demonstrate the adapter working as I trace some code with the ULINKpro.