G400D on a custom board, SDK 4.3.4, BuiltIn ethernet.
I’ve noticed that my board occasionally resets itself. Just like that, once or twice per day. No errors, no faulty behaviour, just - klak - and it restarts.
So I did some digging (again). I now log last reset cause every time G400 boots up. And now I know, that it is caused by Watchdog (register RSTC_SR.RSTTYP = 2). The funny thing is that I do not use Watchdog!!! So why does it fire?..
Also, a few notes to take into account:
When I run the program from Visual Studio and debugger attaches, reset cause also reports as Watchdog.
Even though I keep my Watchdog off, I still call GHI.Processor.Watchdog.ResetCounter() method. I assumed it won’t hurt, but maybe I was wrong with such assumption?
I still think it is somehow related with BuiltIn ethernet.
@ Simon from Vilnius - The C# reset method starts with if(!Watchdog.enabled) return; so calling it is a NOP essentially if you never enabled it. I would remove the networking stuff and let that run to see if it resets. Perhaps the built in Ethernet is locking up so we fail to reset the counter internally.
Visual Studio says “assemblies succesfully deployed”.
I hear the Ding-Dong sound (USB device disappers);
I hear Dong-Ding sound (USB device reappears);
Debugger attaches.
Last reset cause == “User”
All good.
Now, with G400 and BuiltIn ethernet, it’s very often (but not always) like this:
Visual Studio says “assemblies succesfully deployed”.
I hear the Ding-Dong sound (USB device disappers);
A long pause.
I hear Dong-Ding sound (USB device reappears);
I hear the Ding-Dong sound (USB device disappers);
I hear Dong-Ding sound (USB device reappears);
Debugger attaches.
Last reset cause == “Watchdog”
9 .All good.
A quick test shows pause at #3 takes roughly 16 seconds, which corresponds to the default watchdog timeout. So it looks like there’s a problem with correct reset when deploying. Probably, board locks up on reset, 16 seconds later watchdog kicks in and resets again, and then Visual Studio can attach.
Custom board, ETH built in (but not activated), wifi, i2c (external a/d, digit potmeters), mp3, sd, 2x serial, 7" TFT, etc. latest firmware, glide.
It occurs with heavy load after 1-2 minutes of run:
-plays mp3 from sd
-asks sensor panel on serial/9600 and writing datas to sd in every 2 sec
When sd write is disabled or 2 sec period is increased, the reset occures later. Sometimes after 20 minutes, sometimes after 10 minutes. It will be a commercial product, so it’s very nerve-racking.
G400D+Custom PCB+BuiltIn ethernet = random resets.
G400D+Custom PCB+ENC28 ethernet = no problems.
Both modules run exactly the same FW that can detect which PCB it is plugged into, and then select the appropriate ethernet.
Dear GHI guys, any comments? You know, it so happens that we want to ship a prototype to a potencial customer as soon as possible, so a stable BuiltIn ethernet would be somewhat very… Desirable
@ Simon from Vilnius - you are a programmer and you understand that this mystery issue is not a quick fix but we are surely doing our best. This is a priority on our list.
Yeah I do, I just needed an assurance that you’re on it Give me some updates if you find a workaround or something. Meanwhile, I will try to survive on older PCB’s…
Got Watchdog reset with Enc28 ethernet, too A lonely single reset, but a reset. Maybe a cosmic ray hit it, because I saw those boards running for a week and more…
I do not have any reasons to doubt our Altium guru’s skills, but maybe that’s some routing artifact? Do you have a reference design for BuiltIn ethernet?
Or maybe it’s related to ethernet at all. What else could I check?
BTW, o promised to test with zero traffic, but that’s already done — every reset closes sockets, and it resets with them closed, too.
@ Simon from Vilnius - I do not think we have a reference design for built in Ethernet. Though we haven’t reproduced this, there is something we are looking into that might cause this so we will let you know what we find.
Anyway, additional info: when I explicitly disable Watchdog through a register, the board hangs instead of restarting. I need a few more occurencies, but it seems it’s not watchdog that is faulty here. It may be something at your side, it may also be something at my side…
Will continue cutting off application subsystems tommorow.
@ Simon from Vilnius - Since the watchdog is running on power up on the G400, you can write that register to disable it. I mistakenly thought we wrote to that register on startup, which would prevent you from disabling it since it is write-once. We do not write to it until you call our Watchdog.Enable.
If it shows disabled when you read it, it must have been written before since it starts enabled. Since something is disabling it, once you try to write it again, the board hangs.
@ John - Maybe I wasn’t clear enough. [em]I [/em]am disabling watchdog, and board [em]doesn’t[/em] hang that moment. It hangs some time later. It simply hangs istead of restarting, but not immediately.