Page 1 of 1

Cannot reset the hardware watchdog timer

Posted: 24 Aug 2022, 07:38
by torolox
Hi,
I am working with RevPi Connect+ and CODESYS.

Recently, I activated the hardware watchdog on my device, and made a FBD to reset it.
ss1.png
ss1.png (5.81 KiB) Viewed 6421 times
The FBD is set to run every 100ms.

I don't know why, but it doesn't work as I expected.

Actually, I can make blinking the LEDs A1-A3 with similar diagrams.
Also, I can see the boolean variable set as RevPiLED bit 7 turns TRUE <--> FALSE correctly with the CODESYS in debug, but still the device reset by the watchdog.
ss2.png
ss2.png (15.9 KiB) Viewed 6421 times
With the piTest command, RevPiLED byte shows the value of 1 while the variable is TRUE (it must be 128 or higher, right?).
ss3.png
ss3.png (7.55 KiB) Viewed 6421 times
Do you have any idea on this?

Re: Cannot reset the hardware watchdog timer

Posted: 24 Aug 2022, 16:50
by u.biakoup
Hello,

Test the script with the watchdog script provided on connect.
revpi-connect-watchdog.sh
https://revolutionpi.com/tutorials/uebe ... rect=en_US

I suspect, simultaneous reading the RevPiLED and then writing cannot be be done in current codesys library.

This means only outputs could be written to variable RevPiLED (eg controlling LED A1,A2,A3) . But reading RevPiLED and then writing to the variable is not supported in codesys.
Workaround would be to use the provided watchdog script externally

Re: Cannot reset the hardware watchdog timer

Posted: 09 Sep 2022, 08:32
by torolox
Hello, u.biakoup,

>>I suspect, simultaneous reading the RevPiLED and then writing cannot be be done in current codesys library.

Are you sure about this?
If yes, is that only about RevPiLED or also about other variables?

Re: Cannot reset the hardware watchdog timer

Posted: 13 Sep 2022, 18:26
by u.biakoup
Hello,
Yes, It's sure

It's also about the other variables.

Best Regards

Ulrich Kouatang Biakoup | Technical Support