summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/kinetis
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-08-03 08:22:37 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-08-03 08:22:37 -0600
commitb74587a3f2161d1092ccf813bafe1246dbcf5365 (patch)
tree5ef5533c147c7ca3c131bb26d7b50204e459edc5 /nuttx/arch/arm/src/kinetis
parent711d0c577726b0cce1fa37d961fc3f192aa8e70d (diff)
downloadnuttx-b74587a3f2161d1092ccf813bafe1246dbcf5365.tar.gz
nuttx-b74587a3f2161d1092ccf813bafe1246dbcf5365.tar.bz2
nuttx-b74587a3f2161d1092ccf813bafe1246dbcf5365.zip
Standard configuration variables used to enable interupt controller debug; SAMA5: Correct handling of spurious interrupts
Diffstat (limited to 'nuttx/arch/arm/src/kinetis')
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_irq.c52
1 files changed, 22 insertions, 30 deletions
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_irq.c b/nuttx/arch/arm/src/kinetis/kinetis_irq.c
index f8b35656c..bf4585d9b 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_irq.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_irq.c
@@ -58,12 +58,6 @@
* Definitions
****************************************************************************/
-/* Enable NVIC debug features that are probably only desireable during
- * bringup
- */
-
-#undef KINETIS_IRQ_DEBUG
-
/* Get a 32-bit version of the default priority */
#define DEFPRIORITY32 \
@@ -94,51 +88,49 @@ volatile uint32_t *current_regs;
*
****************************************************************************/
-#if defined(KINETIS_IRQ_DEBUG) && defined (CONFIG_DEBUG)
+#if defined(CONFIG_DEBUG_IRQ)
static void kinetis_dumpnvic(const char *msg, int irq)
{
irqstate_t flags;
flags = irqsave();
- slldbg("NVIC (%s, irq=%d):\n", msg, irq);
- slldbg(" INTCTRL: %08x VECTAB: %08x\n",
- getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB));
+ lldbg("NVIC (%s, irq=%d):\n", msg, irq);
+ lldbg(" INTCTRL: %08x VECTAB: %08x\n",
+ getreg32(NVIC_INTCTRL), getreg32(NVIC_VECTAB));
#if 0
- slldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n",
- getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA),
- getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE));
+ lldbg(" SYSH ENABLE MEMFAULT: %08x BUSFAULT: %08x USGFAULT: %08x SYSTICK: %08x\n",
+ getreg32(NVIC_SYSHCON_MEMFAULTENA), getreg32(NVIC_SYSHCON_BUSFAULTENA),
+ getreg32(NVIC_SYSHCON_USGFAULTENA), getreg32(NVIC_SYSTICK_CTRL_ENABLE));
#endif
- slldbg(" IRQ ENABLE: %08x %08x %08x %08x\n",
- getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE);
- getreg32(NVIC_IRQ64_95_ENABLE), getreg32(NVIC_IRQ96_127_ENABLE));
- slldbg(" SYSH_PRIO: %08x %08x %08x\n",
- getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY),
- getreg32(NVIC_SYSH12_15_PRIORITY));
- slldbg(" IRQ PRIO: %08x %08x %08x %08x\n",
+ lldbg(" IRQ ENABLE: %08x %08x %08x %08x\n",
+ getreg32(NVIC_IRQ0_31_ENABLE), getreg32(NVIC_IRQ32_63_ENABLE);
+ getreg32(NVIC_IRQ64_95_ENABLE), getreg32(NVIC_IRQ96_127_ENABLE));
+ lldbg(" SYSH_PRIO: %08x %08x %08x\n",
+ getreg32(NVIC_SYSH4_7_PRIORITY), getreg32(NVIC_SYSH8_11_PRIORITY),
+ getreg32(NVIC_SYSH12_15_PRIORITY));
+ lldbg(" IRQ PRIO: %08x %08x %08x %08x\n",
getreg32(NVIC_IRQ0_3_PRIORITY), getreg32(NVIC_IRQ4_7_PRIORITY),
getreg32(NVIC_IRQ8_11_PRIORITY), getreg32(NVIC_IRQ12_15_PRIORITY));
- slldbg(" %08x %08x %08x %08x\n",
+ lldbg(" %08x %08x %08x %08x\n",
getreg32(NVIC_IRQ16_19_PRIORITY), getreg32(NVIC_IRQ20_23_PRIORITY),
getreg32(NVIC_IRQ24_27_PRIORITY), getreg32(NVIC_IRQ28_31_PRIORITY));
- slldbg(" %08x %08x %08x %08x\n",
+ lldbg(" %08x %08x %08x %08x\n",
getreg32(NVIC_IRQ32_35_PRIORITY), getreg32(NVIC_IRQ36_39_PRIORITY),
getreg32(NVIC_IRQ40_43_PRIORITY), getreg32(NVIC_IRQ44_47_PRIORITY));
-
- slldbg(" %08x %08x %08x %08x\n",
+ lldbg(" %08x %08x %08x %08x\n",
getreg32(NVIC_IRQ48_51_PRIORITY), getreg32(NVIC_IRQ52_55_PRIORITY),
getreg32(NVIC_IRQ56_59_PRIORITY), getreg32(NVIC_IRQ60_63_PRIORITY));
- slldbg(" %08x %08x %08x %08x\n",
+ lldbg(" %08x %08x %08x %08x\n",
getreg32(NVIC_IRQ64_67_PRIORITY), getreg32(NVIC_IRQ68_71_PRIORITY),
getreg32(NVIC_IRQ72_75_PRIORITY), getreg32(NVIC_IRQ76_79_PRIORITY));
-
- slldbg(" %08x %08x %08x %08x\n",
+ lldbg(" %08x %08x %08x %08x\n",
getreg32(NVIC_IRQ80_83_PRIORITY), getreg32(NVIC_IRQ84_87_PRIORITY),
getreg32(NVIC_IRQ88_91_PRIORITY), getreg32(NVIC_IRQ92_95_PRIORITY));
- slldbg(" %08x %08x %08x %08x\n",
+ lldbg(" %08x %08x %08x %08x\n",
getreg32(NVIC_IRQ96_99_PRIORITY), getreg32(NVIC_IRQ100_103_PRIORITY),
getreg32(NVIC_IRQ104_107_PRIORITY), getreg32(NVIC_IRQ108_111_PRIORITY));
#if NR_VECTORS > 111
- slldbg(" %08x %08x\n",
+ lldbg(" %08x %08x\n",
getreg32(NVIC_IRQ112_115_PRIORITY), getreg32(NVIC_IRQ116_119_PRIORITY));
#endif
@@ -423,7 +415,7 @@ void up_irqinitialize(void)
/* Initialize logic to support a second level of interrupt decoding for
* configured pin interrupts.
*/
-
+
#ifdef CONFIG_GPIO_IRQ
kinetis_pinirqinitialize();
#endif