Changeset 7 for trunk/firmware/CubeMX/Inc
- Timestamp:
- May 24, 2023, 1:47:09 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/firmware/CubeMX/Inc/main.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/firmware/CubeMX/Inc/main.h
r4 r7 59 59 /* USER CODE BEGIN EFP */ 60 60 61 #ifdef VARIANT_24V 61 62 #define DISABLE_SHORTCUT_DETECTION_DURING_SWITCH_OFF 63 #endif 62 64 63 65 #ifdef DISABLE_SHORTCUT_DETECTION_DURING_SWITCH_OFF … … 141 143 /* USER CODE BEGIN Private defines */ 142 144 143 #define INVERTER_CAP_PRECHARGE144 145 145 #ifdef DEBUG 146 146 #define DEVICE_TYPE_ID 201 … … 148 148 #ifdef VARIANT_24V 149 149 #define DEVICE_TYPE_ID 202 150 #define INVERTER_CAP_PRECHARGE 150 151 #else 151 152 #define DEVICE_TYPE_ID 201 … … 183 184 #ifdef VARIANT_24V 184 185 #define CONTROL_CURRENT_A 380 // [A] long-term current limit of the device. 185 #define SHORTCUT_CURRENT_mV 2000 // [mV] Some big value to pass test sequence186 #define INRUSH_CURRENT_mV 1100// [mV] Some big value to pass test sequence187 #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV 100 // [mV] - must be measured on the board186 #define SHORTCUT_CURRENT_mV 1100 // [mV] Some big value to pass test sequence 187 #define INRUSH_CURRENT_mV 550 // [mV] Some big value to pass test sequence 188 #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV 200 // [mV] - must be measured on the board 188 189 #else 189 190 #define CONTROL_CURRENT_A 500 // [A] long-term current limit of the device. … … 202 203 #define CURRENT_INTEGRAL_FREQ 320000U // (7.5cycles + 12.5cycles)*1channels + (3.5cycles + 12.5cycles)*5channels = 20 + 80 = 100cycles @ 32MHz = 320 kHz 203 204 #ifdef VARIANT_24V 204 #define CURRENT_INTEGRATION_PERIOD 575// µs205 #define CURRENT_INTEGRATION_PERIOD 1500 // µs 205 206 #else 206 207 #define CURRENT_INTEGRATION_PERIOD 1700 // µs … … 286 287 #define COMMAND_TURN_OVERLOAD_DETECTION_ON 30405 287 288 288 #define U_BAT_CALC_PERIOD 5 // ms289 //#define U_BAT_CALC_PERIOD 5 // ms 289 290 #ifdef VARIANT_24V 290 291 #define U_BAT_CRITICAL_VOLTAGE 20000 // mV (If voltage on battery is lower than 10V, then there is a probability that MOSFETs will not open/close properly) 291 292 #define U_BAT_RECOVERY_VOLTAGE 24000 // mV (If voltage on battery is higher than 12V, then it is fully recovered from possible previous discharge) 292 293 #else 293 #define U_BAT_CRITICAL_VOLTAGE 10000 // mV (If voltage on battery is lower than 10V, then there is a probability that MOSFETs will not open/close properly) 294 #define U_BAT_RECOVERY_VOLTAGE 12000 // mV (If voltage on battery is higher than 12V, then it is fully recovered from possible previous discharge) 294 #define U_BAT_CRITICAL_VOLTAGE_mV 10000 // mV (If voltage on battery is lower than 10V, then there is a probability that MOSFETs will not open/close properly) 295 #define U_BAT_RECOVERY_VOLTAGE_mV 12000 // mV (If voltage on battery is higher than 12V, then it is fully recovered from possible previous discharge) 296 #define ADC_BAT_CRITICAL_VOLTAGE ((((U_BAT_CRITICAL_VOLTAGE_mV / 1000) * R22) * (ADC_MAX_VALUE + 1)) / ((R23 + R22) * (ADC_VREF / 1000))) 295 297 #endif 296 298
Note:
See TracChangeset
for help on using the changeset viewer.
