smartbond_timer: Use hw clock frequency for watchdog expire ticks
Use hardware clock frequency to calculate watchdog expire ticks instead of kernel's "ticks". Signed-off-by: Ioannis Damigos <ioannis.damigos.uj@renesas.com>
This commit is contained in:
parent
ecefb5de5d
commit
6b9eaa9f47
1 changed files with 2 additions and 1 deletions
|
|
@ -120,7 +120,8 @@ void sys_clock_set_timeout(int32_t ticks, bool idle)
|
|||
* RC32K maximum frequency.
|
||||
*/
|
||||
watchdog_expire_ticks = SYS_WDOG->WATCHDOG_REG *
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC / (get_rc32k_max_frequency() / 320);
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC /
|
||||
(get_rc32k_max_frequency() / 320);
|
||||
}
|
||||
if (watchdog_expire_ticks - 2 < ticks) {
|
||||
ticks = watchdog_expire_ticks - 2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue