Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
PetePriority
firmware
Commits
b4a2c87c
Commit
b4a2c87c
authored
Jun 13, 2019
by
ch3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DualCore: Wake up core0 from core1, too
parent
7ae2536d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
hw-tests/dual-core/core1.c
hw-tests/dual-core/core1.c
+4
-0
hw-tests/dual-core/main.c
hw-tests/dual-core/main.c
+5
-1
No files found.
hw-tests/dual-core/core1.c
View file @
b4a2c87c
...
...
@@ -11,6 +11,10 @@ int main(void)
for
(
int
i
=
0
;
1
;
i
++
)
{
__asm
volatile
(
"wfe"
);
printf
(
"core1: Hello! %d
\n
"
,
i
);
mxc_delay
(
3000000
);
printf
(
"core1: Waking up core0
\n
"
);
__asm
volatile
(
"sev"
);
__asm
volatile
(
"wfe"
);
#if 0
GPIO_OutSet(&motor_pin);
...
...
hw-tests/dual-core/main.c
View file @
b4a2c87c
...
...
@@ -39,6 +39,7 @@ int main(void)
}
int
h
=
0
;
MXC_GCR
->
evten
|=
0x04
;
// Release core1
Core1_Start
();
...
...
@@ -54,7 +55,7 @@ int main(void)
}
leds_update
();
TMR_Delay
(
MXC_TMR
0
,
MSEC
(
10
),
0
);
TMR_Delay
(
MXC_TMR
1
,
MSEC
(
10
),
0
);
h
++
;
// Send a txev using `sev` every once in a while to wake up core1
...
...
@@ -62,6 +63,9 @@ int main(void)
if
(
h
%
100
==
0
)
{
printf
(
"core0: Triggering core1 using SEV ...
\n
"
);
__asm
volatile
(
"sev"
);
__asm
volatile
(
"wfe"
);
__asm
volatile
(
"wfe"
);
printf
(
"core0 woke up
\n
"
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment