TC234L SW run problems without debugger

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

cross mob
Not applicable
Hello!

I have encountered a problem I never seen before:
I have a working SW, that is downloaded to target(TC234L) using a IC5000 debugger.
The SW is doing what it shall do, when the debugger is connected.

But if I remove the debugger and perform a POR, the SW starts to run for ~40ms, and then just halts.
What I have seen is that:
Periodic SW toggling on a GPIO port stops after ~40ms.
SMU toggling on P33.1 stops.
QPSI communication stops stops after ~40ms.

I have tried to remove almost all code, and just have the startup code + a periodic GPIO toggling, but with the same problem.
I have tried on our PCB and also a evaluation board, with the same behavior.

But with the Infineon Motor controller example application, it works fine, I can remove the debugger and perform a reset.
And If I start the execution via the debugger, and then remove the JTAG, the SW continues to run as expected.

Does anyone have any idea or tips where I shall start looking for the problem?

Thanks and regards
0 Likes
3 Replies
MoD
Employee
Employee
50 likes received 500 replies posted 100 solutions authored
Hello,
what is the state of ESR0 when stops? When it is low (evaluation board has a red led connected to advice), then the device is in reset and I maybe you have a problem with the safety watchdog or the CPU0 watchdog. As long a debugger is connected the watchdogs are switched off, therefore works with debugger.
If the device is not in reset, you can connect with HOT ATTACH (no reset) via debugger when the device stops and check the state of device.
0 Likes
Not applicable
MoD wrote:
Hello,
what is the state of ESR0 when stops? When it is low (evaluation board has a red led connected to advice), then the device is in reset and I maybe you have a problem with the safety watchdog or the CPU0 watchdog. As long a debugger is connected the watchdogs are switched off, therefore works with debugger.
If the device is not in reset, you can connect with HOT ATTACH (no reset) via debugger when the device stops and check the state of device.


The problem was the CPU0 watchdog. As soon as we added some handling for it, the SW started to work as expected without the debugger!
So easy to forget that one, when you almost all the time use the debugger 😄
0 Likes
NeMa_4793301
Level 6
Level 6
10 likes received 10 solutions authored 5 solutions authored
Hi Mattias. You can modify your iSystem initialization file to set up the debug system so that the watchdog system is still active when the debugger is connected, and when the CPU hits a breakpoint, the watchdog system is temporarily suspended:

// Set CBS_OSTATE.WDTSUS to enable
// Watchdog suspension upon TL1 assertion
// by default TRC0.HALT=2, which means CPU0->TL2
A CBS_TRC0 L 0x00000001
A CBS_TRC1 L 0x00000001
A CBS_TRC2 L 0x00000001

// OSTATE.WDTSUS only suspends when Trigger Line **1** is set
// This limitation means that if you're trying to debug a watchdog issue,
// you HAVE to use TL1 for EACH CPU, even though it's not the default
// (e.g., CBS_TRC0=1 for CPU0 and CBS_TRC1=1 for CPU1, etc.)
//
A CBS_OCNTRL L 0x00003000

That way you will have the same behavior with/without the debugger connected, but you can still debug without worrying about the watchdog.
0 Likes