ITE drivers/timer: check HW cycles per second by build assert

ITE RTOS timer HW frequency is fixed at 32768Hz, because this
clock source is always active in any EC mode (running/doze/deep doze).

Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
This commit is contained in:
Ruibin Chang 2022-03-28 16:29:50 +08:00 committed by Maureen Helm
commit a5fc945fd2

View file

@ -15,6 +15,9 @@
#include <logging/log.h>
LOG_MODULE_REGISTER(timer, LOG_LEVEL_ERR);
BUILD_ASSERT(CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC == 32768,
"ITE RTOS timer HW frequency is fixed at 32768Hz");
/* Event timer configurations */
#define EVENT_TIMER EXT_TIMER_3
#define EVENT_TIMER_IRQ DT_INST_IRQ_BY_IDX(0, 0, irq)