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)
 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 20 of file mpu_util.cpp.

20 {
21 // All sectors on H7 are 128k
22 return 128 * 1024;
23}

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 27 of file mpu_util.cpp.

27 {
28#ifdef STM32H723xx
29 return 0x080E0000;
30#else
31 return 0x08100000;
32#endif
33}

◆ getFlashAddrSecondCopy()

uintptr_t getFlashAddrSecondCopy ( void  )

Definition at line 35 of file mpu_util.cpp.

35 {
36#ifdef STM32H723xx
37 return 0;
38#else
39 // Second copy is one sector past the first
40 return getFlashAddrFirstCopy() + 128 * 1024;
41#endif
42}
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#ifdef STM32H723xx
14 return false;
15#else
16 return true;
17#endif
18}

Go to the source code of this file.