Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Skyward Boardcore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Emilio Corigliano
Skyward Boardcore
Commits
b7594854
Commit
b7594854
authored
3 years ago
by
Alberto Nidasio
Browse files
Options
Downloads
Patches
Plain Diff
[EXTI] Added different prints to better debug errors
parent
85668484
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/shared/drivers/interrupt/external_interrupts.cpp
+89
-37
89 additions, 37 deletions
src/shared/drivers/interrupt/external_interrupts.cpp
with
89 additions
and
37 deletions
src/shared/drivers/interrupt/external_interrupts.cpp
+
89
−
37
View file @
b7594854
...
...
@@ -23,6 +23,9 @@
#include
"external_interrupts.h"
#include
<miosix.h>
#include
"kernel/logging.h"
using
namespace
miosix
;
/**
...
...
@@ -62,46 +65,95 @@ using namespace miosix;
// All unused interrupts call this function.
extern
void
unexpectedInterrupt
();
extern
"C"
void
Default_EXTI_Handler
()
{
unexpectedInterrupt
();
}
extern
"C"
void
Default_EXTI_Handler
()
{
IRQerrorLog
(
"
\r\n
***Unexpected Peripheral interrupt [Boardcore]
\r\n
"
);
}
/**
* Declaration of a separate IRQHandler for each external
* interrupt. If no further implementatio is provided, the
* interrupt. If no further implementatio
n
is provided, the
* Default_Handler will be called.
*/
void
__attribute__
((
weak
))
EXTI0_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI1_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI2_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI3_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI4_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI5_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI6_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI7_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI8_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI9_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI10_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI11_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI12_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI13_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI14_IRQHandlerImpl
();
void
__attribute__
((
weak
))
EXTI15_IRQHandlerImpl
();
#pragma weak EXTI0_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI1_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI2_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI3_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI4_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI5_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI6_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI7_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI8_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI9_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI10_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI11_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI12_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI13_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI14_IRQHandlerImpl = Default_EXTI_Handler
#pragma weak EXTI15_IRQHandlerImpl = Default_EXTI_Handler
void
__attribute__
((
weak
))
EXTI0_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI0
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI1_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI1
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI2_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI2
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI3_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI3
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI4_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI4
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI5_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI5
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI6_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI6
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI7_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI7
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI8_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI8
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI9_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI9
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI10_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI10
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI11_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI11
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI12_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI12
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI13_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI13
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI14_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI14
\r\n
"
);
}
void
__attribute__
((
weak
))
EXTI15_IRQHandlerImpl
()
{
IRQerrorLog
(
"
\r\n
Unexpected Peripheral interrupt EXTI15
\r\n
"
);
}
/**
* Implementation of the IRQHandler that is triggered when
...
...
@@ -266,7 +318,7 @@ void __attribute__((used)) EXTI15_10_IRQHandlerImpl()
}
}
constexpr
unsigned
ConvertGPIO_BASEtoUnsiged
(
unsigned
P
)
constexpr
unsigned
ConvertGPIO_BASEtoUnsig
n
ed
(
unsigned
P
)
{
// clang-format off
return
P
==
GPIOA_BASE
?
0
:
...
...
@@ -303,7 +355,7 @@ constexpr unsigned GetEXTI_IRQn(unsigned N)
constexpr
unsigned
GetEXTICR_register_value
(
unsigned
P
,
unsigned
N
)
{
return
(
ConvertGPIO_BASEtoUnsiged
(
P
)
<<
((
N
%
4
)
*
4
));
return
(
ConvertGPIO_BASEtoUnsig
n
ed
(
P
)
<<
((
N
%
4
)
*
4
));
}
void
enableExternalInterrupt
(
unsigned
int
gpioPort
,
unsigned
int
gpioNumber
,
...
...
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