Friday 4 October 2013

Setting up ULink2 for CSMIS DAP Serial Wire Debug mode configuration.


The Keil ULINK2 USB-JTAG Adapter connects your PC's USB port to your target hardware (via JTAG, OCDS or Serial Wire) and allows you to download and debug your programs on targets and program on-chip and external FLASH memory.
ULINK2
                                                                     ULINK2 Adapter 

 Today I was kind of stuck at debugging with ULink2 in CSMIS-DAP boot mode over Serial Wire Debug  ( SWD) connection. I was using STM3210E-Eval board.


After spending a lot of my office hours I was able to figure out the correct way of booting ULink2 in CSMIS-DAP mode and loading my executable on target and debug it.



I am listing below steps for Windows 7 machine. First you have to install either of the following software from https://www.keil.com/download/product/

Each one of the above software is going to install  ..\Keil\ARM..\ULINK\Utilities. This folder contains two important utilities.

Kindly note that starting with the ULINK2 firmware version 2.00, the default boot mode is CMSIS-DAP.
Boot utility won't be able to recognize ULink2 if firmware is not updated first. If firmware is prior to 2.00 then running the utility using command line will give results as shown below. Use correct serial number in below command.

$ ./UL2_Configure.exe V0044N8E B1
ULINK2 Configure Utility V1.0

Error: ULINK not found!

If you see issues like above and you are sure that there is nothing wrong with ULink2 and it is correctly connected to the system then it is a high possibility that ULink2 firmware is not updated. You need to update it using following command.

$ ./UL2_Upgrade_V201.exe V0044N8E
ULINK2 Firmware Upgrade Utility [FW V2.01]


Disconnecting ULINK ...........

Connecting ULINK Loader ...............................
Erasing Firmware ...
Firmware Erased.
Programming Firmware ...
Firmware Programmed.
Disconnecting ULINK Loader ...........


Now change the boot mode to CSMIS-DAP, output will be similar to following.

$ ./UL2_Configure.exe V0044N8E B1
ULINK2 Configure Utility V1.0


Disconnecting ULINK ..........

Connecting ULINK Loader ...............................


Updating configuration ...

Configuration updated!


Disconnecting ULINK Loader ..........


Now if we try to see properties of device , JTAG port and most of other device properties will be disabled as shown below. If JTAG and other properties are shown properly then there might be a mistake while updating the boot mode.


After above changes connect ULink2 with target.  Now ULink2 will be booted in CSMIS-DAP mode and can be used to debug a target with Serial Wire debug mode availability.






No comments:

Post a Comment