rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
mpu_util.cpp
Go to the documentation of this file.
1/**
2 * @file mpu_util.cpp
3 *
4 * @date Feb 26, 2021
5 * @author Matthew Kennedy, (c) 2021
6 */
7
8#include "pch.h"
9
10#include "flash_int.h"
11
13 // We only support dual bank H7, so always allow flash while running.
14 return true;
15}
16
18 // All sectors on H7 are 128k
19 return 128 * 1024;
20}
21
23 return 0x08100000;
24}
25
27 // Second copy is one sector past the first
28 return getFlashAddrFirstCopy() + 128 * 1024;
29}
bool mcuCanFlashWhileRunning()
Definition mpu_util.cpp:10
uintptr_t getFlashAddrSecondCopy()
Definition mpu_util.cpp:252
uintptr_t getFlashAddrFirstCopy()
Definition mpu_util.cpp:248
size_t flashSectorSize(flashsector_t sector)
Get the size of sector.
Definition mpu_util.cpp:237
uint8_t flashsector_t
Index of a sector.
Definition flash_int.h:89