Compare commits
2
Commits
f1f6b44d99
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2ae132c69 | ||
|
|
7eee5f7881 |
+68
-67
@@ -96,11 +96,11 @@ RPU_TESTS = [
|
|||||||
('Cutoff_voltage_Q128', 50, 'uint16', 0, 8320, None, 8321),
|
('Cutoff_voltage_Q128', 50, 'uint16', 0, 8320, None, 8321),
|
||||||
('OVP_setting_Q128', 11, 'uint16', 0, 8320, None, 8321),
|
('OVP_setting_Q128', 11, 'uint16', 0, 8320, None, 8321),
|
||||||
('Cutoff_over_current_Q128', 10, 'uint16', 0, 4480, None, 4481),
|
('Cutoff_over_current_Q128', 10, 'uint16', 0, 4480, None, 4481),
|
||||||
('Cutoff_minimum_current_Q128', 51, 'uint16', 0, 640, None, 641),
|
('Cutoff_minimum_current_Q128', 51, 'uint16', 0, 1280, None, 1281),
|
||||||
|
|
||||||
# ----- Precharge / CV current -----
|
# ----- Precharge / CV current -----
|
||||||
('Precharge_current', 6, 'int16', 0, 1280, -1, 1281),
|
('Precharge_current', 6, 'int16', 0, 1280, -1, 1281),
|
||||||
('CV_current_limit', 7, 'int16', 0, 1280, -1, 1281),
|
('CV_current_limit', 7, 'int16', 0, 3840, -1, 3841),
|
||||||
|
|
||||||
# ----- SR control -----
|
# ----- SR control -----
|
||||||
('SR_limit_lo', 16, 'uint16', 0, 1280, None, 1281),
|
('SR_limit_lo', 16, 'uint16', 0, 1280, None, 1281),
|
||||||
@@ -127,28 +127,31 @@ RPU_TESTS = [
|
|||||||
('RSSI_auto_threshold', 105, 'int16', -120, 0, -121, 1),
|
('RSSI_auto_threshold', 105, 'int16', -120, 0, -121, 1),
|
||||||
('RSSI_max_voltage_Q128', 106, 'uint16', 0, 8320, None, 8321),
|
('RSSI_max_voltage_Q128', 106, 'uint16', 0, 8320, None, 8321),
|
||||||
|
|
||||||
# ----- Temperature thresholds — dev -----
|
# ----- Temperature thresholds — dev (MOS) -----
|
||||||
('Dev_temp_thres_stage_1', 42, 'int16', -40, 150, -41, 151),
|
# MODBUS_LIMIT_TEMP_THRES_MIN=0, MODBUS_LIMIT_MOS_TEMP_THRES_MAX=120
|
||||||
('Dev_temp_thres_stage_2', 43, 'int16', -40, 150, -41, 151),
|
('Dev_temp_thres_stage_1', 42, 'int16', 0, 120, -1, 121),
|
||||||
('Dev_temp_thres_stage_3', 44, 'int16', -40, 150, -41, 151),
|
('Dev_temp_thres_stage_2', 43, 'int16', 0, 120, -1, 121),
|
||||||
|
('Dev_temp_thres_stage_3', 44, 'int16', 0, 120, -1, 121),
|
||||||
|
|
||||||
# ----- Temperature thresholds — coil -----
|
# ----- Temperature thresholds — coil -----
|
||||||
('Coil_temp_thres_stage_1', 107, 'int16', -40, 150, -41, 151),
|
# MODBUS_LIMIT_COIL_TEMP_THRES_MAX=110
|
||||||
('Coil_temp_thres_stage_2', 108, 'int16', -40, 150, -41, 151),
|
('Coil_temp_thres_stage_1', 107, 'int16', 0, 110, -1, 111),
|
||||||
('Coil_temp_thres_stage_3', 109, 'int16', -40, 150, -41, 151),
|
('Coil_temp_thres_stage_2', 108, 'int16', 0, 110, -1, 111),
|
||||||
|
('Coil_temp_thres_stage_3', 109, 'int16', 0, 110, -1, 111),
|
||||||
|
|
||||||
# ----- Temperature thresholds — MCU -----
|
# ----- Temperature thresholds — MCU -----
|
||||||
('MCU_temp_thres_stage_1', 92, 'int16', -40, 150, -41, 151),
|
# MODBUS_LIMIT_MCU_TEMP_THRES_MAX=125
|
||||||
('MCU_temp_thres_stage_2', 93, 'int16', -40, 150, -41, 151),
|
('MCU_temp_thres_stage_1', 92, 'int16', 0, 125, -1, 126),
|
||||||
('MCU_temp_thres_stage_3', 94, 'int16', -40, 150, -41, 151),
|
('MCU_temp_thres_stage_2', 93, 'int16', 0, 125, -1, 126),
|
||||||
|
('MCU_temp_thres_stage_3', 94, 'int16', 0, 125, -1, 126),
|
||||||
|
|
||||||
# ----- Current derating (%) -----
|
# ----- Current derating (%) -----
|
||||||
('Current_derating_1', 45, 'uint16', 0, 50, None, 51),
|
('Current_derating_1', 45, 'uint16', 0, 50, None, 51),
|
||||||
('Current_derating_2', 46, 'uint16', 0, 50, None, 51),
|
('Current_derating_2', 46, 'uint16', 0, 50, None, 51),
|
||||||
|
|
||||||
# ----- Ramp control -----
|
# ----- Ramp control -----
|
||||||
('Ramp_control_mA_per_sec', 111, 'uint16', 0, 50000, None, 50001),
|
('Ramp_control_mA_per_sec', 111, 'uint16', 0, 20000, None, 20001),
|
||||||
('Ramp_slow_mA_per_sec', 136, 'uint16', 0, 50000, None, 50001),
|
('Ramp_slow_mA_per_sec', 136, 'uint16', 0, 20000, None, 20001),
|
||||||
('Ramp_current_dV', 137, 'uint16', 0, 1280, None, 1281),
|
('Ramp_current_dV', 137, 'uint16', 0, 1280, None, 1281),
|
||||||
|
|
||||||
# ----- Discovery / height -----
|
# ----- Discovery / height -----
|
||||||
@@ -167,12 +170,10 @@ RPU_TESTS = [
|
|||||||
# Written via FC16 (write multiple registers).
|
# Written via FC16 (write multiple registers).
|
||||||
#
|
#
|
||||||
# Calibration gain (A): limits = [nominal × 0.9, nominal × 1.1]
|
# Calibration gain (A): limits = [nominal × 0.9, nominal × 1.1]
|
||||||
# Calibration offset (B) with positive nominal: limits = [nominal × 0.8, nominal × 1.2]
|
# Calibration offset (B): limits = [nominal − delta, nominal + delta]
|
||||||
# Calibration offset (B) with negative nominal: limits are inverted in firmware
|
# PFC/INV current: delta = 5.0
|
||||||
# (lo_limit = nominal×0.8, up_limit = nominal×1.2 where lo > up numerically).
|
# DC bus voltage, AC in voltage, coil voltage: delta = 10.0
|
||||||
# min_val = lo_limit (expected clamp when src too negative),
|
# PFC current rms: delta = 5.0 (nominal = 0.0 → limits = [−5.0, 5.0])
|
||||||
# max_val = up_limit (expected clamp when src too positive/less negative).
|
|
||||||
# PFC_current_rms_cali_B excluded (nominal = 0.0).
|
|
||||||
|
|
||||||
TPU_TESTS = [
|
TPU_TESTS = [
|
||||||
# ----- PFC power (uint16) -----
|
# ----- PFC power (uint16) -----
|
||||||
@@ -188,20 +189,21 @@ TPU_TESTS = [
|
|||||||
# ----- Fan control (uint16 / int16) -----
|
# ----- Fan control (uint16 / int16) -----
|
||||||
('Fan_mode', 69, 'uint16', 0, 255, None, 256),
|
('Fan_mode', 69, 'uint16', 0, 255, None, 256),
|
||||||
('Fan_duty_set', 70, 'uint16', 0, 100, None, 101),
|
('Fan_duty_set', 70, 'uint16', 0, 100, None, 101),
|
||||||
('Fan_temp_lo', 71, 'int16', -40, 80, -41, 81),
|
('Fan_temp_lo', 71, 'int16', 0, 80, -1, 81),
|
||||||
('Fan_temp_hi', 72, 'int16', -40, 80, -41, 81),
|
('Fan_temp_hi', 72, 'int16', 0, 80, -1, 81),
|
||||||
|
|
||||||
# ----- Moving-away detection (uint16) -----
|
# ----- Moving-away detection (uint16) -----
|
||||||
('Moving_away_time_ms', 3, 'uint16', 50, 500, 49, 501),
|
('Moving_away_time_ms', 3, 'uint16', 50, 1000, 49, 1001),
|
||||||
('Move_away_iout_thres', 84, 'uint16', 0, 50, None, 51),
|
('Move_away_iout_thres', 84, 'uint16', 0, 100, None, 101),
|
||||||
|
|
||||||
# ----- OVP (uint16) -----
|
# ----- OVP (uint16) -----
|
||||||
('OVP_iinv_pk_threshold', 75, 'uint16', 0, 50, None, 51),
|
('OVP_iinv_pk_threshold', 75, 'uint16', 0, 100, None, 101),
|
||||||
('OVP_phase_threshold', 76, 'uint16', 0, 500, None, 501),
|
('OVP_phase_threshold', 76, 'uint16', 0, 500, None, 501),
|
||||||
('OVP_count_threshold', 77, 'uint16', 0, 10, None, 11),
|
('OVP_count_threshold', 77, 'uint16', 0, 10, None, 11),
|
||||||
|
|
||||||
# ----- Phase command min (uint16) -----
|
# ----- Phase command / force charging phase (uint16) -----
|
||||||
('Phase_cmd_min', 101, 'uint16', 0, 750, None, 751),
|
('Phase_cmd_min', 101, 'uint16', 0, 750, None, 751),
|
||||||
|
('Force_charging_phase_max', 100, 'uint16', 0, 750, None, 751),
|
||||||
|
|
||||||
# ----- No-batt coupling ramp (uint16) -----
|
# ----- No-batt coupling ramp (uint16) -----
|
||||||
('No_batt_coupling_ramp_phase', 109, 'uint16', 0, 300, None, 301),
|
('No_batt_coupling_ramp_phase', 109, 'uint16', 0, 300, None, 301),
|
||||||
@@ -215,24 +217,25 @@ TPU_TESTS = [
|
|||||||
('Current_derating_2', 108, 'uint16', 0, 50, None, 51),
|
('Current_derating_2', 108, 'uint16', 0, 50, None, 51),
|
||||||
|
|
||||||
# ----- INV temperature thresholds (int16) -----
|
# ----- INV temperature thresholds (int16) -----
|
||||||
('INV_temp_thres_1', 60, 'int16', -40, 150, -41, 151),
|
# MODBUS_LIMIT_TEMP_THRES_MIN=0, MODBUS_LIMIT_TEMP_THRES_MAX=110
|
||||||
('INV_temp_thres_2', 61, 'int16', -40, 150, -41, 151),
|
('INV_temp_thres_1', 60, 'int16', 0, 110, -1, 111),
|
||||||
('INV_temp_thres_3', 62, 'int16', -40, 150, -41, 151),
|
('INV_temp_thres_2', 61, 'int16', 0, 110, -1, 111),
|
||||||
|
('INV_temp_thres_3', 62, 'int16', 0, 110, -1, 111),
|
||||||
|
|
||||||
# ----- PFC temperature thresholds (int16) -----
|
# ----- PFC temperature thresholds (int16) -----
|
||||||
('PFC_temp_thres_1', 63, 'int16', -40, 150, -41, 151),
|
('PFC_temp_thres_1', 63, 'int16', 0, 110, -1, 111),
|
||||||
('PFC_temp_thres_2', 64, 'int16', -40, 150, -41, 151),
|
('PFC_temp_thres_2', 64, 'int16', 0, 110, -1, 111),
|
||||||
('PFC_temp_thres_3', 65, 'int16', -40, 150, -41, 151),
|
('PFC_temp_thres_3', 65, 'int16', 0, 110, -1, 111),
|
||||||
|
|
||||||
# ----- Coil temperature thresholds (int16) -----
|
# ----- Coil temperature thresholds (int16) -----
|
||||||
('Coil_temp_thres_1', 66, 'int16', -40, 150, -41, 151),
|
('Coil_temp_thres_1', 66, 'int16', 0, 110, -1, 111),
|
||||||
('Coil_temp_thres_2', 67, 'int16', -40, 150, -41, 151),
|
('Coil_temp_thres_2', 67, 'int16', 0, 110, -1, 111),
|
||||||
('Coil_temp_thres_3', 68, 'int16', -40, 150, -41, 151),
|
('Coil_temp_thres_3', 68, 'int16', 0, 110, -1, 111),
|
||||||
|
|
||||||
# ----- MCU temperature thresholds (int16) -----
|
# ----- MCU temperature thresholds (int16) -----
|
||||||
('MCU_temp_thres_1', 104, 'int16', -40, 150, -41, 151),
|
('MCU_temp_thres_1', 104, 'int16', 0, 110, -1, 111),
|
||||||
('MCU_temp_thres_2', 105, 'int16', -40, 150, -41, 151),
|
('MCU_temp_thres_2', 105, 'int16', 0, 110, -1, 111),
|
||||||
('MCU_temp_thres_3', 106, 'int16', -40, 150, -41, 151),
|
('MCU_temp_thres_3', 106, 'int16', 0, 110, -1, 111),
|
||||||
|
|
||||||
# ----- Coupling estimation frequencies (float32) -----
|
# ----- Coupling estimation frequencies (float32) -----
|
||||||
# INV_FREQ_MIN = 60.0 Hz, INV_FREQ_MAX = 150.0 Hz (app_inv.h)
|
# INV_FREQ_MIN = 60.0 Hz, INV_FREQ_MAX = 150.0 Hz (app_inv.h)
|
||||||
@@ -245,25 +248,27 @@ TPU_TESTS = [
|
|||||||
('INV_freq_set', 28, 'float32', 60.0, 150.0, 59.0, 151.0),
|
('INV_freq_set', 28, 'float32', 60.0, 150.0, 59.0, 151.0),
|
||||||
('INV_freq_min', 30, 'float32', 60.0, 150.0, 59.0, 151.0),
|
('INV_freq_min', 30, 'float32', 60.0, 150.0, 59.0, 151.0),
|
||||||
('INV_freq_max', 32, 'float32', 60.0, 150.0, 59.0, 151.0),
|
('INV_freq_max', 32, 'float32', 60.0, 150.0, 59.0, 151.0),
|
||||||
('INV_current_limit', 34, 'float32', 0.0, 40.0, -1.0, 41.0),
|
('INV_current_limit', 34, 'float32', 0.0, 50.0, -1.0, 51.0),
|
||||||
|
|
||||||
# ----- PFC voltage / current (float32) -----
|
# ----- PFC voltage / current (float32) -----
|
||||||
# MODBUS_LIMIT_PFC_DC_BUS_VOLTAGE_MAX_CEIL = 450.0, PFC_CURRENT_MAX_CEIL = 40.0
|
# MODBUS_LIMIT_PFC_DC_BUS_VOLTAGE_MAX_CEIL = 425.0
|
||||||
('PFC_vdc_ref', 40, 'float32', 0.0, 450.0, -1.0, 451.0),
|
# MODBUS_LIMIT_PFC_CURRENT_LIMIT_CEIL = 25.0, MODBUS_LIMIT_PFC_CURRENT_MAX_CEIL = 40.0
|
||||||
('PFC_voltage_limit', 42, 'float32', 0.0, 450.0, -1.0, 451.0),
|
('PFC_vdc_ref', 40, 'float32', 0.0, 425.0, -1.0, 426.0),
|
||||||
('PFC_current_limit', 44, 'float32', 0.0, 40.0, -1.0, 41.0),
|
('PFC_voltage_limit', 42, 'float32', 0.0, 425.0, -1.0, 426.0),
|
||||||
|
('PFC_current_limit', 44, 'float32', 0.0, 25.0, -1.0, 26.0),
|
||||||
|
|
||||||
# ----- Protection current / voltage limits (float32) -----
|
# ----- Protection current / voltage limits (float32) -----
|
||||||
('PFC_current_max', 48, 'float32', 0.0, 40.0, -1.0, 41.0),
|
('PFC_current_max', 48, 'float32', 0.0, 40.0, -1.0, 41.0),
|
||||||
('INV_current_max', 50, 'float32', 0.0, 40.0, -1.0, 41.0),
|
('INV_current_max', 50, 'float32', 0.0, 50.0, -1.0, 51.0),
|
||||||
('INV_current_min', 170, 'float32', 0.0, 40.0, -1.0, 41.0),
|
('INV_current_min', 170, 'float32', 0.0, 50.0, -1.0, 51.0),
|
||||||
('DC_bus_voltage_min', 52, 'float32', 0.0, 450.0, -1.0, 451.0),
|
('DC_bus_voltage_min', 52, 'float32', 0.0, 425.0, -1.0, 426.0),
|
||||||
('DC_bus_voltage_max', 54, 'float32', 0.0, 450.0, -1.0, 451.0),
|
('DC_bus_voltage_max', 54, 'float32', 0.0, 425.0, -1.0, 426.0),
|
||||||
# MODBUS_LIMIT_AC_IN_VOLTAGE_MAX_CEIL = 400.0
|
# MODBUS_LIMIT_AC_IN_VOLTAGE_MAX_CEIL = 320.0
|
||||||
('AC_in_voltage_min', 56, 'float32', 0.0, 400.0, -1.0, 401.0),
|
('AC_in_voltage_min', 56, 'float32', 0.0, 320.0, -1.0, 321.0),
|
||||||
('AC_in_voltage_max', 58, 'float32', 0.0, 400.0, -1.0, 401.0),
|
('AC_in_voltage_max', 58, 'float32', 0.0, 320.0, -1.0, 321.0),
|
||||||
|
|
||||||
# ----- No-batt coupling INV current (float32) -----
|
# ----- No-batt coupling INV current (float32) -----
|
||||||
|
# MODBUS_LIMIT_NO_BATT_COUPLING_INV_CURRENT_MAX = 40.0 (unchanged)
|
||||||
('No_batt_coupling_inv_current', 168, 'float32', 0.0, 40.0, -1.0, 41.0),
|
('No_batt_coupling_inv_current', 168, 'float32', 0.0, 40.0, -1.0, 41.0),
|
||||||
|
|
||||||
# ----- ADC calibration gain (A) registers (float32) -----
|
# ----- ADC calibration gain (A) registers (float32) -----
|
||||||
@@ -283,24 +288,20 @@ TPU_TESTS = [
|
|||||||
('PFC_current_rms_cali_A', 110, 'float32', 0.9, 1.1, 0.85, 1.15),
|
('PFC_current_rms_cali_A', 110, 'float32', 0.9, 1.1, 0.85, 1.15),
|
||||||
|
|
||||||
# ----- ADC calibration offset (B) registers (float32) -----
|
# ----- ADC calibration offset (B) registers (float32) -----
|
||||||
# Limits = [nominal × 0.8, nominal × 1.2]
|
# Limits = [nominal − delta, nominal + delta]
|
||||||
# Nominal values from global_variables.h:
|
# Nominal values from global_variables.h:
|
||||||
# ANA_PFC_CURRENT_OFFSET = -0.469129801 (negative → inverted range in firmware)
|
# ANA_PFC_CURRENT_OFFSET = -0.469129801 delta=5.0 → [-5.469130, 4.530870]
|
||||||
# ANA_INV_CURRENT_OFFSET = -51.38759228 (negative → inverted range in firmware)
|
# ANA_INV_CURRENT_OFFSET = -51.38759228 delta=5.0 → [-56.387592, -46.387592]
|
||||||
# ANA_DC_BUS_VOLTAGE_OFFSET = 0.391120149 (positive)
|
# ANA_DC_BUS_VOLTAGE_OFFSET = 0.391120149 delta=10.0 → [-9.608880, 10.391120]
|
||||||
# ANA_AC_IN_VOLTAGE_OFFSET = 0.639814597 (positive)
|
# ANA_AC_IN_VOLTAGE_OFFSET = 0.639814597 delta=10.0 → [-9.360185, 10.639815]
|
||||||
# ANA_COIL_VOLTAGE_OFFSET = -7.280746292 (negative → inverted range in firmware)
|
# ANA_COIL_VOLTAGE_OFFSET = -7.280746292 delta=10.0 → [-17.280746, 2.719254]
|
||||||
# ANA_PFC_CURRENT_RMS_OFFSET = 0.0 (excluded: trivial limits)
|
# ANA_PFC_CURRENT_RMS_OFFSET = 0.0 delta=5.0 → [-5.0, 5.0]
|
||||||
#
|
('PFC_current_cali_B', 14, 'float32', -5.469130, 4.530870, -5.5, 4.6),
|
||||||
# For negative nominals: min_val = lo_limit = nominal×0.8 (less negative),
|
('INV_current_cali_B', 18, 'float32', -56.387592, -46.387592, -57.0, -46.0),
|
||||||
# max_val = up_limit = nominal×1.2 (more negative).
|
('DC_bus_voltage_cali_B', 22, 'float32', -9.608880, 10.391120, -9.7, 10.5),
|
||||||
# Phase 1 writes a more-negative value (<min_val) → expect clamp to min_val.
|
('AC_in_voltage_cali_B', 26, 'float32', -9.360185, 10.639815, -9.4, 10.7),
|
||||||
# Phase 2 writes a less-negative value (>max_val) → expect clamp to max_val.
|
('Coil_voltage_cali_B', 82, 'float32', -17.280746, 2.719254, -17.5, 2.8),
|
||||||
('PFC_current_cali_B', 14, 'float32', -0.375304, -0.562956, -0.65, -0.30),
|
('PFC_current_rms_cali_B', 112, 'float32', -5.0, 5.0, -5.1, 5.1),
|
||||||
('INV_current_cali_B', 18, 'float32', -41.11007, -61.66511, -70.0, -30.0),
|
|
||||||
('DC_bus_voltage_cali_B', 22, 'float32', 0.312896, 0.469344, 0.293, 0.490),
|
|
||||||
('AC_in_voltage_cali_B', 26, 'float32', 0.511852, 0.767778, 0.480, 0.800),
|
|
||||||
('Coil_voltage_cali_B', 82, 'float32', -5.824597, -8.736896, -10.0, -4.0),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user