parent
1de32753e6
commit
71976df42f
|
@ -22,6 +22,8 @@
|
|||
|
||||
#define EFI_PWM_TESTER FALSE
|
||||
|
||||
#define EFI_MC33816 TRUE
|
||||
|
||||
#define HAL_USE_USB_MSD FALSE
|
||||
|
||||
#define EFI_ENABLE_CRITICAL_ENGINE_STOP TRUE
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
#undef EFI_HIP_9011
|
||||
#define EFI_HIP_9011 TRUE
|
||||
|
||||
#define EFI_MC33816 FALSE
|
||||
|
||||
#undef EFI_CJ125
|
||||
#define EFI_CJ125 TRUE
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu May 02 22:11:03 EDT 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri May 03 21:08:34 EDT 2019
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -2300,7 +2300,7 @@ typedef struct {
|
|||
/**
|
||||
* offset 3131
|
||||
*/
|
||||
uint8_t unusedTest55;
|
||||
brain_pin_e mc33816_cs;
|
||||
/**
|
||||
* Optional timing advance table for Cranking (see useSeparateAdvanceForCranking)
|
||||
* offset 3132
|
||||
|
@ -2456,7 +2456,11 @@ typedef struct {
|
|||
/**
|
||||
* offset 4025
|
||||
*/
|
||||
uint8_t unusedSpiPadding6[3];
|
||||
spi_device_e mc33816spiDevice;
|
||||
/**
|
||||
* offset 4026
|
||||
*/
|
||||
uint8_t unusedSpiPadding6[2];
|
||||
/**
|
||||
* offset 4028
|
||||
*/
|
||||
|
@ -2723,4 +2727,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu May 02 22:11:03 EDT 2019
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri May 03 21:08:34 EDT 2019
|
||||
|
|
|
@ -1402,6 +1402,10 @@
|
|||
#define max31855spiDevice_offset_hex 324
|
||||
#define maxKnockSubDeg_offset 552
|
||||
#define maxKnockSubDeg_offset_hex 228
|
||||
#define mc33816_cs_offset 3131
|
||||
#define mc33816_cs_offset_hex c3b
|
||||
#define mc33816spiDevice_offset 4025
|
||||
#define mc33816spiDevice_offset_hex fb9
|
||||
#define mc33972_cs_offset 678
|
||||
#define mc33972_cs_offset_hex 2a6
|
||||
#define mc33972_csPinMode_offset 679
|
||||
|
@ -1782,8 +1786,8 @@
|
|||
#define unusedSpiPadding4_offset_hex a39
|
||||
#define unusedSpiPadding5_offset 2737
|
||||
#define unusedSpiPadding5_offset_hex ab1
|
||||
#define unusedSpiPadding6_offset 4025
|
||||
#define unusedSpiPadding6_offset_hex fb9
|
||||
#define unusedSpiPadding6_offset 4026
|
||||
#define unusedSpiPadding6_offset_hex fba
|
||||
#define unusedSpiPadding7_offset 4029
|
||||
#define unusedSpiPadding7_offset_hex fbd
|
||||
#define unusedSpiPadding8_offset 4033
|
||||
|
@ -1792,8 +1796,6 @@
|
|||
#define unusedSpiPadding9_offset_hex 2a4
|
||||
#define unusedt_offset 583
|
||||
#define unusedt_offset_hex 247
|
||||
#define unusedTest55_offset 3131
|
||||
#define unusedTest55_offset_hex c3b
|
||||
#define unuseduartPadding1_offset 809
|
||||
#define unuseduartPadding1_offset_hex 329
|
||||
#define unuseSpi3_offset 2630
|
||||
|
|
|
@ -49,6 +49,9 @@
|
|||
#include "engine_configuration.h"
|
||||
#include "aux_pid.h"
|
||||
|
||||
#if EFI_MC33816
|
||||
#include "mc33816.h"
|
||||
#endif /* EFI_MC33816 */
|
||||
|
||||
#if EFI_SPEED_DENSITY
|
||||
#include "map_averaging.h"
|
||||
|
@ -481,6 +484,10 @@ void initHardware(Logging *l) {
|
|||
// output pins potentially depend on 'initSmartGpio'
|
||||
initOutputPins();
|
||||
|
||||
#if EFI_MC33816
|
||||
initMc33816();
|
||||
#endif /* EFI_MC33816 */
|
||||
|
||||
#if EFI_MAX_31855
|
||||
initMax31855(sharedLogger, CONFIGB(max31855spiDevice), CONFIGB(max31855_cs));
|
||||
#endif /* EFI_MAX_31855 */
|
||||
|
|
|
@ -23,6 +23,7 @@ HW_LAYER_EMS_CPP = $(HW_LAYER_EGT_CPP) \
|
|||
$(PROJECT_DIR)/hw_layer/pwm_generator.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/trigger_input.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/hip9011.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/mc33816.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/hip9011_logic.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/vehicle_speed.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/stepper.cpp \
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* @file mc33816.cpp
|
||||
*
|
||||
* The NXP MC33816 is a programmable gate driver IC for precision solenoid control applications.
|
||||
*
|
||||
* @date May 3, 2019
|
||||
* @author Andrey Belomutskiy, (c) 2012-2019
|
||||
*/
|
||||
|
||||
#include "efifeatures.h"
|
||||
#include "mc33816.h"
|
||||
|
||||
#if EFI_MC33816
|
||||
|
||||
static void showStats() {
|
||||
|
||||
}
|
||||
|
||||
static void sentByte(int param) {
|
||||
|
||||
}
|
||||
|
||||
void initMc33816() {
|
||||
if (engineConfiguration->mc33816_cs == GPIO_UNASSIGNED)
|
||||
return;
|
||||
|
||||
addConsoleAction("mc33_stats", showStats);
|
||||
|
||||
addConsoleActionI("mc33_send", sentByte);
|
||||
|
||||
}
|
||||
|
||||
#endif /* EFI_MC33816 */
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* @file mc33816.h
|
||||
*
|
||||
* @date May 3, 2019
|
||||
* @author Andrey Belomutskiy, (c) 2012-2019
|
||||
*/
|
||||
|
||||
#ifndef HW_LAYER_MC33816_H_
|
||||
#define HW_LAYER_MC33816_H_
|
||||
|
||||
void initMc33816();
|
||||
|
||||
#endif /* HW_LAYER_MC33816_H_ */
|
|
@ -976,7 +976,7 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300,
|
|||
brain_pin_e stepperEnablePin;
|
||||
brain_pin_e tle8888_cs;
|
||||
pin_output_mode_e tle8888_csPinMode;
|
||||
uint8_t[1] unusedTest55;
|
||||
brain_pin_e mc33816_cs;
|
||||
|
||||
float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvanceBins;Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"RPM", 1, 0, 0.0, 18000, 2
|
||||
float[CRANKING_ADVANCE_CURVE_SIZE] crankingAdvance ;Optional timing advance table for Cranking (see useSeparateAdvanceForCranking);"deg", 1, 0, -20, 90, 2
|
||||
|
@ -1026,7 +1026,8 @@ tChargeMode_e tChargeMode;
|
|||
float tpsAccelFractionDivisor;+A fraction divisor: 1 or less = entire portion at once, or split into diminishing fractions;"coef", 1, 0, 0, 100, 2
|
||||
|
||||
spi_device_e tle8888spiDevice;
|
||||
uint8_t[3] unusedSpiPadding6;
|
||||
spi_device_e mc33816spiDevice;
|
||||
uint8_t[2] unusedSpiPadding6;
|
||||
spi_device_e tle6240spiDevice;
|
||||
uint8_t[3] unusedSpiPadding7;
|
||||
spi_device_e mc33972spiDevice;
|
||||
|
|
|
@ -1531,6 +1531,8 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
field = "A/C Switch", acSwitchAdc
|
||||
|
||||
dialog = allPins1_1
|
||||
field = mc33816_cs, mc33816_cs
|
||||
field = mc33816spiDevice, mc33816spiDevice
|
||||
field = "Warning Led", warningLedPin
|
||||
field = "Fatal Error Led", fatalErrorPin
|
||||
field = "tle6240_cs", tle6240_cs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu May 02 22:11:03 EDT 2019
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri May 03 21:08:34 EDT 2019
|
||||
public class Fields {
|
||||
public static final int accelerometerSpiDevice_offset = 2736;
|
||||
public static final int acCutoffHighRpm_offset = 1498;
|
||||
|
@ -916,6 +916,8 @@ public class Fields {
|
|||
public static final int max31855spiDevice_offset_hex = 324;
|
||||
public static final int maxKnockSubDeg_offset = 552;
|
||||
public static final int maxKnockSubDeg_offset_hex = 228;
|
||||
public static final int mc33816_cs_offset = 3131;
|
||||
public static final int mc33816spiDevice_offset = 4025;
|
||||
public static final int mc33972_cs_offset = 678;
|
||||
public static final int mc33972_csPinMode_offset = 679;
|
||||
public static final int mc33972spiDevice_offset = 4032;
|
||||
|
@ -1145,13 +1147,12 @@ public class Fields {
|
|||
public static final int unusedSpiPadding3_offset = 2285;
|
||||
public static final int unusedSpiPadding4_offset = 2617;
|
||||
public static final int unusedSpiPadding5_offset = 2737;
|
||||
public static final int unusedSpiPadding6_offset = 4025;
|
||||
public static final int unusedSpiPadding6_offset = 4026;
|
||||
public static final int unusedSpiPadding7_offset = 4029;
|
||||
public static final int unusedSpiPadding8_offset = 4033;
|
||||
public static final int unusedSpiPadding9_offset = 676;
|
||||
public static final int unusedt_offset = 583;
|
||||
public static final int unusedt_offset_hex = 247;
|
||||
public static final int unusedTest55_offset = 3131;
|
||||
public static final int unuseduartPadding1_offset = 809;
|
||||
public static final int unuseduartPadding1_offset_hex = 329;
|
||||
public static final int unuseSpi3_offset = 2630;
|
||||
|
@ -1926,7 +1927,7 @@ public class Fields {
|
|||
public static final Field STEPPERENABLEPIN = Field.create("STEPPERENABLEPIN", 3128, FieldType.INT8, brain_pin_e);
|
||||
public static final Field TLE8888_CS = Field.create("TLE8888_CS", 3129, FieldType.INT8, brain_pin_e);
|
||||
public static final Field TLE8888_CSPINMODE = Field.create("TLE8888_CSPINMODE", 3130, FieldType.INT8, pin_output_mode_e);
|
||||
public static final Field UNUSEDTEST55 = Field.create("UNUSEDTEST55", 3131, FieldType.INT8);
|
||||
public static final Field MC33816_CS = Field.create("MC33816_CS", 3131, FieldType.INT8, brain_pin_e);
|
||||
public static final Field SERVOOUTPUTPINS1 = Field.create("SERVOOUTPUTPINS1", 3164, FieldType.INT8, brain_pin_e);
|
||||
public static final Field SERVOOUTPUTPINS2 = Field.create("SERVOOUTPUTPINS2", 3165, FieldType.INT8, brain_pin_e);
|
||||
public static final Field SERVOOUTPUTPINS3 = Field.create("SERVOOUTPUTPINS3", 3166, FieldType.INT8, brain_pin_e);
|
||||
|
@ -1970,6 +1971,7 @@ public class Fields {
|
|||
public static final Field TPSACCELFRACTIONPERIOD = Field.create("TPSACCELFRACTIONPERIOD", 4018, FieldType.INT16);
|
||||
public static final Field TPSACCELFRACTIONDIVISOR = Field.create("TPSACCELFRACTIONDIVISOR", 4020, FieldType.FLOAT);
|
||||
public static final Field TLE8888SPIDEVICE = Field.create("TLE8888SPIDEVICE", 4024, FieldType.INT8);
|
||||
public static final Field MC33816SPIDEVICE = Field.create("MC33816SPIDEVICE", 4025, FieldType.INT8);
|
||||
public static final Field TLE6240SPIDEVICE = Field.create("TLE6240SPIDEVICE", 4028, FieldType.INT8);
|
||||
public static final Field MC33972SPIDEVICE = Field.create("MC33972SPIDEVICE", 4032, FieldType.INT8);
|
||||
public static final Field FSIOFORMULAS1 = Field.create("FSIOFORMULAS1", 6672, FieldType.INT);
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#define EFI_CDM_INTEGRATION FALSE
|
||||
|
||||
#define EFI_MC33816 FALSE
|
||||
|
||||
#define EFI_BLUETOOTH_SETUP FALSE
|
||||
|
||||
#define EFI_GPIO_HARDWARE FALSE
|
||||
|
|
Loading…
Reference in New Issue