Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
10394cb4
Commit
10394cb4
authored
12 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Fix KL25Z interrupt enable/disable logic
parent
8e5ae388
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
arch/arm/include/kinetis/irq.h
+2
-2
2 additions, 2 deletions
arch/arm/include/kinetis/irq.h
arch/arm/include/kl/irq.h
+3
-4
3 additions, 4 deletions
arch/arm/include/kl/irq.h
arch/arm/src/kl/kl_irq.c
+8
-8
8 additions, 8 deletions
arch/arm/src/kl/kl_irq.c
with
13 additions
and
14 deletions
arch/arm/include/kinetis/irq.h
+
2
−
2
View file @
10394cb4
...
...
@@ -301,13 +301,13 @@
*/
# define NR_VECTORS (120)
/* 120 vectors */
# define NR_IRQS (108)
/*
97
interrupts but 108 IRQ numbers */
# define NR_IRQS (108)
/*
120
interrupts but 108 IRQ numbers */
#else
/* The interrupt vectors for other parts are defined in other documents and may or
* may not be the same as above (the family members are all very similar) This
* error just means that you have to look at the document and determine for yourself
* if the
memory map is
the same.
* if the
vectors are
the same.
*/
# error "No IRQ numbers for this Kinetis part"
...
...
This diff is collapsed.
Click to expand it.
arch/arm/include/kl/irq.h
+
3
−
4
View file @
10394cb4
...
...
@@ -122,15 +122,14 @@
* now) seems to justify the waste.
*/
# define NR_VECTORS (64)
/* 64 vectors */
# define NR_IRQS (64)
/* 64 interrupts but 48 IRQ numbers */
# define KL_IRQ_INTERRUPT (64)
# define NR_VECTORS (64)
/* 64 vectors */
# define NR_IRQS (48)
/* 64 interrupts but 48 IRQ numbers */
#else
/* The interrupt vectors for other parts are defined in other documents and may or
* may not be the same as above (the family members are all very similar) This
* error just means that you have to look at the document and determine for yourself
* if the
memory map is
the same.
* if the
vectors are
the same.
*/
# error "No IRQ numbers for this Kinetis L part"
...
...
This diff is collapsed.
Click to expand it.
arch/arm/src/kl/kl_irq.c
+
8
−
8
View file @
10394cb4
...
...
@@ -198,13 +198,13 @@ static inline void kl_clrpend(int irq)
/* Check for an external interrupt */
if
(
irq
>=
KL_IRQ_
INTERRUP
T
&&
irq
<
KL_IRQ_
INTERRUP
T
+
32
)
if
(
irq
>=
KL_IRQ_
EXTIN
T
&&
irq
<
(
KL_IRQ_
EXTIN
T
+
32
)
)
{
/* Set the appropriate bit in the ISER register to enable the
* interrupt
*/
putreg32
((
1
<<
(
irq
-
KL_IRQ_
INTERRUP
T
)),
ARMV6M_NVIC_ICPR
);
putreg32
((
1
<<
(
irq
-
KL_IRQ_
EXTIN
T
)),
ARMV6M_NVIC_ICPR
);
}
}
...
...
@@ -295,13 +295,13 @@ void up_disable_irq(int irq)
/* Check for an external interrupt */
if
(
irq
>=
KL_IRQ_
INTERRUP
T
&&
irq
<
KL_IRQ_
INTERRUP
T
+
32
)
if
(
irq
>=
KL_IRQ_
EXTIN
T
&&
irq
<
(
KL_IRQ_
EXTIN
T
+
32
)
)
{
/* Set the appropriate bit in the ICER register to disable the
* interrupt
*/
putreg32
((
1
<<
(
irq
-
KL_IRQ_
INTERRUP
T
)),
ARMV6M_NVIC_ICER
);
putreg32
((
1
<<
(
irq
-
KL_IRQ_
EXTIN
T
)),
ARMV6M_NVIC_ICER
);
}
/* Handle processor exceptions. Only SysTick can be disabled */
...
...
@@ -332,13 +332,13 @@ void up_enable_irq(int irq)
/* Check for external interrupt */
if
(
irq
>=
KL_IRQ_
INTERRUP
T
&&
irq
<
KL_IRQ_
INTERRUP
T
+
32
)
if
(
irq
>=
KL_IRQ_
EXTIN
T
&&
irq
<
(
KL_IRQ_
EXTIN
T
+
32
)
)
{
/* Set the appropriate bit in the ISER register to enable the
* interrupt
*/
putreg32
((
1
<<
(
irq
-
KL_IRQ_
INTERRUP
T
)),
ARMV6M_NVIC_ISER
);
putreg32
((
1
<<
(
irq
-
KL_IRQ_
EXTIN
T
)),
ARMV6M_NVIC_ISER
);
}
/* Handle processor exceptions. Only SysTick can be disabled */
...
...
@@ -386,13 +386,13 @@ int up_prioritize_irq(int irq, int priority)
DEBUGASSERT
(
irq
==
KL_IRQ_SVCALL
||
irq
==
KL_IRQ_PENDSV
||
irq
==
KL_IRQ_SYSTICK
||
(
irq
>=
KL_IRQ_
INTERRUP
T
&&
irq
<
NR_IRQS
));
(
irq
>=
KL_IRQ_
EXTIN
T
&&
irq
<
NR_IRQS
));
DEBUGASSERT
(
priority
>=
NVIC_SYSH_DISABLE_PRIORITY
&&
priority
<=
NVIC_SYSH_PRIORITY_MIN
);
/* Check for external interrupt */
if
(
irq
>=
KL_IRQ_
INTERRUP
T
&&
irq
<
KL_IRQ_
INTERRUP
T
+
32
)
if
(
irq
>=
KL_IRQ_
EXTIN
T
&&
irq
<
(
KL_IRQ_
EXTIN
T
+
32
)
)
{
/* ARMV6M_NVIC_IPR() maps register IPR0-IPR7 with four settings per
* register.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment