Skip to content

Commit

Permalink
arch: arm: aarch32: fix system clock driver selection for cortex m
Browse files Browse the repository at this point in the history
The selection of the Cortex M systick driver to be used as a system
clock driver is controlled by CONFIG_CORTEX_M_SYSTICK.

To replace it by another driver CONFIG_CORTEX_M_SYSTICK must be set
to 'n'. Unfortunately this also controls the interrupt vector for
the systick interrupt. It is now routed to z_arm_exc_spurious.

Remove the dependecy on CONFIG_CORTEX_M_SYSTICK and route to
z_clock_isr as it was before zephyrproject-rtos#24012.

Fixes zephyrproject-rtos#24347

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
  • Loading branch information
b0661 authored and avisconti committed Apr 15, 2020
1 parent c6a5b1e commit e257fd4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions arch/arm/core/aarch32/cortex_m/vector_table.S
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,14 @@ SECTION_SUBSEC_FUNC(exc_vector_table,_vector_table_section,_vector_table)
.word 0
.word z_arm_pendsv
#if defined(CONFIG_CPU_CORTEX_M_HAS_SYSTICK)
#if defined(CONFIG_SYS_CLOCK_EXISTS) && defined(CONFIG_CORTEX_M_SYSTICK)
#if defined(CONFIG_SYS_CLOCK_EXISTS)
/* Install z_clock_isr even if CORTEX_M_SYSTICK is not set
* (e.g. to support out-of-tree SysTick-based timer drivers).
*/
.word z_clock_isr
#else
.word z_arm_exc_spurious
#endif /* CONFIG_SYS_CLOCK_EXISTS && CONFIG_CORTEX_M_SYSTICK */
#endif /* CONFIG_SYS_CLOCK_EXISTS */
#else
.word 0
#endif /* CONFIG_CPU_CORTEX_M_HAS_SYSTICK */
Expand Down

0 comments on commit e257fd4

Please sign in to comment.