Changeset 25 for trunk/fw_g473rct/SES
- Timestamp:
- Sep 7, 2025, 3:51:43 PM (8 weeks ago)
- Location:
- trunk/fw_g473rct/SES
- Files:
-
- 75 added
- 13 edited
-
Output/Debug125A_12V (added)
-
Output/Debug125A_12V/Exe (added)
-
Output/Debug125A_12V/Exe/smartPro.elf (added)
-
Output/Debug125A_12V/Exe/smartPro.map (added)
-
Output/Debug125A_12V/Obj (added)
-
Output/Debug125A_12V/Obj/smartPro (added)
-
Output/Debug125A_12V/Obj/smartPro/SEGGER_THUMB_Startup.d (added)
-
Output/Debug125A_12V/Obj/smartPro/STM32G4xx_Startup.d (added)
-
Output/Debug125A_12V/Obj/smartPro/adc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/ads1260.d (added)
-
Output/Debug125A_12V/Obj/smartPro/ah_counter.d (added)
-
Output/Debug125A_12V/Obj/smartPro/battery_voltage.d (added)
-
Output/Debug125A_12V/Obj/smartPro/chip_temperature.d (added)
-
Output/Debug125A_12V/Obj/smartPro/crc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/dma.d (added)
-
Output/Debug125A_12V/Obj/smartPro/eeprom.d (added)
-
Output/Debug125A_12V/Obj/smartPro/efficiency.d (added)
-
Output/Debug125A_12V/Obj/smartPro/esr.d (added)
-
Output/Debug125A_12V/Obj/smartPro/fast_current-4af47574.o.tmp (added)
-
Output/Debug125A_12V/Obj/smartPro/fast_current.d (added)
-
Output/Debug125A_12V/Obj/smartPro/fdcan.d (added)
-
Output/Debug125A_12V/Obj/smartPro/gpio.d (added)
-
Output/Debug125A_12V/Obj/smartPro/i2c.d (added)
-
Output/Debug125A_12V/Obj/smartPro/int_bat_voltage.d (added)
-
Output/Debug125A_12V/Obj/smartPro/main.d (added)
-
Output/Debug125A_12V/Obj/smartPro/modbus.d (added)
-
Output/Debug125A_12V/Obj/smartPro/outputs.d (added)
-
Output/Debug125A_12V/Obj/smartPro/ref_voltage.d (added)
-
Output/Debug125A_12V/Obj/smartPro/rtc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/self_discharge.d (added)
-
Output/Debug125A_12V/Obj/smartPro/shunt_temperature.d (added)
-
Output/Debug125A_12V/Obj/smartPro/shunt_voltage.d (added)
-
Output/Debug125A_12V/Obj/smartPro/smartPro_files.ind (added)
-
Output/Debug125A_12V/Obj/smartPro/spi.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g473xx_Vectors.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_adc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_adc_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_cortex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_crc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_crc_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_dma.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_dma_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_exti.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_fdcan.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_flash.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_flash_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_flash_ramfunc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_gpio.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_i2c.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_i2c_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_msp.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_pcd.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_pcd_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_pwr.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_pwr_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_rcc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_rcc_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_rtc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_rtc_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_spi.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_spi_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_uart.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_hal_uart_ex.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_it.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_ll_adc.d (added)
-
Output/Debug125A_12V/Obj/smartPro/stm32g4xx_ll_usb.d (added)
-
Output/Debug125A_12V/Obj/smartPro/sysdata.d (added)
-
Output/Debug125A_12V/Obj/smartPro/system_stm32g4xx.d (added)
-
Output/Debug125A_12V/Obj/smartPro/template.d (added)
-
Output/Debug125A_12V/Obj/smartPro/usart.d (added)
-
Output/Debug125A_12V/Obj/smartPro/usb.d (added)
-
Output/Debug125A_12V/Obj/smartPro/wh_counter.d (added)
-
inc/battery_voltage.h (modified) (1 diff)
-
inc/doku.h (modified) (7 diffs)
-
inc/fast_current.h (modified) (1 diff)
-
inc/sysdata.h (modified) (3 diffs)
-
smartPro.emProject (modified) (4 diffs)
-
smartPro.emSession (modified) (11 diffs)
-
smartPro_Debug125A_12V.jlink (added)
-
src/ads1260.c (modified) (3 diffs)
-
src/battery_voltage.c (modified) (3 diffs)
-
src/eeprom.c (modified) (11 diffs)
-
src/esr.c (modified) (8 diffs)
-
src/fast_current.c (modified) (2 diffs)
-
src/main.c (modified) (4 diffs)
-
src/ref_voltage.c (added)
-
src/sysdata.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fw_g473rct/SES/inc/battery_voltage.h
r22 r25 16 16 17 17 //--- GLOBALE DEFINES ---------------------------------------------------------- 18 #define BATTERY_VOLTAGE_VOLTAGE_DIVIDER 6.0 19 #define BATTERY_VOLTAGE_ADC_RESOLUTION 32768.0 //65536/2 da im differential mode 20 #define BATTERY_VOLTAGE_ADC_OFFSET 32768.0 18 21 19 22 //--- GLOBALE VARIABLEN PROTOTYPEN --------------------------------------------- -
trunk/fw_g473rct/SES/inc/doku.h
r20 r25 1 1 /* 2 3 Neue Version für smartPro 4 5 - VDD muss jetzt nicht mehr berechnet werden, da wir eine echte Referenz haben. Deshalb entfällt die Anzeige im Register 101. Diese wurde ersetzt durch die 6 Spannung der neuen Backup Batterie 7 - Register Position für mWs und mWh getauscht, damit besser lesbar und ggf weniger Datenübetragung notwendig 8 - Register Position für mAs und mAh getauscht, damit besser lesbar und ggf weniger Datenübetragung notwendig 9 10 11 12 ----- ALT greenMeter------- 2 13 Achtung: 3 14 - IMMER NEUE HEX und NEUE BIN DATEI erzeugen!!! 4 - Bin Datei f ür Encryption Tool15 - Bin Datei fr Encryption Tool 5 16 - Hex für Prüfprogramm, automatische Programmierung 6 17 … … 22 33 2.0 COMMON MODE ERROR COMPENSATION 23 34 - Temperatur kalt, Raumtemperartur 24 - Busspannung 24,00V (Dabei änder sich der gemessene Strom um z.B. -120mA )35 - Busspannung 24,00V (Dabei nder sich der gemessene Strom um z.B. -120mA ) 25 36 - Busstrom 0,0A - Lastschalter aus!! 26 37 - Warten bis Mittwelwert stabilisert … … 30 41 2.1 (OPTIONAL) 31 42 - Common Mode Error Kompensation testen 32 - Spannung auf 32V erh öhen43 - Spannung auf 32V erhhen 33 44 - Fehler Strommessung < +- 5VmA 34 45 - Spannung auf 6V verringern … … 41 52 42 53 3.0 OFFSET TEMP COMPENSATION 43 - Kein erheblicher Fehler. Kompensation kann zun ächst entfallen54 - Kein erheblicher Fehler. Kompensation kann zunchst entfallen 44 55 45 56 4.0 GAIN CAL 46 - SHUNT Überbrücken57 - SHUNT berbrcken 47 58 - 250A einstellen 48 59 - warten bis stabil, +- 2mA 49 - SHUNT ÜBERBRÜCKUNG ÖFFNEN60 - SHUNT BERBRCKUNG FFNEN 50 61 - Warten auf Mittelwertbildung (10 Sekunden) 51 62 - COMMAND 10 … … 53 64 54 65 5.0 GAIN TEMP CAL 55 - Warten bis Shunt Temp um 10 °C gestiegen ist.66 - Warten bis Shunt Temp um 10C gestiegen ist. 56 67 - 57 68 */ … … 63 74 //--------------------- 64 75 //Test Shunt Spannungsmessung: 65 //Mit greenSwitch als Hauptschalter nur bis 32V m öglich. Da Überspannungsschutzdiode im greenSwitch aktiv wird76 //Mit greenSwitch als Hauptschalter nur bis 32V mglich. Da berspannungsschutzdiode im greenSwitch aktiv wird 66 77 // Sollwer: Read: Strom am Shunt: 67 78 // 0 V 0,09 V 0,0 mA … … 79 90 80 91 /* 81 Pr üfung Common Mode Error nach Kalibrierung 12/24V92 Prfung Common Mode Error nach Kalibrierung 12/24V 82 93 - Muster 1 hatte bei 0V - 8 mA 83 94 - Muster 1 hatte bei 2V - 6 mA -
trunk/fw_g473rct/SES/inc/fast_current.h
r24 r25 16 16 17 17 //--- GLOBALE DEFINES ---------------------------------------------------------- 18 #define FAST_CURRENT_I_SENSE_GAIN 40.0 19 #define FAST_CURRENT_ADC_OFFSET 32768 20 #define FAST_CURRENT_ADC_RESOLUTION 32768 //65536/2 da im differential mode 21 22 23 #if (DEVICETYPE == 500) 24 #define FAST_CURRENT_SHUNT_RESISTOR 0.000125 25 #elif (DEVICETYPE == 250) 26 #define FAST_CURRENT_SHUNT_RESISTOR 0.000250 27 #elif (DEVICETYPE == 125) 28 #define FAST_CURRENT_SHUNT_RESISTOR 0.000500 29 #else 30 #error No valid device type 31 #endif 32 33 18 34 19 35 //--- GLOBALE VARIABLEN PROTOTYPEN --------------------------------------------- -
trunk/fw_g473rct/SES/inc/sysdata.h
r23 r25 170 170 /* 8 of 8 */ uint32_t lastTimeVbatEmpty; // 146-147 [s] 171 171 /* 4 of 8 */ uint32_t onTime; // 148-149 [s] Runtime Zähler zum speichern der Statistik Werte im EEPROM und als Betriebszeitzähler 172 /* 8 of 8 */ uint32_t dischargeTotalAh; // 150-151 [ mAs]173 /* 4 of 8 */ uint32_t chargeTotalAh; // 152-153 [ mAs]174 /* 8 of 8 */ uint32_t dischargeTotalWh; // 154-155 [ mAs]175 /* 4 of 8 */ uint32_t chargeTotalWh; // 156-157 [ mAs]172 /* 8 of 8 */ uint32_t dischargeTotalAh; // 150-151 [Ah] 173 /* 4 of 8 */ uint32_t chargeTotalAh; // 152-153 [Ah] 174 /* 8 of 8 */ uint32_t dischargeTotalWh; // 154-155 [Wh] 175 /* 4 of 8 */ uint32_t chargeTotalWh; // 156-157 [Wh] 176 176 /* 6 of 8 */ uint16_t fullCyclesCnt; // 158 177 /* 8 of 8 */ uint16_t volatile UNIQUE_NAME(reserved); // 159 178 /* 8 of 8 */ int64_t mAs_AutoMode; // 160-163 179 /* 8 of 8 */ int64_t mWs_AutoMode; // 164-167 180 /* 2 of 8 */ uint16_t ovp_sense; // 168 181 /* 4 of 8 */ uint16_t lvp_sense; // 169 177 /* 8 of 8 */ uint16_t volatile UNIQUE_NAME(reserved); // 159 178 /* 4 of 8 */ int32_t mAh_AutoMode; // 160-161 179 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 162 180 /* 8 of 8 */ uint16_t UNIQUE_NAME(reserved); // 163 181 /* 4 of 8 */ int32_t mWh_AutoMode; // 164-165 182 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 166 183 /* 8 of 8 */ uint16_t UNIQUE_NAME(reserved); // 167 184 /* 2 of 8 */ uint16_t ovp_sense; // 168 185 /* 4 of 8 */ uint16_t lvp_sense; // 169 182 186 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 170 183 187 /* 8 of 8 */ uint16_t UNIQUE_NAME(reserved); // 171 … … 186 190 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 174 187 191 /* 8 of 8 */ uint16_t UNIQUE_NAME(reserved); // 175 188 /* 2 of 8 */ uint16_t UNIQUE_NAME(reserved); // 176 189 /* 4 of 8 */ uint16_t UNIQUE_NAME(reserved); // 177 190 /* 6 of 8 */ uint16_t UNIQUE_NAME(reserved); // 178 191 /* 8 of 8 */ uint16_t UNIQUE_NAME(reserved); // 179 192 192 193 193 194 // --- DEBUG WERTE 194 /* 4 of 8 */ int32_t mAh_AutoMode; // 180-181[mWh]195 /* 8 of 8 */ int 32_t mWh_AutoMode; // 182-183 [mWh]195 /* 8 of 8 */ int64_t mAs_AutoMode; // 176-179 [mWh] 196 /* 8 of 8 */ int64_t mWs_AutoMode; // 180-183 [mWh] 196 197 /* 8 of 8 */ int64_t mWsCounter; // 184-187 [mWs] 197 198 /* 4 of 8 */ int32_t mWhCounter; // 188-189 [mWh] … … 209 210 /* 4 of 8 */ int16_t selfDischargeStatus; // 206 210 211 /* 6 of 8 */ uint16_t selfDischargeTime; // 207 211 /* 8 of 8 */ uint8_t message[2 4]; // 208-219 ASCII-char message, limited to 8letters212 /* 8 of 8 */ uint8_t message[20]; // 208-219 ASCII-char message, limited to 20 letters 212 213 /* 4 of 8 */ int32_t current_buffer[SAMPLE_ARRAY_SIZE]; // 220-283 213 214 /* 8 of 8 */ int32_t voltage_buffer[SAMPLE_ARRAY_SIZE]; // 284-347 -
trunk/fw_g473rct/SES/smartPro.emProject
r24 r25 83 83 <folder Name="src"> 84 84 <file file_name="../Core/Src/adc.c" /> 85 <file file_name="../Core/Src/crc.c" /> 85 86 <file file_name="../Core/Src/dma.c" /> 86 87 <file file_name="../Core/Src/fdcan.c" /> 87 88 <file file_name="../Core/Src/gpio.c" /> 88 89 <file file_name="../Core/Src/i2c.c" /> 90 <file file_name="../Core/Src/main.c" /> 91 <file file_name="../Core/Src/rtc.c" /> 89 92 <file file_name="../Core/Src/spi.c" /> 90 93 <file file_name="../Core/Src/stm32g4xx_hal_msp.c" /> … … 151 154 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_adc_ex.c" /> 152 155 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_cortex.c" /> 156 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_crc.c" /> 157 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_crc_ex.c" /> 153 158 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma.c" /> 154 159 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma_ex.c" /> … … 167 172 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rcc.c" /> 168 173 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rcc_ex.c" /> 174 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rtc.c" /> 175 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rtc_ex.c" /> 169 176 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_spi.c" /> 170 177 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_spi_ex.c" /> … … 213 220 <file file_name="src/fast_current.c" /> 214 221 <file file_name="src/int_bat_voltage.c" /> 215 <file file_name="src/main.c" /> 222 <file file_name="src/main.c"> 223 <configuration Name="Common" build_exclude_from_build="Yes" /> 224 </file> 216 225 <file file_name="src/modbus.c" /> 217 226 <file file_name="src/outputs.c" /> -
trunk/fw_g473rct/SES/smartPro.emSession
r20 r25 10 10 <FrameBufferWindow width="0" keepAspectRatio="0" zoomToFitWindow="0" showGrid="0" addressSpace="" format="0" height="0" autoEvaluate="0" scaleFactor="1" refreshPeriod="0" name="PowerPro_Debug" addressText="" accessByDisplayWidth="0"/> 11 11 <FrameBufferWindow width="0" keepAspectRatio="0" zoomToFitWindow="0" showGrid="0" addressSpace="" format="0" height="0" autoEvaluate="0" scaleFactor="1" refreshPeriod="0" name="PowerPro_Release" addressText="" accessByDisplayWidth="0"/> 12 <FrameBufferWindow width="0" keepAspectRatio="0" zoomToFitWindow="0" showGrid="0" addressSpace="" format="0" height="0" autoEvaluate="0" scaleFactor="1" refreshPeriod="0" name="smartPro_Debug" addressText="" accessByDisplayWidth="0"/> 13 <FrameBufferWindow width="0" keepAspectRatio="0" zoomToFitWindow="0" showGrid="0" addressSpace="" format="0" height="0" autoEvaluate="0" scaleFactor="1" refreshPeriod="0" name="smartPro_Debug125A_12V" addressText="" accessByDisplayWidth="0"/> 12 14 </FrameBuffer> 13 15 <Memory1> … … 15 17 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="PowerPro_Debug" sizeText="" addressText=""/> 16 18 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="PowerPro_Release" sizeText="" addressText=""/> 19 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="smartPro_Debug" sizeText="" addressText=""/> 20 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="smartPro_Debug125A_12V" sizeText="" addressText=""/> 17 21 </Memory1> 18 22 <Memory2> … … 20 24 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="PowerPro_Debug" sizeText="" addressText=""/> 21 25 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="PowerPro_Release" sizeText="" addressText=""/> 26 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="smartPro_Debug" sizeText="" addressText=""/> 27 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="smartPro_Debug125A_12V" sizeText="" addressText=""/> 22 28 </Memory2> 23 29 <Memory3> … … 25 31 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="PowerPro_Debug" sizeText="" addressText=""/> 26 32 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="PowerPro_Release" sizeText="" addressText=""/> 33 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="smartPro_Debug" sizeText="" addressText=""/> 34 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="smartPro_Debug125A_12V" sizeText="" addressText=""/> 27 35 </Memory3> 28 36 <Memory4> … … 30 38 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="PowerPro_Debug" sizeText="" addressText=""/> 31 39 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="PowerPro_Release" sizeText="" addressText=""/> 40 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="smartPro_Debug" sizeText="" addressText=""/> 41 <MemoryWindow addressSpace="" dataSize="1" autoEvaluate="0" viewMode="0" viewType="4" addressOrder="0" columnsText="" refreshPeriod="0" name="smartPro_Debug125A_12V" sizeText="" addressText=""/> 32 42 </Memory4> 33 43 <Project> 34 44 <ProjectSessionItem path="smartPro"/> 35 45 <ProjectSessionItem path="smartPro;smartPro"/> 36 <ProjectSessionItem path="smartPro;smartPro;Source Files"/> 46 <ProjectSessionItem path="smartPro;smartPro;core"/> 47 <ProjectSessionItem path="smartPro;smartPro;core;inc"/> 48 <ProjectSessionItem path="smartPro;smartPro;core;src"/> 49 <ProjectSessionItem path="smartPro;smartPro;HAL"/> 50 <ProjectSessionItem path="smartPro;smartPro;HAL;inc"/> 51 <ProjectSessionItem path="smartPro;smartPro;HAL;src"/> 52 <ProjectSessionItem path="smartPro;smartPro;inc"/> 53 <ProjectSessionItem path="smartPro;smartPro;Script Files"/> 54 <ProjectSessionItem path="smartPro;smartPro;src"/> 55 <ProjectSessionItem path="smartPro;smartPro;System Files_segger"/> 56 <ProjectSessionItem path="smartPro;smartPro;systemfiles_st"/> 37 57 </Project> 38 58 <Register1> … … 40 60 <RegisterWindow invisibleNodes="" visibleNodes="TIM16/TIM16_CR1;TIM16/TIM16_CR2;TIM16/TIM16_DIER;TIM16/TIM16_SR;TIM16/TIM16_EGR;TIM16/TIM16_CCMR1_input;TIM16/TIM16_CCMR1_output;TIM16/TIM16_CCER;TIM16/TIM16_CNT;TIM16/TIM16_PSC;TIM16/TIM16_ARR;TIM16/TIM16_RCR;TIM16/TIM16_CCR1;TIM16/TIM16_BDTR;TIM16/TIM16_DCR;TIM16/TIM16_DMAR;TIM16/TIM16_AF1;TIM16/TIM16_TISEL;TIM17/TIM17_CR1;TIM17/TIM17_CR2;TIM17/TIM17_DIER;TIM17/TIM17_SR;TIM17/TIM17_EGR;TIM17/TIM17_CCMR1_input;TIM17/TIM17_CCMR1_output;TIM17/TIM17_CCER;TIM17/TIM17_CNT;TIM17/TIM17_PSC;TIM17/TIM17_ARR;TIM17/TIM17_RCR;TIM17/TIM17_CCR1;TIM17/TIM17_BDTR;TIM17/TIM17_DCR;TIM17/TIM17_DMAR;TIM17/TIM17_AF1;TIM17/TIM17_TISEL" binaryNodes="" asciiNodes="" openNodes="TIM16/TIM16_SR;TIM16/TIM16_CCER;TIM16/TIM16_CCR1;TIM17" name="PowerPro_Debug" decimalNodes="TIM17/TIM17_ARR;TIM17/TIM17_CCR1" octalNodes="" unsignedNodes="TIM16/TIM16_CNT;TIM16/TIM16_CCR1"/> 41 61 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="PowerPro_Release" decimalNodes="" octalNodes="" unsignedNodes=""/> 62 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/BASEPRI;CPU/FAULTMASK;CPU/CONTROL;CPU/internal;ADC1/ISR;ADC1/IER;ADC1/CR;ADC1/CFGR;ADC1/CFGR2;ADC1/SMPR1;ADC1/SMPR2;ADC1/TR1;ADC1/TR2;ADC1/TR3;ADC1/SQR1;ADC1/SQR2;ADC1/SQR3;ADC1/SQR4;ADC1/DR;ADC1/JSQR;ADC1/OFR1;ADC1/OFR2;ADC1/OFR3;ADC1/OFR4;ADC1/JDR1;ADC1/JDR2;ADC1/JDR3;ADC1/JDR4;ADC1/AWD2CR;ADC1/AWD3CR;ADC1/DIFSEL;ADC1/CALFACT;ADC1/GCOMP;ADC5/ISR;ADC5/IER;ADC5/CR;ADC5/CFGR;ADC5/CFGR2;ADC5/SMPR1;ADC5/SMPR2;ADC5/TR1;ADC5/TR2;ADC5/TR3;ADC5/SQR1;ADC5/SQR2;ADC5/SQR3;ADC5/SQR4;ADC5/DR;ADC5/JSQR;ADC5/OFR1;ADC5/OFR2;ADC5/OFR3;ADC5/OFR4;ADC5/JDR1;ADC5/JDR2;ADC5/JDR3;ADC5/JDR4;ADC5/AWD2CR;ADC5/AWD3CR;ADC5/DIFSEL;ADC5/CALFACT;ADC5/GCOMP" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context;ADC1;ADC1/DR;ADC5;ADC5/CFGR;ADC5/DR" name="smartPro_Debug" decimalNodes="" octalNodes="" unsignedNodes=""/> 63 <RegisterWindow invisibleNodes="" visibleNodes="VREFBUF/VREFBUF_CSR;VREFBUF/VREFBUF_CCR;ADC345_Common/CSR;ADC345_Common/CCR;ADC345_Common/CDR" binaryNodes="" asciiNodes="" openNodes="VREFBUF;VREFBUF/VREFBUF_CSR;VREFBUF/VREFBUF_CCR;ADC345_Common;ADC345_Common/CCR" name="smartPro_Debug125A_12V" decimalNodes="" octalNodes="" unsignedNodes=""/> 42 64 </Register1> 43 65 <Register2> … … 45 67 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="PowerPro_Debug" decimalNodes="" octalNodes="" unsignedNodes=""/> 46 68 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="PowerPro_Release" decimalNodes="" octalNodes="" unsignedNodes=""/> 69 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/BASEPRI;CPU/FAULTMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="smartPro_Debug" decimalNodes="" octalNodes="" unsignedNodes=""/> 70 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/BASEPRI;CPU/FAULTMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="smartPro_Debug125A_12V" decimalNodes="" octalNodes="" unsignedNodes=""/> 47 71 </Register2> 48 72 <Register3> … … 50 74 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="PowerPro_Debug" decimalNodes="" octalNodes="" unsignedNodes=""/> 51 75 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="PowerPro_Release" decimalNodes="" octalNodes="" unsignedNodes=""/> 76 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/BASEPRI;CPU/FAULTMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="smartPro_Debug" decimalNodes="" octalNodes="" unsignedNodes=""/> 77 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/BASEPRI;CPU/FAULTMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="smartPro_Debug125A_12V" decimalNodes="" octalNodes="" unsignedNodes=""/> 52 78 </Register3> 53 79 <Register4> … … 55 81 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="PowerPro_Debug" decimalNodes="" octalNodes="" unsignedNodes=""/> 56 82 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="PowerPro_Release" decimalNodes="" octalNodes="" unsignedNodes=""/> 83 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/BASEPRI;CPU/FAULTMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="smartPro_Debug" decimalNodes="" octalNodes="" unsignedNodes=""/> 84 <RegisterWindow invisibleNodes="" visibleNodes="CPU - Current Context/r0;CPU - Current Context/r1;CPU - Current Context/r2;CPU - Current Context/r3;CPU - Current Context/r4;CPU - Current Context/r5;CPU - Current Context/r6;CPU - Current Context/r7;CPU - Current Context/r8;CPU - Current Context/r9;CPU - Current Context/r10;CPU - Current Context/r11;CPU - Current Context/r12;CPU - Current Context/sp(r13);CPU - Current Context/lr(r14);CPU - Current Context/pc(r15);CPU - Current Context/apsr;CPU/r0;CPU/r1;CPU/r2;CPU/r3;CPU/r4;CPU/r5;CPU/r6;CPU/r7;CPU/r8;CPU/r9;CPU/r10;CPU/r11;CPU/r12;CPU/sp(r13);CPU/lr(r14);CPU/pc(r15);CPU/xpsr;CPU/MSP;CPU/PSP;CPU/PRIMASK;CPU/BASEPRI;CPU/FAULTMASK;CPU/CONTROL;CPU/internal" binaryNodes="" asciiNodes="" openNodes="CPU - Current Context" name="smartPro_Debug125A_12V" decimalNodes="" octalNodes="" unsignedNodes=""/> 57 85 </Register4> 58 86 <Threads> … … 63 91 </TraceWindow> 64 92 <Watch1> 65 <Watches active="1" update="Twice a Second"/> 93 <Watches active="1" update="Twice a Second"> 94 <Watchpoint expression="adc12Data" name="adc12Data" radix="-1" linenumber="72" filename="src/main.c"/> 95 <Watchpoint expression="adc1Data" name="adc1Data" radix="-1" linenumber="220" filename="src/main.c"/> 96 <Watchpoint expression="adc2Data" name="adc2Data" radix="-1" linenumber="82" filename="src/main.c"/> 97 <Watchpoint expression="adc5Data" name="adc5Data" radix="-1" linenumber="209" filename="src/main.c"/> 98 <Watchpoint expression="chiptemperature" name="chiptemperature" radix="-1" linenumber="78" filename="src/chip_temperature.c"/> 99 <Watchpoint expression="data" name="data" radix="-1" linenumber="719" filename="src/eeprom.c"/> 100 <Watchpoint expression="dataToStore" name="dataToStore" radix="-1" linenumber="403" filename="src/eeprom.c"/> 101 <Watchpoint expression="Dout" name="Dout" radix="16" linenumber="1008" filename="src/ads1260.c"/> 102 <Watchpoint expression="huart2" name="huart2" radix="-1" linenumber="28" filename="../Core/Src/usart.c"/> 103 <Watchpoint expression="modbusData" name="modbusData" radix="-1" linenumber="70" filename="src/main.c"/> 104 <Watchpoint expression="replyHeader" name="replyHeader" radix="16" linenumber="947" filename="src/ads1260.c"/> 105 <Watchpoint expression="sys_data" name="sys_data" radix="-1" linenumber="31" filename="src/sysdata.c"/> 106 <Watchpoint expression="uart" name="uart" radix="16" linenumber="191" filename="src/modbus.c"/> 107 </Watches> 66 108 </Watch1> 67 109 <Watch2> … … 74 116 <Watches active="0" update="Never"/> 75 117 </Watch4> 76 <Files/> 77 <EMStudioWindow activeProject="smartPro" fileDialogDefaultFilter="*" autoConnectTarget="J-Link" buildConfiguration="Debug" sessionSettings="" debugSearchFileMap="" fileDialogInitialDirectory="D:/Projekte/ecsSmartPro/trunk/fw_g473rct/SES/src" debugSearchPath="" autoConnectCapabilities="3199"/> 118 <Files> 119 <SessionOpenFile windowGroup="DockEditLeft" x="16" y="48" useTextEdit="1" path="src/main.c" left="0" top="38" codecName="Default"/> 120 <SessionOpenFile windowGroup="DockEditLeft" x="0" y="217" useTextEdit="1" path="../Core/Src/stm32g4xx_it.c" left="0" top="196" codecName="Default"/> 121 <SessionOpenFile windowGroup="DockEditLeft" x="0" y="420" useTextEdit="1" path="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_gpio.c" left="0" top="393" codecName="Default"/> 122 <SessionOpenFile windowGroup="DockEditLeft" x="0" y="0" useTextEdit="1" path="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_uart_ex.c" left="0" top="0" codecName="Default"/> 123 <SessionOpenFile windowGroup="DockEditLeft" x="161" y="1006" useTextEdit="1" path="src/ads1260.c" left="18" top="987" codecName="Default"/> 124 <SessionOpenFile windowGroup="DockEditLeft" x="0" y="0" useTextEdit="1" path="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_pwr.c" left="0" top="0" codecName="Default"/> 125 <SessionOpenFile windowGroup="DockEditLeft" x="4" y="112" useTextEdit="1" path="../Core/Src/gpio.c" left="0" top="97" codecName="Default"/> 126 <SessionOpenFile windowGroup="DockEditLeft" x="0" y="410" useTextEdit="1" path="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal.c" left="0" top="364" codecName="Default"/> 127 <SessionOpenFile windowGroup="DockEditLeft" x="57" y="46" useTextEdit="1" path="../Core/Src/spi.c" left="0" top="30" codecName="Default"/> 128 <SessionOpenFile windowGroup="DockEditLeft" x="25" y="40" useTextEdit="1" path="inc/ads1260.h" left="0" top="27" codecName="Default"/> 129 <SessionOpenFile windowGroup="DockEditLeft" x="18" y="797" useTextEdit="1" path="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_spi.h" left="0" top="784" codecName="Default"/> 130 <SessionOpenFile windowGroup="DockEditLeft" x="9" y="311" useTextEdit="1" path="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_crc.h" left="0" top="292" codecName="Default"/> 131 <SessionOpenFile windowGroup="DockEditLeft" x="20" y="50" useTextEdit="1" path="../Core/Src/crc.c" left="0" selected="1" top="30" codecName="Default"/> 132 <SessionOpenFile windowGroup="DockEditLeft" x="9" y="338" useTextEdit="1" path="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_crc.c" left="0" top="319" codecName="Default"/> 133 </Files> 134 <EMStudioWindow activeProject="smartPro" fileDialogDefaultFilter="*" autoConnectTarget="J-Link" buildConfiguration="Debug125A_12V" sessionSettings="" debugSearchFileMap="" fileDialogInitialDirectory="D:/Projekte/ecsSmartPro/trunk/fw_g473rct/Core/Src" debugSearchPath="" autoConnectCapabilities="3711"/> 78 135 </session> -
trunk/fw_g473rct/SES/src/ads1260.c
r20 r25 61 61 62 62 #define DEFAULT_ADS1260_TRANSMIT_TIMEOUT (10) 63 #define DEFAULT_ADS1260_TRANSMIT_RECEIVE_TIMEOUT (10 )63 #define DEFAULT_ADS1260_TRANSMIT_RECEIVE_TIMEOUT (1000) 64 64 #define ADS1260_SELF_OFFSET_CALIBRATION_TIMEOUT (2000) // > 16 * sampletime muss eingestellt werden 65 65 #define ADS1260_SYSTEM_OFFSET_CALIBRATION_TIMEOUT (2000) … … 776 776 777 777 /* 4*/ //while(HAL_GPIO_ReadPin(ADC_DATA_READY_GPIO_Port, ADC_DATA_READY_Pin) == GPIO_PIN_RESET); 778 HAL_NVIC_SetPriority(EXTI2_IRQn, 2, 0);779 HAL_NVIC_EnableIRQ(EXTI2_IRQn);778 //HAL_NVIC_SetPriority(EXTI2_IRQn, 2, 0); 779 //HAL_NVIC_EnableIRQ(EXTI2_IRQn); 780 780 781 781 /* 5*/ ADS_1260_SetExternalReference(&hspi3); … … 1005 1005 //HAL_GPIO_WritePin(ADC_SPI1_NSS_GPIO_Port, ADC_SPI1_NSS_Pin, GPIO_PIN_SET); 1006 1006 1007 if (Dout[0] == replyHeader && Dout[1] == Din[0] && Dout[2] == Din[1] && Dout[3] == Din[2] && Dout[5] == HAL_CRC_Calculate(&hcrc, (uint32_t*)&Dout[4], 1)) 1007 if (Dout[0] == replyHeader && Dout[1] == Din[0] && Dout[2] == Din[1] && Dout[3] == Din[2] && Dout[5] == HAL_CRC_Calculate(&hcrc, (uint32_t*)&Dout[4], 1)) 1008 1008 { 1009 1009 if ((Dout[4] & (1U << MODE3_STATENB)) && (Dout[4] & (1U << MODE3_CRCENB))) -
trunk/fw_g473rct/SES/src/battery_voltage.c
r24 r25 20 20 21 21 22 #define BATTERY_VOLTAGE_VOLTAGE_DIVIDER 6.023 #define ADC_RESOLUTION 32768.0 //65536/2 da im differential mode24 #define ADC_OFFSET 32768.025 22 26 23 // --- LOKALE TYPE DEFS - bitte hier dokumentieren------------------------------- … … 54 51 55 52 //Umrechung auf Eingangsspannung am Gerät mit Teiler 56 sys_data.s.values.batteryVoltage = ((avgVal- ADC_OFFSET) * VREF * BATTERY_VOLTAGE_VOLTAGE_DIVIDER ) /ADC_RESOLUTION;53 sys_data.s.values.batteryVoltage = ((avgVal-BATTERY_VOLTAGE_ADC_OFFSET) * VREF * BATTERY_VOLTAGE_VOLTAGE_DIVIDER ) / BATTERY_VOLTAGE_ADC_RESOLUTION; 57 54 58 55 … … 76 73 //Berechnung schnelle Wert ohne Glättung: 77 74 //Umrechung auf Eingangsspannung am Gerät mit Teiler 78 sys_data.s.values.fast_voltage = ((newVal- ADC_OFFSET) * VREF * BATTERY_VOLTAGE_VOLTAGE_DIVIDER ) /ADC_RESOLUTION;75 sys_data.s.values.fast_voltage = ((newVal-BATTERY_VOLTAGE_ADC_OFFSET) * VREF * BATTERY_VOLTAGE_VOLTAGE_DIVIDER ) / BATTERY_VOLTAGE_ADC_RESOLUTION; 79 76 80 77 -
trunk/fw_g473rct/SES/src/eeprom.c
r20 r25 94 94 int16_t uBatEmptyCompStopTemp; // We stop calculating uBatEmpty compensations when cell temperature is lower than this value 95 95 uint16_t uBatEmptyCompStopVolt; // uBatEmpty Voltage at temperatures lower than lvpCompStopTemp 96 97 96 int16_t extraDischargeStrom_mA; // For example, current that consumes LiPro itself 98 uint32_t dischargeTotalAh;99 uint32_t chargeTotalAh;100 uint32_t dischargeTotalWh; // 154-155 [mAs]101 uint32_t chargeTotalWh; // 156-157 [mAs]102 103 97 uint16_t cefW; 104 uint32_t onTime; 98 105 99 106 100 } eeprom_data_t; 107 101 108 typedef struct 109 { 110 // Schnittstellenparameter 111 uint32_t baudrate; 112 uint16_t parityMode; 113 uint16_t stopBits; 114 uint16_t slave_adress; 115 uint16_t ibn_day; 116 uint16_t ibn_month; 117 uint16_t ibn_year; 118 uint16_t user_id; 119 120 // Offset und Gain 121 int16_t batteryCurrentOffsetRefTemperatureShunt; 122 int16_t batteryCurrentOffsetRefTemperatureChip; 123 int16_t batteryCurrentGainRefTempShunt; 124 int16_t batteryCurrentGainRefTempChip; 125 int16_t batteryCurrentOffsetTemperatureCalibrationTemperature; 126 int16_t batteryCurrentGainTemperatureCalibrationShuntTemperature; 127 int16_t batteryCurrentGainTemperatureCalibrationChipTemperature; 128 int32_t batteryCurrentOffsetRefshuntVoltage; 129 int32_t batteryCurrentOffsetCommonModeCalibrationVoltage; 130 int32_t batteryCurrentOffsetCommonModeCompensationFactor; 131 int32_t batteryCurrentOffsetTemperatureCompensationFactor; 132 int32_t batteryCurrentGainRefCurrent; 133 int32_t batteryCurrentGainTemperatureCompensationShuntFactor; 134 int32_t batteryCurrentGainTemperatureCompensationChipFactor; 135 136 int32_t currentOffset; 137 uint32_t currentGain; 138 139 int64_t mAsCounter; 140 int32_t detectedCapacity; 141 int32_t detectedEnergy; 142 int32_t mAh_AutoMode; 143 int32_t mWh_AutoMode; 144 145 // battery parameter 146 uint16_t cef; 147 uint16_t peukert; 148 uint32_t cellCapacity; 149 uint32_t cellEnergy; 150 uint16_t iBatFull; 151 uint16_t tBatFull; 152 uint16_t uBatFull; 153 uint16_t uBatEmpty; 154 uint8_t socCalcMode; 155 uint16_t cellRatedDischargeTime; 156 157 // Schaltausgänge 158 uint16_t lvpStart; // Spannung ab der die LOW Voltage Protection aktiv wird in mV 159 uint16_t lvpStop; // Spannung ab der die LOW Voltage Protection wieder inaktiv wird 160 uint16_t ovpStart; // Spannung ab der die OVER Voltage Protection aktiv wird in mV 161 uint16_t ovpStop; // Spannung ab der die OVER Voltage Protection wieder inaktiv wird 162 int16_t loadCurrentLimit; // maximaler Laststrom in A wenn der Strom größer ist als der eingestelle Wert dann wird die Laststrom Protection aktiv 163 int16_t chargeCurrentLimit; // maximaler Ladestrom in A wenn der Strom größer ist als der eingestelle Wert dann wird die Ladestrom Protection aktiv 164 int16_t chargeStopHighTemperatureStart; // Abschalttemperatur Ladung wegen zu hoher Temperatur 165 int16_t chargeStopHighTemperatureStop; // Wiedereinschalttemperatur 166 int16_t chargeStopLowTemperatureStart; // Abschalttemperatur Ladung wegen zu niedriger Temperatur 167 int16_t chargeStopLowTemperatureStop; // Wiedereinschalttemperatur 168 int16_t dischargeStopHighTemperatureStart; // Abschalttemperatur Entladung wegen zu hoher Temperatur 169 int16_t dischargeStopHighTemperatureStop; // Wiedereinschalttemperatur 170 int16_t dischargeStopLowTemperatureStart; // Abschalttemperatur EntLadung wegen zu niedriger Temperatur 171 int16_t dischargeStopLowTemperatureStop; // Wiedereinschalttemperatur 172 173 int16_t uBatEmptyCompStartTemp; // We start calculating uBatEmpty compensations only when cell temperature is lower than this value 174 int16_t uBatEmptyCompStopTemp; // We stop calculating uBatEmpty compensations when cell temperature is lower than this value 175 uint16_t uBatEmptyCompStopVolt; // uBatEmpty Voltage at temperatures lower than lvpCompStopTemp 176 177 int16_t extraDischargeStrom_mA; // For example, current that consumes LiPro itself 178 uint32_t dischargeTotalAh; 179 uint32_t chargeTotalAh; 180 uint32_t dischargeTotalWh; // 154-155 [mAs] 181 uint32_t chargeTotalWh; // 156-157 [mAs] 182 183 uint16_t cefW; 184 uint32_t onTime; 185 186 }eeprom_old_data_t; 102 187 103 188 104 // Substitute for #if sizeof(some_type) == sizeof(another_type) functionality … … 248 164 249 165 // muss modulo 8 noch hinzufügen wg 8 byte alignement 250 static uint 64_t eepromData[(SIZE_OF_DATA_TO_STORE / 8) + 1];166 static uint8_t eepromData[SIZE_OF_DATA_TO_STORE]; 251 167 252 168 … … 336 252 337 253 /* extraDischargeStrom_mA */ 7, // mA, current that LiPro consumes itself 338 /* dischargeTotalAh */ 0, // Ah for negative current counter339 /* chargeTotalAh */ 0, // Ah for total charge counter340 /* dischargeTotalWh */ 0,341 /* chargeTotalWh */ 0,342 343 254 /* cefW */ 90, // 90% cef for Wh calculations 344 /* onTime */ 0255 345 256 346 257 }; … … 359 270 startType_t EEPROM_isFirstStart(void) 360 271 { 361 // sizeof eeprom_new_data_t must not be equal to size of eeprom_old_data_t362 BUILD_BUG_ON(sizeof(eeprom_data_t) == sizeof(eeprom_old_data_t));363 272 364 273 uint8_t firstStartCatcher; … … 390 299 { 391 300 eeprom_stored_data_t* dataToStore; 392 uint32_t PageError;393 uint32_t Address;394 uint32_t x;395 396 301 printf("EEPROM FULL RESTORE!\n"); 397 302 … … 458 363 459 364 dataToStore->changedData.extraDischargeStrom_mA = defaultEepromData.extraDischargeStrom_mA; 460 dataToStore->changedData.dischargeTotalAh = defaultEepromData.dischargeTotalAh;461 dataToStore->changedData.chargeTotalAh = defaultEepromData.chargeTotalAh;462 dataToStore->changedData.dischargeTotalWh = defaultEepromData.dischargeTotalWh;463 dataToStore->changedData.chargeTotalWh = defaultEepromData.chargeTotalWh;464 365 dataToStore->changedData.cefW = defaultEepromData.cefW; 465 dataToStore->changedData.onTime = defaultEepromData.onTime; 466 467 dataToStore->changedData.mAsCounter = defaultEepromData.mAsCounter; 468 dataToStore->changedData.detectedCapacity = defaultEepromData.detectedCapacity; 469 dataToStore->changedData.detectedEnergy = defaultEepromData.detectedEnergy; 470 dataToStore->changedData.mAs_AutoMode = defaultEepromData.mAs_AutoMode; 471 dataToStore->changedData.mWs_AutoMode = defaultEepromData.mWs_AutoMode; 472 366 367 368 473 369 // Eeprom Status Infos 474 370 dataToStore->eepromState.writeCounter++; … … 567 463 568 464 dataToStore->changedData.extraDischargeStrom_mA = defaultEepromData.extraDischargeStrom_mA; 569 dataToStore->changedData.dischargeTotalAh = defaultEepromData.dischargeTotalAh;570 dataToStore->changedData.chargeTotalAh = defaultEepromData.chargeTotalAh;571 465 dataToStore->changedData.cefW = defaultEepromData.cefW; 572 dataToStore->changedData.onTime = defaultEepromData.onTime; 573 574 // These fields are new 575 dataToStore->changedData.mAsCounter = defaultEepromData.mAsCounter; 576 dataToStore->changedData.detectedCapacity = defaultEepromData.detectedCapacity; 577 dataToStore->changedData.detectedEnergy = defaultEepromData.detectedEnergy; 578 dataToStore->changedData.mAs_AutoMode = defaultEepromData.mAs_AutoMode; 579 dataToStore->changedData.mWs_AutoMode = defaultEepromData.mWs_AutoMode; 580 dataToStore->changedData.dischargeTotalWh = defaultEepromData.dischargeTotalWh; 581 dataToStore->changedData.chargeTotalWh = defaultEepromData.chargeTotalWh; 582 466 467 468 469 583 470 584 471 dataToStore->eepromState.writeCounter = dataToStore->eepromState.writeCounter++; … … 599 486 { 600 487 eeprom_stored_data_t* dataToStore; 601 uint32_t PageError;602 uint32_t Address;603 uint32_t x;604 488 /****************LESE_WERTE_AUS_SYSDATA*********************/ 605 489 printf("EEPROM STORE CONFIG!\n"); … … 669 553 dataToStore->changedData.uBatEmptyCompStopTemp = data->s.parameter.uBatEmptyCompStopTemp; 670 554 dataToStore->changedData.uBatEmptyCompStopVolt = data->s.parameter.uBatEmptyCompStopVolt; 671 672 555 dataToStore->changedData.extraDischargeStrom_mA = data->s.parameter.extraDischargeStrom_mA; 673 dataToStore->changedData.dischargeTotalAh = data->s.values.dischargeTotalAh;674 dataToStore->changedData.chargeTotalAh = data->s.values.chargeTotalAh;675 dataToStore->changedData.dischargeTotalWh = data->s.values.dischargeTotalWh;676 dataToStore->changedData.chargeTotalWh = data->s.values.chargeTotalWh;677 556 dataToStore->changedData.cefW = data->s.parameter.cefW; 678 dataToStore->changedData.onTime = data->s.values.onTime; 679 680 dataToStore->changedData.mAsCounter = data->s.values.mAsCounter; 681 dataToStore->changedData.detectedCapacity = data->s.values.detectedCapacity; 682 dataToStore->changedData.detectedEnergy = data->s.values.detectedEnergy; 683 dataToStore->changedData.mAs_AutoMode = data->s.values.mAs_AutoMode; 684 dataToStore->changedData.mWs_AutoMode = data->s.values.mWs_AutoMode; 685 557 686 558 // Eeprom Status Infos 687 559 dataToStore->eepromState.writeCounter++; … … 781 653 782 654 data->s.parameter.extraDischargeStrom_mA = dataToStore->changedData.extraDischargeStrom_mA; 655 data->s.parameter.cefW = dataToStore->changedData.cefW; 656 657 658 // Geräteinformation 659 data->s.parameter.sn = dataToStore->deviceInfo.SN; 660 661 // prüfe Eeprom Status Infos 662 //dataToStore->eepromState.writeCounter ++ ; 663 if (dataToStore->eepromState.structureSize != sizeof(eeprom_stored_data_t)) return HAL_ERROR; 664 if (dataToStore->eepromState.revisionInfo != 0) return HAL_ERROR; 665 if (dataToStore->eepromState.firstStartId != CONFIG_ID) return HAL_ERROR; 666 667 668 return HAL_OK; 669 } 670 671 /*Entfernte EEPROM Werte 672 783 673 data->s.values.dischargeTotalAh = dataToStore->changedData.dischargeTotalAh; 784 674 data->s.values.chargeTotalAh = dataToStore->changedData.chargeTotalAh; 785 675 data->s.values.dischargeTotalWh = dataToStore->changedData.dischargeTotalWh; 786 676 data->s.values.chargeTotalWh = dataToStore->changedData.chargeTotalWh; 787 data->s.parameter.cefW = dataToStore ->changedData.cefW;788 677 data->s.values.onTime = dataToStore->changedData.onTime; 789 790 678 data->s.values.mAsCounter = dataToStore->changedData.mAsCounter; 791 679 data->s.values.detectedCapacity = dataToStore->changedData.detectedCapacity; … … 793 681 data->s.values.mAs_AutoMode = dataToStore->changedData.mAs_AutoMode; 794 682 data->s.values.mWs_AutoMode = dataToStore->changedData.mWs_AutoMode; 795 796 // Geräteinformation 797 data->s.parameter.sn = dataToStore->deviceInfo.SN; 798 799 // prüfe Eeprom Status Infos 800 //dataToStore->eepromState.writeCounter ++ ; 801 if (dataToStore->eepromState.structureSize != sizeof(eeprom_stored_data_t)) return HAL_ERROR; 802 if (dataToStore->eepromState.revisionInfo != 0) return HAL_ERROR; 803 if (dataToStore->eepromState.firstStartId != CONFIG_ID) return HAL_ERROR; 804 805 return HAL_OK; 806 } 683 */ 684 807 685 808 686 //--- NEW Functions -
trunk/fw_g473rct/SES/src/esr.c
r20 r25 4 4 #include "esr.h" 5 5 #include <stdlib.h> 6 #include <stdio.h> 6 #include "main.h" 7 #include "battery_voltage.h" 8 #include "fast_current.h" 9 7 10 8 11 9 12 int32_t current_buffer[SAMPLE_ARRAY_SIZE]; 10 13 int32_t voltage_buffer[SAMPLE_ARRAY_SIZE]; 11 int32_t current_buffer_fast[SAMPLE_ARRAY_SIZE]; 12 int32_t voltage_buffer_fast[SAMPLE_ARRAY_SIZE]; 14 //int32_t current_buffer_fast[SAMPLE_ARRAY_SIZE]; 15 //int32_t voltage_buffer_fast[SAMPLE_ARRAY_SIZE]; 16 17 extern uint16_t adc12Data[SAMPLE_ARRAY_SIZE][2]; 13 18 14 19 … … 105 110 for (x=0; x < SAMPLE_ARRAY_SIZE; x++) 106 111 { 107 sys_data.s.values.current_buffer[(SAMPLE_ARRAY_SIZE-1)-x] = current_buffer[x];108 sys_data.s.values.voltage_buffer[(SAMPLE_ARRAY_SIZE-1)-x] = voltage_buffer[x];112 sys_data.s.values.current_buffer[(SAMPLE_ARRAY_SIZE-1)-x] = adc12Data[x][0]; 113 sys_data.s.values.voltage_buffer[(SAMPLE_ARRAY_SIZE-1)-x] = adc12Data[x][1]; 109 114 } 110 115 … … 126 131 sys_data.s.values.esrCalcTime = sys_data.s.values.onTime - last_refresh; 127 132 128 for (x=SAMPLE_ARRAY_SIZE-1; x>0; x--)129 {130 current_buffer_fast[x] = current_buffer_fast[x-1];131 voltage_buffer_fast[x] = voltage_buffer_fast[x-1];132 }133 134 // Neue Werte ins array aufnehmen135 current_buffer_fast[0] = sys_data.s.values.fast_current;136 voltage_buffer_fast[0] = sys_data.s.values.shuntVoltage;137 133 138 134 … … 150 146 for (x=0; x < SAMPLE_ARRAY_SIZE; x++) 151 147 { 152 if (a bs(current_buffer_fast[x]) < minI) { minI = abs(current_buffer_fast[x]); minIPos = x; }153 if (a bs(current_buffer_fast[x]) >= maxI) { maxI = abs(current_buffer_fast[x]); maxdIPos = x; }154 if (a bs(voltage_buffer_fast[x]) < minU) { minU = abs(voltage_buffer_fast[x]); minUPos = x; }155 if (a bs(voltage_buffer_fast[x]) > maxU) { maxU = abs(voltage_buffer_fast[x]); maxUPos = x; }148 if (adc12Data[x][0] < minI) { minI = adc12Data[x][0]; minIPos = x; } 149 if (adc12Data[x][0] >= maxI) { maxI = adc12Data[x][0]; maxdIPos = x; } 150 if (adc12Data[x][1] < minU) { minU = adc12Data[x][1]; minUPos = x; } 151 if (adc12Data[x][1] > maxU) { maxU = adc12Data[x][1]; maxUPos = x; } 156 152 } 157 153 … … 160 156 161 157 //Delta berechnen 162 int32_t dI = abs (maxI - minI); 163 int32_t dU = abs (maxU - minU); 158 int32_t dI = maxI - minI; 159 int32_t dU = maxU - minU; 160 161 //Umrechnung in mV / mA 162 dI = dI * ((int64_t) VREF / FAST_CURRENT_SHUNT_RESISTOR / FAST_CURRENT_I_SENSE_GAIN / FAST_CURRENT_ADC_RESOLUTION); 163 dI = dI * (sys_data.s.parameter.batteryCurrentGainCorrectionFaktor / 1000000.0); 164 165 dU = dU * VREF * BATTERY_VOLTAGE_VOLTAGE_DIVIDER / BATTERY_VOLTAGE_ADC_RESOLUTION ; 166 164 167 165 168 //Minimale Belastung Prüfen ob es genügent Änderungen gab … … 168 171 int32_t min_dI; 169 172 min_dI = sys_data.s.parameter.cellCapacity / sys_data.s.parameter.cellRatedDischargeTime; //Nennlaststrom in mA 170 min_dI = min_dI / 4 ; 171 172 int32_t min_dU = 100; 173 174 if( dI < min_dI) 173 min_dI = min_dI / 10 ; 174 175 176 int32_t min_dU = 10; 177 178 if( abs(dI) < min_dI) 175 179 { 176 180 … … 180 184 //printf("dI change!\r\n"); 181 185 182 if ( dU< min_dU) {186 if (abs(dU) < min_dU) { 183 187 return -2; 184 188 } … … 191 195 int32_t dIMaxPos=-1; 192 196 197 198 199 //Finde Position der flanke 193 200 for (x=0; x < (SAMPLE_ARRAY_SIZE-1); x++) 194 201 { 195 dIx = a bs(current_buffer_fast[x+1] - current_buffer_fast[x]);202 dIx = adc12Data[x+1][0] - adc12Data[x][0]; 196 203 if (dIx > dIMax) { dIMax = dIx; dIMaxPos = x; } 197 204 } 198 205 199 200 201 if (dIMaxPos == SAMPLE_ARRAY_SIZE / 2) 202 { 203 //ESR berechnen! 204 sys_data.s.values.esr_fast = ( (double)dU / (double) dI) * 1000; 205 last_refresh = sys_data.s.values.onTime; 206 207 208 for (x=0; x < SAMPLE_ARRAY_SIZE; x++) 209 { 210 sys_data.s.values.current_buffer_fast[(SAMPLE_ARRAY_SIZE-1)-x] = current_buffer_fast[x]; 211 sys_data.s.values.voltage_buffer_fast[(SAMPLE_ARRAY_SIZE-1)-x] = voltage_buffer_fast[x]; 212 } 213 214 215 216 217 } 206 if ((dIMaxPos < 5 ) || (dIMaxPos > (SAMPLE_ARRAY_SIZE-5) )) 207 { 208 return -3; 209 } 210 211 212 //ESR berechnen! 213 sys_data.s.values.esr_fast = ( (double)dU / (double) dI) * 1000; 214 last_refresh = sys_data.s.values.onTime; 215 216 217 for (x=0; x < SAMPLE_ARRAY_SIZE; x++) 218 { 219 sys_data.s.values.current_buffer_fast[x] = (int32_t) adc12Data[x][0] - FAST_CURRENT_ADC_OFFSET ; 220 sys_data.s.values.voltage_buffer_fast[x] = (int32_t) adc12Data[x][1] - BATTERY_VOLTAGE_ADC_OFFSET ; 221 } 222 223 224 225 226 218 227 return 0; 219 228 } -
trunk/fw_g473rct/SES/src/fast_current.c
r24 r25 17 17 18 18 // --- LOKALE DEFINES - bitte hier dokumentieren -------------------------------- 19 20 #define I_SENSE_GAIN 40.021 #define ADC_OFFSET 3276822 #define ADC_RESOLUTION 32768 //65536/2 da im differential mode23 24 25 #if (DEVICETYPE == 500)26 #define SHUNT_RESISTOR 0.00012527 #elif (DEVICETYPE == 250)28 #define SHUNT_RESISTOR 0.00025029 #elif (DEVICETYPE == 125)30 #define SHUNT_RESISTOR 0.00050031 #else32 #error No valid device type33 #endif34 35 19 36 20 … … 55 39 //Umrechung auf Strom 56 40 double temp_current; 57 temp_current = ((int32_t) newVal - ADC_OFFSET) * VREF ;58 temp_current = temp_current / ADC_RESOLUTION;59 temp_current = temp_current / I_SENSE_GAIN ;60 temp_current = temp_current / SHUNT_RESISTOR ;41 temp_current = ((int32_t) newVal - FAST_CURRENT_ADC_OFFSET) * VREF ; 42 temp_current = temp_current / FAST_CURRENT_ADC_RESOLUTION; 43 temp_current = temp_current / FAST_CURRENT_I_SENSE_GAIN ; 44 temp_current = temp_current / FAST_CURRENT_SHUNT_RESISTOR ; 61 45 sys_data.s.values.fast_current = temp_current * (sys_data.s.parameter.batteryCurrentGainCorrectionFaktor / 1000000.0); 62 46 -
trunk/fw_g473rct/SES/src/main.c
r24 r25 44 44 #include "chip_temperature.h" 45 45 #include "shunt_temperature.h" 46 #include "esr.h" 47 #include "ads1260.h" 48 #include "outputs.h" 49 #include "crc.h" 46 50 /* USER CODE END Includes */ 47 51 … … 139 143 MX_USB_PCD_Init(); 140 144 /* USER CODE BEGIN 2 */ 145 MX_CRC_Init(); //Cube is not generating this call ?! 141 146 printf("Test debug io\r\n"); 142 147 SYS_DATA_Init(); … … 207 212 Error_Handler(); 208 213 } 214 215 216 // ADS1260 Initialierung 217 ADS1260_init(); 218 printf("ADS1260 Init\n"); 219 OUTPUTS_Init(); 209 220 210 221 /* USER CODE END 2 */ … … 249 260 sys_data.s.values.lvp_sense = (adc5Data[3] * VREF * 21 ) / 65536.0; 250 261 } 262 263 264 if (newCurrentValue == 1) 265 { 266 ADS1260_ConversionFinished(); 267 ESR_Exec(); 268 269 newCurrentValue = 0; 270 271 } 251 272 252 273 if(sys_data.s.parameter.command != 0) -
trunk/fw_g473rct/SES/src/sysdata.c
r23 r25 37 37 38 38 39 sys_data.s.parameter.fw_revision_major = 2;40 sys_data.s.parameter.fw_revision_minor = 1;41 sys_data.s.parameter.fw_revision_revision = 5;39 sys_data.s.parameter.fw_revision_major = 1; 40 sys_data.s.parameter.fw_revision_minor = 0; 41 sys_data.s.parameter.fw_revision_revision = 0; 42 42 43 43 sys_data.s.values.batteryCurrentMax = INT32_MIN; … … 53 53 sys_data.s.parameter.test[3] = 5; 54 54 55 sys_data.s.values.message[0] = 'a'; 56 sys_data.s.values.message[1] = 'b'; 57 sys_data.s.values.message[18] = 'y'; 58 sys_data.s.values.message[19] = 'z'; 59 55 60 }
Note: See TracChangeset
for help on using the changeset viewer.
