Hallo zusammen,
mittlerweile beschäftige ich mich mit dem integrierten FRAM des
MSP430FR5729 und habe mit Hilfe der MPU den FRAM in drei Segmente
partitioniert:
1 | int _system_pre_init(void)
|
2 | {
|
3 | WDTCTL = WDTPW + WDTHOLD;
|
4 |
|
5 | // Configure Memory Protection Unit
|
6 | MPUCTL0 = MPUPW; // Write PWD to access MPU registers
|
7 | MPUSEG = 0x0804; // B1 = 0xC9B0; B2 = 0xD160
|
8 |
|
9 | // Segment 1 – Allows read and write only
|
10 | // Segment 2 – Allows read only
|
11 | // Segment 3 – Allows read and execute only
|
12 | MPUSAM = (MPUSEG1WE | MPUSEG1RE | MPUSEG2RE | MPUSEG3RE | MPUSEG3XE);
|
13 | MPUCTL0 = MPUPW | MPUENA; // Enable MPU protection
|
14 |
|
15 | return 1;
|
16 | }
|
Führe ich meinen Programmcode nun aus, haben alle Variablen den selben
sinnfreien Wert.
Muss ich die Partitionierung auch noch im *.cmd Linker-File vornehmen?
Weiß Jemand ob es da ein Tutorial, Anleitung etc gibt?
Beste Grüße,
Michael