IDAP-Link

IDAP-LinkTM

A low cost CMSIS-DAP compatible debug JTAG

Available on
I sell on Tindie



The IDAP-LinkTM/M is a very low cost CMSIS-DAP JTAG debug probe with enhanced features.  It can do more with it than just debugging.  It will appears as a USB disk drive.  This allows firmware flashing easily by copying the firmware file over without requiring any special flashing software and work instantly with any operating system.  It provides a UART to USB bridge for communication between the target device and the PC.  It also provides a regulated 3.3V to directly power the target device without addition power source by taking advantage of the USB power source.  These feature turn the target device into mBed enable.  It can be used as an ultra low cost solution to production programming.  The IDAP firmware is written from scratch with optimization for performance and strictly  adhering to ARM specifications.  BSP is also provided for the Open Source CMSIS-DAP firmware from mBed.org version which makes it totally customizable.  

  • Support both SWD & JTAG mode
  • It is just plug & play with most IDE such as Keil, CrosWorks, Eclipse, etc.. Works instantly, no driver to install
  • Onboard 3.3V regulator to power the target device
  • UART to USB bridge for communication between target and PC up to 3 MBaud
  • Dynamic embedded target device selection
  • microSD slot for flash programming without a PC
  • mBed enabled the target device
  • Firmware flashing by drap & drop simply by copying file over in BIN or Intel Hex format
  • BSP is provided for the Open Source CMSIS-DAP firmware from mBed.org version

IDAP-LinkTM is the full Debug JTAG probe : Data sheet & User guide
IDAP-M is the CMSIS-DAP on module : Data sheet & User guide
Firmware updates : Ver. 1.2.170817
IDAP-Link/M Software Download now supports readback protection

Current firmware status :

All features are implemented.  Current supported targets
  • Nordic nRF51, nRF52
  • Epson S1C31D01, S1C31W74 (custom target implemented & maintained by Epson)
  • Supports USB-UART baudrate up to 3 MBaud streaming
  • More to come (NXP LPC, Freescale up next)



For maker who wants to add JTAG onboard


IDAP-M is the IDAP-Link core foundation. It is a small footprint 16 x15 mm module designed to be integrated onto your board design to provide a CMSIS-DAP and mBed functionality.

IDAP-M module
The core CMSIS-DAP of the IDAP-Link
available on Tindie


This video shows the Neblina ProMotion 9 axis sensor fusion development kit.  It has a IDAP-M onboard to program its Freescale KZ26 and the Nordic nRF51822.












Onboard target connection

Flash programming without PC using microSD


The IDAP-Link can Flash program the target using a micro-SD containing the firmware.  It is done simply by a press of a button.  Gang programming by using multiple IDAP-Link this way no PC is require


  • Connect the IDAP-Link to PC.  Run the command line IDAPSetTarget program to select the target device. Pass the index number of the target device as argument to the IDAPSetTarget program.  Running the IDAPSetTarget without argument will display a list of supported target device along with its index number.  Once the target is successfully programmed into the IDAP-Link, the a list of require firmware file name is listed.  This is require only done once unless a different target is needed.
  • Copy the the firmware files with predefined file names onto the microSD card.  The firmware file name must be exactly the same as those listed during the target selection step above.
  • Power up the IDAP-Link or press the Reset button (S2) with the microSD in the slot. The microSD card must be inserted prior to power up the IDAP-Link otherwise it will not switch to microSD programming mode
  • If the IDAP-Link is still connected to the PC.  The USB mass storage device will show up.  Eject it from the PC prior to start flashing.  Keeping the USB mass storage connected to the PC will have a huge impact on the Flashing performance as PC will try to access the microSD card at the same time.
  • A USB power source is require to power the IDAP-Link if not connected to PC.  
  • Press ISP/PROG button (S1) to start Flashing.  The green LED will turn on or blink.  The programming status will be also be printed to the USB CDC COM port.
  • Once programming completed, the green LED will turns off.  If programming failed, the red LED will blink at 1 sec interval.  All LED are off when programming is successful.   



Gang programming with PC via USB


With the drag & drop feature, it would be easy to do gang programming by connecting multiple IDAP-Link to a single PC via a USB hub.  Each IDAP-Link then would appears to the PC as a USB drive.  All that is left to do is to copy firmware file over to each drive.  This could be accomplished by a batch command.  Using IDAPnRFProg command line program to flash using multiple IDAP-Link at the speed of 12KB / s.  Flashing SD + APP + DFU in 16 s.


Parallel gang Flashing nRF51 with IDAPnRFProg on OS X and Windows


On OS X using IDAPnRFProg (click to download) flashing Softdevice + Firmware + DFU
Windows version of IDAPnRFProg (click to download) :

IDAPnRFProg s110_nrf51822_7.1.0_softdevice.hex Blinky_ble.hex dfu_sdk7.hex


$ ./IDAPnRFProg s110_nrf51_8.0.0_softdevice.hex Blinky_ble.hex dfu_nrf51.hex
IDAPnRFProg version 0.2
Copyright 2015, I-SYST inc. All rights reserved

Found IDAP-Link - S/N : 0000000000001
Found IDAP-Link - S/N : 0000000000002
IDAP-Link-0030415000005 : nRF51822-QFAA R2, Rev.2, HWID = 0x003C, DEVID = 0x299C1D17BD361134
IDAP-Link-0030415000005 : Flash size = 262144, Ram size = 16384
IDAP-Link-0030415000017 : nRF51822-QFAA R1, Rev.1, HWID = 0x001D, DEVID = 0x32B4DDFECEE22394
IDAP-Link-0030415000017 : Flash size = 262144, Ram size = 16384

IDAP-Link found : 2

IDAP-Link-0030415000005 : Erase Flash
IDAP-Link-0030415000017 : Erase Flash
IDAP-Link-0030415000005 : Blank checking...
IDAP-Link-0030415000017 : Blank checking...
IDAP-Link-0030415000005 : Programming...
IDAP-Link-0030415000017 : Programming...
IDAP-Link-0030415000005 : Firmware start address 0x18000
IDAP-Link-0030415000005 : DFU start address 0x3c000
IDAP-Link-0030415000017 : Firmware start address 0x18000
IDAP-Link-0030415000017 : DFU start address 0x3c000
IDAP-Link-0030415000005 : Programmed 256 KB in 21.524 sec at rate 11.894 KB/s
IDAP-Link-0030415000005 : Verifying...
IDAP-Link-0030415000017 : Programmed 256 KB in 21.524 sec at rate 11.894 KB/s
IDAP-Link-0030415000017 : Verifying...
IDAP-Link-0030415000005 : Flashing succeeded.
IDAP-Link-0030415000017 : Flashing succeeded.

Total Flashed 2 nRF51 devices in 51.112 sec, 1024 KB R/W transfered, rate = 20.035 KB/s



Flashing using OpenOCD


The current HEAD OpenOCD is performance has improved 10 fold.  It is now flashing at 9 KB/s.


nRF51:

openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c "program s110.hex verify"



LPC17xx :

openocd -f interface/cmsis.cfg -f target/lpc17xx.cfg -c "program blinky.hex verify"


LPC11xx:


openocd -f interface/cmsis-dap.cfg -f target/lpc11xx.cfg -c "program blinky.hex verify"


Freescale:

Note : kinetis.cfg of the current OpenOCD 0.9xx does not work with KL26.  Use the one in EHAL. 

openocd -f kinetis.cfg -c "program blinky.hex verify"



Debugging with OpenOCD



To enable debugging in Eclipse, select the menu Run/Debug Configuration.   A popup as bellow will appear.  Then create new GDB OpenOCD debugging configuration.


In the OpenOCD configuration popup,  select the Debugger tab to configure OpenOCD.   OpenOCD requires configuration files .cfg for the target device and the interface device.  The interface device should be set with -f interface/cmsis-dap.   The target device depends on which MCU being used.   The picture bellow shows configuration example for the nRF51 series.




OpenOCD with multi-board


When multiple IDAP-Links are connected to the PC, OpenOCD needs to know which is to be used for the debug session.  This can be accomplished using the OpenOCD command 'cmsis_dap_serial' to select the target board to use using its serial #.  Type in the Config options box -c “cmsis_dap_serial #######” where ###### is the serial number.  The image above shows the selection of the IDAP-Link with serial number '0030415000000' for the debug session.

Semihosting with OpenOCD

In order for semihosting to work.  It needs to be enabled both in OpenOCD and code initialization.

The code initialization is as follow :

extern void initialise_monitor_handles(void);

int main(void) {
    initialise_monitor_handles();

    printf("hello world!\n");
}

These linker flags are also required

--specs=rdimon.specs -lrdimon

The semihosting support in OpenOCD debug session is done in the Startup tab of the Debug configuration.  See picture bellow.





148 comments:

  1. Hi, great post. Could you tell me how you made IDAPnRFProg? Could you give me some clue?

    ReplyDelete
    Replies
    1. I read the CMSIS-DAP specs, read the ARM coresight specs, read the nRF51 specs. Write the code by testing one section of specs, one register at a time to understand. Once gone through all the specs, put all the pieces together.

      Delete
  2. Have you abandoned this project now, since the Kickstarter funding failed?

    ReplyDelete
    Replies
    1. No, it is still on. I am shipping boards already. It was too advanced for the Kickstarter crow as one of my supporter said. Many people complained that they don't need all the features and have more immediate needs and most which was for parallel programming in production. So I did what I could for that by providing the IDAPnRFProg which has solved the more urgent requirements. Now I am back to the firmware implementing the embedded filesystem for microSD and the drag & drop feature. This feature requires a lot of work. It is not a project anymore. It is now a product. The software will continue to evolve for sure.

      Delete
  3. Hi Nguyen!
    First off, awesome work!
    I have a question essentially about compatibility of using your CMSIS-DAP JTAG SWD probe and a nRF51822 BLE development board.
    1) I am thinking of getting the Nano BLE dev board: http://redbearlab.com/blenano/
    2) I want to use a Real-Time-Terminal software tool for debugging. Something like SEGGER's: https://www.segger.com/jlink-real-time-terminal.html
    3) I want to get your CMSIS-DAP JTAG SWD probe: https://www.tindie.com/products/hnhoan/idap-link-a-cmsis-dap-debug-tag-with-drag-and-drop-flash-programming/

    With items 1 and 3 above, will I be able to do real-time printing like in item 2 (perhaps with a OpenOCD tool?
    Thanks for your time, Nguyen!
    _
    Asif

    ReplyDelete
    Replies
    1. I thing RTT is proprietary of Segger. I don't think OpenOCD supports it. Semihosting is supported by OpenOCD, though I haven't tried it with IDAP-Link yet. I do know that semihosting works with CrossWorks and IDAP-Link though.

      Delete
    2. I found some info about semixosting with OpenOCD from this site http://bgamari.github.io/posts/2014-10-31-semihosting.html

      Delete
  4. Hi,
    I am trying to use IDAP-LINK to debug NRF51 board. However, after connecting the IDAP-LINK to my Windows7 64bit computer, it is giving me an error in installing the USB driver. The USB driver that didn't install is CDC - IDAP-Link . But other drivers such as the USB Composite Device, USB Input Devic, USB Mass Storage Device and IDAP-M installed correctly. Where do I find the driver for CDC - IDAP-Link?

    ReplyDelete
    Replies
    1. You can download the software here http://sourceforge.net/projects/idaplinkfirmware/files/?source=navbar

      Delete
  5. Additionally, I went ahead and attempted to call the openocd command directly from the command line as
    openocd -f interface/cmsis-dap.cfg -f target/nrf51.cfg -c "program s110.hex verify"

    The error that I got was


    GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.9.0-00073-gdd34716-dirty (2015-0
    5-19-09:55)
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : only one transport option; autoselect 'swd'
    cortex_m reset_config sysresetreq
    adapter speed: 1000 kHz
    Info : CMSIS-DAP: SWD Supported
    Info : CMSIS-DAP: JTAG Supported
    Info : CMSIS-DAP: Interface Initialised (SWD)
    Info : CMSIS-DAP: FW Version = 0.2.150624
    Info : SWCLK/TCK = 1 SWDIO/TMS = 0 TDI = 0 TDO = 0 nTRST = 1 nRESET = 1
    Info : CMSIS-DAP: Interface ready
    Info : clock speed 1000 kHz
    in procedure 'program'
    in procedure 'init' called at file "embedded:startup.tcl", line 473
    in procedure 'ocd_bouncer'
    ** OpenOCD init failed **
    shutdown command invoked

    ReplyDelete
    Replies
    1. Do you have the s110.hex file ? I think it didn't find the file

      Delete
  6. Hello. Thanks for your work.
    I'm working on Ubuntu 64bit (Trusty). is Gang programming availaible on linux? Thanks.

    ReplyDelete
    Replies
    1. Hi,

      Currently the IDAPnRFProg parallel programming software is not yet available on Linux. The board itself is compatible with Linux. You can use OpenOCD on Linux to Flash and debug.

      Delete
  7. Thanks for the quick reply.
    Just to be sure : do you mean that using openOCD (and maybe other readily available tools), *full* development is possible on Linux?
    And out of curiosity, what is one missing by using openOCD rather than IDAPnRFProg parallel programming software?

    ReplyDelete
    Replies
    1. Yes, you can use Eclipse + OpenOCD, CrossWorks or any other IDE that supports CMSIS-DAP on Linux to ARM MCU development with IDAP-Link. The IDAP-Link is being used for development on Kinetis KL series on Linux with Eclipse at one of my customers site. IDPnRFProg is witten for parallel programming of the nRF5x chip. It scans the USB for all connected IDAP-Link and program all at once. OpenOCD does on at a time.

      Delete
  8. Hi Nguyen,
    As a part of a project we are making a PCB prototype with the nrf52 chip. We are looking for a cheap alternative to jlink for flashing our device. If i was to use a header to connect pins 1 to 10 of the IDAP-link to corresponding microcontroler pins, would it still work ? (Basically we don't need the UART pins and the microcontroller is powered up from the PCB anyway)

    ReplyDelete
    Replies
    1. The IDAP-Link has on board the ARM standard 10 pins (1.27mm pitch) connector. The same one found on the Nordic-DK. You can also use the IDA-Link connector. The IDAP-Link connector can provide 3V supply to your board. The IDAPnRFProg can parrallel program both nRF51 & nRF52. For Jtag connection with IDAP-Link connector, you need to connect pin 1 (T_VCC), 2 (SWDIO), 4(SWDCLK) and GND (3 or 5 or 9 or 13) and power to your board.

      Delete
    2. Thanks for the quick reply ! Can i ask you a somewhat unrelated and basic question ? You say P2 connector is ok for standard Jtag connection, but all the pins used are SWD. What is the difference between SWD mode and JTAG mode(that uses TDI/TDO pins ?

      Delete
    3. P2 is the ARM CoreSight 10 connector. It has both SWD & JTAG pin see link bellow

      http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0499b/BEHEIHCE.html

      Delete
    4. This comment has been removed by the author.

      Delete
  9. Hi Nguen, Our company produces CortexM based micro controllers. I am wondering if I-DAP board (I-syst) would be an alternative solution for some of our customers as an ISP programming tool. As I understand the target flash algorithm is required to be built into the CMSIS DAP firmware as a C code.
    https://developer.mbed.org/handbook/cmsis-dap-interface-firmware#concatenated-production-image

    Are the sources for I-DAP available to expand the flash algorithms to a new target?
    You mentioned that BSP is available for I-syst board to compliment the embed CMSIS DAP. That would work too.
    We also could cooperate with i-syst to built in our the flash algorithm (binary) into the future revisions of I-DAP.
    Regards. my email tanya_kadantsev@yahoo.com

    ReplyDelete
  10. Hi Nguyen,
    I use OpenOCD to debug my target chip through the interface cmsis-dap and transport jtag, but the raw cmsis-dap only support swd and it will choose swd as the default transport, is that mean that I have to modify the code of openocd/src/jtag/drivers/cmsis_dap_usb.c to make it support for jtag?

    I'm new to the openocd codebase and I'm not entirely sure what direction development is trying to make cmsis-dap support jtag. Could you give me some directions, thanks lot

    ReplyDelete
    Replies
    1. The swd/jtag mode is selected by the target MCU. For nRF51 the target nrf51.cfg will select swd. What is your target MCU ?

      Delete
    2. Thanks for your quick reply!
      My target MCU is a cortex-a based MCU designed by our company and our DAP only support jtag. I kown that openocd config file can select the transport to jtag or swd, but the openocd cmsis-dap driver only support swd.

      Delete
    3. Yes, I remember now. OpenOCD 0.9 does not support jtag mode. Don't know if 0.10 has ? Otherwise, you'll need to add the code to the OpenOCD driver. The IDAP-Link itself does support jtag mode. You can test it with CrossWorks or Keil. I use CrossWork on OSX to test JTag mode on the LPC1769.

      Delete
  11. Hi,

    I am interrested by your product, but i have 2 question:

    1/ I work on mbed, and i have my .hex file from mbed, it is possible to flash my firmware directly on a module Bluetooth Smart (with nrf51822/51422 SoC) by drag and drop like on mBed ?

    2/I need several iDAP-link for gang programming or one is good enough ?

    Thanks for your work (and help on nordic's dev zone)

    Yacire.

    ReplyDelete
    Replies
    1. 1) Yes, it should work with hex file from mBed. You drag & Drop or copy over to the IDAP_FLASH drive
      2) Multiple IDAP-Link or IDAP-M are require for parallel gang programming.

      Delete
    2. Hi M. Nguyen,

      thanks for your answer.

      I downloaded the IDAP-Link_UserGuide.pdf and i tried to install the I-SYST_CDC.inf file, but it doesn't work on my PC (windows 10), i have an issue, i can't install it. there is an other way to install it ?

      Delete
    3. You need to manually install it as in the user guide. First install the .inf. Then manually select the driver. Have you check the screen shot in the user guide? Is there an error when you install it ? Could you give more details of the problem ?

      Delete
    4. Yes i checked the screen in the user guide;But do i need a IDAP-link to install the driver or i can install without ?
      I have the windows error dialog: "installation error", after i right click on .inf and click on intall.

      Delete
    5. What type of error did you get ? Can you try to manually install the driver as in the next section to see if it is listed despite the error ? I have Windows 10 too but did not have the error. Also can you check for Windows update.

      Delete
    6. BTW do you have admin priviledge on your Windows ?

      Delete
  12. We have purchased several IDAP-Link in order to flash a large number of nRF52832 HWID 0xC7 with S132 SoftDevixce 1.0.0-3.alpha, a custom DFU bootloader and a custom application. We use the Keil uVision 5.16 compiler

    The hex files have previously been successfully programmed using a nRF52 Development Board as a programmer and the nrfjprog.exe
    The bootloader starts at address 0x0007A000 and the bootloader setting at 0x0007F000

    Command line and output:

    .\IDAPnRFProg.exe "s132_nrf52_1.0.0-3.alpha_softdevice.hex" "nrf52832_xxaa_s132.hex" "nrf52832_bootloader_xxaa.hex"

    IDAPnRFProg Ver. 0.9
    Copyright 2015, I-SYST inc., all rights reserved

    Found IDAP-Link/M - S/N : 0030415000064, Firmware : 0.6.160201

    IDAP-Link/M-0030415000064 : nRF52832, Rev.-1, HWID = 0x00C7, DEVID = 0x402C5085F057E2BB
    IDAP-Link/M-0030415000064 : Flash size = 524288, Ram size = 65536

    Target device found : 1

    IDAP-Link/M-0030415000064 : Erase all
    IDAP-Link/M-0030415000064 : Blank checking...
    IDAP-Link/M-0030415000064 : Chip erased
    IDAP-Link/M-0030415000064 : Programming...
    IDAP-Link/M-0030415000064 : Programmed 256 KB in 16.902 sec at rate 15.146 KB/s
    IDAP-Link/M-0030415000064 : Application Firmware start address 0x1f000
    IDAP-Link/M-0030415000064 : DFU start address 0xffffffff
    IDAP-Link/M-0030415000064 : Verifying...
    IDAP-Link/M-0030415000064 : Programming succeeded.
    Total programmed 1 nRF51 devices in 59.361 sec, 512 KB R/W transfered, rate = 8.625 KB/s

    Well, IDAP-Link reports that the bootloader starts at address 0xffffffff (should be 0x0007A000) and dumping the 512 kB flash shows that all the bytes starting at 0x0007A000 are empty (0xFF).

    Is there a workaround for this behaviour? Am I doing anything wrong or is the IDAP-Link not fully supporting the nRF52 SOC ?

    ReplyDelete
    Replies
    1. Hi,

      Thanks for the info. I did found the bug and working on that. Could you send me your hex files for testing ? Send it to support at i-syst.com. Thanks.

      Delete
    2. Thank you for good support. My problem is solved and I guess the fix will be available for other nRF52 developers soon.

      Delete
  13. Programming is very interesting and creative thing if you do it with love. Your blog code helps a lot to beginners to learn programming from basic to advance level. I really love this blog because I learn a lot from here and this process is still continuing.
    Love from Pro Programmer

    ReplyDelete
  14. Hi.

    Can the IDAP-Link be coaxed into interfacing at other than 3.3v? Our target will likely be running at 1.8v, or maybe at 2.5v, but definitely not at 3.3v. Any suggestions?

    ReplyDelete
    Replies
    1. Yes, it has level shifter that from 1.8V to 3.6V. Feed the IDAP-Link Pin 1 (TVcc) the VCC from your board.

      Delete
    2. Excellent!

      So, can TVcc go all the way to 0v? That is, can the target be powered off and on again with the IDAP-Link still powered, and will the IDAP handle it gracefully? Finally, I guessing that the IDAP must have some sort of direction control for the level shifter, and that all that is handled by your software, right?

      Thanks for the prompt reply!!

      Neil

      Delete
    3. Yes, it has direction control. It shouldn't be a problem to power off your vcc and up again as long that you are not in the middle of programming cycle.

      Delete
  15. Hello Nguyen,

    Does the IDAP-Link work with any Cortex M MCU? I am working with LPC824, KL27, and a few others and I'm hoping I can use IDAP-Link as J-Link alternative?

    Or is it just for nRF51 based boards?

    Thanks!

    ReplyDelete
    Replies
    1. Yes, it does. Any cortex-m (m0-m4) supported by OpenOCD or other IDE such as Keil, CrossWorks, IAR, etc...
      I used it on LPC11xx, LPC17xx, Freescale KL26Z, K22, Atmel SAM3
      The SD card, Drag & Drop and the parallel programming IDAPnRFProg are only for nRF5x at the moment. I am working on a more generic version that can support other MCU as well.

      Delete
  16. Programming is combination of intelligent and creative work. Programmers can do anything with code. The entire Programming tutorials that you mention here on this blog are awesome. Beginners Heap also provides latest tutorials of Programming from beginning to advance level.
    Be with us to learn programming in new and creative way.

    ReplyDelete
  17. Hi, I build a homemade IDAP-Link. I have the two led blinking, however my windowns 10 put "unknow usb device". I try to install CDC as in the doc, but there is an error too.
    I want to use with Keil. The question is if the IDAP has HID interface as CMSIS DAP?

    ReplyDelete
    Replies
    1. Yes, the IDAP-Link is CMSIS-DAP. You can use it with Keil or other directly selecting CMSIS-DAP device. CDC driver is not required for Windows 10. The IDAP-Link firmware can only work on IDAP hardware. For your board, you can use this open source firmware https://github.com/I-SYST/CMSIS-DAP_IDAP-Link. This firmware is from mBed which I adapted for IDAP-Link for people who wants to use mBed firmware. IDAp-link firmware is written from scratch based on ARM CMSIS-DAP & Coresight specs.
      If you wish to build the IDAP-Link, you can use the IDAP-M for it. It's on this page.

      Delete
    2. Hi. I try to made the IDAP-M trying to compare the pin out of the module and the LPC11U37. So the IDAP-M is not hardware open?
      So for the firmware I need to try to compile the GIT you gave me? Becuase I see there is no .bin in the folders.
      Thank!

      Delete
    3. Sorry, it is not open. I got knock off by the Chinese so now my software won't work any boards other than the IDAP-Link or IDAP-M. yes, use that firmware. You need Keil to compile it. There is a Keil project for it. I haven't touched it for over a year now. The pin map is probably a little old. You need to check it.

      Delete
    4. Thank you Nguyen for your words! I compiled the proyect after fighting with the GIT and the "version_git.h" error! The Keil recognize it as DAP and SWD. However every time I plug and unplug appear a virtual unit to format (as a pendrive & I don't have any uC in the chain). I suppose this is the feature of the mbed to drag & drop the .bin.
      I like your project becuase you have JTAG & SWD, and the standard CMSIS-DAP is only SWD (I believe) and the CDC is really interesting.
      Great work and thank you for your comments!

      Delete
  18. It appears that IDAPnRFProg leaves the nRF51822 in debug mode after flashing. This leaves the nRESET pin inoperative and is causing me other problems. I would like to see a command-line option to cause IDAPnRFProg to terminate debug mode after flashing.

    ReplyDelete
    Replies
    1. I don't quite understand what you mean by leaving the nRESET pin inoperative on the nRF51822. That pin is not available after the processor is started. It's a shared pin with SWDIO. After programming the IDAPnRFProg sends a debug reset command which causes the processor to perform a reset and start executing the code that was flash. Though it is no longer in debug mode. It does not however precluded that your code can cause a hard fault. Have your code run in the debugger ? You can use the IDAP-Link with OpenOCD or any other IDE that support CMSIS-DAP to debug your code.

      Delete
  19. From the rRF1822 manual, "In debug interface mode, the SWDIO/nRESET pin will be used as SWDIO. The pin reset mechanism will
    therefore be disabled as long as the device is in debug interface mode."

    With the IDAP-Link attached, bringing the nRESET pin low does not reset the chip. If I disconnect the IDAP-Link and hard power cycle the chip bringing nRESET low will reset the chip as expected.

    Exiting debug mode appears to involve more than what you are doing. From the manual...

    "Normal mode can always be resumed by performing a "hard-reset" through the SWD interface:
    1. Enter debug interface mode.
    2. Enable reset through the RESET register in the POWER peripheral.
    3. Hold the SWDCLK and SWDIO/nRESET line low for a minimum of 100 µs"

    I haven't run OpenOCD yet. That will be my next step.

    One other thing I've encountered is that the nrf_drv_gpiote driver does not function with the IDAP-Link attached. Button presses do not register. It seems like interrupts are not firing, although it's hard to say for sure what's going on. When I detach the IDAP-Link and hard power-cycle the chip the button presses do register.

    ReplyDelete
    Replies
    1. I see what you are referring too. The IDAP-Link is a generic interface. It does not know the specific register for enabling reset pin. So it leaves the register as it. It does however sends a jtag reset code to the target when the ISP button is pressed. This used in the case of the nRF51 where no dedicated reset pin is available. The IDAPnRFProg program also does a jtag reset at the end of programming but does not change the register. I can add an option to enable reset pin in the next version.

      For the button, is that gpio pin connected to the IDAP-Link ? Please note, at power on, the IDAP-Link will put the target in halt mode. Use the ISP pin to perform a Reset on the target to start it.

      Delete
    2. It appears that interrupts are not firing or their vectors are not being executed after the chip is programmed using IDAPnRFProg. The program executes normally in all other respects. Everything works as expected if I use only OpenOCD. The solution for me is to use OpenOCD during development and to use IDAPnRFProg for bulk flashing.

      Delete
  20. I never got round to using the IDAP-LINK I purchased a while back, for various reasons. I am currently working with Kinetis MKL26Z parts, are you supporting them yet?

    Thanks

    ReplyDelete
    Replies
    1. Hi,
      It does work with anything that is supported by OpenOCD or by the IDE such as KEIL, CrossWorks, IAR... I used it to develop on Eclipse with OpenOCD on LPC17xx, LPC11xx, KL26, nRF51, nRF52. If the OpenOCD default .cfg for KL26 does not work properly, you can used my kinetis.cfg in the EHAL libary, see the EHAL page for the link to GitHub repo.

      Thanks

      Delete
  21. This would support traditional jtag style debugging on an nrf52xxx mcu? I'm looking to investigate their softdevices for a full open source stack.

    ReplyDelete
    Replies
    1. Yes, it is ARM standard debug jtag. It can be used to debug any Cortex-M series either SWD or JTag mode. As for the softdevice, it is not open source. Nordic provide bin only. There are however other initiatives already making open source Bluetooth stack. You can easily google for it.

      Delete
  22. I'm aware the softdevices are bin only, but one could debug them with jtag to gain insight. I've actually been looking for an open source stack for them, but google fails me. Do you think you could provide some project names?

    ReplyDelete
    Replies
    1. just google 'bluetooth stack open source', you'll find a bunch.

      Delete
  23. Just bought and received this programmer. Tried it in uVision and using IDAPnRFProg and it works great! Thank you for developing and selling it!

    ReplyDelete
  24. I'm interested in talking to you about licensing this work on a different processor. I'm dgrobinson at dgrobinson dot com.

    ReplyDelete
  25. How do you power it when doing programming without PC (using the miniSD)?

    ReplyDelete
    Replies
    1. Hi,
      You can use any USB charger adapter.

      Delete
  26. When using IDAP for SWD programming. Why is TVCC needed?
    In our case, we use the 3.3V from IDAP to power the device.
    Can we just connect TVCC to the 3.3V as well?

    ReplyDelete
    Replies
    1. The TVCC is the power that comes from the target. It is used for level shifter so the IDAP-Link can be used to program targets with power ranging from 1.8-3.6V. It is required to operated properly.

      Delete
  27. Can you be more specific? Say I want to program nrf51822. Which pin on the nrf51822 is suppose to be connected to TVCC?

    ReplyDelete
    Replies
    1. You need to connect
      nRF5x --- IDAP-Link
      SWDIO --- SWDIO
      SWCLK --- SWCLK
      GND --- GND
      VCC --- TVCC

      Delete
  28. OK. That's what I thought. Thank you!

    ReplyDelete
  29. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Embedded Training in Chennai

    ReplyDelete
  30. Hi,
    I am trying to flash nRF52 development kit using IDAPLink. The connection are as follows:
    nRF52(P20) --- IDAP
    VDD --- TVCC
    SWDIO --- SWDIO
    SWDCLK --- SWDCLK
    GND DETECT --- GND

    I tried using IDAPnRFProg_0.9 and IDAPnRFProg_1_0_Alpha3 both to flash the nRF52 target it is showing the error "Failed connecting to target".Please let me know,What went wrong?

    ReplyDelete
    Replies
    1. Hi,

      P20 is the JLink output. P18 (Debug In) is the one to use for the nRF52. The DK already have the JLink on board. Why would you need an external jtag ?

      Delete
  31. Hi,

    I am trying to flash nRF52 development kit with IDAPLink. The connections are as follows:

    Method 1:
    nRF52 (P20) -- IDAP
    VDD -- TVCC
    SWDIO -- SWDIO
    SWDCLK -- SWDCLK
    GND DETECT -- GND

    Method2:
    nRF52 (P20) -- IDAP
    VDD -- TVCC
    SWDIO -- SWDIO
    SWDCLK -- SWDCLK

    GND DETECT to GND (nRF52) -- GND (IDAP)

    I power up the target by using 3.3 volt and GND pin on IDAPLink. Afterwards,I tried using both IDAPnRFProg_0.9 and IDAPnRFProg_1_0_Alpha3 one after the other but it is giving error "Failed Connecting to Target".Please feel free to let me know,What would went wrong??

    ReplyDelete
    Replies
    1. Hi,

      P20 is the JLink output. P18 (Debug In) is the one to use for the nRF52. The DK already have the JLink on board. Why would you need an external jtag ?

      Delete
    2. Thanks for letting me know about it.I just wanted to check whether the DAPLink with nRF52 DK. So,I need to connect to Debug In (P18) in order to make it work.

      Apart from that,I had another query "Can I use 10-pin Cortex Debug Connector (P2) on IDAPLink to flash nRF52?"

      Once again,Thanks for letting me know.

      Delete
    3. Yes, exactly connect the P2 of IDAP-Link to P8 of DK. That should work. The IDAPnRFProg_0.9 is for use with older firmware 0.6. The newer IDAPnRFProg is for the new beta firmware.

      Delete
  32. I am extremely grateful for your prompt responses.One last concern after connecting P18 on nRF52 DK to P2 on IDAPLink. Can I drag-n- drop any hex file into the "IDAP_FLASH" drive in order to flash corresponding hex file into nRF52 DK?

    ReplyDelete
    Replies
    1. Yes, you can do that or you can use the IDAPnRFProg which is faster. The drag & drop has a limitation that only one hex file can be flashed. Which means you need to merge SD + firmware all into 1 hex file.

      Delete
  33. Thanks!!Good luck with your project.

    ReplyDelete
  34. Hi,

    Can I able to debug the IDAP Link using P3 by connecting it to Segger Jlink?Since,I developed interface firmware for nRF52 DK using the IDAPLink github repo and Keil MDK. When I trying to drop ".bin" example in MBED drive,It was asserting an error "RESERVED BITS" in "fail.txt"

    ReplyDelete
    Replies
    1. Yes, of course you use the JLink or IDAP-Link to debug mBed DAPLink code on IDAP-Link with KEIL.

      Delete
  35. Thanks,Do you have any clue why it was asserting an error "RESERVED BITS" in "fail.txt" when trying to develop interface firmware for nRF52 DK using the IDAP Link github repo and Keil MDK?

    ReplyDelete
    Replies
    1. I don't know what that could be. The mBed firmware is bigger than 32KB, I couldn't compile it.

      Delete
    2. Thanks for your reply,I am trying to figuring it out.Btw.You can set the optimization level in order to reduce the code size.I set it to "O-2" level then it compiles successfully for me.Hope that helps.

      Delete
    3. I tried all optimization settings no luck. Which version of KEIL are you compiling with ?

      Delete
    4. I tried with Keil uVision5. It works foe me but you have to install one software pack for uVision5 in order to make it run

      Delete
    5. could you tell me which pack did you install ? I can help debugging if I can have it compiled.

      Delete
    6. This comment has been removed by the author.

      Delete
    7. Sorry for delay in the reply. It's "MDK Version 4 Legacy Pack".Feel free to go through the below link,
      http://www.keil.com/support/man/docs/uv4/uv4_ca_migrate2v5.htm

      Delete
  36. Hi,

    I had another concern,When I am plugging IDAP Link board to desktop it says "format the disk in drive E: before you can use it".Please let me know,What would be the issue?

    ReplyDelete
    Replies
    1. It's the usb drive emulation. Which version of Windows are you using ? Which IDAP firmware version ?

      Delete
    2. This comment has been removed by the author.

      Delete
    3. It works for me just updated the firmware version thanks for letting me know and for your reply as well

      Delete
    4. I tried drag n drop programming after this error "format the disk in drive E: before you can use it" but can't able to program the nRF52 DK and it doesn't return the "fail.txt" file as well. Meanwhile,When I am trying to program with IDAPnRFProg it works well without any issue.

      Can you please let me know,What exactly the problem is?

      Delete
    5. Which WIndows version are you using ?
      You need to set the target device with IDAPSetTarget first. You need to do this only once until you change target device. For example 'IDAPSetTarget 2' will set nRF52832 as target. The IDAP firmware is not is not mBed firmware, there is no fail.txt.

      Delete
    6. Do you still have issues ? Could you email me your hex file so I can debug it, thanks.

      Delete
    7. It works fine with ".hex" files but can't able to do it ".bin" files.Trying to figuring it out and let you know if I encounter any problem.Thanks for helping a lot Nguyen.

      Delete
    8. I am having the same issue and sending the ".bin" file wanted to flash onto nrf52 DK. Apart from that,I am sending the mBed firmware ".hex" file as well just let me know if you are able to help me in debugging it.I am sending files to support@i-syst.com

      Delete
    9. I received your email. Thanks for sending the files for debugging.

      Delete
    10. You are welcome,Looking forward for your response.

      Delete
  37. Dear Nguyen,

    We successfully flashed our nRF52 with your programmer. However, we found it to be extremely slow.
    Here is the report:


    IDAPnRFProg Ver. 1.0.170624
    Copyright 2015, I-SYST inc. All rights reserved

    Found IDAP-Link/M - S/N : 0030416000085, Firmware : 1.0.170423

    Target device found : 1


    IDAP-Link/M-0030416000085 : nRF52832-QFAAB0, Rev.-1, HWID = 0x52832, DEVID = 0xF26ADEA2AFB56FCD
    IDAP-Link/M-0030416000085 : Flash size = 524288, Ram size = 65536
    IDAP-Link/M-0030416000085 : Erase all
    IDAP-Link/M-0030416000085 : Blank checking...
    IDAP-Link/M-0030416000085 : Chip erased
    IDAP-Link/M-0030416000085 : Programming...
    IDAP-Link/M-0030416000085 : Programmed 508 KB in 45.745 sec at rate 11.105 KB/s
    IDAP-Link/M-0030416000085 : DFU start address 0x7a000
    IDAP-Link/M-0030416000085 : Verifying...
    IDAP-Link/M-0030416000085 : Programming succeeded.
    Total programmed 1 nRF51 devices in 50.128 sec, 2032 KB R/W transfered, rate = 40.536 KB/s

    First, what speed should we expect to get? Is 40KB/s reasonable?
    Second, the hex we flashed was ~700KB. That shouldn't have taken 50 sec.
    Third, why does it say nRF51 device programmed?

    ReplyDelete
    Replies
    1. Thanks, for reporting. It was just a wrong message. I though it was corrected. The verify was changed to do checksum instead of read back the whole flash and compare. The previous version, it reads back the whole and compare with the original in memory. There was 700KB initial write, then a read back 700KB, then a compare of 700KB. The new verify is not the same case. I'll readjust the calculation. Thanks

      Delete
    2. Where is this new version? Is this in firmware or a new IDAPnRFProg?

      Delete
    3. Also, what is the expected transmit speed with SWD using IDAP?

      Delete
    4. The maximum speed is about 1MHz. The latest version of firmware software is at https://sourceforge.net/projects/idaplinkfirmware/?source=directory

      Delete
  38. Another problem we experienced is that one in a while, we get the following error:
    IDAP-Link/M-0030416000085 : nRF52832-QFAAB0, Rev.-1, HWID = 0x52832, DEVID = 0x21F7A5356665163E
    IDAP-Link/M-0030416000085 : Flash size = 524288, Ram size = 65536
    IDAP-Link/M-0030416000085 : Erase all
    IDAP-Link/M-0030416000085 : Blank checking...
    IDAP-Link/M-0030416000085 : Flash NOT BLANK. Device may be protected
    IDAP-Link/M-0030416000085 : Atempting to unprotect and erase Flash again

    And then programming does not work correctly (even though it says successful).
    Chips are not protected. When we execute the IDAPnRFProg again, it usually works the second time.

    ReplyDelete
    Replies
    1. Thi happens when there was a bad chip or an Engineering version of it. Eventually, it will stop working.

      Delete
    2. Is there a way to catch this event or test for it? (Flash NOT BLANK). Maybe with a different executable return code?

      Delete
    3. Yes, it is certainly possible. I'll add it to the next release of the software.

      Delete
  39. I see that these cannot be ordered now from the store and that only 2 are left in stock. Is that accurate?

    ReplyDelete
    Replies
    1. Sorry, I am travelling right now. I switched production to China to reduce cost in order to reduce the sale price but the yield was terrible. Many soldering issues. I hope to get production running again soon. I usually keep a few on reserve if you need more.

      Delete
    2. Sounds good. We definitely want to order a couple more as soon as they are available.

      Delete
    3. Ping me when you are back from your vacation. We would like to order a couple more.

      Delete
  40. What is the maximum number of IDAPlinks you managed to simultaneously connect to a PC?
    We are trying to figure out an optimal strategy for gang programming.

    ReplyDelete
    Replies
    1. That's depend on how many USB connection your PC can handle. The IDAPnRFProg does not have a limit. It will scan for all that it can find on the USB bus.

      Delete
  41. I am having trouble getting serial information read from the UART 16 pin connector.
    I have a circuit that is sending characters over 115200 baud (verified via nrf52dk board), however, when I connect the it to the idaplink port, I don't see anything on the corresponding com port.
    Any ideas how to proceed?

    ReplyDelete
    Replies
    1. Connect nRF RX pin to IDAP T_RXD (12) pin and nRF TX to IDAP T_TXD (11) pin

      Delete
    2. This comment has been removed by the author.

      Delete
    3. My circuit only outputs over UART, so I don't have a RX pin on nRF.
      I connected nRF TX to pin 11 on IDAP as well as GND.
      Still - there I don't get anything on the terminal.

      Delete
    4. UART has TXD & RXD. What is you TX & RX pin config in the nRF code ? If you tested on the DK then look under the DK PCB. It will indicate which pin of the nRF.

      IDAP Pin --- nRF Pin
      TVCC --- nRF VCC
      GND --- nRF GND
      T_TXD --- nRF TXD pin (pin number configured by your code)
      T_RXD --- nRF RXD pin (pin number configured by your code)



      Delete
    5. Let me elaborate. I am connecting a custom device with nrf52832 (or nrf51822). The board is running mbed os with Serial defined over two pins. the RX is a dummy pin and not actually connected to anything. The TX pin outputs debugging messages from the device. I've been using this device with many other debuggers that have UART (MK20, NRF51DK, NRF52DK) and in all of those cases, I never connected the device RX pin to the debugger.
      Perhaps it is because I didn't connect TVCC. Let me check.

      Delete
    6. The IDAP-Link has a level shifter so TVCC is required.

      Delete
    7. Yes. That was the issue. Everything works now.

      Delete
  42. I have a question regarding the buttons. We are thinking about connecting several IDAPlink to an arduino/other MCU to do the gang programming from the SD card (and then additional testing). It is possible to solder out the three buttons and connect them to a digital out of the arduino? Do they pull high/low?

    ReplyDelete
    Replies
    1. Yes, it is possible to hack it. You can tie them all together to a single button. The button is pullup internally so no pullup is required on the Arduino side. The button is active low.

      Delete
    2. Note that SD card programming is slower than using the IDAPnRFProg program.

      Delete
  43. IDAPSetTarget on OSX hangs problem.
    I just tried to run IDAPSetTarget for the first time on my mac and it get stuck with the following message:
    ./IDAPSetTarget 2

    IDAPSetTarget Ver.: 1.1.170624
    Copyright 2015, I-SYST inc.

    This program is used to set the runtime target for the IDAP-Link/IDAP-M

    I'm running 10.12.5 (macOS Sierra).

    ReplyDelete
    Replies
    1. I am not sure what could be the problem. I work on MAC as well and could not reproduce the problem with and without the IDAP-Link connected. When there is no IDAP-Link connected. It took about 3 secs to timeout but no hanging. Running on Sierra 10.12.6

      Delete
    2. Solved after a computer reboot. Everything works now.

      Delete
  44. Is there a way to instruct IDAPlink to perform a target device reset from the command line?

    ReplyDelete
    Replies
    1. Currently not. IDAPnRFProg does reset the target after programming is completed.

      Delete
    2. Another feature for a future release. Thank you!

      Delete
  45. Is there a way to restrict IDAPnRFProg to program only one of the IDAPlink modules if multiple of them are connected to the PC? If not, can you please add this feature for the next software release? (maybe with a specific flag and the serial number of the IDAPlink?)

    ReplyDelete
    Replies
    1. It would a feature for future release. Thanks

      Delete
    2. Added to IDAPnRFPRog 1.1. You can try it.

      Delete
    3. Thank you for this quick fix. I'll test once the new programmers arrive

      Delete
  46. We noticed some inconsistent behavior from IDAPnPRog. In some cases, when it runs, it will correctly identify the chip HWID and DEVID, but in others it will output zeros. Here is an example run where upon the first call, it returns zeros, and then a subsequent call (just to reset the device) correctly returns that information:


    Found IDAP-Link/M - S/N : 0030416000085, Firmware : 1.0.170624

    Target device found : 1


    IDAP-Link/M-0030416000085 : , Rev.0, HWID = 0x0000, DEVID = 0x0000000000000000
    IDAP-Link/M-0030416000085 : Flash size = 0, Ram size = 0
    IDAP-Link/M-0030416000085 : Erase all
    IDAP-Link/M-0030416000085 : Blank checking...
    IDAP-Link/M-0030416000085 : Chip erased
    IDAP-Link/M-0030416000085 : Programming...
    IDAP-Link/M-0030416000085 : Programmed 508 KB in 33.781 sec at rate 15.039 KB/s
    IDAP-Link/M-0030416000085 : DFU start address 0x7a000
    IDAP-Link/M-0030416000085 : Verifying...
    IDAP-Link/M-0030416000085 : Programming succeeded.

    Total programmed 1 nRF5x devices in 37.052 sec, 508 KB R/W transfered, rate = 13.711 KB/s

    IDAPnRFProg Ver. 1.1.170722
    Copyright 2015, I-SYST inc. All rights reserved

    Found IDAP-Link/M - S/N : 0030416000085, Firmware : 1.0.170624

    Target device found : 1


    IDAP-Link/M-0030416000085 : nRF52832-QFAAB0, Rev.-1, HWID = 0x52832, DEVID = 0xEA5E62639D28766F
    IDAP-Link/M-0030416000085 : Flash size = 524288, Ram size = 65536

    Total programmed 1 nRF5x devices in 2.003 sec, 0 KB R/W transfered, rate = 0.000 KB/s
    logout
    Saving session...
    ...copying shared history...
    ...saving history...truncating history files...
    ...completed.


    ReplyDelete
    Replies
    1. Yes, I am aware of the issue. It is due to existing firmware that override the detection info of flashing algo in RAM. It doesn't affect to programming. It happens when latest softdevice is present. It will be fixed in the next release.

      Delete
  47. Feature request: Can you add an option to report which COM port is linked with which IDAPlink serial number? We have an issue of port remapping after hitting a hard reset. It will be useful to get a list of all IDAPlink connected devices and their corresponding virtual COM port location.

    ReplyDelete
    Replies
    1. The IDAP does have serial in the USB device info. It is Windows that control the port mapping. The COM driver is native Windows driver. IDAP does not install any driver.

      Delete