Password Protected JTAG Flashing Query

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User13596
Level 1
Level 1
Hi,

I am using AURIX TC299TF controller.
I want the JTAG to be locked so that only authorized person can access the JTAG and modify things.

For example :
To flash new application into the flash memory the JTAG first needs to be unlocked with correct password. If JTAG was successfully unlocked only then it will allow the new application to be flashed into the flash memory.

Is this possible? If yes, what should I refer for configurations?

My target is to understand,

1: How can we protect the debug interface or how to lock it?
2: How to set the configuration for debug interface lock?
3: How to unlock the debug interface by means of password or hardware settings etc. when we will connect the debugger.

I have went through the user manual and found that we need to configure UCB_DBG

UCB_DBG is located at 0xAF101400H. So do we have to flash the configurations directly at this location as per following?

Table 10-13 UCB_DBG Content
Offset Content Description
00H PROCONDBG Protection of the debug interface.
10H PROCONDBG Copy.
20H PW0 – PW7 256-bit password, from least significant word to most
significant word (8 words).
40H PW0 – PW7 Copy of 256-bit password.
70H Confirmation 4 bytes.
78H Confirmation Copy.


We have to flash the password at 20H and its copy at 40H?.
Location 00H and 10H will be flashed with configurations as per the PROCONDBG?
Do we have to do any additional configurations?


Could you please explain the complete procedure and configurations to be done step by step.


Thank you,
Harish Anchan.
0 Likes
12 Replies
User16395
Level 1
Level 1
Hello Harish Anchan
Have you come to resolve your problem, i also have had the same and could not find enough info.
Please share.
0 Likes
User13596
Level 1
Level 1
For Locking/ Unlocking the debug interface Infineon Memtool can be used.
Please follow the below steps

Device Setup
1.Power on the Aurix Development Kit.
2.Connect the Aurix device with system (i.e. PC) through Micro USB Connector.
3.Open Infineon Memtool.

There will be a pop-up message “Initializing Memtool failed”.

Click Ok.

3425.attach



Status : Not initialized

3426.attach



Now click On Target-> Change

3427.attach



Following message will pop-up.

Click OK.

3428.attach



Click on Default to use predefined configuration files

3429.attach
0 Likes
User13596
Level 1
Level 1
Configuration list will pop up, select the appropriate configuration.

3430.attach



We will select,

TriCore Aurix -> Starter Kits (DAS) -> TriBoard with TC297/TC298/TC299 B-Step (DAS)

You may select your respective device

Click Finish.

3431.attach



Now save the configuration at a desired location.

Click OK.

3432.attach



Check the status,

It will show Target not connected.

Now Click on "Connect" to connect the target.

3433.attach



Once the target is connected successfully the status will be changed to “Ready for Memtool Command”

3434.attach
0 Likes
User13596
Level 1
Level 1
3435.attach

3436.attach

3437.attach
0 Likes
User13596
Level 1
Level 1
3438.attach

3439.attach

3440.attach

3441.attach
0 Likes
User13596
Level 1
Level 1
3442.attach

3443.attach
0 Likes
User13596
Level 1
Level 1
This will give a clear idea of unlocking the Aurix Tricore TC299 Debug Interface using iSystem’s winIDEA for flashing new application or for debugging

3444.attach

3445.attach
0 Likes

Hi, I followed your tutorial for setting a password for the JTAG on TriCore TC364DP. Even when entering the correct password the JTAG is not unlocked through memtool or winIDEA.I read the registers containing the values of UCB_DBG_ORIGIN and they output the same values as the password I set up the JTAG lock with.

Could you help me with my issue?

 

Regards,

Nikil

0 Likes

Hi,

modifying password is best done in winIDEA GUI not by modifying .xjrf file. In the latest winIDEA version this is done through the HW/CPU Options... dialog SoC tab. Here you can enable using password and enter its HEX values like shown here: 

oldPcSpeakers_0-1704450045646.png

and explained here.

However you have to be also careful how you configure your password or modify anything related to UCBs since it can lock the device. For this winIDEA has quite powerful features that prevent you misconfiguring them such as UCB legacy or more comprehensive and newer UCB Checker AURIX plugins which both enable you to change debug password conveniently. Then there is also Image checker to name just a few of related features. Simple procedure of how to change it with winIDEA is described here.

Best regards

0 Likes
User11926
Level 1
Level 1
Hello Anchan,

I don't have any feasibility of connecting my aurix controller to the PC for unlocking debug interface from you explanation.

Is there any other process of unlocking i.e by modifying register values?

If there please explain me.

Thanks in advance.

Regards,
Sunil
0 Likes
User22783
Level 1
Level 1
Is there a described way to erase debug interface lock using lauterbach ?
0 Likes
SYStem.Option.KEYCODE Password
You try it.
0 Likes