Hello,
I am working on a device that has to be set to idle mode when the connection is lost. To add this feature I want to use watchdog which reset all configuration to default. I changed the default settings using Kipling and verified by the device reset.
After that I manually changed registers in the following order:
WATCHDOG_ENABLE_DEFAULT = 0 // disable watchdog
WATCHDOG_TIMEOUT_S_DEFAULT = 5 // set 5s watchdog timeout
WATCHDOG_ADVANCED_DEFAULT = 2 // 0b01, select IO_CONFIG_SET_CURRENT_TO_DEFAULT on timeout
WATCHDOG_ENABLE_DEFAULT = 1 // enable watchdog
After the reset of the device and no connection the device is in default settings, but after 5s (watchdog timeout) the settings are set to factory settings. The board behave like the WATCHDOG_ADVANCED_DEFAULT register is set to 1 (IO_CONFIG_SET_CURRENT_TO_FACTORY is performed). It is unacceptable in my application, because in factory settings pull-up resistors set the DIO to a high state. Also, I cannot use the WATCHDOG_RESET_ENABLE_DEFAULT register to reset the whole device, because the reset transient state is uncontrollable and dangerous in my application.
I assume I miss some procedure and that's why the board don't want to behave as I want. Can you point where I make a mistake?
I work on a LabJack T7 OEM version with firmware 1.0255.
I did the following on firmware 1.0255 and my settings are loading as expected:
Thank you for your quick response.
I partially solved my problem by following your steps and firmware update to v1.0292. Now the watchdog works as expected, but I have an issue during start-up. I have set the watchdog timeout to 1s. After the power-up, the application-sensitive DIO is set to a low state as I set in the defaults. After ca. 1.5s the device goes to factory settings for 6 seconds and after that, the DIO goes to output low state again. Throughout this process, the status LED blinks twice every second indicating that the watchdog is triggered.
For clearance, I attach a screenshot from the oscilloscope. Both lines show the DIO pins set as an output by my default settings. The green line should be in the high state and yellow in the low state. Point (1) is the power-up, point (2) shows the abnormal behaviour (the device is in the factory settings), point (3) is the moment from which everything works fine. As I mentioned, the status LED blinks twice every second (the watchdog timer is set to 1s). The Lua script is disabled.
When I disable the watchdog, after the power-up both lines are in the correct state and strange behaviour does not occur.
Have you met this before? Can you reproduce this behaviour on your setup?
I am having difficulty reproducing the behavior you are seeing. One thing I would recommend is increasing the value of the register WATCHDOG_TIMEOUT_S_DEFAULT so the device has more time at startup before the watchdog is triggered. Beyond that, please send us a screenshot of your configuration setup, and let us know what connection type you are using and if you are using a T7-Pro or base T7 when the issue occurs.
During the weekend we had made some additional experiments with LJ T7.
The described issue occurs only when the watchdog timer is set to equal or less than 6s. For higher values, the device behaves as expected. Fortunately, the issue has no critical effect on our setup, so we will come to terms with that drawback and we will work with 1s watchdog.
We've made our tests on the board connected to our setup and on the disconnected board (only power supply) as well. The measuring pin is EIO2. The issue was noticed regardless of the connected load.
Connection type: Ethernet. Board: LabJack T7 OEM (non-PRO, w/o wi-fi).
I attach a photo of our basic setup (notations on oscilloscope screen: (1) start-up spike, (2) malfunction).
I am able to reproduce the issue. We will start a firmware investigation to look into this behavior.