drivers: wdt_gecko: select clock source explicitly
At present wdt_gecko driver supports ULFRCO as its only clock source. Select the clock explicitly, do not rely on the default configuration provided by the SiLabs header files. The default configuration is changing between different SiLabs HAL versions. Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
This commit is contained in:
parent
93f644e1c0
commit
71c41e5024
1 changed files with 4 additions and 2 deletions
|
@ -137,7 +137,7 @@ static int wdt_gecko_install_timeout(struct device *dev,
|
|||
const struct wdt_timeout_cfg *cfg)
|
||||
{
|
||||
struct wdt_gecko_data *data = DEV_DATA(dev);
|
||||
WDOG_Init_TypeDef init_defaults = WDOG_INIT_DEFAULT;
|
||||
data->wdog_config = (WDOG_Init_TypeDef)WDOG_INIT_DEFAULT;
|
||||
u32_t installed_timeout;
|
||||
|
||||
if (data->timeout_installed) {
|
||||
|
@ -152,7 +152,9 @@ static int wdt_gecko_install_timeout(struct device *dev,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
data->wdog_config = init_defaults;
|
||||
#if defined(_WDOG_CTRL_CLKSEL_MASK)
|
||||
data->wdog_config.clkSel = wdogClkSelULFRCO;
|
||||
#endif
|
||||
|
||||
data->wdog_config.perSel = (WDOG_PeriodSel_TypeDef)
|
||||
wdt_gecko_get_persel_from_timeout(cfg->window.max);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue