Hello,
I'd like to enable the internal Watchdog. I saw an viewtopic.php?f=3427&t=25195 but it's not available in the last release (2.1.1), and I need an urgent solution.
How can I enable the watchdog? Which commands (and how) are needed?
Thank you.
Enable Hardware Watchdog
Re: Enable Hardware Watchdog
Why do you need it? Does your Z-Uno hangs? Internal WatchDog is pretty tricky - you can not configure it's grace period, so you might have problems with even on valid sketches. Better to solve the problem that causes the hang
Re: Enable Hardware Watchdog
Thank you for your reply.
Yes, it hangs after a while. There is a problem when i read with ADC (analogRead) after a while. I found that moving all local variables (just few uint16_t) to a global scope and merging code (to avoid entering to a functions and increasing stack), the problem is solved. But this solution doesn't give me very confidence because it seems to be related to an internal issue.
Yes, it hangs after a while. There is a problem when i read with ADC (analogRead) after a while. I found that moving all local variables (just few uint16_t) to a global scope and merging code (to avoid entering to a functions and increasing stack), the problem is solved. But this solution doesn't give me very confidence because it seems to be related to an internal issue.
-
- Posts: 255
- Joined: 26 Jul 2015 17:29
Re: Enable Hardware Watchdog
@apica, have you tried 2.1.1 yet? I can recommend it, it contains a lot of improvements. And if it does not, I offer you a helping hand, ... Please let me know what you think...
Meet me here: https://forum.fibaro.com/index.php?/pro ... rgebruers/ or here: memberlist.php?mode=viewprofile&u=564463
-
- Posts: 255
- Joined: 26 Jul 2015 17:29
Re: Enable Hardware Watchdog
Forgot something important... there is an issue with that version on windows, if your user directory has a space in its path...
Meet me here: https://forum.fibaro.com/index.php?/pro ... rgebruers/ or here: memberlist.php?mode=viewprofile&u=564463
Re: Enable Hardware Watchdog
Yes!
I'm using the 2.1.1 from yesterday (I had the same problem with 2.1.0).
I'm using the 2.1.1 from yesterday (I had the same problem with 2.1.0).
Re: Enable Hardware Watchdog
We can try to investigate your issue if you provide the sketch and a way to reproduce the problem
Re: Enable Hardware Watchdog
@PoltoS, I've send you a private message with the sketch. I prefer to not make it public for the moment.
Thank you
Thank you
Re: Enable Hardware Watchdog
We have cheked your sketch. Clearly, it overflows the stack. You can check this in the debug output once enabled in the ArduinoIDE.
We suggest to use less float (don't multiply by g and then device back). Try to minimized numbers of nested functions and make more glabal variables and/or make them smaller size.
Note the check it agains this table: https://github.com/Z-Wave-Me/Z-Uno-Core ... ons.h#L130
We suggest to use less float (don't multiply by g and then device back). Try to minimized numbers of nested functions and make more glabal variables and/or make them smaller size.
Code: Select all
0056:A0 00...
Period Average = 6.89
Send report
ADC: 779 Bat: 3089.87 V: 2352 R: 313 F: 66.11 W: 6.74
0056:A0 00
ADC: 785 Bat: 3089.87 V: 2370 R: 303 F: 68.08 W: 6.94
ADC: 779 Bat: 3089.87 V: 2352 R: 313 F: 66.11 W: 6.74
ADC: 786 Bat: 3089.87 V: 2373 R: 301 F: 68.47 W: 6.98
Code: Select all
A0 00
Re: Enable Hardware Watchdog
Thank you @PoltoS.
I've tried enabling the output Log on UART0, but it didn't appeared (I'll check it again) -> EDIT: I didn't know about that codes and the meaing! Thank you!
The stack usage shouldn't be that high (the same code runs in all arduino boards I tried). How big is the stack? Any way to determine/estimate the stack used?
Thank you
I've tried enabling the output Log on UART0, but it didn't appeared (I'll check it again) -> EDIT: I didn't know about that codes and the meaing! Thank you!
The stack usage shouldn't be that high (the same code runs in all arduino boards I tried). How big is the stack? Any way to determine/estimate the stack used?
Thank you