Skip to content

Commit fc16603

Browse files
duynguyenxaKhiemNguyenT
authored andcommitted
hal: renesas: ra: Disable irq priority configuration
IRQ priority on Zephyr have offset, disable the priority setting for IRQ in FSP HAL layer so that priority setting will not be override when Open() API is called Signed-off-by: Duy Nguyen <[email protected]>
1 parent a751dfe commit fc16603

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

zephyr/ra/portable/bsp_irq.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,8 @@ __STATIC_INLINE void R_BSP_IrqClearPending (IRQn_Type irq)
131131
**********************************************************************************************************************/
132132
__STATIC_INLINE void R_BSP_IrqCfg (IRQn_Type const irq, uint32_t priority, void * p_context)
133133
{
134-
/* The following statement is used in place of NVIC_SetPriority to avoid including a branch for system exceptions
135-
* every time a priority is configured in the NVIC. */
136-
#if (4U == __CORTEX_M)
137-
NVIC->IPR[((uint32_t) irq)] = (uint8_t) ((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t) UINT8_MAX);
138-
#elif (33 == __CORTEX_M)
139-
NVIC->IPR[((uint32_t) irq)] = (uint8_t) ((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t) UINT8_MAX);
140-
#elif (23 == __CORTEX_M)
141-
NVIC->IPR[_IP_IDX(irq)] = ((uint32_t) (NVIC->IPR[_IP_IDX(irq)] & ~((uint32_t) UINT8_MAX << _BIT_SHIFT(irq))) |
142-
(((priority << (8U - __NVIC_PRIO_BITS)) & (uint32_t) UINT8_MAX) << _BIT_SHIFT(irq)));
143-
#else
144-
NVIC_SetPriority(irq, priority);
145-
#endif
146-
134+
/* Zephyr interrupt priority will have offset, remove priority config in FSP to prevent override seting on Zephyr */
135+
FSP_PARAMETER_NOT_USED(priority);
147136
/* Store the context. The context is recovered in the ISR. */
148137
R_FSP_IsrContextSet(irq, p_context);
149138
}

0 commit comments

Comments
 (0)