Changeset 73 for trunk/fw_g473rct/SES/inc
- Timestamp:
- Aug 4, 2026, 1:53:58 PM (29 hours ago)
- Location:
- trunk/fw_g473rct/SES/inc
- Files:
-
- 6 edited
- 2 moved
-
ads1260.h (modified) (1 diff)
-
battery_voltage_fast.h (moved) (moved from trunk/fw_g473rct/SES/inc/battery_voltage.h ) (1 diff)
-
chip_temperature.h (modified) (1 diff)
-
esr.h (modified) (1 diff)
-
fast_current.h (modified) (1 diff)
-
int_bat_voltage.h (modified) (2 diffs)
-
shunt_voltage_fast.h (moved) (moved from trunk/fw_g473rct/SES/inc/shunt_voltage.h ) (1 diff)
-
sysdata.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fw_g473rct/SES/inc/ads1260.h
r20 r73 137 137 void ADS_1260_SetDataRate(SPI_HandleTypeDef * hspi, uint8_t dataRate); 138 138 139 void ADS1260_BatteryVoltageZeroCal(void); 140 void ADS1260_ShuntVoltageZeroCal(void); 139 141 #endif // !_ADS_1260_H -
trunk/fw_g473rct/SES/inc/battery_voltage_fast.h
r72 r73 16 16 17 17 //--- GLOBALE DEFINES ---------------------------------------------------------- 18 #if defined SYSTEM_VOLTAGE_12V19 #define BATTERY_VOLTAGE_VOLTAGE_DIVIDER 6.020 #elif defined SYSTEM_VOLTAGE_24V21 #define BATTERY_VOLTAGE_VOLTAGE_DIVIDER 11.022 #elif defined SYSTEM_VOLTAGE_48V23 #define BATTERY_VOLTAGE_VOLTAGE_DIVIDER 21.024 #else25 #error "System voltage not defined"26 #endif27 18 28 19 29 30 #define BATTERY_VOLTAGE_ADC_RESOLUTION 32768.0 //65536/2 da im differential mode 31 #define BATTERY_VOLTAGE_ADC_OFFSET 32768.0 20 #define BATTERY_VOLTAGE_FAST_ADC_RESOLUTION 65536 21 #define BATTERY_VOLTAGE_FAST_ADC_OFFSET 32768 32 22 33 23 //--- GLOBALE VARIABLEN PROTOTYPEN --------------------------------------------- 34 24 35 25 //--- GLOBALE FUNKTIONS PROTOTYPEN --------------------------------------------- 36 void BATTERY_VOLTAGE_Exec(int32_t newvalP ); 37 void BATTERY_VOLTAGE_ZeroCal(void); 26 void BATTERY_VOLTAGE_FAST_Exec(int32_t newvalP ); 27 void BATTERY_VOLTAGE_FAST_ZeroCal(void); 28 38 29 39 30 #endif // -
trunk/fw_g473rct/SES/inc/chip_temperature.h
r20 r73 33 33 * @retval kein 34 34 */ 35 void CHIP_TEMPERATURE_Exec( uint32_t chiptemperature);35 void CHIP_TEMPERATURE_Exec(int32_t chiptemperature); 36 36 #endif // !__CHIP_TEMPERATURE_H -
trunk/fw_g473rct/SES/inc/esr.h
r20 r73 1 #ifndef __ESR_H 2 #define __ESR_H 3 1 4 #include <inttypes.h> 2 5 3 int16_t ESR_Exec(void); 6 4 7 int16_t ESR_FAST_Exec(void); 8 #endif -
trunk/fw_g473rct/SES/inc/fast_current.h
r26 r73 36 36 37 37 //--- GLOBALE FUNKTIONS PROTOTYPEN --------------------------------------------- 38 void FAST_CURRENT_Exec( uint32_t newVal );39 void CurrentOffsetCal( uint32_t newVal);40 void CurrentGainCal( uint32_t newVal);38 void FAST_CURRENT_Exec(int32_t newVal ); 39 void CurrentOffsetCal(int32_t newVal); 40 void CurrentGainCal(int32_t newVal); 41 41 42 42 #endif // -
trunk/fw_g473rct/SES/inc/int_bat_voltage.h
r24 r73 12 12 13 13 //--- INCLUDEs ----------------------------------------------------------------- 14 14 #include "inttypes.h" 15 15 //--- GLOBALE TYPE DEFS -------------------------------------------------------- 16 16 … … 26 26 * @retval kein 27 27 */ 28 void INT_BAT_VOLTAGE_Exec( uint32_t newval);28 void INT_BAT_VOLTAGE_Exec(int32_t newval); 29 29 30 30 #endif // __REF_VOLTAGE_H -
trunk/fw_g473rct/SES/inc/shunt_voltage_fast.h
r72 r73 26 26 * @retval kein 27 27 */ 28 void SHUNT_VOLTAGE_ Exec(int32_t voltage);29 28 void SHUNT_VOLTAGE_FAST_Exec(int32_t voltage); 29 void SHUNT_VOLTAGE_FAST_ZeroCal(void); 30 30 #endif // !__SHUNT_VOLTAGE_H -
trunk/fw_g473rct/SES/inc/sysdata.h
r69 r73 127 127 int32_t batteryCurrentGainTemperatureCompensationShuntFactor; // 82-83 Berechneter Faktor für Gain Temperatur kompensation. Pro 1/100 C * 1000000000 128 128 int16_t batteryCurrentGainTemperatureCalibrationChipTemperature; // 84 Gesicherte Chip Temperatur bei Start der Gain Temperatur Kompensation 129 int16_t UNIQUE_NAME(reserved); // 85 reserviert129 int16_t shuntVoltageFastOffset; // 85 reserviert 130 130 int32_t batteryCurrentGainTemperatureCompensationChipFactor; // 86-87 zuszätzlicher Kalibrierungsfaktor, nicht in Verwendung 131 131 int32_t batteryCurrentOffsetFast; // 88-89 Korrektur in STM32 ADC Messung Gain, Strommessung … … 136 136 uint16_t auxOutputSetpointOff; // 95 SOC in Prozent für SOC mode 137 137 uint16_t auxOutputInverted; // 96 0= NORMAL, 1=INVERTED 138 uint16_t UNIQUE_NAME(reserved)[3]; 138 int16_t batteryVoltageFastOffset; // 97 Offset für Spannungsmessung 139 int16_t batteryVoltageOffset; // 98 Offset für Spannungsmessung 140 int16_t shuntVoltageOffset; // 99 Offset für Spannungsmessung 141 139 142 140 143 } device_parameter_t; … … 150 153 /* 2 of 8 */ int16_t shuntTemperatureMax; // 104 Höchste Shunttemperatur seit Programmstart, kann durch Schreiben von Int16-Min (-32.768) in das Register zurückgesetzt werden 151 154 /* 4 of 8 */ int16_t shuntTemperatureMin; // 105 Niedrigste Shunttemperatur seit Programmstart, kann durch Schreiben von Int16_Max (+32.767) in das Register zurückgesetzt werden 152 /* 8 of 8 */ uint32_tshuntVoltage; // 106-107 Shuntspannung in mV (Common Mode Voltage) gemessen von dem STM32G0. Spannung zwischen Shunt B und GND Versorgung155 /* 8 of 8 */ int32_t shuntVoltage; // 106-107 Shuntspannung in mV (Common Mode Voltage) gemessen von dem STM32G0. Spannung zwischen Shunt B und GND Versorgung 153 156 /* 4 of 8 */ int32_t batteryVoltage; // 108-109! Gemessenen Batteriespannung in mV. Es kann in beide Richtungen gemessen werden (mindestens von -60V bis +60V). Es muss darauf geachtet werden, dass die gemessen Spannung positiv ist (+ an Batterieplus und - an Batterieminus) 154 157 /* 8 of 8 */ int32_t batteryVoltageMax; // 110-111 Hchster Spannungswert in mV (Batteriespannung) seit Programmstart. Kann durch schreiben von int32-Min (-2,147,483,648) in das Register zurckgesetzt werden … … 170 173 /* 2 of 8 */ int16_t selfDischarge; // 140 [mA] 171 174 /* 4 of 8 */ int16_t selfDischargeAvg; // 141 [mA] 172 /* 6 of 8 */ int16_t esr ;// 142 [mOhm]173 /* 8 of 8 */ int16_t esr_ fast;// 143 [mOhm]174 /* 6of 8 */ uint32_t lastTimeVbatFull; // 144-145 [s]175 /* 6 of 8 */ int16_t esr_batt; // 142 [mOhm] 176 /* 8 of 8 */ int16_t esr_shunt; // 143 [mOhm] 177 /* 4 of 8 */ uint32_t lastTimeVbatFull; // 144-145 [s] 175 178 /* 8 of 8 */ uint32_t lastTimeVbatEmpty; // 146-147 [s] 176 179 /* 4 of 8 */ uint32_t onTime; // 148-149 [s] Runtime Zähler zum speichern der Statistik Werte im EEPROM und als Betriebszeitzähler … … 185 188 /* 8 of 8 */ int16_t calculatedCEFWh; // 163 186 189 /* 4 of 8 */ int32_t mWh_AutoMode; // 164-165 187 /* 2of 8 */ int16_t overcurrentMeasurement; // 166188 /* 4of 8 */ int16_t overcurrentMaxValue; // 167 /reserviert190 /* 6 of 8 */ int16_t overcurrentMeasurement; // 166 191 /* 8 of 8 */ int16_t overcurrentMaxValue; // 167 /reserviert 189 192 /* 2 of 8 */ uint16_t ovp_sense; // 168 reserviert 190 193 /* 4 of 8 */ uint16_t lvp_sense; // 169 191 194 /* 6 of 8 */ uint16_t overcurrentRetryCounter; // 170 192 195 /* 8 of 8 */ uint16_t overcurrentEventsTotal; // 171 193 /* 6 of 8 */ uint32_t detectedCapacityAtActualCRate; // 272,273194 /* 8 of 8 */ uint32_t detectedEnergyAtActualCRate; // 274,275196 /* 4 of 8 */ uint32_t detectedCapacityAtActualCRate; // 172,173 197 /* 8 of 8 */ uint32_t detectedEnergyAtActualCRate; // 174,175 195 198 196 199 … … 207 210 /* 8 of 8 */ int32_t batteryCurrentOffsetCommonModeCorrectionADCSteps; // 198-199 Offset Korrektur Wert aufgrund Common Mode Error 208 211 /* 4 of 8 */ int32_t fast_current; // 200-201 209 /* 4 of 8 */ int32_t fast_voltage;// 202-203210 /* 8of 8 */ int16_t esrCalcStatus; // 204211 /* 2of 8 */ uint16_t esrCalcTime; // 205212 /* 4of 8 */ int16_t selfDischargeStatus; // 206213 /* 6of 8 */ uint16_t selfDischargeTime; // 207212 /* 8 of 8 */ int32_t batteryVoltageFast; // 202-203 213 /* 2 of 8 */ int16_t esrCalcStatus; // 204 214 /* 4 of 8 */ uint16_t esrCalcTime; // 205 215 /* 6 of 8 */ int16_t selfDischargeStatus; // 206 216 /* 8 of 8 */ uint16_t selfDischargeTime; // 207 214 217 /* 8 of 8 */ uint8_t message[24]; // 208-219 ASCII-char message, limited to 20 letters 215 218 /* 8 of 8 */ int64_t mWsCounterUncorrected; // 220-223 [mWs] 216 219 /* 8 of 8 */ int64_t mAsCounterUncorrected; // 224-227 [mAs] 217 /* 2of 8 */ int32_t mAhCounterUncorrected; // 228-229220 /* 4 of 8 */ int32_t mAhCounterUncorrected; // 228-229 218 221 /* 6 of 8 */ uint16_t soc0; // 230 219 222 /* 8 of 8 */ uint16_t soc1; // 231 … … 225 228 /* 6 of 8 */ uint16_t ltc_charge_current; // 238 226 229 /* 8 of 8 */ uint16_t ltc_charge_current_max; // 239 227 /* 4 of 8 */ int64_t mAs_AutoModeU; // 240-243 228 /* 6 of 8 */ uint16_t ramCRCErrCnt; // 244 229 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 245 230 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 246 231 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 247 232 /* 6 of 8 */ uint16_t ltc_discharge_current; // 248 233 /* 8 of 8 */ uint16_t ltc_discharge_current_max; // 249 234 /* 8 of 8 */ int16_t current_buffer[SAMPLE_ARRAY_SIZE]; // 250-313 235 /* 8 of 8 */ int16_t voltage_buffer[SAMPLE_ARRAY_SIZE]; // 314-377 236 /* 8 of 8 */ int16_t current_buffer_fast[SAMPLE_ARRAY_SIZE]; // 378-441 237 /* 8 of 8 */ int16_t voltage_buffer_fast[SAMPLE_ARRAY_SIZE]; // 442-505 230 /* 8 of 8 */ int64_t mAs_AutoModeU; // 240-243 231 /* 2 of 8 */ uint16_t ramCRCErrCnt; // 244 232 /* 4 of 8 */ int16_t UNIQUE_NAME(reserved); // 245 233 234 /* 8 of 8 */ int32_t shuntVoltageFast; // 246 235 /* 2 of 8 */ uint16_t ltc_discharge_current; // 248 236 /* 4 of 8 */ uint16_t ltc_discharge_current_max; // 249 237 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 250 238 /* 8 of 8 */ int16_t pos_I_peak; // 251 239 /* 2 of 8 */ int16_t neg_I_peak; // 252 240 /* 4 of 8 */ int16_t pos_U_Batt_peak; // 253 241 /* 6 of 8 */ int16_t neg_U_Batt_peak; // 254 242 /* 8 of 8 */ int16_t pos_U_Shunt_peak; // 255 243 /* 2 of 8 */ int16_t neg_U_Shunt_peak; // 256 244 /* 4 of 8 */ uint16_t pos_I_Buffer_pos; // 257 245 /* 6 of 8 */ uint16_t neg_I_Buffer_pos; // 258 246 /* 8 of 8 */ uint16_t UNIQUE_NAME(reserved); // 259 247 /* 8 of 8 */ int16_t current_buffer[SAMPLE_ARRAY_SIZE]; // 260-323 248 /* 8 of 8 */ int16_t voltage_buffer_batt[SAMPLE_ARRAY_SIZE]; // 324-387 249 /* 8 of 8 */ int16_t voltage_buffer_shunt[SAMPLE_ARRAY_SIZE]; // 388-451 238 250 239 251 } device_values_t;
Note:
See TracChangeset
for help on using the changeset viewer.
