mirror of
https://github.com/apache/nuttx.git
synced 2026-08-05 14:19:03 +00:00
arch/arm/rp23xx: Set priority for svcall exception
Fixes https://github.com/apache/nuttx/issues/15503. Signed-off-by: Ian Douglas Scott <ian@iandouglasscott.com>
This commit is contained in:
parent
5f4a15b690
commit
351db57e35
1 changed files with 23 additions and 0 deletions
|
|
@ -181,6 +181,27 @@ static int rp23xx_reserved(int irq, void *context, void *arg)
|
|||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp23xx_prioritize_syscall
|
||||
*
|
||||
* Description:
|
||||
* Set the priority of an exception. This function may be needed
|
||||
* internally even if support for prioritized interrupts is not enabled.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static inline void rp23xx_prioritize_syscall(int priority)
|
||||
{
|
||||
uint32_t regval;
|
||||
|
||||
/* SVCALL is system handler 11 */
|
||||
|
||||
regval = getreg32(NVIC_SYSH8_11_PRIORITY);
|
||||
regval &= ~NVIC_SYSH_PRIORITY_PR11_MASK;
|
||||
regval |= (priority << NVIC_SYSH_PRIORITY_PR11_SHIFT);
|
||||
putreg32(regval, NVIC_SYSH8_11_PRIORITY);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: rp23xx_clrpend
|
||||
*
|
||||
|
|
@ -276,6 +297,8 @@ void up_irqinitialize(void)
|
|||
irq_attach(RP23XX_IRQ_SVCALL, arm_svcall, NULL);
|
||||
irq_attach(RP23XX_IRQ_HARDFAULT, arm_hardfault, NULL);
|
||||
|
||||
rp23xx_prioritize_syscall(NVIC_SYSH_SVCALL_PRIORITY);
|
||||
|
||||
/* Attach all other processor exceptions (except reset and sys tick) */
|
||||
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue