1# Software watchdog configuration 2 3# Copyright (c) 2020 Libre Solar Technologies GmbH 4# SPDX-License-Identifier: Apache-2.0 5 6menuconfig TASK_WDT 7 bool "Task-level software watchdog" 8 select REBOOT 9 help 10 Enable task watchdog 11 12 The task watchdog allows to have individual watchdog channels 13 per thread, even if the hardware supports only a single watchdog. 14 15config TASK_WDT_CHANNELS 16 int "Maximum number of task watchdog channels" 17 depends on TASK_WDT 18 default 5 19 range 2 100 20 help 21 The timeouts for each channel are stored in an array. Allocate only 22 the required amount of channels to reduce memory footprint. 23 24config TASK_WDT_HW_FALLBACK 25 bool "Use hardware watchdog as a fallback" 26 depends on TASK_WDT 27 default y 28 help 29 This option allows to specify a hardware watchdog device in the 30 application that is used as an additional safety layer if the task 31 watchdog itself gets stuck. 32 33config TASK_WDT_MIN_TIMEOUT 34 int "Minimum timeout for task watchdog (ms)" 35 depends on TASK_WDT_HW_FALLBACK 36 default 100 37 range 1 10000 38 help 39 The task watchdog uses a continuously restarted k_timer as its 40 backend. This value specifies the minimum timeout in milliseconds 41 among all task watchdogs used in the application. 42 43 If a hardware watchdog is configured as a fallback for the task 44 watchdog, its timeout is set to this value plus 45 TASK_WDT_HW_FALLBACK_DELAY. 46 47config TASK_WDT_HW_FALLBACK_DELAY 48 int "Additional delay for hardware watchdog (ms)" 49 depends on TASK_WDT_HW_FALLBACK 50 default 20 51 range 1 1000 52 help 53 The timeout of the hardware watchdog fallback will be increased by 54 this value to provide sufficient time for corrective actions in the 55 callback function. 56 57 In addition to that, the delay allows to compensate deviations 58 between different clock sources for the hardware watchdog and the 59 kernel timer. This is especially important if the hardware watchdog 60 is clocked by an inaccurate low-speed RC oscillator. 61