Over a million developers have joined DZone.

Using the KwikStik K40 Board to Debug an External Board

A clever way of troubleshooting problems without a dedicated debug box.

· IoT Zone

Access the survey results 'State of Industrial Internet Application Development' to learn about latest challenges, trends and opportunities with Industrial IoT, brought to you in partnership with GE Digital.

When I left for the week-end, I missed to take with me my Segger J-Link debug box. I have one P&E Universal Multilink at home, but I needed a Segger J-Link to use the SystemViewer with my robot. I need that for a FreeRTOS trainig I will deliver in Poing/Germany on Monday at Avnet/Silica.

But I had a Freescale KwikStk board at home, and I did remember that I can use that board as a Segger J-Link to debug my custom hardware (see “Freescale Kinetis KwikStik (part 1)“).

Debugging Custom Board with KwikStik

Debugging Custom Board with KwikStik

I have stopped using the KwikStik board because the Kinetis K40 on it had several silicon issues making the board difficult to use, and there were several different version/schematics of that board creating much confusion. So I had shelved these KwikStik boards and use the better Freescale Freedom boards instead. But now I have found a way so they can be still useful: as a Segger J-Link to debug my external boards. :-)

Unlike the Freescale Freedom boards, the Segger J-Link on the KwikStik allows me to debug an external microcontroller:

Debugging External MCU

Debugging External MCU

Here are the steps using the Freescale KwikStik as a normal J-Link programmer/debugger:

  1. Solder a SMD 2×5 SWD header on the footprint (DNP/unpopulated by the factory) SWD Header Soldered SWD Header on J8
  2. Put the On/Off switch to the OFF position KwikStik Slide Switch in OFF position KwikStik Slide Switch in OFF position
  3. Connect a 10pin SWD cable to the target board. Make sure that the cable is matching pin 1. Pin 1 Orientation Pin 1 Orientation
  4. Plug the KwikStik board to the host PC. Use the USB port near the audio connector. If necessary, this will automatically install the Segger J-Link drivers on the host (assuming the Segger J-Link software is already installed on the host).
  5. At the first time connecting to the board, it might update the J-Link firmware. In my case I had to unplug and replug/repower the board at the end of the update process.
  6. From here on, the board can be used as a normal J-Link to debug external boards. There is a rather ugly orange flexible plastic enclosure which came with the KwikStik board which now serves as of board protection: Orange Protectin Enclosure Orange Protecting Enclosure

The ‘normal’ Segger J-Links are more powerful and faster, but as an emergency and quick debugging probe, the KwikStik boards can have a purpose now. :-)

I recommend using a normal J-Link, so I will order another one next week. The above thing is only a temporary solution: it is not as fast (the KwikStik uses a JM128 as debug processor), not very robust with all the cables and not protected electrically as good as the normal J-Link. But at least the above hack saved me two hours of work itineray. ;-)

The IoT Zone is brought to you in partnership with GE Digital.  Discover how IoT developers are using Predix to disrupt traditional industrial development models.

Topics:
kinetis ,kwikstik

Published at DZone with permission of Erich Styger, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}