Can't connect to KIT_A2G_TC397_3V3_TFT after flashing an app

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

cross mob
vjalle
Level 1
Level 1
5 sign-ins First like received 5 replies posted

Hi,

After flashing my test app into the TC397XX step B on the TFT board, the free Hightec debugger and the Infineon MemTool can't connect anymore. When powering up the board, the ESR0 LED flashes very briefly, and the backlight of the TFT display switches on. After approx. 0.5s the backlight goes off and the ESR0 LED turns on permanently.

Also tried to keep the reset button pressed during powerup, and only releasing it after clicking connect in the tools. This resulted in partial success. Without the trick, I get this errors in MemTool:

Message from component 'IMTMemtool' :
Can't connect to Target

Message from component 'Controller0.Core0.Tc2CoreTargIntf' :
Can't connect target !

Message from component 'Controller0.Core0.Tc2CoreTargIntf' :
Can't connect target device via DAS !

With the trick, I get only this:

Message from component 'IMTMemtool' :
Can't connect to Target

So something changed.

Any ideas what's happening and how could I regain control over the MCU?

The image that was flashed did not cover the UCB or any "sensitive" regions. It only has data in the 0x80000000-0x80019fff region. The startup code is obviously broken, the cores can't boot properly.

I only have the on-board debugger on the TFT kit and the free tools. Is this a known issue and would Lauterbach help?

Thanks, Ferenc

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

dw_0-1658021640767.png

dw_1-1658021848574.png

 

Hi vjalle,

I attached my .wsx file, DAS and UDE version is in above screenshot. I am using onboard miniWiggler which has a USBUART bridge chip onboard. COM5 is my USB port to communicate with the miniWiggler. Triboard TC397 is with default settings. Maybe you could change a new board to try. Or if you have a socket onboard, then you could change a MCU to try.

 

dw

 

View solution in original post

0 Likes
10 Replies
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Dear Vjalle,

Have you used ADS to try? The App Board has onboard miniWiggler, so you can use USB cable to connect it to PC, and use ADS to debug it.

The ADS has DAS inside, the link is in below:

https://www.infineon.com/cms/en/product/promopages/aurix-development-studio/

https://www.infineon.com/dgdl/Infineon-AURIX_Getting_Started_with_AURIX_Development_Studio-GettingSt...

 

dw

0 Likes
vjalle
Level 1
Level 1
5 sign-ins First like received 5 replies posted

Hi DW,

Thanks for looking into this issue. Unfortunately, it did not work:

Error creating session
The debug instrument IO could not be initialized.
The GDI debug instrument provided the following error message.
An internal error has occurred.

I believe, all the tools I tried are using DAS, and probably failed in the same / similar way. Any idea what should I try?

Ferenc

0 Likes
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

Hi vjalle,

I am not sure if it's a software or hardware issue. Generally, if doesn't flash UCB blocks, the software will not impact the debug port.

Or could you send your software to me for test on my TC397 Triboard?

dw

0 Likes
lock attach
Attachments are accessible only for community members.
vjalle
Level 1
Level 1
5 sign-ins First like received 5 replies posted

Hi DW,

Added the elf file in a zip. The linker also produces an s19 file. That I analyzed with srec_info to make sure that there is no data at the UCB. The srec_info tool output is as follows:

Format: Motorola S-Record
Header: "ltc"
Start: A0000000
Data: 80000004 - 800002BD
800002C0 - 8000034D
80000350 - 80000351
80000354 - 80000354
80000358 - 80000358
8000035C - 8000035C
80000360 - 80000360
80000364 - 80000364
80000368 - 80000368
8000036C - 8000036C
80000370 - 80000370
80000374 - 80000374
80000378 - 80000378
8000037C - 8000037C
80000380 - 80000380
80000384 - 80000384
80000388 - 8000238D
80002390 - 800024B5
800024B8 - 800027B5
800027B8 - 800027DA
800027DC - 800027FA
800027FC - 80002815
80002818 - 80002879
8000287C - 800028BE
800028C0 - 800028DD
800028E0 - 80002902
80002904 - 8000291E
80002920 - 80002940
80002944 - 800029BD
800029C0 - 80002C6D
80002C70 - 80002CA9
80002CAC - 80002D75
80002D78 - 800037B4
800037B8 - 80003898
8000389C - 800038D9
800038DC - 800039C5
800039C8 - 80003A75
80003A78 - 80003E88
80003E8C - 80003EA5
80003EA8 - 80003EC2
80003EC4 - 80003EDC
80003EE0 - 80003EEC
80003EF0 - 80003F00
80003F04 - 80003F19
80003F1C - 80003F25
80003F28 - 80003F2C
80003F30 - 80003F34
80003F38 - 80003F3C
80003F40 - 80003F44
80003F48 - 80003F51
80003F54 - 80003F65
80003F68 - 80003F7C
80003F80 - 80003F81
80003F84 - 8000406D
80004070 - 80004261
80004264 - 80004269
8000426C - 800042EA
800042EC - 800042F0
800042F4 - 8000430C
80004310 - 80004328
8000432C - 8000433C
80004340 - 80004354
80004358 - 8000435C
80004360 - 80004362
80004364 - 80004401
80004404 - 8000441E
80004420 - 80004426
80004428 - 8000442D
80004430 - 80004439
8000443C - 80004495
80004498 - 800044B0
800044B4 - 800044C1
800044C4 - 800044D1
800044D4 - 800044E6
800044E8 - 80004502
80004504 - 80004516
80004518 - 8000452C
80004530 - 800045B5
800045B8 - 800045F6
800045F8 - 80004601
80004604 - 80004605
80004608 - 80004621
80004624 - 8000470D
80004710 - 8000471D
80004720 - 800047D5
800047D8 - 8000493D
80004940 - 80004961
80004964 - 800049ED
800049F0 - 80004A01
80004A04 - 80004A15
80004A18 - 80004A29
80004A2C - 80004A35
80004A38 - 80004A49
80004A4C - 80004A5D
80004A60 - 80004A69
80004A6C - 80004AAD
80004AB0 - 80004B19
80004B1C - 80004B59
80004B5C - 80004B61
80004B64 - 80004BF1
80004BF4 - 80004C81
80004C84 - 80004E71
80004E74 - 80004EA1
80004EA4 - 80004EA9
80004EAC - 80004EB1
80004EB4 - 80004FA5
80004FA8 - 80005071
80005074 - 800051C9
800051CC - 80005275
80005278 - 800052E5
800052E8 - 80005375
80005378 - 80005989
8000598C - 80005A81
80005A84 - 80005AE9
80005AEC - 80005B99
80005B9C - 80005CA1
80005CA4 - 80005D4D
80005D50 - 80005DBD
80005DC0 - 80005DE9
80005DEC - 80005F65
80005F68 - 80005F6D
80005F70 - 80005FBD
80005FC0 - 80005FD1
80005FD4 - 80006031
80006034 - 80006041
80006044 - 80006175
80006178 - 800061B5
800061B8 - 800061F5
800061F8 - 80006211
80006214 - 80006315
80006318 - 8000635D
80006360 - 80006559
8000655C - 80006571
80006574 - 800065A1
800065A4 - 800066BD
800066C0 - 800066F9
800066FC - 80006701
80006704 - 80006731
80006734 - 8000674D
80006750 - 80006779
8000677C - 80006795
80006798 - 8000684D
80006850 - 80006855
80006858 - 80006951
80006954 - 80006A45
80006A48 - 80006AE5
80006AE8 - 80006B31
80006B34 - 80006BA5
80006BA8 - 80006D19
80006D1C - 80006D45
80006D48 - 80006DFD
80006E00 - 80006EC9
80006ECC - 80006EE9
80006EEC - 80006F11
80006F14 - 80007029
8000702C - 80007031
80007034 - 8000712D
80007130 - 80007185
80007188 - 8000727D
80007280 - 800072F1
800072F4 - 8000730D
80007310 - 80007385
80007388 - 80007451
80007454 - 80007475
80007478 - 80007529
8000752C - 80007545
80007548 - 80007599
8000759C - 800075F5
800075F8 - 800077A1
800077A4 - 80007801
80007804 - 80007B41
80007B44 - 80007B99
80007B9C - 80007BF5
80007BF8 - 80007C99
80007C9C - 800081B1
800081B4 - 80008385
80008388 - 80008441
80008444 - 800084D9
800084DC - 80008951
80008954 - 80008CBD
80008CC0 - 80008E15
80008E18 - 80008E41
80008E44 - 80008E89
80008E8C - 80008F29
80008F2C - 80008FE1
80008FE4 - 800090BD
800090C0 - 80009239
8000923C - 80009261
80009264 - 8000938D
80009390 - 800093CD
800093D0 - 800094F9
800094FC - 8000960D
80009610 - 80009651
80009654 - 8000977D
80009780 - 80009855
80009858 - 80009A19
80009A1C - 80009CD9
80009CDC - 80009E85
80009E88 - 8000A03D
8000A040 - 8000A061
8000A064 - 8000A0D9
8000A0DC - 8000A2A1
8000A2A4 - 8000A491
8000A494 - 8000A535
8000A538 - 8000A589
8000A58C - 8000ABCD
8000ABD0 - 8000B045
8000B048 - 8000B095
8000B098 - 8000B139
8000B13C - 8000B225
8000B228 - 8000B2F5
8000B2F8 - 8000B365
8000B368 - 8000B3C1
8000B3C4 - 8000B3D5
8000B3D8 - 8000B431
8000B434 - 8000B479
8000B47C - 8000B481
8000B484 - 8000B531
8000B534 - 8000B581
8000B584 - 8000B635
8000B638 - 8000B679
8000B67C - 8000B689
8000B68C - 8000B7D9
8000B7DC - 8000B7ED
8000B7F0 - 8000B815
8000B818 - 8000B81D
8000B820 - 8000B835
8000B838 - 8000B841
8000B844 - 8000B929
8000B92C - 8000B939
8000B93C - 8000BA81
8000BA84 - 8000BBB9
8000BBBC - 8000BDD1
8000BDD4 - 8000C845
8000C848 - 8000C8B1
8000C8B4 - 8000C9A5
8000C9A8 - 8000CC21
8000CC24 - 8000CDB1
8000CDB4 - 8000CDD5
8000CDD8 - 8000CDDD
8000CDE0 - 8000CF75
8000CF78 - 8000CF7D
8000CF80 - 8000D059
8000D05C - 8000D2F9
8000D2FC - 8000D3B1
8000D3B4 - 8000D5A1
8000D5A4 - 8000D625
8000D628 - 8000D669
8000D66C - 8000D685
8000D688 - 8000D6B9
8000D6BC - 8000D6CD
8000D6D0 - 8000D9B9
8000D9BC - 8000DB5D
8000DB60 - 8000DB79
8000DB7C - 8000DD59
8000DD5C - 8000DEED
8000DEF0 - 8000E02D
8000E030 - 8000E035
8000E038 - 8000E195
8000E198 - 8000E209
8000E20C - 8000E2A1
8000E2A4 - 8000E31D
8000E320 - 8000E355
8000E358 - 8000E4E5
8000E4E8 - 8000E659
8000E65C - 8000E7E5
8000E7E8 - 8000E9F5
8000E9F8 - 8000EAC9
8000EACC - 8000EBA1
8000EBA4 - 8000EBA5
8000EBA8 - 8000EC7D
8000EC80 - 8000EC85
8000EC88 - 8000EC8D
8000EC90 - 8000EDDD
8000EDE0 - 8000EF59
8000EF5C - 8000F005
8000F008 - 8000F4C9
8000F4CC - 8000F4FD
8000F500 - 8000F95D
8000F960 - 8000FA31
8000FA34 - 8000FD31
8000FD34 - 8000FD39
8000FD3C - 8000FDBD
8000FDC0 - 800100E9
800100EC - 800104B5
800104B8 - 800104D5
800104D8 - 800105E5
800105E8 - 800108A5
800108A8 - 80010B7D
80010B80 - 80010D5D
80010D60 - 80010E19
80010E1C - 80010EDD
80010EE0 - 80010F25
80010F28 - 80010F79
80010F7C - 8001139D
800113A0 - 800113D1
800113D4 - 800115FD
80011600 - 80011851
80011854 - 80011885
80011888 - 80011A5D
80011A60 - 80011A91
80011A94 - 80011B75
80011B78 - 80011CD9
80011CDC - 80011D05
80011D08 - 80011DF5
80011DF8 - 80012161
80012164 - 80012591
80012594 - 800125D5
800125D8 - 80012685
80012688 - 800126A1
800126A4 - 800128D9
800128DC - 80012D41
80012D44 - 80012D95
80012D98 - 80012DA1
80012DA4 - 80012DA9
80012DAC - 80012DB1
80012DB4 - 80012E5D
80012E60 - 80012E7D
80012E80 - 80013085
80013088 - 80013139
8001313C - 80013151
80013154 - 80013169
8001316C - 8001319D
800131A0 - 800131B5
800131B8 - 800131E1
800131E4 - 8001323D
80013240 - 800132E5
800132E8 - 800132ED
800132F0 - 80013319
8001331C - 80013329
8001332C - 80013361
80013364 - 80013369
8001336C - 80013375
80013378 - 800133D5
800133D8 - 800133E9
800133EC - 80013405
80013408 - 80013499
8001349C - 800138C9
800138CC - 800138D1
800138D4 - 800138D9
800138DC - 800139C5
800139C8 - 80013AE1
80013AE4 - 80013BE1
80013BE4 - 80013C45
80013C48 - 80013F71
80013F74 - 80014141
80014144 - 800142BD
800142C0 - 80014499
8001449C - 80014525
80014528 - 800145D5
800145D8 - 80014751
80014754 - 800149E1
800149E4 - 80014C45
80014C48 - 80014D81
80014D84 - 80014E81
80014E84 - 80014F01
80014F04 - 800151AD
800151B0 - 80015515
80015518 - 80015671
80015674 - 80015D69
80015D6C - 80015FD5
80015FD8 - 800160E1
800160E4 - 800161ED
800161F0 - 80016359
8001635C - 8001637D
80016380 - 8001639D
800163A0 - 800168E5
800168E8 - 8001698D
80016990 - 80016A2D
80016A30 - 80016B9D
80016BA0 - 80016CD1
80016CD4 - 80016CF5
80016CF8 - 80016D51
80016D54 - 80016D65
80016D68 - 80016EA5
80016EA8 - 80016EED
80016EF0 - 80017129
8001712C - 800172A5
800172A8 - 800172F5
800172F8 - 800173F1
800173F4 - 80017515
80017518 - 80017979
8001797C - 800179B5
800179B8 - 800179F1
800179F4 - 800180B5
800180B8 - 80018259
8001825C - 80018275
80018278 - 800182A1
800182A4 - 8001832D
80018330 - 80018351
80018354 - 800183BD
800183C0 - 800187B5
800187B8 - 80019CB8
A0000000 - A0000003

As you see there is nothing at the UCB. My feeling is that the MCU starts booting and then does something that the debugger does not like. Probably in that 0.5s window before entering the permanent reset state a good debugger with proper configuration should be able to connect.

I know that the __start_tc1 .. __start_tc5 functions are not called properly, because in the Tasking 6.3r1 compiler they're called __start_tc1_no_vtc, and or Os produced the old calls (without _no_vtc). They were redirected to endless loops. My assumption was that the cores stuck in infinite loops I'd see with the debugger. But can't connect anymore to debug it.

I'm curious how it works for you. Hope that it won't kill your board too...

BR, Ferenc

0 Likes
vjalle
Level 1
Level 1
5 sign-ins First like received 5 replies posted

Hi DW,

Did you manage to test it? Any ideas how could I recover access to my board? I need help with it as I don't seem to be able to fix it. Thanks.

Ferenc

0 Likes
lock attach
Attachments are accessible only for community members.
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

dw_0-1657959210100.png

 

Hi vjalle,

I have used UDE 2021 to download your .elf to my Triboard TC397, and then press PORST button, then I programmed .elf of my LED demo, and programming successfully. Then I press PORST button again, and see LED blinking.

That means my .elf works again, and your .elf doesn't interference my .elf.

C:\Program Files\pls\UDE Starterkit 2021

By the way, UDE 2021 is free software which you can download from below link:

https://free-entry-toolchain.hightec-rt.com/

User Manual https://free-entry-toolchain.hightec-rt.com/gettingstarted.pdf?d=20190812

 

 

dw

0 Likes
vjalle
Level 1
Level 1
5 sign-ins First like received 5 replies posted

Hi DW,

Basically the same symptoms, no luck. My board is in continuous reset (ESR0 illuminated), and UDE can't connect in this state. If the board is powered up with reset pressed, and I only release the reset button after clicking connect, something happens, typically this:

Error, Core0, Tc2CoreTargIntf, Can't connect target device via DAS !
Error, Core0, Tc2CoreTargIntf, Can't connect target !
Message, Core0, Tc2CoreTargIntf, Connection failed report created: C:\Users\Public\Documents\pls\UDESTK 2021\Workspaces\__connection_failed_report__Controller0_Core0_2022_07_16.txt
Error, Core0, UDEDebugServer, Unable to establish connection . To correct the situation, check configuration file entries and try again.
Error, Core0, Tc2CoreTargIntf, Can't connect target device via DAS !
Error, Core0, Tc2CoreTargIntf, Can't connect target !
Message, Core0, Tc2CoreTargIntf, Connection failed report created: C:\Users\Public\Documents\pls\UDESTK 2021\Workspaces\__connection_failed_report__Controller0_Core0_2022_07_16.txt
Error, Core0, UDEDebugServer, Unable to establish connection . To correct the situation, check configuration file entries and try again.
Message, Core0, Tc2CoreTargIntf, Initializing EMEM (64 KB)...
Message, Core0, Tc2CoreTargIntf, Initializing PSPR/DSPR...
Error, Core0, Tc2CoreTargIntf, Failed to initialize PSPR/DSPR !
Success, Core0, UDEDebugServer, Connection to TC39xB target established: TriCore (Core0), ID: 20205083h
Warning, Core0, Tc2CoreTargIntf, Failed to determine user application running state ! Assume still running

There were 2 connection attempts without the reset trick, and a 3rd one during reset. The board entered permanent reset after the 3rd attempt so in reality it did not connect.

Note the PSPR/DSPR failure. If I disable initializing PSPR/DSPR in the target config, and/or disable reset and select "break running application", the connection goes through. I can see the memory content, assembly listing (correct). However, when trying to single step the app, the board immediately goes into permanent reset again and the debugger disconnects. In the flash programmer the memory is not ready, all buttons are greyed out. Clicking the enable box results in yet another error message. If reset was disabled, it explicitly says that flash programming is not possible without reset. If reset was enabled, there is no further info and the details button is greyed out. So it did not work...

Are you using the integrated debugger (mini wiggler?) on these boards with DAS? Which DAS version? Or an UAD device? Maybe could you send me your UDE workspace? It seems that all debugger frontends are using DAS and suffer from the same issue here...

Thanks and best regards, vjalle

0 Likes
lock attach
Attachments are accessible only for community members.
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

dw_0-1658021640767.png

dw_1-1658021848574.png

 

Hi vjalle,

I attached my .wsx file, DAS and UDE version is in above screenshot. I am using onboard miniWiggler which has a USBUART bridge chip onboard. COM5 is my USB port to communicate with the miniWiggler. Triboard TC397 is with default settings. Maybe you could change a new board to try. Or if you have a socket onboard, then you could change a MCU to try.

 

dw

 

0 Likes
vjalle
Level 1
Level 1
5 sign-ins First like received 5 replies posted

Hi DW,

Still the same, your workspace works in the same way as mine. Tool versions are identical (just updated DAS to 7.3.7).

When connecting with the reset trick, I can even see the SFR and switch on the LEDs by configuring the IOCR register through the debugger. I can see the disassembly list, set the PC and other core registers. However, when attempting to single step, or click the "Enable" checkbox in the flash programmer, the ESR0 LED immediately lights up and the debugger disconnects. In the target setup I have to disable reset and PSPR/DSPR init, otherwise the same happens directly after the successful connection.

Btw this is the KIT_A2G_TC397_3V3_TFT, not a Triboard. The MCU is soldered, not in socket. Will play with it a bit, open a ticket with PLS, and try to get hold of a Lauterbach.

And then it's time to give up and get a new board, I guess. Hope that won't be bricked so easily. Thanks for all of your help with this issue! Should you have any idea what could have gone wrong, let me know. Probably from the registers it's possible to figure something...

Best regards, vjalle

0 Likes
vjalle
Level 1
Level 1
5 sign-ins First like received 5 replies posted

The root cause was that the STBYEV/STBYEVEN fields of  SCU_PMSWCR1 were written with wrong content by the MCAL. After commenting out that write the issue does not happen anymore.

Otherwise the MCU executed some further code after the write, and then entered the permanent reset state, where it was insensitive to even PORST. Only a power cycle helped, and debuggers could only connect in the time window between restart and executing the write to that register.