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

Detailed Description

Date
Nov 3, 2023
Author
Andrey Gusakov, (c) 2023

Definition in file mpu_util.cpp.

Functions

bool mcuCanFlashWhileRunning ()
 
void stm32_standby ()
 

Function Documentation

◆ mcuCanFlashWhileRunning()

bool mcuCanFlashWhileRunning ( )

Definition at line 10 of file mpu_util.cpp.

10 {
11 /* TODO: check for actual flash configuration? */
12 /* currently we support only AT32F43X with dual-bank flash, so allow flashing to second bank */
13 /* TODO: Seems AT32 is still freezes even write is happen to second bank, while executing code from first */
14 return true;
15}

Referenced by storageAllowWriteID().

Here is the caller graph for this function:

◆ stm32_standby()

void stm32_standby ( )

Definition at line 18 of file mpu_util.cpp.

18 {
19 // Don't get bothered by interrupts
20 __disable_irq();
21
22 /* TODO: validate! */
23#if 0
24 SysTick->CTRL = 0;
25 SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
26 PWR->CR |= PWR_CR_PDDS; // PDDS = use standby mode (not stop mode)
27 PWR->CR |= PWR_CR_CSBF; // Clear standby flag
28#endif
29
30 // Do anything the board wants to prepare for standby mode - enabling wakeup sources!
32
33 __WFI();
34}
void boardPrepareForStandby()

Referenced by configureRusefiLuaUtilHooks(), and runRusEfi().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.