T7 Watchdog | LabJack
 

T7 Watchdog

6 posts / 0 new
Last post
HTech
HTech's picture
T7 Watchdog

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.

LabJack Support
labjack support's picture
I did the following on

I did the following on firmware 1.0255 and my settings are loading as expected:

  1. Set some IO config with the register matrix. For testing I simply set DIO_DIRECTION to 8388607 to set all IO to output, then DIO_STATE to 0 to set them to output low.
  2. Navigated to the Power-Up Defaults tab and clicked "Configure Power-up Defaults" to save the config. I tested with a reset that my settings were applied correctly.
  3. Navigate back to the register matrix, set WATCHDOG_ENABLE_DEFAULT to 0, WATCHDOG_TIMEOUT_S_DEFAULT to 5, WATCHDOG_ADVANCED_DEFAULT to 2, then finally WATCHDOG_ENABLE_DEFAULT to 1.
  4. Go to the device selector tab of Kipling and close the device connection. Wait until the status LED flashes to indicate the watchdog triggered, then reconnected to the device. Navigating to the Dashboard tab I could see that all of my settings were saved. I also tested with WATCHDOG_ADVANCED_DEFAULT = 1 to ensure I was seeing factory settings being set properly.
HTech
HTech's picture
Thank you for your quick

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?

  

LabJack Support
labjack support's picture
I am having difficulty

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.

HTech
HTech's picture
During the weekend we had

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).

LabJack Support
labjack support's picture
I am able to reproduce the

I am able to reproduce the issue. We will start a firmware investigation to look into this behavior.