WatchDog on TLF35584

Announcements

From sunburn to sun earn – we’ve got the power! Watch our #poweringgreen videos now.

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

cross mob
leonng
Level 3
Level 3
First like received First like given 10 questions asked

Hi there,
I enable the window watchdog in INIT state and it can move to NORMAL state. Then, when I make an overflow and restart the program to initialize the IC, it stuck/returns/stops in INIT state.
However, when I disable watchdog once, then the IC wouldn't be stuck in INIT state.

I set INITERR = 11111100 to clear the failure flag. And read the status flags from 1A to 1F, there is no error.
If I don't want to disable the watchdog once in INIT, what should I do? Or What mistake did I make?

Best Regards,
Leon

0 Likes
1 Solution
Vishnu_Nambrath
Moderator
Moderator
Moderator
50 solutions authored 100 replies posted 5 likes given

Hello Leon, 

There are only two ways to avoid the window watchdog failure. One is by disabling the watchdog and the other one is having a proper trigger from the microcontroller. As soon as the device is in the init state, it opens a long window period and expects a trigger from the microcontroller. The trigger can be provided by setting WWDSCMD:bit0 from 1 to 0. Each open window expects a trigger. A valid triggering pattern is also given below. 

Vishnu_Nambrath_0-1652246725343.png

Vishnu_Nambrath_1-1652246929481.png

Vishnu_Nambrath_2-1652247092662.png

 

Please try the triggering and let me know the update. 

Regards 

Vishnu Nambrath

 

 

 

View solution in original post

0 Likes
7 Replies
Vishnu_Nambrath
Moderator
Moderator
Moderator
50 solutions authored 100 replies posted 5 likes given

Hello Leon, 

The window watchdog will become active in INIT state as soon as reset output pin ROT turns from low to high.
After activation, the watchdog opens a so called “Long Open Window” (LOW) of duration of t_LOW. During the ”Long
Open Window” the window watchdog expects a valid triggering, which has to be provided via SPI in case the
default configuration is kept, since any signal to watchdog trigger pin WDI is ignored. This is to avoid wrong
triggering at pin WDI due to glitches at the microcontroller outputs during startup and initialization. Each open window expects a trigger and each closed window does not expect a trigger from the microcontroller. 

I have given an example here for the valid triggering pattern. You can see here, each open window has a trigger and the closed window doesn't have a trigger. 

Vishnu_Nambrath_0-1651893267301.png

 

One of the fault operation of the Window watchdog is given below. You can see, no trigger in the first open window. 

Vishnu_Nambrath_1-1651893557776.png

Multiple fault operations are given in the datasheet section "15.2.1 Timing Diagrams"

Coming to your question related to INITERR.  Failure bits are logged into this register for the INIT state. Address of this register is 1B and default value is 00. You can read this register to check if there any failures logged in the INIT state.  I am sorry, I didn't understand your statement "I set INITERR = 11111100 to clear the failure flag. And read the status flags from 1A to 1F, there is no error". 

Regards 
Vishnu N

 

0 Likes
leonng
Level 3
Level 3
First like received First like given 10 questions asked

Thank you for your answer, but I'm trying to ask how to reset the watchdog.

INITERR is the name of register 1B on the datasheet, I'm trying to clear the fault by writing 1. 

leonng_0-1652156676128.png

After making an overflow, I try to reload the program:

1. read the Failure register 1A to 1F.

2. clear the Failure register.

3. read the Failure register.

4.  init chip->NORMAL.

The Failure register is 00 in step 3. The problem is that step 4 is fail, then I reload it and I find the failure register hasn't been clear in step 2.

However, when I disable the watchdog in 4, then reload and enable watchdog, there is no error.

Best Regards,
Leon

0 Likes
Vishnu_Nambrath
Moderator
Moderator
Moderator
50 solutions authored 100 replies posted 5 likes given

Hello Leon, 

There are only two ways to avoid the window watchdog failure. One is by disabling the watchdog and the other one is having a proper trigger from the microcontroller. As soon as the device is in the init state, it opens a long window period and expects a trigger from the microcontroller. The trigger can be provided by setting WWDSCMD:bit0 from 1 to 0. Each open window expects a trigger. A valid triggering pattern is also given below. 

Vishnu_Nambrath_0-1652246725343.png

Vishnu_Nambrath_1-1652246929481.png

Vishnu_Nambrath_2-1652247092662.png

 

Please try the triggering and let me know the update. 

Regards 

Vishnu Nambrath

 

 

 

0 Likes
leonng
Level 3
Level 3
First like received First like given 10 questions asked

Thank you.

The problem is solved. I enable watchdog in the NORMAL state and trigger WDI by an interrupt.

However, I meet another problem that I don't understand.

When I set the watchdog error threshold below 3, then I make a watchdog error and read the flag 1B, 1C, and 1D. The 1B show there is an overflow error, but 1C and 1D did not show the error.

However, when the watchdog error threshold >= 3, 1C and 1D will show the error. Why?

leonng_0-1652935396142.png

Best regards,

Leon

 

0 Likes
Vishnu_Nambrath
Moderator
Moderator
Moderator
50 solutions authored 100 replies posted 5 likes given

Hello Leon, 

Thank you for the acknowledgment of the first issue. 

How you are setting the watchdog error count? Which register you are using?

Can you please let me know value of IB, IC, ID after power on reset and during each watchdog failure till the watchdog overflow in both cases?

Regards
Vishnu N

0 Likes

Hello Vishnu,

Do you mean the WDCFG0 & 1? WDCFG0=0xX9 (X is the threshold), WDCFG1= 0x0f.

when the X is set >=3:

watchdog failusre: 1B = 0x00 1C =0x81 1D = 0x02.

watchdog overflow: 1B = 0x08 1C =0x81 1D = 0x02

power-on reset: 1B = 0x08 1C =0x81 1D = 0x02

when the X is set <3, When watchdog overflow

watchdog overflow: 1B = 0x08 1C =0x00 1D = 0x00

power-on reset: 1B = 0x08 1C =0x00 1D = 0x00

it seem the chip directly jump to INIT state, then the 1D and 1C  isn't triggered.

Best Regards,

Leon 

 

0 Likes

Hello Leon, 

I have one doubt regarding the register settings WDCFG0. You are enabling the window watchdog, disabling the functional watchdog, and triggering via WDI Pin. It's supposed to be via SPI right?
So WWDTSEL should be '1' right?

WDCFG0=0xX9 = 0011 1001 (X is considered as '3')

 

Vishnu_Nambrath_0-1653455040345.png

Please read the registers just after the power on reset, while reading it supposed to be the reset values given in the datasheet. For example 1B should be '00' after power on reset. But it different from your reading. Can you please check this as well

After this please change the error threshold and read the registers as mentioned previously. 

Regards 
Vishnu N

 

0 Likes