Skip to content

Commit f815866

Browse files
committed
porting/nimble/hal_timer: fix NVIC setup
In commit ab53154 platform specific handling of the NVIC setup for the timers priority and vectors were revertet. This leads to problems on certain platforms, e.g. interrupt priority related hard-faults on RIOT. This commit re-introduces the platform specific setup.
1 parent 3caae64 commit f815866

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

porting/nimble/src/hal_timer.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,14 @@ hal_timer_init(int timer_num, void *cfg)
538538

539539
/* Disable IRQ, set priority and set vector in table */
540540
NVIC_DisableIRQ(irq_num);
541+
#ifndef RIOT_VERSION
541542
NVIC_SetPriority(irq_num, (1 << __NVIC_PRIO_BITS) - 1);
543+
#endif
544+
#if MYNEWT
542545
NVIC_SetVector(irq_num, (uint32_t)irq_isr);
546+
#else
547+
ble_npl_hw_set_isr(irq_num, irq_isr);
548+
#endif
543549

544550
return 0;
545551

0 commit comments

Comments
 (0)