How to check external watched dog IC when toggling MCU oscillator?

Thread Starter

Hasan2019

Joined Sep 5, 2019
64
Hi There,

I am working with a MCU STM32F405VET for any particular purpose. Lets a at this time firmware code has burn on MCU. Lets talk about HW issue.

Take a look the datasheet here https://www.qdatasheet.com/datasheet-download/190671/1/ST-Microelectronics/STM32F405VET6
In my design portion a 25MHz oscillator supports MCU for clocking. See the attached file.
watched_problem.png
In this time a watched dog ic STWD100NXWY3F working externally,https://www.st.com/resource/en/datasheet/stwd100.pdf

If we think as firmware case what it does is watchdog timer system used to monitor to detect and reset an "out of control" microprocessor. When program execution goes awry it will not properly execute the code that restarts the watchdog. In such a case the watchdog timer will timeout and cause a microcontroller reset. In a properly designed system, the reset will correct the error. Is the case of independent watched dog from main MCU timer.


I want to connect a toggle swish in 2 and 3 point of crystal oscillator XT1 and wish to see the input out put of 1 and 4 of U29 watched dog.
I did see in oscillator when I push the switch meaning that 3 and 2 pin of XT1 has been shorted then input of U29 distorted but wont disappeared.

It wont clear instantly , what do you think?

Datasheet of STWD100NXWY3F says, While the system is operating correctly, it periodically toggles the watchdog input, WDI. If the system fails, the watchdog timer is not reset, a system alert is generated and the watchdog output, WDO , is asserted.

BUT MY MCU NEVER GOES TO RESET.
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
64
When ENable pin (3) is pulled up the watchdog is disabled.
Yes, I removed it.
Previously who handled this project has gone. This is a charger module controller, at display control( display has external pad input) voltage values comes correctly but current does not.
Someone explains just very few information but he doesn't know what to do.

He said, f/w cant make watchdog action in this case. But I do believe WD command has inactivated.
Now looking at left bottom side of circuit you can see 2 signal WADCH_DOG_EVENT and WADCH_DOG_EV_CLEAR is appeared.

What I did is connect a IN4148 at the base of Q15 that goes to pin 1 of U29 WD IC.
Then I stared push and pull the switch again in XT1 and saw the WDO input pulse diminish and MCU got reset.
After "time out" system restart again!
 

RPLaJeunesse

Joined Jul 29, 2018
252
The oscillator going bad is a valid fault, but is the system designed to recover under that situation? It would need to recognize the condition and run off some other oscillator. FWIW the better way to test a watchdog is to induce a hang-up in the code somewhere, possibly by changing an IO pin. But don't leave that hangup capability in the release code!
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
64
The oscillator going bad is a valid fault, but is the system designed to recover under that situation? It would need to recognize the condition and run off some other oscillator. FWIW the better way to test a watchdog is to induce a hang-up in the code somewhere, possibly by changing an IO pin. But don't leave that hangup capability in the release code!
Really I don't know what my team wants to do. I believe they want to just see the WD is working or not with just downloading .out/.bin/.hex files! They have not told me to work on code. HW testing is done as I said, boss wanted to toggle the crystal oscillator output ( not a good idea at all) and thus he assume if main clack is disable then it affects WD i/o. After downloading program system takes time to run a cycle, instantly the MCU wont RESET quickly.
 

Irving

Joined Jan 30, 2016
3,841
Stopping the oscillator isnt a valid test as its outside the scope of what the WD controls... only S/W or H/W that the WD resets, or is reset by the MCU after its reset is valid for testing WD function.
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
64
Sorry, but not really different. Either you have the oscillator runnning, or you don't. You would need to restart it immediately before the watchdog issues reset, but there is no way to know that.
Yesterday my co worker said they have solved the problem, but in this country no one wants to go deep insight. Third party may have Enabled the WD command/ structure of the code thus the 2 signals are activated after updateding.
 

Irving

Joined Jan 30, 2016
3,841
Sorry, but not really different. Either you have the oscillator runnning, or you don't. You would need to restart it immediately before the watchdog issues reset, but there is no way to know that.
Exactly this. For the test to be even remotely valid you need to stop or slow it down enough to emulate an internal fault without creating a 'nonsense' scenario. But that is such a macro event who knows if it's proving anything...

Of course we have no way to tell if the software installation is fit for purpose. I once was asked to investigate a WDT issue in a centralized manufacturing process control system and found that only 8 or so out of the 30-odd parallel tasks had any relationship with the WDT subsystem... and many of those with WDTs were UI related :rolleyes: :(
 

Thread Starter

Hasan2019

Joined Sep 5, 2019
64
Exactly this. For the test to be even remotely valid you need to stop or slow it down enough to emulate an internal fault without creating a 'nonsense' scenario. But that is such a macro event who knows if it's proving anything...

Of course we have no way to tell if the software installation is fit for purpose. I once was asked to investigate a WDT issue in a centralized manufacturing process control system and found that only 8 or so out of the 30-odd parallel tasks had any relationship with the WDT subsystem... and many of those with WDTs were UI related :rolleyes: :(
That project has similar tasks like TI does in CLA library. Very difficult to track down the actual cause. Not sure why and what the objective is. In this case WD will reload the system if any irregularity find on interrupt system or resuming something in MCU, alarm will turn on but display shows wrong values. checking WD in HW is worthless for sure, because you wont see anything abnormal if the event is not related to the actual fault!!
ST technical manager said

Not sure if I got everything right from your problem description, but: The STM32 has an on-chip clock-security-system (CSS) which, when active, will detect failure of your external clock (HSE), switch to internal oscillator (HSI) and generate an interrupt for further software treatment. Moreover, the on-chip independent watchdog (IWDG) is clocked by an independent internal oscillator and can safely reset the MCU. So there is IMHO no need for such a complex external circuitry. Even if you use STWD100 you may connect /WDO to /NRST via a simple 4k7 resistor (as shown in the data sheet).
 
Top