I use the hwtimer in MQX ,But I find the timer is slow than my phone timer. About slow 4 seconds every one hour?
Can someone help me ?
I use external 8M osc.
#define CPU_BUS_CLK_HZ 60000000U /* Initial value of the bus clock frequency in Hz */
#define CPU_CORE_CLK_HZ 120000000U /* Initial value of the core/system clock frequency in Hz. */
/* HWTIMER definitions for user applications */
#define BSP_1S_PIT_TIMER_DEV pit_devif
#define BSP_1STIMER_SOURCE_CLK (CM_CLOCK_SOURCE_BUS)
#define BSP_1S_PIT_TIMER_ID (0)
The period is 1 second, and I add a counter to count the seconds in the callback function.