Changeset 76 for trunk/fw_g473rct/SES


Ignore:
Timestamp:
Sep 9, 2026, 3:02:30 PM (11 days ago)
Author:
f.jahn
Message:
 
Location:
trunk/fw_g473rct/SES
Files:
5 edited

Legend:

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

    r73 r76  
    1818
    1919
    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
    2228
    2329//--- GLOBALE VARIABLEN PROTOTYPEN ---------------------------------------------
  • trunk/fw_g473rct/SES/smartPro.emProject

    r75 r76  
    7171    <configuration
    7272      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" />
    7474    <configuration
    7575      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" />
    7777    <configuration
    7878      Name="Release125A_12V"
     
    9090      Name="Release125A_48V_GM"
    9191      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"
    9393      gcc_debugging_level="None"
    9494      gcc_optimization_level="Level 2 for speed"
     
    100100      <folder Name="inc">
    101101        <file file_name="../Core/Inc/adc.h" />
     102        <file file_name="../Core/Inc/dac.h" />
    102103        <file file_name="../Core/Inc/dma.h" />
    103104        <file file_name="../Core/Inc/fdcan.h" />
     
    115116        <file file_name="../Core/Src/adc.c" />
    116117        <file file_name="../Core/Src/crc.c" />
     118        <file file_name="../Core/Src/dac.c" />
    117119        <file file_name="../Core/Src/dma.c" />
    118120        <file file_name="../Core/Src/gpio.c" />
     
    134136        <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_adc_ex.h" />
    135137        <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" />
    136140        <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_def.h" />
    137141        <file file_name="../Drivers/STM32G4xx_HAL_Driver/Inc/stm32g4xx_hal_dma.h" />
     
    185189        <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_crc.c" />
    186190        <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" />
    187193        <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma.c" />
    188194        <file file_name="../Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma_ex.c" />
  • trunk/fw_g473rct/SES/src/ads1260.c

    r73 r76  
    960960    }
    961961
     962#ifdef ADS1261
    962963        if (channelInProgress==0)
    963964        {
     
    978979          channelInProgress=0;
    979980        }
    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
    981986        ADS1260_StartConversion();
    982987}
  • trunk/fw_g473rct/SES/src/battery_voltage_fast.c

    r73 r76  
    4343  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;
    4444
     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
    4555 }
    4656
  • trunk/fw_g473rct/SES/src/shunt_voltage_fast.c

    r73 r76  
    1818extern __IO int32_t adc4Data[SAMPLE_ARRAY_SIZE] __attribute__((section(".RAM1_CRC")));
    1919//      --- LOKALE DEFINES - bitte hier dokumentieren --------------------------------
    20 #define SHUNT_VOLTAGE_FAST_ADC_RESOLUTION                                                 65536
    21 #define SHUNT_VOLTAGE_FAST_ADC_OFFSET                                                     32768
     20//#define SHUNT_VOLTAGE_FAST_ADC_RESOLUTION                                               65536
     21//#define SHUNT_VOLTAGE_FAST_ADC_OFFSET                                                   32768
    2222
    2323
     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
    2431
    2532
     
    5158  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 ;
    5259
     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
    5370}
    5471
Note: See TracChangeset for help on using the changeset viewer.