Index: trunk/fw_g473rct/SES/src/ads1260.c
===================================================================
--- trunk/fw_g473rct/SES/src/ads1260.c	(revision 35)
+++ trunk/fw_g473rct/SES/src/ads1260.c	(revision 38)
@@ -45,8 +45,9 @@
 #include "ads1260.h"
 #include "spi.h"
-#include "math.h"
+//#include "math.h"
 #include "main.h"
 #include "eeprom.h"
 #include <stdio.h>
+#include "iwdg.h"
 //      --- EXTERNE VARIABLEN --------------------------------------------------------
 
@@ -765,4 +766,5 @@
   /* 3*/ HAL_GPIO_WritePin(ADC_START_CONV_GPIO_Port, ADC_START_CONV_Pin, GPIO_PIN_SET);
          HAL_Delay(150); // Delay weil die Vref braucht zeit um sich zu stabilisieren (siehe Datenblatt Seite 9)
+		 HAL_IWDG_Refresh(&hiwdg);
   /* 1*/ //HAL_GPIO_WritePin(ADC_POWER_DOWN_GPIO_Port, ADC_POWER_DOWN_Pin, GPIO_PIN_RESET);
          //HAL_Delay(150); // Delay weil die Vref braucht zeit um sich zu stabilisieren (siehe Datenblatt Seite 9)
@@ -771,6 +773,8 @@
   /* 2*/ HAL_GPIO_WritePin(ADC_RESET_GPIO_Port, ADC_RESET_Pin, GPIO_PIN_RESET);
          HAL_Delay(150); // Delay weil die Vref braucht zeit um sich zu stabilisieren (siehe Datenblatt Seite 9)
+		 HAL_IWDG_Refresh(&hiwdg);
   /* 2*/ HAL_GPIO_WritePin(ADC_RESET_GPIO_Port, ADC_RESET_Pin, GPIO_PIN_SET);
          HAL_Delay(150); // Delay weil die Vref braucht zeit um sich zu stabilisieren (siehe Datenblatt Seite 9)
+		 HAL_IWDG_Refresh(&hiwdg);
   /* 3*/ HAL_GPIO_WritePin(ADC_START_CONV_GPIO_Port, ADC_START_CONV_Pin, GPIO_PIN_RESET);
 
@@ -781,4 +785,5 @@
   /* 5*/ ADS_1260_SetExternalReference(&hspi3);
          HAL_Delay(150);
+		 HAL_IWDG_Refresh(&hiwdg);
   /* 6*/ ADS_1260_SetDataRate(&hspi3, DATA_RATE_20);
   //  /* 7*/ ADS_1260_SetDigitalFilter(&hspi1, FILTER_SINC4);
@@ -789,10 +794,14 @@
 
          ADS_1260_ActivateStatusData();
+		 HAL_IWDG_Refresh(&hiwdg);
          ADS_1260_ActivateLock();
+		 HAL_IWDG_Refresh(&hiwdg);
 
   /*10*/ //ADS_1260_SelfOffsetCalibration(&hspi1);
          HAL_Delay(150);
+		 HAL_IWDG_Refresh(&hiwdg);
   /*x*/  ads1260DataCoversionState = ADC_STATE_READY_FOR_CONVERSION;
          ADS1260_StartConversion();
+		 HAL_IWDG_Refresh(&hiwdg);
 }
 
Index: trunk/fw_g473rct/SES/src/battery_voltage.c
===================================================================
--- trunk/fw_g473rct/SES/src/battery_voltage.c	(revision 35)
+++ trunk/fw_g473rct/SES/src/battery_voltage.c	(revision 38)
@@ -17,6 +17,6 @@
 
 //	--- LOKALE DEFINES - bitte hier dokumentieren --------------------------------
+
 #define BATTERY_VOLTAGE_FILTER  32
-
 
 
Index: trunk/fw_g473rct/SES/src/eeprom.c
===================================================================
--- trunk/fw_g473rct/SES/src/eeprom.c	(revision 35)
+++ trunk/fw_g473rct/SES/src/eeprom.c	(revision 38)
@@ -223,13 +223,41 @@
 	/* iBatFull					*/											10,				// I-batt full 10%, 10A bei 100Ah akku
 	/* tBatFull					*/											2,				// t-batt full 2 Sekunden
-	/* uBatFull					*/											0,				// 14V olt Ubatt full, Neu: Bei 0: Erkung von Lipro LVP als 0% 
-	/* uBatEmpty				*/											11312,				// 11,312V Ubatt Empty
+#if defined SYSTEM_VOLTAGE_12V
+	/* uBatFull					*/											14000,				// 14V olt Ubatt full, Neu: Bei 0: Erkung von Lipro LVP als 0% 
+	/* uBatEmpty				*/											12400,				// 11,312V Ubatt Empty
+#elif defined SYSTEM_VOLTAGE_24V
+	/* uBatFull					*/											28000,				// 14V olt Ubatt full, Neu: Bei 0: Erkung von Lipro LVP als 0% 
+	/* uBatEmpty				*/											24800,				// 11,312V Ubatt Empty
+#elif defined SYSTEM_VOLTAGE_48V
+	/* uBatFull					*/											56000,				// 14V olt Ubatt full, Neu: Bei 0: Erkung von Lipro LVP als 0% 
+	/* uBatEmpty				*/											49600,				// 11,312V Ubatt Empty
+#else
+  #error "System voltage not defined"
+#endif
+
+
 	/* socCalcMode				*/											1,				// SoC calculation mode: 0(default)
 	/* cellRatedDischargeTime	*/											2,				// cell rated current discharge time [C/x]. For example, if 40Ah cell is rated as 0.5c, then rated discharge time is 2
-
+#if defined SYSTEM_VOLTAGE_12V
 	/* lvpStart	*/															12000,			// uint16_t lvpStart; Spannung ab der die LOW Voltage Protection aktiv wird in mV
 	/* lvpStop	*/															12500,			// uint16_t lvpStop; Spannung ab der die LOW Voltage Protection wieder inaktiv wird
 	/* ovpStart	*/															14800,			// uint16_t  ovpStart; Spannung ab der die OVER Voltage Protection aktiv wird in mV
 	/* ovpStop	*/															14000,			// uint16_t  ovpStop; Spannung ab der die OVER Voltage Protection wieder inaktiv wird
+#elif defined SYSTEM_VOLTAGE_24V
+	/* lvpStart	*/															24000,			// uint16_t lvpStart; Spannung ab der die LOW Voltage Protection aktiv wird in mV
+	/* lvpStop	*/															25000,			// uint16_t lvpStop; Spannung ab der die LOW Voltage Protection wieder inaktiv wird
+	/* ovpStart	*/															29600,			// uint16_t  ovpStart; Spannung ab der die OVER Voltage Protection aktiv wird in mV
+	/* ovpStop	*/															28000,			// uint16_t  ovpStop; Spannung ab der die OVER Voltage Protection wieder inaktiv wird
+
+#elif defined SYSTEM_VOLTAGE_48V
+	/* lvpStart	*/															48000,			// uint16_t lvpStart; Spannung ab der die LOW Voltage Protection aktiv wird in mV
+	/* lvpStop	*/															50000,			// uint16_t lvpStop; Spannung ab der die LOW Voltage Protection wieder inaktiv wird
+	/* ovpStart	*/															59200,			// uint16_t  ovpStart; Spannung ab der die OVER Voltage Protection aktiv wird in mV
+	/* ovpStop	*/															56000,			// uint16_t  ovpStop; Spannung ab der die OVER Voltage Protection wieder inaktiv wird
+#else
+  #error "System voltage not defined"
+#endif
+
+
 
 #if (DEVICETYPE == 500)
@@ -247,6 +275,6 @@
 	/* chargeStopHighTemperatureStart	*/									6000,			// 80°C int16_t chargeStopHighTemperatureStart;	Abschalttemperatur Ladung wegen zu hoher Temperatur
 	/* chargeStopHighTemperatureStop	*/									5500,			// 75°C int16_t chargeStopHighTemperatureStop;	Wiedereinschalttemperatur
-	/* chargeStopLowTemperatureStart	*/									-3000,			// -35°C int16_t chargeStopLowTemperatureStart;	Abschalttemperatur Ladung wegen zu niedriger Temperatur
-	/* chargeStopLowTemperatureStop		*/									-2500,			// -30°C int16_t chargeStopLowTemperatureStop; Wiedereinschalttemperatur
+	/* chargeStopLowTemperatureStart	*/									-2500,			// -35°C int16_t chargeStopLowTemperatureStart;	Abschalttemperatur Ladung wegen zu niedriger Temperatur
+	/* chargeStopLowTemperatureStop		*/									-2000,			// -30°C int16_t chargeStopLowTemperatureStop; Wiedereinschalttemperatur
 	/* dischargeStopHighTemperatureStart*/									6000,			// 80°C int16_t dischargeStopHighTemperatureStart; Abschalttemperatur Entladung wegen zu hoher Temperatur
 	/* dischargeStopHighTemperatureStop	*/									5500,			// 75°C int16_t dischargeStopHighTemperatureStop; Wiedereinschalttemperatur
@@ -256,5 +284,13 @@
 	/* uBatEmptyCompStartTemp	*/											50,				// 5°C We start calculating uBatEmpty compensations only when cell temperature is lower than this value
 	/* uBatEmptyCompStopTemp	*/											-200,			// -20°C We stop calculating uBatEmpty compensations when cell temperature is lower than this value
+#if defined SYSTEM_VOLTAGE_12V
 	/* uBatEmptyCompStopVolt	*/											10000,			// 10V uBatEmpty voltage at temperatures lower than -20°C
+#elif defined SYSTEM_VOLTAGE_24V
+/* uBatEmptyCompStopVolt	*/												20000,			// 10V uBatEmpty voltage at temperatures lower than -20°C
+#elif defined SYSTEM_VOLTAGE_48V
+/* uBatEmptyCompStopVolt	*/												40000,			// 10V uBatEmpty voltage at temperatures lower than -20°C
+#else
+  #error "System voltage not defined"
+#endif
 
 	/* extraDischargeStrom_mA	*/											7,				// mA, current that LiPro consumes itself
@@ -262,5 +298,13 @@
 	/* Battery Empty Detection Mode*/										1,				// Auto, from BMS
 	/* AUX MODE */															AUX_MODE_HEATER,// Heizung
+#if defined SYSTEM_VOLTAGE_12V
 	/* AUX SETPOINT ON */													13600,			// Erkennung Ladegerät ab 13,6V
+#elif defined SYSTEM_VOLTAGE_24V
+	/* AUX SETPOINT ON */													27200,			// Erkennung Ladegerät ab 13,6V
+#elif defined SYSTEM_VOLTAGE_48V
+	/* AUX SETPOINT ON */													54400,			// Erkennung Ladegerät ab 13,6V
+#else
+#error No valid device type
+#endif
 	/* AUX SETPOINT OFF */													100,			// Batterie Entladung wird erkannt bei -100mA
 	/* AUX Inverted */														0,				// Nicht invertiert
Index: trunk/fw_g473rct/SES/src/esr.c
===================================================================
--- trunk/fw_g473rct/SES/src/esr.c	(revision 35)
+++ trunk/fw_g473rct/SES/src/esr.c	(revision 38)
@@ -12,6 +12,5 @@
 int32_t current_buffer[SAMPLE_ARRAY_SIZE];  
 int32_t voltage_buffer[SAMPLE_ARRAY_SIZE];
-//int32_t current_buffer_fast[SAMPLE_ARRAY_SIZE];  
-//int32_t voltage_buffer_fast[SAMPLE_ARRAY_SIZE];
+
 
 extern uint16_t adc12Data[SAMPLE_ARRAY_SIZE][2];
Index: trunk/fw_g473rct/SES/src/outputs.c
===================================================================
--- trunk/fw_g473rct/SES/src/outputs.c	(revision 35)
+++ trunk/fw_g473rct/SES/src/outputs.c	(revision 38)
@@ -118,5 +118,5 @@
 			//Temperabschaltung Start 80°C
 			//Temperaturabschaltung Stop -99°C
-			if (sys_data.s.values.lvpState != OUTPUTS_LVP_OVERCURRENT)
+			if ((sys_data.s.values.lvpState != OUTPUTS_LVP_OVERCURRENT) && (sys_data.s.values.lvpState != OUTPUTS_LVP_SHORT_PROTECTION))
 			{
 				//Andere Fehler, automatisches zurücksetzen, wenn keine Fehlerbedingungen mehr vorliegen
@@ -209,5 +209,5 @@
 			//Wenn Abschaltung aufgrund zu hohem Lade/Lastrom erfolgt ist, dann muss Rücksetzen durch Reset Button erfolgen 
 			//Andere Fehler, automatisches zurücksetzen, wenn keine Fehlerbedingungen mehr vorliegen
-			if (sys_data.s.values.ovpState != OUTPUTS_OVP_OVERCURRENT)
+			if ((sys_data.s.values.ovpState != OUTPUTS_OVP_OVERCURRENT) && (sys_data.s.values.ovpState != OUTPUTS_OVP_SHORT_PROTECTION) )
 			{
 				printf("OUTPUT OVP OK\n");
Index: trunk/fw_g473rct/SES/src/shunt_voltage.c
===================================================================
--- trunk/fw_g473rct/SES/src/shunt_voltage.c	(revision 35)
+++ trunk/fw_g473rct/SES/src/shunt_voltage.c	(revision 38)
@@ -19,5 +19,17 @@
 #define ADC_RESOLUTION						  32768 //65536/2 da im differential mode
 #define ADC_OFFSET							  32768
-#define SHUNT_VOLTAGE_DIVIDER				  6
+
+#if defined SYSTEM_VOLTAGE_12V
+  #define SHUNT_VOLTAGE_DIVIDER       6.0
+#elif defined SYSTEM_VOLTAGE_24V
+  #define SHUNT_VOLTAGE_DIVIDER       11.0
+#elif defined SYSTEM_VOLTAGE_48V
+  #define SHUNT_VOLTAGE_DIVIDER       21.0
+#else
+  #error "System voltage not defined"
+#endif
+
+
+
 //	--- LOKALE TYPE DEFS - bitte hier dokumentieren-------------------------------
 
