mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-06-06 05:14:45 +00:00
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.
This commit is contained in:
committed by
Hauke Petersen
parent
3caae6474c
commit
f8158661ed
@@ -538,8 +538,14 @@ hal_timer_init(int timer_num, void *cfg)
|
||||
|
||||
/* Disable IRQ, set priority and set vector in table */
|
||||
NVIC_DisableIRQ(irq_num);
|
||||
#ifndef RIOT_VERSION
|
||||
NVIC_SetPriority(irq_num, (1 << __NVIC_PRIO_BITS) - 1);
|
||||
#endif
|
||||
#if MYNEWT
|
||||
NVIC_SetVector(irq_num, (uint32_t)irq_isr);
|
||||
#else
|
||||
ble_npl_hw_set_isr(irq_num, irq_isr);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user