Changeset 76 for trunk/fw_g473rct/SES
- Timestamp:
- Sep 9, 2026, 3:02:30 PM (11 days ago)
- Location:
- trunk/fw_g473rct/SES
- Files:
-
- 5 edited
-
inc/battery_voltage_fast.h (modified) (1 diff)
-
smartPro.emProject (modified) (6 diffs)
-
src/ads1260.c (modified) (2 diffs)
-
src/battery_voltage_fast.c (modified) (1 diff)
-
src/shunt_voltage_fast.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/fw_g473rct/SES/inc/battery_voltage_fast.h
r73 r76 18 18 19 19 20 #define BATTERY_VOLTAGE_FAST_ADC_RESOLUTION 65536 21 #define BATTERY_VOLTAGE_FAST_ADC_OFFSET 32768 20 21 #ifdef ADCOFFSET 22 #define BATTERY_VOLTAGE_FAST_ADC_RESOLUTION 65536 23 #define BATTERY_VOLTAGE_FAST_ADC_OFFSET 32768 24 #else 25 #define BATTERY_VOLTAGE_FAST_ADC_RESOLUTION 32768 26 #define BATTERY_VOLTAGE_FAST_ADC_OFFSET 32768 27 #endif 22 28 23 29 //--- GLOBALE VARIABLEN PROTOTYPEN --------------------------------------------- -
trunk/fw_g473rct/SES/smartPro.emProject
r75 r76 71 71 <configuration 72 72 Name="Debug125A_48V_GM" 73 c_preprocessor_definitions="DEFAULT_PARAMETER_SYSTEM_VOLTAGE_12V;BATTERY_VOLTAGE_VOLTAGE_DIVIDER=44;SHUNT_VOLTAGE_VOLTAGE_DIVIDER=44;DEVICETYPE=125;NO_USB_SUPPORT;NO_TRISTATE_OUTPUTS " />73 c_preprocessor_definitions="DEFAULT_PARAMETER_SYSTEM_VOLTAGE_12V;BATTERY_VOLTAGE_VOLTAGE_DIVIDER=44;SHUNT_VOLTAGE_VOLTAGE_DIVIDER=44;DEVICETYPE=125;NO_USB_SUPPORT;NO_TRISTATE_OUTPUTS;ADS1261;ADCOFFSET" /> 74 74 <configuration 75 75 Name="Debug250A_12V" 76 c_preprocessor_definitions="DEVICETYPE= 125;DEFAULT_PARAMETER_SYSTEM_VOLTAGE_12V;BATTERY_VOLTAGE_VOLTAGE_DIVIDER=6;SHUNT_VOLTAGE_VOLTAGE_DIVIDER=6" />76 c_preprocessor_definitions="DEVICETYPE=250;DEFAULT_PARAMETER_SYSTEM_VOLTAGE_12V;BATTERY_VOLTAGE_VOLTAGE_DIVIDER=6;SHUNT_VOLTAGE_VOLTAGE_DIVIDER=6" /> 77 77 <configuration 78 78 Name="Release125A_12V" … … 90 90 Name="Release125A_48V_GM" 91 91 arm_library_optimization="Fast" 92 c_preprocessor_definitions="DEFAULT_PARAMETER_SYSTEM_VOLTAGE_12V;BATTERY_VOLTAGE_VOLTAGE_DIVIDER=44;SHUNT_VOLTAGE_VOLTAGE_DIVIDER=44;DEVICETYPE=125;NO_USB_SUPPORT;NO_TRISTATE_OUTPUTS "92 c_preprocessor_definitions="DEFAULT_PARAMETER_SYSTEM_VOLTAGE_12V;BATTERY_VOLTAGE_VOLTAGE_DIVIDER=44;SHUNT_VOLTAGE_VOLTAGE_DIVIDER=44;DEVICETYPE=125;NO_USB_SUPPORT;NO_TRISTATE_OUTPUTS;ADS1261;ADCOFFSET" 93 93 gcc_debugging_level="None" 94 94 gcc_optimization_level="Level 2 for speed" … … 100 100 <folder Name="inc"> 101 101 <file file_name="../Core/Inc/adc.h" /> 102 <file file_name="../Core/Inc/dac.h" /> 102 103 <file file_name="../Core/Inc/dma.h" /> 103 104 <file file_name="../Core/Inc/fdcan.h" /> … … 115 116 <file file_name="../Core/Src/adc.c" /> 116 117 <file file_name="../Core/Src/crc.c" /> 118 <file file_name="../Core/Src/dac.c" /> 117 119 <file file_name="../Core/Src/dma.c" /> 118 120 <file file_name="../Core/Src/gpio.c" /> … … 134 136 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h" /> 135 137 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_cortex.h" /> 138 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac.h" /> 139 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dac_ex.h" /> 136 140 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h" /> 137 141 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h" /> … … 185 189 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_crc.c" /> 186 190 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_crc_ex.c" /> 191 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dac.c" /> 192 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dac_ex.c" /> 187 193 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma.c" /> 188 194 <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma_ex.c" /> -
trunk/fw_g473rct/SES/src/ads1260.c
r73 r76 960 960 } 961 961 962 #ifdef ADS1261 962 963 if (channelInProgress==0) 963 964 { … … 978 979 channelInProgress=0; 979 980 } 980 981 #else 982 ADS1260_ProcessCurrent(value); 983 //ADS_1260_InputMuxSelect(&hspi3, POS_INPUT_MUX_SELECT_AIN4 + NEG_INPUT_MUX_SELECT_AIN5,1); 984 //channelInProgress=0; 985 #endif 981 986 ADS1260_StartConversion(); 982 987 } -
trunk/fw_g473rct/SES/src/battery_voltage_fast.c
r73 r76 43 43 sys_data.s.values.batteryVoltageFast = ((newVal - BATTERY_VOLTAGE_FAST_ADC_OFFSET) * (int64_t)VREF * BATTERY_VOLTAGE_VOLTAGE_DIVIDER / BATTERY_VOLTAGE_FAST_ADC_RESOLUTION) - sys_data.s.parameter.batteryVoltageFastOffset; 44 44 45 46 47 #ifdef ADS1261 48 //Batteriespannung wird vom ADS1261 genommen. Wird im ADS Modul ausgewertet 49 #else 50 sys_data.s.values.batteryVoltage = ((newVal - BATTERY_VOLTAGE_FAST_ADC_OFFSET ) * (int64_t)VREF * BATTERY_VOLTAGE_VOLTAGE_DIVIDER / BATTERY_VOLTAGE_FAST_ADC_RESOLUTION) - sys_data.s.parameter.batteryVoltageFastOffset; 51 52 53 #endif 54 45 55 } 46 56 -
trunk/fw_g473rct/SES/src/shunt_voltage_fast.c
r73 r76 18 18 extern __IO int32_t adc4Data[SAMPLE_ARRAY_SIZE] __attribute__((section(".RAM1_CRC"))); 19 19 // --- LOKALE DEFINES - bitte hier dokumentieren -------------------------------- 20 #define SHUNT_VOLTAGE_FAST_ADC_RESOLUTION 6553621 #define SHUNT_VOLTAGE_FAST_ADC_OFFSET 3276820 //#define SHUNT_VOLTAGE_FAST_ADC_RESOLUTION 65536 21 //#define SHUNT_VOLTAGE_FAST_ADC_OFFSET 32768 22 22 23 23 24 #ifdef ADCOFFSET 25 #define SHUNT_VOLTAGE_FAST_ADC_RESOLUTION 65536 26 #define SHUNT_VOLTAGE_FAST_ADC_OFFSET 32768 27 #else 28 #define SHUNT_VOLTAGE_FAST_ADC_RESOLUTION 32768 29 #define SHUNT_VOLTAGE_FAST_ADC_OFFSET 32768 30 #endif 24 31 25 32 … … 51 58 sys_data.s.values.shuntVoltageFast = ((newval - SHUNT_VOLTAGE_FAST_ADC_OFFSET) * (int64_t) (VREF) * SHUNT_VOLTAGE_VOLTAGE_DIVIDER / SHUNT_VOLTAGE_FAST_ADC_RESOLUTION) - sys_data.s.parameter.shuntVoltageFastOffset ; 52 59 60 #ifdef ADS1261 61 //Batteriespannung wird vom ADS1261 genommen 62 #else 63 sys_data.s.values.shuntVoltage = ((newval - SHUNT_VOLTAGE_FAST_ADC_OFFSET) * (int64_t) (VREF) * SHUNT_VOLTAGE_VOLTAGE_DIVIDER / SHUNT_VOLTAGE_FAST_ADC_RESOLUTION) - sys_data.s.parameter.shuntVoltageFastOffset ; 64 65 66 #endif 67 68 69 53 70 } 54 71
Note:
See TracChangeset
for help on using the changeset viewer.
