Ignore:
Timestamp:
Sep 8, 2025, 6:57:30 PM (7 weeks ago)
Author:
f.jahn
Message:
  • Bug in ADC Kalibrierung (STM32 ADC Strom) behoben
  • DMA Buffer für ADC 1 und ADC wird vor Überschreibung während bearbeitung geschützt, indem Datenübertragung nur einmalig erfolgt und erst nach Auswertung wieder gestartet wird
  • RS485Modbus: Timeout Zeit wird für Baudraten >19200 korrekt berechnet
  • Hardware ID geändert
  • Separates Register für "Batterie Empty detection mode" auf Adresse 92 angelegt
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fw_g473rct/SES/inc/sysdata.h

    r25 r26  
    1919#define UNIQUE_NAME(base) CONCAT(base, __COUNTER__)                                                             // according to template "baseX", like "base1", "base2" and etc.
    2020
    21 #define SAMPLE_ARRAY_SIZE 32
     21#define SAMPLE_ARRAY_SIZE 64
    2222
    2323//------------------------------------------------------------------------------
     
    5858        uint16_t ibn_year;                                                                                                                      // 16   Inbetriebnahme Datum: Jahr
    5959        uint16_t user_id;                                                                                                                       // 17   Freies Feld für eine Kunden ID oder ähnlich
    60         uint16_t test[8];                                                                                       // 18-25        RESERVIERT
     60        uint16_t test[8];                                                                                                                       // 18-25        RESERVIERT
    6161
    6262        //--- Konfiguration Schaltausgänge ---
     
    103103        int16_t  extraDischargeStrom_mA;                                                                                        // 56
    104104        uint16_t cefW;                                                                                                                          // 57           CeF for Wh calculations
    105         uint16_t lvpMode;                                                                                                                       // 58-59        RESERVIERT
    106         uint16_t ovpMode;                                                                                                                       // 58-59        RESERVIERT
    107 
     105        uint16_t lvpMode;                                                                                                                       // 58   
     106        uint16_t ovpMode;                                                                                                                       // 59   
    108107        // ------- Calibration Parameter -----
    109108        int32_t batteryCurrentOffset;                                                                                           // 60-61        Offset bei Raumtemperatur ADC Schritte
     
    119118        int32_t batteryCurrentOffsetTemperatureCompensationFactor;                                      // 72-73        Berechnete Temperatur Kompensation für Strom Offset
    120119
    121         int32_t batteryCurrentGainCorrectionFaktor;                                                                     // 74-75        Gain Korrektur Faktor * 1000000
     120        uint32_t batteryCurrentGainCorrectionFaktor;                                                            // 74-75        Gain Korrektur Faktor * 1000000
    122121        int16_t batteryCurrentGainRefTempShunt;                                                                         // 76           Gesicherte Temperatur Shunts bei Gain Kallibrierung
    123122        int16_t batteryCurrentGainRefTempChip;                                                                          // 77           Gesicherte Temperatur Chip bei Gain Kallibrierung
     
    129128        int16_t batteryCurrentGainTemperatureCalibrationChipTemperature;                        // 84           Gesicherte Chip Temperatur bei Start der Gain Temperatur Kompensation
    130129        int16_t UNIQUE_NAME(reserved);                                                                                          // 85           reserviert
    131         int32_t batteryCurrentGainTemperatureCompensationChipFactor;                            // 86-87        zustzlicher Kalibrierungsfaktor, nicht in Verwendung
    132 
    133         uint32_t UNIQUE_NAME(reserved)[6];
     130        int32_t batteryCurrentGainTemperatureCompensationChipFactor;                            // 86-87        zuszätzlicher Kalibrierungsfaktor, nicht in Verwendung
     131        int32_t batteryCurrentOffsetFast;                                                                                       // 88-89        Korrektur in STM32 ADC Messung Gain, Strommessung
     132        uint32_t batteryCurrentGainCorrectionFaktorFast;                                                        // 90-91        Korrektur in STM32 ADC Messung Gain, Strommessung
     133        int16_t batteryEmptyDetectionMode;                                                                                      // 92           0= Alt, Nach Batteriespannungsmessung von greenmeter, 1= Neu Auto BMS Mode, Erkennung mit LVP Leitung, geht erst ab smartPro Hardware
     134        uint16_t UNIQUE_NAME(reserved)[7];
    134135
    135136} device_parameter_t;
     
    181182        /* 4 of 8 */ int32_t  mWh_AutoMode;                                                                                     // 164-165
    182183        /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved);                                                            // 166
    183         /* 8 of 8 */ uint16_t UNIQUE_NAME(reserved);                                                            // 167
     184        /* 8 of 8 */ uint16_t UNIQUE_NAME(reserved);                                                            // 167r
    184185        /* 2 of 8 */ uint16_t ovp_sense;                                            // 168
    185186        /* 4 of 8 */ uint16_t lvp_sense;                                            // 169
     
    200201        /* 2 of 8 */ uint16_t uBatEmptyTempComp;                                                                        // 192          [mV]
    201202        /* 4 of 8 */ uint16_t adc_restarts;                                                                                     // 193
    202         /* 6 of 8 */ int16_t  UNIQUE_NAME(reserved);                                                            // 194          Reserviert
    203         /* 8 of 8 */ int16_t  UNIQUE_NAME(reserved);                                                            // 195          Reserviert
     203        /* 6 of 8 */ int32_t  power_Fast;                                                                                       // 194          Reserviert
     204        /* 8 of 8 */// int16_t  UNIQUE_NAME(reserved);                                                          // 195          Reserviert
    204205        /* 4 of 8 */ int32_t  battryCurrentRaw;                                                                         // 196-197      Gemessener Strom in ADC Schritte Ohne Korrekturen
    205206        /* 8 of 8 */ int32_t  batteryCurrentOffsetCommonModeCorrectionADCSteps;         // 198-199      Offset Korrektur Wert aufgrund Common Mode Error
     
    211212        /* 6 of 8 */ uint16_t selfDischargeTime;                                                                        // 207
    212213        /* 8 of 8 */ uint8_t  message[20];                                                                                      // 208-219      ASCII-char message, limited to 20 letters
    213         /* 4 of 8 */ int32_t  current_buffer[SAMPLE_ARRAY_SIZE];                                        // 220-283
    214         /* 8 of 8 */ int32_t  voltage_buffer[SAMPLE_ARRAY_SIZE];                                        // 284-347
    215         /* 4 of 8 */ int32_t  current_buffer_fast[SAMPLE_ARRAY_SIZE];                           // 348-411
    216         /* 8 of 8 */ int32_t  voltage_buffer_fast[SAMPLE_ARRAY_SIZE];                           // 412-475
     214        /* 4 of 8 */ int16_t  current_buffer[SAMPLE_ARRAY_SIZE];                                        // 220-283
     215        /* 8 of 8 */ int16_t  voltage_buffer[SAMPLE_ARRAY_SIZE];                                        // 284-347
     216        /* 4 of 8 */ int16_t  current_buffer_fast[SAMPLE_ARRAY_SIZE];                           // 348-411
     217        /* 8 of 8 */ int16_t  voltage_buffer_fast[SAMPLE_ARRAY_SIZE];                           // 412-475
    217218
    218219} device_values_t;
Note: See TracChangeset for help on using the changeset viewer.