Main Site Documentation

Watchdog kills G400


#1

This is ironic. Watchdog is supposed to rescue systems, right? :slight_smile: consider the following code (for G400):

 public static void Main() {
            Watchdog.Enable(10000);
            Debug.Print(Resources.GetString(Resources.StringResources.String1));

        }

Execution never passes beyond

Watchdog.Enable()

statement. And, for a bonus, bangs the firmware off.


#2

Maybe 10 seconds is to much, not sure where i red it but there’s a function/method returning the max time value that can be set


#3

Yes, that’s the one, now i remember. Short memory gets poor when getting older :wink:

btw For G120 its defined as 16.777 seconds


#4

Guys, you missed the key point: [em]it corrupts firmware[/em].

But since you are interested so much, MAX_TIMEOUT=4294967.


#5

auch… MAX_TIMEOUT does not feel like a valid value too


#6

Where can we found the max value for the timeout? I used to enable watchdog on EMX with 30000 and 60000 and I did not notice any problem with that…


#7

GHI.Premium.Hardware.LowLevel.Watchdog.MAX_TIMEOUT


#8

So using max time out should be compliant with the watchdog unless there’s a bug


#9

I guess so. A System.ArgumentOutOfRangeException is thrown on G120 when calling Watchdog.Enable with a value greater than MAX_TIMEOUT.


#10

We can reproduce the issue. Are you sure that it corrupts the firmware instead of just making the board unresponsive since the first thing the program does is try to enable watchdog?


#11

To quote Sheldon Cooper “was that sarcasm?”


#12

Yeah, sorry guys, I was too quick to bang the firmware :slight_smile: There’s just too many faulty things on my table. Watchdog simply locks the board dead.

How could I configure the Watchdog manually, through Register class? I really need this feature much earlier then the next SDK…


#13

We are talking about releasing an updated firmware for G400 without waiting for the SDK. But we need to cover few things first, starting with the CAN issue confusion.