Changeset 9 for trunk/firmware/CubeMX
- Timestamp:
- Jun 5, 2023, 9:58:44 AM (2 years ago)
- Location:
- trunk/firmware/CubeMX
- Files:
-
- 2 edited
-
Inc/main.h (modified) (2 diffs)
-
Src/main.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/firmware/CubeMX/Inc/main.h
r8 r9 184 184 #ifdef VARIANT_24V 185 185 #define CONTROL_CURRENT_A 380 // [A] long-term current limit of the device. 186 #define SHORTCUT_CURRENT_mV 1100 // [mV] Some big value to pass test sequence186 #define SHORTCUT_CURRENT_mV 1100 187 187 #define INRUSH_CURRENT_mV 550 // [mV] Some big value to pass test sequence 188 188 #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV 200 // [mV] - must be measured on the board … … 190 190 #define CONTROL_CURRENT_A 500 // [A] long-term current limit of the device. 191 191 #define SHORTCUT_CURRENT_mV 1500 192 #define INRUSH_CURRENT_mV 650193 #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV 1 50 // [mV] - must be measured during calibration192 #define INRUSH_CURRENT_mV 500 193 #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV 100 // [mV] - must be measured during calibration 194 194 #endif 195 195 //#define COPPER_V_DROP_AT_INRUSH_CURRENT ((INRUSH_CURRENT_A * COPPER_V_DROP_AT_CONTROL_CURRENT_A)/CONTROL_CURRENT_A) // ~391mV -
trunk/firmware/CubeMX/Src/main.c
r8 r9 397 397 old_time = new_time; // Saving current time value 398 398 399 //HAL_IWDG_Refresh(&hiwdg); // 0.5s RESET399 HAL_IWDG_Refresh(&hiwdg); // 0.5s RESET 400 400 401 401 Callibration(); … … 2263 2263 low_bat_shutdown_is_active = 0; 2264 2264 sys_data.s.device_status &= ~(1 << LOWBAT_ERROR); 2265 ExternalRedLED_Management = &DoNothing;2265 if (ExternalRedLED_Management == ExternalRedLED5ShortOnThenLongPauseBlinking) ExternalRedLED_Management = &DoNothing; 2266 2266 } 2267 2267 } … … 3210 3210 // Recording ADC value drop under control current 3211 3211 sys_data.s.copper_v_drop_adc = ubbsense_adc; 3212 sys_data.s.copper_v_drop_adc_limit = (sys_data.s.copper_v_drop_adc * 110) / 100; 3212 sys_data.s.copper_v_drop_adc_limit = (sys_data.s.copper_v_drop_adc * 110) / 100; // +10% 3213 3213 3214 3214 SEGGER_RTT_printf(0, "\t\t\tFinal voltage-drop ADC value: %4u. Final voltage-drop value: %3u mV\n", sys_data.s.copper_v_drop_adc, sys_data.s.copper_v_drop); … … 3220 3220 Callibration = &DoNothing; 3221 3221 //InrushCurrentManagement = &InrushCurrentDetected; // Test program disables this, so we must re-enable it after callibration 3222 MX_IWDG_Init(); 3222 3223 } 3223 3224
Note:
See TracChangeset
for help on using the changeset viewer.
