GDI/HPFP: Set HPFP current/timing params on MC33816 (#3736)
This commit is contained in:
parent
dc1996f9b0
commit
5e5750a5d5
|
@ -172,6 +172,20 @@ static void setTimings() {
|
|||
mcUpdateDram(MC33816Mem::Tbypass, (MC_CK * engineConfiguration->mc33_t_bypass));
|
||||
mcUpdateDram(MC33816Mem::Thold_off, (MC_CK * engineConfiguration->mc33_t_hold_off));
|
||||
mcUpdateDram(MC33816Mem::Thold_tot, (MC_CK * engineConfiguration->mc33_t_hold_tot));
|
||||
|
||||
// HPFP solenoid settings
|
||||
mcUpdateDram(MC33816Mem::HPFP_Ipeak,
|
||||
dacEquation(engineConfiguration->mc33_hpfp_i_peak * 100));
|
||||
mcUpdateDram(MC33816Mem::HPFP_Ihold,
|
||||
dacEquation(engineConfiguration->mc33_hpfp_i_hold * 100));
|
||||
mcUpdateDram(MC33816Mem::HPFP_Thold_off,
|
||||
std::min(MC_CK * engineConfiguration->mc33_hpfp_i_hold_off,
|
||||
UINT16_MAX));
|
||||
// Note, if I'm reading this right, the use of the short and the given clock speed means
|
||||
// the max time here is approx 10ms.
|
||||
mcUpdateDram(MC33816Mem::HPFP_Thold_tot,
|
||||
std::min(MC_CK * 1000 * engineConfiguration->mc33_hpfp_max_hold,
|
||||
UINT16_MAX));
|
||||
}
|
||||
|
||||
void setBoostVoltage(float volts)
|
||||
|
|
|
@ -2,14 +2,18 @@
|
|||
typedef enum {
|
||||
Iboost = 0,
|
||||
Ipeak = 1,
|
||||
Ihold = 2,
|
||||
Tpeak_off = 3,
|
||||
Tpeak_tot = 4,
|
||||
Tbypass = 5,
|
||||
Thold_off = 6,
|
||||
Thold_tot = 7,
|
||||
Vboost_high = 64,
|
||||
Vboost_low = 65,
|
||||
Isense4_high = 66,
|
||||
Isense4_low = 67
|
||||
Ihold = 2,
|
||||
Tpeak_off = 3,
|
||||
Tpeak_tot = 4,
|
||||
Tbypass = 5,
|
||||
Thold_off = 6,
|
||||
Thold_tot = 7,
|
||||
Vboost_high = 64,
|
||||
Vboost_low = 65,
|
||||
Isense4_high = 66,
|
||||
Isense4_low = 67,
|
||||
HPFP_Ipeak = 69,
|
||||
HPFP_Ihold = 70,
|
||||
HPFP_Thold_off = 71,
|
||||
HPFP_Thold_tot = 72,
|
||||
} MC33816Mem;
|
||||
|
|
Loading…
Reference in New Issue