Skip to content
Snippets Groups Projects
Commit 04ca9ab1 authored by brian's avatar brian
Browse files

Working user stack no errors

parent fac105dc
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@
switch_to_user_mode:
ldr r0, =user_stack
add r0, r0, #2048
msr PSP, r0
mov r1, #3
msr CONTROL, r1
......
......@@ -80,6 +80,7 @@ int main(void) {
MPU->RBAR = 0x00000000;
MPU->RASR = RO | BTEX_NORMAL_NOT_SHAREABLE | SET_SIZE_512KB | REGION_ENABLE;
// Region 1 (SRAM1)
MPU->RNR = 1;
MPU->RBAR = 0x10000000;
......@@ -119,7 +120,7 @@ int main(void) {
switch_to_user_mode(); // to be implemented
// testing memory accesses in user mode:
test_user_mode(); // to be removed after checking
//test_user_mode(); // to be removed after checking
while (1) {
exec_user_read_write();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment