DZone
IoT Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > IoT Zone > Reprogramming the Hexiwear Docking Station

Reprogramming the Hexiwear Docking Station

You can (and must) use a debug probe to reprogram the Hexiwear docking station. This guide will show you how to get in using the station's pins.

Erich Styger user avatar by
Erich Styger
·
Jan. 22, 17 · IoT Zone · Tutorial
Like (0)
Save
Tweet
4.47K Views

Join the DZone community and get the full member experience.

Join For Free

The Hexiwear docking station has a nice feature: an embedded a debug circuit (OpenSDA). That way, I don't need an external debug probe to debug the Hexiwear. However, a debug probe is required to reprogram the docking station itself:

Repgrogramming the Mikroelektronika Docking Station

Reprogramming the Mikroelektronika docking station

I have not used the docking station debug circuit so far. It does not work out of the box. I would have to install pyOCD (which never worked well on my machine), and the default OpenOCD is simply not usable (too slow and seems not to support the KW40 device). Additionally, Windows 10 rendered the default OpenSDA debug firmware useless within seconds (see Bricking and Recovering OpenSDA Boards in Windows 8 and 10).

Instead, I successfully used external debug probes (P&E Multilink and Segger J-Links), including restoring the original firmware (see Flashing and Restoring the Hexiwear Firmware). Still, it might come handy if I have working firmware on the docking station, either the P&E or Segger one. However, to recover and program the OpenSDA bootloader, an external probe is required.

I’m using a Segger J-Link in this post, but any other ARM SWD/JTAG probe would do it too. It shows how to program the OpenSDA (DAPLink) bootloader on the docking station.

NXP Kinetis K20 SWD Header

First I need to find the SWD debug header to reprogram the NXP Kinetis K20 on the board:

Hexiwear Docking Station Schematics

Hexiwear docking station schematics

The footprint for that header is located here:

K20 SWD Footprint

K20 SWD footprint

No idea why the designers have placed that header under the Hexiwear itself: having it placed outside (with the correct orientation would make more sense in my opinion.

For programming the K20/OpenSDA, make sure the OSDA switch is in the ON position:

OSDA in ON Position

OSDA in the ON position

Because that connector is not populated, a standard ARM 10-pin debug header is needed:

ARM 2x5 SWD/JTAG Header

ARM 2×5 SWD/JTAG header

However, I’m not going to solder that header in (not needed). Instead, I put the header into the debug connector cable:

Debug Header on Debug Cable

Debug header on debug cable

Then use the header to make a connection with the board on the bottom side. Pay attention to the white dot marking pin 1:

Debug Header Footprint on Bottom Side

Debug header footprint on bottom side

Put in the header with the cable. The header should fit nicely and make contact — otherwise, pull on the cable to make sure there's good contact. Make sure you properly align the red wire to pin 1:

Inserted Debug Cable

Inserted debug cable

Programming the DAPLink Bootloader

I used the approach outlined in “Bricking and Recovering OpenSDA Boards in Windows 8 and 10” to program the OpenSDA/DAPLink bootloader:

Running Script to program the bootloader

Running script to program the bootloader

After successfully programming the bootloader, it shows up as DAPLINK:

daplink

DAPLINK

Now it is ready to be programmed with any OpenSDA (P&E, Segger, etc.) firmware.

The default bootloader on the Hexiwear docking station can be reprogrammed so it can be used with Windows 10 either as a P&E or Segger OpenSDA probe. I still prefer to use the external debug probe, but to have an extra debug interface on the docking station comes handy. In any case, I recommend always to have a commercial debug probe at hand, as the ‘free’ ones from the silicon vendors are good to start with, but they cannot solve the hard problems, or you might end up with a pile of bricked boards on your desk.

Happy Dockstationing!

Docking (molecular) Debug (command)

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

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Top 5 Programming Languages in AI: A Comparison
  • SQL CTE: How to Master It in One Sitting With Easy Examples
  • How To Use Open Source Cadence for Polling
  • Legacy Modernization and Hybrid Cloud with Kafka in Healthcare

Comments

IoT Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo