Changeset 9 for trunk/firmware/CubeMX


Ignore:
Timestamp:
Jun 5, 2023, 9:58:44 AM (2 years ago)
Author:
f.jahn
Message:

Some minor bugfixes.

Location:
trunk/firmware/CubeMX
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/firmware/CubeMX/Inc/main.h

    r8 r9  
    184184#ifdef VARIANT_24V
    185185        #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 sequence
     186        #define SHORTCUT_CURRENT_mV                                     1100
    187187        #define INRUSH_CURRENT_mV                                       550             // [mV] Some big value to pass test sequence
    188188        #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV     200             // [mV] - must be measured on the board
     
    190190        #define CONTROL_CURRENT_A                                       500             // [A] long-term current limit of the device.
    191191    #define SHORTCUT_CURRENT_mV                                 1500
    192         #define INRUSH_CURRENT_mV                                       650
    193         #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV     150             // [mV] - must be measured during calibration
     192        #define INRUSH_CURRENT_mV                                       500
     193        #define COPPER_V_DROP_AT_CONTROL_CURRENT_mV     100             // [mV] - must be measured during calibration
    194194#endif
    195195//#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  
    397397          old_time = new_time;                                                                                                          // Saving current time value
    398398
    399           //HAL_IWDG_Refresh(&hiwdg);   // 0.5s RESET
     399          HAL_IWDG_Refresh(&hiwdg);     // 0.5s RESET
    400400
    401401          Callibration();
     
    22632263                        low_bat_shutdown_is_active = 0;
    22642264                        sys_data.s.device_status &= ~(1 << LOWBAT_ERROR);
    2265                         ExternalRedLED_Management = &DoNothing;
     2265                        if (ExternalRedLED_Management == ExternalRedLED5ShortOnThenLongPauseBlinking) ExternalRedLED_Management = &DoNothing;
    22662266                }
    22672267        }
     
    32103210        // Recording ADC value drop under control current
    32113211        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%
    32133213
    32143214        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);
     
    32203220        Callibration = &DoNothing;
    32213221        //InrushCurrentManagement = &InrushCurrentDetected; // Test program disables this, so we must re-enable it after callibration
     3222        MX_IWDG_Init();
    32223223}
    32233224
Note: See TracChangeset for help on using the changeset viewer.