diff --git a/port/board/afc-v4/CMakeLists.txt b/port/board/afc-v4/CMakeLists.txt index 7d39769ad..cd1a30fef 100644 --- a/port/board/afc-v4/CMakeLists.txt +++ b/port/board/afc-v4/CMakeLists.txt @@ -19,8 +19,8 @@ set(TARGET_MODULES "EEPROM_AT24MAC" "LM75" "MAX6642" -# "INA3221_VOLTAGE" -# "INA3221_CURRENT" + "INA3221_VOLTAGE" + "INA3221_CURRENT" "UART_DEBUG" "MCP23016" "ADC" diff --git a/port/board/afc-v4/sdr_list.c b/port/board/afc-v4/sdr_list.c index 6c5b69abc..a59ed52f3 100644 --- a/port/board/afc-v4/sdr_list.c +++ b/port/board/afc-v4/sdr_list.c @@ -298,17 +298,17 @@ const SDR_type_01h_t SDR_FMC1_VADJ = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ -// .nominal_reading = 39, /* Nominal reading */ -// .normal_max = 47, /* Normal maximum */ -// .normal_min = 0, /* Normal minimum */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 51, /* Upper non-recoverable Threshold */ -// .upper_critical_thr = 46, /* Upper critical Threshold */ -// .upper_noncritical_thr = 43, /* Upper non critical Threshold */ -// .lower_nonrecover_thr = 28, /* Lower non-recoverable Threshold */ -// .lower_critical_thr = 32, /* Lower critical Threshold */ -// .lower_noncritical_thr = 36, /* Lower non-critical Threshold */ + .nominal_reading = (2500 >> 6), /* Nominal reading */ + .normal_max = (3400 >> 6), /* Normal maximum */ + .normal_min = (1700 >> 6), /* Normal minimum */ + .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ + .sensor_min_reading = 0x00, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (3700 >> 6), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3600 >> 6), /* Upper critical Threshold */ + .upper_noncritical_thr = (3500 >> 6), /* Upper non critical Threshold */ + .lower_nonrecover_thr = (1500 >> 6), /* Lower non-recoverable Threshold */ + .lower_critical_thr = (1600 >> 6), /* Lower critical Threshold */ + .lower_noncritical_thr = (1700 >> 6), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 1, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 1, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -344,6 +344,7 @@ const SDR_type_01h_t SDR_FMC1_P3V3 = { .sensor_units_1 = 0x00, /* sensor units 1 :*/ .sensor_units_2 = 0x04, /* sensor units 2 :*/ .sensor_units_3 = 0x00, /* sensor units 3 :*/ + .linearization = 0x00, /* Linearization */ .M = 64, /* M */ .M_tol = 0x00, /* M - Tolerance */ .B = 0x00, /* B */ @@ -351,17 +352,17 @@ const SDR_type_01h_t SDR_FMC1_P3V3 = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ -// .nominal_reading = 52, /* Nominal reading */ -// .normal_max = 59, /* Normal maximum */ -// .normal_min = 45, /* Normal minimum */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 62, /* Upper non-recoverable Threshold */ -// .upper_critical_thr = 59, /* Upper critical Threshold */ -// .upper_noncritical_thr = 55, /* Upper non critical Threshold */ -// .lower_nonrecover_thr = 42, /* Lower non-recoverable Threshold */ -// .lower_critical_thr = 45, /* Lower critical Threshold */ -// .lower_noncritical_thr = 48, /* Lower non-critical Threshold */ + .nominal_reading = (3300 >> 6), /* Nominal reading */ + .normal_max = (3500 >> 6), /* Normal maximum */ + .normal_min = (3000 >> 6), /* Normal minimum */ + .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ + .sensor_min_reading = 0x00, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (3700 >> 6), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3600 >> 6), /* Upper critical Threshold */ + .upper_noncritical_thr = (3550 >> 6), /* Upper non critical Threshold */ + .lower_nonrecover_thr = (2800 >> 6), /* Lower non-recoverable Threshold */ + .lower_critical_thr = (2900 >> 6), /* Lower critical Threshold */ + .lower_noncritical_thr = (2950 >> 6), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -459,17 +460,17 @@ const SDR_type_01h_t SDR_FMC2_VADJ = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ -// .nominal_reading = 39, /* Nominal reading */ -// .normal_max = 47, /* Normal maximum */ -// .normal_min = 0, /* Normal minimum */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 51, /* Upper non-recoverable Threshold */ -// .upper_critical_thr = 46, /* Upper critical Threshold */ -// .upper_noncritical_thr = 43, /* Upper non critical Threshold */ -// .lower_nonrecover_thr = 28, /* Lower non-recoverable Threshold */ -// .lower_critical_thr = 32, /* Lower critical Threshold */ -// .lower_noncritical_thr = 36, /* Lower non-critical Threshold */ + .nominal_reading = (2500 >> 6), /* Nominal reading */ + .normal_max = (3400 >> 6), /* Normal maximum */ + .normal_min = (1700 >> 6), /* Normal minimum */ + .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ + .sensor_min_reading = 0x00, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (3700 >> 6), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3600 >> 6), /* Upper critical Threshold */ + .upper_noncritical_thr = (3500 >> 6), /* Upper non critical Threshold */ + .lower_nonrecover_thr = (1500 >> 6), /* Lower non-recoverable Threshold */ + .lower_critical_thr = (1600 >> 6), /* Lower critical Threshold */ + .lower_noncritical_thr = (1700 >> 6), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 1, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 1, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -514,17 +515,17 @@ const SDR_type_01h_t SDR_FMC2_P3V3 = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ -// .nominal_reading = 52, /* Nominal reading */ -// .normal_max = 59, /* Normal maximum */ -// .normal_min = 45, /* Normal minimum */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 62, /* Upper non-recoverable Threshold */ -// .upper_critical_thr = 59, /* Upper critical Threshold */ -// .upper_noncritical_thr = 55, /* Upper non critical Threshold */ -// .lower_nonrecover_thr = 42, /* Lower non-recoverable Threshold */ -// .lower_critical_thr = 45, /* Lower critical Threshold */ -// .lower_noncritical_thr = 48, /* Lower non-critical Threshold */ + .nominal_reading = (3300 >> 6), /* Nominal reading */ + .normal_max = (3500 >> 6), /* Normal maximum */ + .normal_min = (3000 >> 6), /* Normal minimum */ + .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ + .sensor_min_reading = 0x00, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (3700 >> 6), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3600 >> 6), /* Upper critical Threshold */ + .upper_noncritical_thr = (3550 >> 6), /* Upper non critical Threshold */ + .lower_nonrecover_thr = (2800 >> 6), /* Lower non-recoverable Threshold */ + .lower_critical_thr = (2900 >> 6), /* Lower critical Threshold */ + .lower_noncritical_thr = (2950 >> 6), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -572,17 +573,17 @@ const SDR_type_01h_t SDR_AMC_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ - .nominal_reading = 62, /* Nominal reading [mA] */ - .normal_max = 100, /* Normal maximum */ + .nominal_reading = 2000 >> 5, /* Nominal reading */ + .normal_max = 3000 >> 5, /* Normal maximum */ .normal_min = 0, /* Normal minimum */ - .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ - .sensor_min_reading = 0x00, /* Sensor Minimum reading */ - .upper_nonrecover_thr = 127, /* Upper non-recoverable Threshold - 4A */ - .upper_critical_thr = 127, /* Upper critical Threshold - 3.5A */ - .upper_noncritical_thr = 127, /* Upper non critical Threshold - 3A */ - .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ - .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ - .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.5A */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (4000 >> 5), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3500 >> 5), /* Upper critical Threshold */ + .upper_noncritical_thr = (3000 >> 5), /* Upper non critical Threshold */ + .lower_nonrecover_thr = - (200 >> 5), /* Lower non-recoverable Threshold */ + .lower_critical_thr = - (150 >> 5), /* Lower critical Threshold */ + .lower_noncritical_thr = - (100 >> 5), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -627,17 +628,17 @@ const SDR_type_01h_t SDR_RTM_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ -// .nominal_reading = 32, /* Nominal reading = 1A */ -// .normal_max = 125, /* Normal maximum */ -// .normal_min = 0, /* Normal minimum */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ -// .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ -// .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ -// .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ -// .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ -// .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.5A */ + .nominal_reading = (2000 >> 5), /* Nominal reading */ + .normal_max = (3000 >> 5), /* Normal maximum */ + .normal_min = 0, /* Normal minimum */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (4000 >> 5), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3500 >> 5), /* Upper critical Threshold */ + .upper_noncritical_thr = (3000 >> 5), /* Upper non critical Threshold */ + .lower_nonrecover_thr = - (200 >> 5), /* Lower non-recoverable Threshold */ + .lower_critical_thr = - (150 >> 5), /* Lower critical Threshold */ + .lower_noncritical_thr = - (100 >> 5), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -682,17 +683,17 @@ const SDR_type_01h_t SDR_FMC1_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ -// .nominal_reading = 32, /* Nominal reading = 1A */ -// .normal_max = 125, /* Normal maximum */ -// .normal_min = 0, /* Normal minimum */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ -// .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ -// .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ -// .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ -// .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ -// .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.5A */ + .nominal_reading = (1000 >> 5), /* Nominal reading */ + .normal_max = (3000 >> 5), /* Normal maximum */ + .normal_min = 0, /* Normal minimum */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (4000 >> 5), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3500 >> 5), /* Upper critical Threshold */ + .upper_noncritical_thr = (3000 >> 5), /* Upper non critical Threshold */ + .lower_nonrecover_thr = - (200 >> 5), /* Lower non-recoverable Threshold */ + .lower_critical_thr = - (150 >> 5), /* Lower critical Threshold */ + .lower_noncritical_thr = - (100 >> 5), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -736,17 +737,17 @@ const SDR_type_01h_t SDR_FMC1_VADJ_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ -// .nominal_reading = 39, /* Nominal reading - 1.24A */ -// .normal_max = 47, /* Normal maximum - 1.5A*/ -// .normal_min = 0, /* Normal minimum - 0A */ -// .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x80, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ -// .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ -// .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ -// .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.32A */ -// .lower_critical_thr = -10, /* Lower critical Threshold - 0A */ -// .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.16A */ + .nominal_reading = 1000 >> 5, /* Nominal reading */ + .normal_max = 1500 >> 5, /* Normal maximum */ + .normal_min = 0, /* Normal minimum - 0A */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (2000 >> 5), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (1700 >> 5), /* Upper critical Threshold */ + .upper_noncritical_thr = (1500 >> 5), /* Upper non critical Threshold */ + .lower_nonrecover_thr = - (200 >> 5), /* Lower non-recoverable Threshold */ + .lower_critical_thr = - (150 >> 5), /* Lower critical Threshold */ + .lower_noncritical_thr = - (100 >> 5), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -789,17 +790,17 @@ const SDR_type_01h_t SDR_FMC1_P3V3_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ -// .nominal_reading = 85, /* Nominal reading */ -// .normal_max = 94, /* Normal maximum - 3A */ -// .normal_min = 32, /* Normal minimum - 1A */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ -// .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ -// .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ -// .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ -// .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ -// .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 1A */ + .nominal_reading = (1500 >> 5), /* Nominal reading */ + .normal_max = (3000 >> 5), /* Normal maximum */ + .normal_min = 0, /* Normal minimum */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (4000 >> 5), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3500 >> 5), /* Upper critical Threshold */ + .upper_noncritical_thr = (3000 >> 5), /* Upper non critical Threshold */ + .lower_nonrecover_thr = - (200 >> 5), /* Lower non-recoverable Threshold */ + .lower_critical_thr = - (150 >> 5), /* Lower critical Threshold */ + .lower_noncritical_thr = - (100 >> 5), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -843,17 +844,17 @@ const SDR_type_01h_t SDR_FMC2_12V_CURR = { .acc_exp_sensor_dir = 0x02, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp = -3 , B-Exp = 0 */ .analog_flags = 0x03, /* Analogue characteristics flags */ -// .nominal_reading = 32, /* Nominal reading = 1A */ -// .normal_max = 125, /* Normal maximum */ -// .normal_min = 0, /* Normal minimum */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ -// .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ -// .upper_noncritical_thr = 95, /* Upper non critical Threshold - 3A */ -// .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ -// .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ -// .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.5A */ + .nominal_reading = (1000 >> 5), /* Nominal reading */ + .normal_max = (3000 >> 5), /* Normal maximum */ + .normal_min = 0, /* Normal minimum */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (4000 >> 5), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3500 >> 5), /* Upper critical Threshold */ + .upper_noncritical_thr = (3000 >> 5), /* Upper non critical Threshold */ + .lower_nonrecover_thr = - (200 >> 5), /* Lower non-recoverable Threshold */ + .lower_critical_thr = - (150 >> 5), /* Lower critical Threshold */ + .lower_noncritical_thr = - (100 >> 5), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -897,17 +898,17 @@ const SDR_type_01h_t SDR_FMC2_VADJ_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ -// .nominal_reading = 39, /* Nominal reading - 1.24A */ -// .normal_max = 47, /* Normal maximum - 1.5A*/ -// .normal_min = 0, /* Normal minimum - 0A */ -// .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x80, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ -// .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ -// .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ -// .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.32A */ -// .lower_critical_thr = -10, /* Lower critical Threshold - 0A */ -// .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 0.16A */ + .nominal_reading = 1000 >> 5, /* Nominal reading */ + .normal_max = 1500 >> 5, /* Normal maximum */ + .normal_min = 0, /* Normal minimum - 0A */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (2000 >> 5), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (1700 >> 5), /* Upper critical Threshold */ + .upper_noncritical_thr = (1500 >> 5), /* Upper non critical Threshold */ + .lower_nonrecover_thr = - (200 >> 5), /* Lower non-recoverable Threshold */ + .lower_critical_thr = - (150 >> 5), /* Lower critical Threshold */ + .lower_noncritical_thr = - (100 >> 5), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */ @@ -950,17 +951,17 @@ const SDR_type_01h_t SDR_FMC2_P3V3_CURR = { .acc_exp_sensor_dir = 0x00, /* Sensor direction */ .Rexp_Bexp = 0xD0, /* R-Exp , B-Exp */ .analog_flags = 0x00, /* Analogue characteristics flags */ -// .nominal_reading = 85, /* Nominal reading */ -// .normal_max = 94, /* Normal maximum - 3A */ -// .normal_min = 32, /* Normal minimum - 1A */ -// .sensor_max_reading = 0xFF, /* Sensor Maximum reading */ -// .sensor_min_reading = 0x00, /* Sensor Minimum reading */ -// .upper_nonrecover_thr = 125, /* Upper non-recoverable Threshold - 4A */ -// .upper_critical_thr = 110, /* Upper critical Threshold - 3.5A */ -// .upper_noncritical_thr = 94, /* Upper non critical Threshold - 3A */ -// .lower_nonrecover_thr = -15, /* Lower non-recoverable Threshold - -0.1A */ -// .lower_critical_thr = -10, /* Lower critical Threshold - 0.32A */ -// .lower_noncritical_thr = -5, /* Lower non-critical Threshold - 1A */ + .nominal_reading = (1500 >> 5), /* Nominal reading */ + .normal_max = (3000 >> 5), /* Normal maximum */ + .normal_min = 0, /* Normal minimum */ + .sensor_max_reading = 0x7F, /* Sensor Maximum reading */ + .sensor_min_reading = 0x80, /* Sensor Minimum reading */ + .upper_nonrecover_thr = (4000 >> 5), /* Upper non-recoverable Threshold */ + .upper_critical_thr = (3500 >> 5), /* Upper critical Threshold */ + .upper_noncritical_thr = (3000 >> 5), /* Upper non critical Threshold */ + .lower_nonrecover_thr = - (200 >> 5), /* Lower non-recoverable Threshold */ + .lower_critical_thr = - (150 >> 5), /* Lower critical Threshold */ + .lower_noncritical_thr = - (100 >> 5), /* Lower non-critical Threshold */ .pos_thr_hysteresis = 2, /* positive going Threshold hysteresis value */ .neg_thr_hysteresis = 2, /* negative going Threshold hysteresis value */ .reserved1 = 0x00, /* reserved */