rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions
mpu_util.cpp File Reference

Detailed Description

Date
Feb 26, 2021
Author
Matthew Kennedy, (c) 2021

Definition in file mpu_util.cpp.

Functions

bool mcuCanFlashWhileRunning ()
 
size_t flashSectorSize (flashsector_t sector)
 Get the size of sector.
 
uintptr_t getFlashAddrFirstCopy ()
 
uintptr_t getFlashAddrSecondCopy ()
 

Function Documentation

◆ flashSectorSize()

size_t flashSectorSize ( flashsector_t  sector)

Get the size of sector.

Returns
sector size in bytes.

Definition at line 17 of file mpu_util.cpp.

17 {
18 // All sectors on H7 are 128k
19 return 128 * 1024;
20}

Referenced by intFlashSectorBegin(), and intFlashSectorErase().

Here is the caller graph for this function:

◆ getFlashAddrFirstCopy()

uintptr_t getFlashAddrFirstCopy ( void  )

Flex Non Volatile Memory is faster than flash It also has smaller pages so it takes less time to erase

There is no remote access to FlexNVM meaning that we cannot erase settings externally

Definition at line 22 of file mpu_util.cpp.

22 {
23 return 0x08100000;
24}

◆ getFlashAddrSecondCopy()

uintptr_t getFlashAddrSecondCopy ( void  )

Definition at line 26 of file mpu_util.cpp.

26 {
27 // Second copy is one sector past the first
28 return getFlashAddrFirstCopy() + 128 * 1024;
29}
uintptr_t getFlashAddrFirstCopy()
Definition mpu_util.cpp:248
Here is the call graph for this function:

◆ mcuCanFlashWhileRunning()

bool mcuCanFlashWhileRunning ( )

Definition at line 12 of file mpu_util.cpp.

12 {
13 // We only support dual bank H7, so always allow flash while running.
14 return true;
15}

Go to the source code of this file.