Skip to content

Commit dff6871

Browse files
committed
Fixed UART interrupts
1 parent 20bb073 commit dff6871

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

targets/arm/mikroe/core/include/hal_ll_core_defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ extern "C"{
430430

431431
#define NVIC_IPR ((NVIC_IPR_Type *) 0xE000E400UL)
432432

433-
#define hal_ll_core_irq(irq_val) (1 << irq_val)
433+
#define hal_ll_core_irq(irq_val) (1 << (irq_val & HAL_LL_CORE_IRQ_MASK))
434434
#define hal_ll_core_pri(irq_pri) (irq_pri << 4)
435435

436436
#define HAL_LL_CORE_IRQ_MASK 0x1F

targets/arm/mikroe/core/src/renesas/m4/hal_ll_core_port.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ void hal_ll_core_port_nvic_enable_irq( uint8_t IRQn )
4949
{
5050
// Application vectors
5151
if (( IRQn <= 31 ) && ( IRQn >= 0 ))
52-
set_reg_bits( HAL_LL_CORE_NVIC_ISER_0, ( ( hal_ll_core_irq( IRQn ) ) & HAL_LL_CORE_IRQ_MASK ) );
52+
set_reg_bits( HAL_LL_CORE_NVIC_ISER_0, hal_ll_core_irq( IRQn ));
5353
}
5454

5555
void hal_ll_core_port_nvic_disable_irq( uint8_t IRQn )
5656
{
5757
// Application vectors
5858
if (( IRQn <= 31 ) && ( IRQn >= 0 ))
59-
set_reg_bits( HAL_LL_CORE_NVIC_ICER_0, ( ( hal_ll_core_irq( IRQn ) ) & HAL_LL_CORE_IRQ_MASK ) );
59+
set_reg_bits( HAL_LL_CORE_NVIC_ICER_0, hal_ll_core_irq( IRQn ));
6060
}
6161

6262
void hal_ll_core_port_nvic_set_priority_irq( uint8_t IRQn, uint8_t IRQn_priority )

0 commit comments

Comments
 (0)