Why does IOT-DAPLINK change to Maintenance drive when plugging in the Rapid IoT board to Docking Station?

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Why does IOT-DAPLINK change to Maintenance drive when plugging in the Rapid IoT board to Docking Station?

Contributor II

Background - Previously everything with the Open SDA IOT-DAPLINK firmware worked before I installed the PEMicro DEBUG code. First I had installed the IOT-DAPLINK software to the Maintenance MSD drive, plugged in the Rapid IoT board/housing to the Hexiwear Docking Station and every thing worked. I was able to down load the Rapid IoT Blinking and LED source and the Rapid IoT Kit Out of Box Demo source and debug each application with breakpoints. So I thought I'd try to do it with the latest PEMicro DEBUG_OpenSDA_for_MBED_Bootloader_by_Pemicro_v108_v2.1.bin  firmware. This I installed into the Maintenance directory. Both the applications  above debugged and I was able to set breakpoints as before. I decided best to go back to the IOT-DAPLINK firmware because it can both download applications and debug.

So I reloaded the IOT-DAP LINK software without the Rapid IOT board/housing installed and the drive became the IOT-DAPLINK drive. I turned power to the docking station off, then on. Then installed the Rapid board/housing. The connection was not detected by the debugger and I then figured out the when the board/housing is installed the drive changed to the Maintenance drive. After turning off power and removing the Rapid IOT board/housing the drive changes back to the IOT-DAPLINK drive. This can be repeated. It appears something went bad on the docking station or the Rapid-IOT board/housing assembly. Is there some way to fix this or to know which one when bad? Did I do anything that caused this and if so what?

3 Replies

NXP Employee
NXP Employee


This is likely the symptom of a very common issue: K64 bootloader was overwritten

The short answer is:

if you remove the boot loader (by overwriting it) in the K64 memory in the kit, then the reset pin shared between K64 and KW41 (in Rapid IoT) and K20 (in docking station) is not properly managed when the kit is on the docking.

As a consequence

  • if you boot your docking station wo Rapid Iot it should work well (Docking displayed as IoT DAPLINK in Windows explorer)
  • if you have Rapid IoT plug, the K21 reset pin is tied low and consequently boots in maintenance mode.

To fix this, you should not act on the docking (K21µC)  itself, but rather on the Rapid IoT kit:

If you reflash the  K64 boot loader into the Rapid IoT kit, then Reset pin is properly managed, then when plugged on the docking the docking will show the DAP Link mode.

In order to avoid this in the future, you should place your K64 FW from the adress 0X14000 onwards (see options associated with your proejct Under MCUXPresso)

One more challenge you will face:

   -  because your docking is booting  in maintenance mode, you likely can no longer program K64 via MCUXpresso. To get your docking station in DAP Link mode, while having your kit plugged in, you have 2 options. A dirty but workign one, and a 'clean' one:

  • Dirty method:
    • boot your docking wo kit
    • Plugthe kit so that the kit does not reset
    • Verify the docking did not switch to Maintenance mode and is still in DAP Link mode
    • There is a chance that inserting the kit into the docking while docking being ON resets it... but is you do it carefully it may not be the case.
  • Clean method:
    • Set the switches on the docking so that KW41Z is connected to K21 and not K64 (00111111)
    • Reset your docking: K21 will switch in DAPLINK mode as now being connected to KW41Z for which you did not rewrite the bootloader memory area yet
    • Verify the docking station appears as DAPLINK mode
    • Put the docking switches back to K64 position (11001111)
    • You shall be able to agian write programs in K64 and reflash the bootlader.

I though that would be a short answer... so I failed and will shoot a video sometime next week - will be easier to follow than plain text...

Contributor II

Thanks much. I used the Clean method, just to be safe, and re-flashed the boot loader successfully.

I am unclear on how to move the K64 Firm Ware to 0x14000. Sounds like it has to do with the MCUXpresso linker. Would you mind sharing on what the settings must be to do this? This would be very helpful.

0 Kudos

NXP Employee
NXP Employee

Hi John, 


  • Right click on the project and follow the menu down to; C/C++ Build>MCU Settings.

Here are the settings for the boot loader: Flash location is 0X0, which is correct for boot loader


Now with a from scratch project, you need to change memory manually (To do so, click on the Edit button, right below the memory table)


In project generated from the studio, this is taken care for you, no need to change the address.