1# Copyright (c) 2021, TOKITA Hiroshi 2# SPDX-License-Identifier: Apache-2.0 3 4description: GD32 free watchdog timer 5 6compatible: "gd,gd32-fwdgt" 7 8include: base.yaml 9 10properties: 11 reg: 12 required: true 13 14 initial-timeout-ms: 15 type: int 16 default: 250 17 description: | 18 Set timeout value in milliseconds. 19 The following equation gives the maximum timeout value 20 21 timeout = (reload + 1) / (peripheral_freqency / prescaler). 22 23 where the maximum prescaler = 256 and the maximum reload = 4096. 24 The peripheral_frequency uses GD32_LOW_SPEED_IRC_FREQUENCY 25 that defined in modules/hal_gigadevice/Kconfig. 26 Validate the value is within a capable range at the compile time. 27 28 The default value defined is close to the register reset value 29 from values that don't cause calculation errors in both cases of 30 the low-speed internal RC oscillator frequency is 32kHz or 40kHz. 31 32 0.25 [timeout in sec] = (1999 [reload] + 1) / (32000 [freq] / 4 [prescaler]) 33 0.25 [timeout in sec] = (2499 [reload] + 1) / (40000 [freq] / 4 [prescaler]) 34