REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches
plugin.cpp
Go to the documentation of this file.
1#include <Arduino.h>
2#include <cstring> // memcpy
3
4#include <imxrt.h> // framework-arduinoteensy/cores/teensy4
5#include <plugin/plugin.h>
6#include <utils/etl_base64.h>
7
8using namespace loader;
9
16 // Turn off MPU completely
17 // Effect: Can execute code in stack and global storage.
18 SCB_MPU_CTRL = 0;
19
20 /*
21 SCB_MPU_RBAR = 0x00000000 | REGION(1); // ITCM
22 SCB_MPU_RASR = MEM_NOCACHE | READWRITE | SIZE_512K;
23
24 SCB_MPU_RBAR = 0x20000000 | REGION(4); // DTCM
25 SCB_MPU_RASR = MEM_NOCACHE | READWRITE | NOEXEC | SIZE_512K;
26
27 SCB_MPU_RBAR = 0x20200000 | REGION(6); // RAM (AXI bus)
28 SCB_MPU_RASR = MEM_CACHE_WBWA | READWRITE | NOEXEC | SIZE_1M;
29 */
30
31 // Enabling back the MPU
32 // SCB_MPU_CTRL = SCB_MPU_CTRL_ENABLE;
33
34 // recommended to do before and after changing MPU registers
35 asm("dsb");
36 asm("isb");
37}
void prepare_mpu()
At the time being, we completely disable the Memory Protection Unit in order to enable our plugin sys...
Definition plugin.cpp:15