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

AURIX™ Forum Discussions

User17451
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked
WDT Counter behavior (not count down) on Application Kit TC27x / TC29x

Dear Forum members,

I have question about using Watch doc timer of Application Kit TC27x / TC29x.

To use configure the function, I'm refering AP32019 below,
https://www.infineon.com/dgdl/ap3201922_.pdf?fileId=db3a304412b407950112b41c3ba42d89


Here is my code to call function to check like below.

...

WDT_Passwd();

WDT_Modify(0x0000 0000, 0x0000 0000); // ENDINIT clear
[or WDT_Modify(0x00FF 0000, 0xFFFF 0000);] // ENDINIT clear, RELAOD value

/* some operation to check counter, or trap occur */
/* So the func is to execute long duration here */

WDT_Modify(0x0000 000F, 0x0000 000F); // ENDINIT set

I check status reg - WDTTIM (or other flag) during the operation to check counter or trap occur.
there is no change - no coutner dcrement or no interrupt happen...

I dont know why such behavior is.. WDT doesnt start ??


Could you let me know if I mistake something ? and let me know how to configure ? (example code is beter to me)


Best Regards,
Shige
0 Likes
7 Replies
cwunder
Employee
Employee
25 likes received 25 solutions authored 100 sign-ins
Some comments:
1) The Watchdog timers only count up (they do not count down)
2) The Watchdog timers are enabled by default after reset, however if you are connected to a debugger they are by default disabled. Depending on the debugger there is a command to enable them while debugging or you can directly do this with your code.
3) It is not clear to me what you what to achieve with the watchdog? Which watchdog?
0 Likes
User17451
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked
Hello.

thank you for your message.

Regarding to 1),2), here is my current situation

Those related registers status are below:


WDT Control register 0 is :
(reset) 0xfffc000f -> 0xfffc000e / Reload: 0xfffc , endinit: 0
WDT Control register 1 is :
-> 0x000000 / enable Watchdog timer
WDT Status register is : -> 0xfffc0010 / time-out mode, reflect the current contents of WDT ;0xfffc

about 3),
I want to check the function behavior normal WDT, not safty.

From register status, it seems that WDT enable and start, but no trap, interrupt and no change counter number even if without changing endinit :1.

something wrong with my sequence and understanding ?

Best regards,
Shige
0 Likes
User17451
Level 2
Level 2
10 replies posted 5 replies posted 5 questions asked
Hi.

After that, I tried and checked WDT functionality with IFX software framework, iLLD_1_0_1_10_0__TC2x and iLLD_1_0_1_10_0__TC2x Demos. (Compiler,debugger: TASKING)

Consequently, API - IfxScuWdt_enableWatchdogWithDebugger() was required to run well.

What the API is doing ?

Best regards,
Shige
0 Likes
cwunder
Employee
Employee
25 likes received 25 solutions authored 100 sign-ins
For ease of use the AURIX has the capability to suspend the watchdogs when connected to a debugger (default setting). This is to avoid nuisance watchdog timeouts that will reset your system while you are developing your code.

This API is writing to a debug specific register that allows the watchdogs to run when the debugger (connected) is running and pause it when you halt or break your program execution. With this setting the watchdog timeout behavior will act as it would when you don't have a debugger connected. This will allow you to determine if your watchdog servicing is proper (the right timeout value).
0 Likes
s-shige
Level 1
Level 1
Welcome!
Thank you for the information.

>>This API is writing to a debug specific register that allows the watchdogs to run when the debugger (connected) is running

Where can we get the information about the register ?

As I checked some spec but I couldn't find.
I only know that we need some treatment when using debugger.

Best regards,
Shige
0 Likes
cwunder
Employee
Employee
25 likes received 25 solutions authored 100 sign-ins
As I checked some spec but I couldn't find.
I only know that we need some treatment when using debugger.


Is there something else you need as you have the API or a tooling command to accomplish the task at hand.

The user's manual states the distribution of the OCDS documentation is restricted.
0 Likes
User9635
Level 4
Level 4
50 replies posted 50 questions asked 25 replies posted
Hello Support,
For the following comments:
"
Some comments:
1) The Watchdog timers only count up (they do not count down)
2) The Watchdog timers are enabled by default after reset, however if you are connected to a debugger they are by default disabled. Depending on the debugger there is a command to enable them while debugging or you can directly do this with your code.
3) It is not clear to me what you what to achieve with the watchdog? Which watchdog?
"

When Debugger is connected and the default mode, watchdog is disabled due to debugger connection, then also there can be Application Reset according to
"Figure 9-5 Watchdog timeout alarm configuration" from TC29x User Manual SMU Section.
Can you please explain how this is possible when Debugger is connected and WDTSUS signal based WDT is disabled?
Thank you.
Regards
0 Likes