diff --git a/arch/arm/src/armv7-a/arm_timer.c b/arch/arm/src/armv7-a/arm_timer.c index 2a7d685996280..0718cd0f162c2 100644 --- a/arch/arm/src/armv7-a/arm_timer.c +++ b/arch/arm/src/armv7-a/arm_timer.c @@ -264,10 +264,13 @@ struct oneshot_lowerhalf_s *arm_timer_initialize(unsigned int freq) { freq = arm_timer_get_freq(); } + else + { + arm_timer_set_freq(freq); + } lower->lh.ops = &g_arm_timer_ops; lower->freq = freq; - arm_timer_set_freq(freq); /* Enable timer, but disable interrupt */ @@ -275,7 +278,7 @@ struct oneshot_lowerhalf_s *arm_timer_initialize(unsigned int freq) ctrl |= ARM_TIMER_CTRL_ENABLE | ARM_TIMER_CTRL_INT_MASK; arm_timer_set_ctrl(ctrl); -#ifdef CONFIG_ARCH_TRUSTZONE_SECURE +#if defined(CONFIG_ARCH_TRUSTZONE_SECURE) || defined(CONFIG_ARCH_TRUSTZONE_BOTH) irq_attach(GIC_IRQ_SEPTM, arm_timer_interrupt, lower); up_enable_irq(GIC_IRQ_SEPTM); #else