GDI: add min/max boost time config (#4343)
* add min/max boost time config * add cast * generated * UI
This commit is contained in:
parent
a0d8ae3f4f
commit
d413b28a77
|
@ -788,10 +788,11 @@ void setBoschHDEV_5_injectors() {
|
|||
engineConfiguration->mc33_i_boost = 13000;
|
||||
engineConfiguration->mc33_i_peak = 9400;
|
||||
engineConfiguration->mc33_i_hold = 3700;
|
||||
engineConfiguration->mc33_t_max_boost = 470;
|
||||
engineConfiguration->mc33_t_min_boost = 100;
|
||||
engineConfiguration->mc33_t_max_boost = 400;
|
||||
engineConfiguration->mc33_t_peak_off = 10;
|
||||
engineConfiguration->mc33_t_peak_tot = 700;
|
||||
engineConfiguration->mc33_t_bypass = 15;
|
||||
engineConfiguration->mc33_t_bypass = 10;
|
||||
engineConfiguration->mc33_t_hold_off = 60;
|
||||
engineConfiguration->mc33_t_hold_tot = 10000;
|
||||
|
||||
|
|
|
@ -119,13 +119,15 @@ static unsigned short readId() {
|
|||
|
||||
// Read a single word in Data RAM
|
||||
unsigned short mcReadDram(MC33816Mem addr) {
|
||||
uint16_t addrInt = static_cast<uint16_t>(addr);
|
||||
|
||||
unsigned short readValue;
|
||||
spiSelect(driver);
|
||||
// Select Channel command, Common Page
|
||||
spi_writew(0x7FE1);
|
||||
spi_writew(0x0004);
|
||||
// read (MSB=1) at data ram x9 (SCV_I_Hold), and 1 word
|
||||
spi_writew((0x8000 | addr << 5) + 1);
|
||||
spi_writew((0x8000 | addrInt << 5) + 1);
|
||||
readValue = recv_16bit_spi();
|
||||
|
||||
spiUnselect(driver);
|
||||
|
@ -134,12 +136,14 @@ unsigned short mcReadDram(MC33816Mem addr) {
|
|||
|
||||
// Update a single word in Data RAM
|
||||
void mcUpdateDram(MC33816Mem addr, unsigned short data) {
|
||||
uint16_t addrInt = static_cast<uint16_t>(addr);
|
||||
|
||||
spiSelect(driver);
|
||||
// Select Channel command, Common Page
|
||||
spi_writew(0x7FE1);
|
||||
spi_writew(0x0004);
|
||||
// write (MSB=0) at data ram x9 (SCV_I_Hold), and 1 word
|
||||
spi_writew((addr << 5) + 1);
|
||||
spi_writew((addrInt << 5) + 1);
|
||||
spi_writew(data);
|
||||
|
||||
spiUnselect(driver);
|
||||
|
@ -173,6 +177,8 @@ 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));
|
||||
mcUpdateDram(MC33816Mem::Tboost_min, (MC_CK * engineConfiguration->mc33_t_min_boost));
|
||||
mcUpdateDram(MC33816Mem::Tboost_max, (MC_CK * engineConfiguration->mc33_t_max_boost));
|
||||
|
||||
// HPFP solenoid settings
|
||||
mcUpdateDram(MC33816Mem::HPFP_Ipeak,
|
||||
|
|
|
@ -6,3 +6,5 @@
|
|||
#define Tbypass 5;
|
||||
#define Thold_off 6;
|
||||
#define Thold_tot 7;
|
||||
#define Tboost_max 8;
|
||||
#define Tboost_min 9;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
0000000011110000
|
||||
0000000011110000
|
||||
0000000010001100
|
||||
0010000000000000
|
||||
0000000111110100
|
||||
0000000010110100
|
||||
0000000011000000
|
||||
0000000010010010
|
||||
0000000001001001
|
||||
0000000000111100
|
||||
0001000001101000
|
||||
0000000000111100
|
||||
0000000101101000
|
||||
1110101001100000
|
||||
0000000000000000
|
||||
0000000000000000
|
||||
0000100101100000
|
||||
0000001001011000
|
||||
0000000000000000
|
||||
0000000000000000
|
||||
0000000000000000
|
||||
|
|
|
@ -3,19 +3,19 @@
|
|||
// Asic ID: PT2001
|
||||
// Version:
|
||||
// DRAM
|
||||
// Date: Wednesday, July 13, 2022
|
||||
// Date: Thursday, July 14, 2022
|
||||
// Author: makenne
|
||||
//
|
||||
0x00F0,
|
||||
0x00F0,
|
||||
0x008C,
|
||||
0x2000,
|
||||
0x01F4,
|
||||
0x00B4,
|
||||
0x00C0,
|
||||
0x0092,
|
||||
0x0049,
|
||||
0x003C,
|
||||
0x1068,
|
||||
0x003C,
|
||||
0x0168,
|
||||
0xEA60,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0960,
|
||||
0x0258,
|
||||
0x0000,
|
||||
0x0000,
|
||||
0x0000,
|
||||
|
|
|
@ -74,7 +74,7 @@ unsigned short PT2001_code_RAM2[43] =
|
|||
// Data to be loaded into the Data RAM memory space
|
||||
unsigned short PT2001_data_RAM[128] =
|
||||
{
|
||||
0x00F0, 0x00F0, 0x008C, 0x2000, 0x01F4, 0x00B4, 0x003C, 0xEA60, 0x0000, 0x0000,
|
||||
0x00C0, 0x0092, 0x0049, 0x003C, 0x1068, 0x003C, 0x0168, 0xEA60, 0x0960, 0x0258,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
#define PT2001_D1_Tbypass 0x05
|
||||
#define PT2001_D1_Thold_off 0x06
|
||||
#define PT2001_D1_Thold_tot 0x07
|
||||
#define PT2001_D1_Tboost_max 0x08
|
||||
#define PT2001_D1_Tboost_min 0x09
|
||||
|
||||
// DRAM 2 Parameter Addresses
|
||||
#define PT2001_D2_Vboost_high 0x40
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "mc33816/rusefi/sample_code/PT2001_dram.h"
|
||||
|
||||
typedef enum {
|
||||
enum class MC33816Mem {
|
||||
// see dram1.def values
|
||||
Iboost = PT2001_D1_Iboost,
|
||||
Ipeak = PT2001_D1_Ipeak,
|
||||
|
@ -14,6 +14,8 @@ typedef enum {
|
|||
Tbypass = PT2001_D1_Tbypass,
|
||||
Thold_off = PT2001_D1_Thold_off,
|
||||
Thold_tot = PT2001_D1_Thold_tot,
|
||||
Tboost_min = PT2001_D1_Tboost_min,
|
||||
Tboost_max = PT2001_D1_Tboost_max,
|
||||
// see dram2.def values, base 64 for channel 2
|
||||
Vboost_high = PT2001_D2_Vboost_high,
|
||||
Vboost_low = PT2001_D2_Vboost_low,
|
||||
|
@ -23,4 +25,4 @@ typedef enum {
|
|||
HPFP_Ihold = PT2001_D2_PCV_Ihold,
|
||||
HPFP_Thold_off = PT2001_D2_PCV_Thold_off,
|
||||
HPFP_Thold_tot = PT2001_D2_PCV_Thold_tot,
|
||||
} MC33816Mem;
|
||||
};
|
||||
|
|
|
@ -710,7 +710,7 @@ custom adc_channel_mode_e 1 bits, U08, @OFFSET@, [0:1], "Off", "Slow", "Fast"
|
|||
float idle_antiwindupFreq;+0.1 is a good default value;"x", 1, 0, -1000000, 1000000, 4
|
||||
|
||||
brain_input_pin_e[TRIGGER_INPUT_PIN_COUNT iterate] triggerInputPins;
|
||||
uint16_t unused688
|
||||
uint16_t mc33_t_min_boost;Minimum allowed time for the boost phase. If the boost target current is reached before this time elapses, it is assumed that the injector has failed short circuit.;"us", 1, 0, 0, 10000, 0
|
||||
pin_output_mode_e hip9011CsPinMode;
|
||||
output_pin_e tachOutputPin;
|
||||
pin_output_mode_e tachOutputPinMode;
|
||||
|
@ -1411,7 +1411,7 @@ tChargeMode_e tChargeMode;
|
|||
uint16_t mc33_i_boost;;"mA", 1, 0, 1000, 25000, 0
|
||||
uint16_t mc33_i_peak;;"mA", 1, 0, 1000, 20000, 0
|
||||
uint16_t mc33_i_hold;;"mA", 1, 0, 1000, 20000, 0
|
||||
uint16_t mc33_t_max_boost;;"us", 1, 0, 0, 10000, 0
|
||||
uint16_t mc33_t_max_boost;Maximum allowed boost phase time. If the injector current doesn't reach the threshold before this time elapses, it is assumed that the injector is missing or has failed open circuit.;"us", 1, 0, 0, 10000, 0
|
||||
uint16_t mc33_t_peak_off;;"us", 1, 0, 0, 10000, 0
|
||||
uint16_t mc33_t_peak_tot;;"us", 1, 0, 0, 10000, 0
|
||||
uint16_t mc33_t_bypass;;"us", 1, 0, 0, 10000, 0
|
||||
|
|
|
@ -2321,15 +2321,16 @@ cmd_set_engine_type_default = "@@TS_IO_TEST_COMMAND_char@@\x00\x31\x00\x00"
|
|||
field = "Boost voltage", mc33_hvolt
|
||||
|
||||
field = "Boost current target", mc33_i_boost
|
||||
field = "Min boost time", mc33_t_min_boost
|
||||
field = "Max boost time (timeout)", mc33_t_max_boost
|
||||
field = "Boost -> Peak Bypass Time", mc33_t_peak_off
|
||||
|
||||
field = "Peak current target", mc33_i_peak
|
||||
field = "Peak time", mc33_t_peak_tot
|
||||
field = "Peak phase current target", mc33_i_peak
|
||||
field = "Peak phase duration", mc33_t_peak_tot
|
||||
field = "Peak phase loop off time", mc33_t_peak_off
|
||||
field = "Peak -> Hold Bypass Time", mc33_t_bypass
|
||||
|
||||
field = "Hold current target", mc33_i_hold
|
||||
field = "Hold off time", mc33_t_hold_off
|
||||
field = "Hold phase loop off time", mc33_t_hold_off
|
||||
field = "Maximum injection duration", mc33_t_hold_tot
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue