GPIO Watchdog

Top  Previous  Next
Got to SUB-20 page

Beginning from the FW version 0.4.4 and library version 0.1.12.32, SUB-20 provides GPIO Watchdog functionality.

GPIO Watchdog is used to guarantee that SUB-20 GPIO will be returned to their idle state after given period of time. GPIO watchdog is implemented in SUB-20 CPU and once activated works independently from the USB host SW application. Thus if for some reason host SW got stuck or failed, GPIO will be returned to their idle state by SUB-20 CPU once the GPIO Watchdog got expired.

 

GPIO Watchdog implementation

The state diagram below explains GPIO Watchdog implementation.

 

GPIO-wdt

 

RST - means any GPIO write or GPIO configuration operation (sub_gpio_write or sub_i2c_config).

CFG - means GPIO Watchdog configuration with sub_gpio_wdt_set

EXPIRED - means that GPIO Watchdog got expired and GPIO are returned to idle state

STOP: 0 - GPIO Watchdog is stopped, 1 - GPIO Watchdog is counting

EXP: 0 - GPIO Watchdog is not expired, 1 - GPIO Watchdog is expired

 

States:

1.After SUB-20 reset GPIO Watchdog is disabled. It's period is set to 0.

2.GPIO Watchdog is enabled by sub_gpio_wdt_set but still not counting.

3.GPIO watchdog starts counting after RST operation.

4.There was no RST operations during GPIO Watchdog period. Watchdog got expired and stopped. GPIO are reset to idle state.

5.GPIO Watchdog is restarted with RST operation.

Functions

sub_gpio_wdt_set

sub_gpio_wdt_get