summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/lpc43xx/lpc43_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/lpc43xx/lpc43_irq.c')
-rw-r--r--nuttx/arch/arm/src/lpc43xx/lpc43_irq.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/lpc43xx/lpc43_irq.c b/nuttx/arch/arm/src/lpc43xx/lpc43_irq.c
index aa0e4cf09..6f49b3e38 100644
--- a/nuttx/arch/arm/src/lpc43xx/lpc43_irq.c
+++ b/nuttx/arch/arm/src/lpc43xx/lpc43_irq.c
@@ -386,9 +386,12 @@ void up_irqinitialize(void)
lpc43_dumpnvic("initial", LPC43M4_IRQ_NIRQS);
- /* If a debugger is connected, try to prevent it from catching hardfaults */
+ /* If a debugger is connected, try to prevent it from catching hardfaults.
+ * If CONFIG_ARMV7M_USEBASEPRI, no hardfaults are expected in normal
+ * operation.
+ */
-#ifdef CONFIG_DEBUG
+#if defined(CONFIG_DEBUG) && !defined(CONFIG_ARMV7M_USEBASEPRI)
regval = getreg32(NVIC_DEMCR);
regval &= ~NVIC_DEMCR_VCHARDERR;
putreg32(regval, NVIC_DEMCR);