From a2b632f8701e6b33afda072ed132f6ccdff44a1d Mon Sep 17 00:00:00 2001 From: The foxBMS ReleaseBot Date: Thu, 27 Oct 2022 14:40:20 +0200 Subject: [PATCH] Bugfix release of foxBMS 2 (v1.4.1) * The BMS Master hardware has been updated to v1.1.5. * CAN: * The implementation of the CAN driver has been changed to simplify adding new messages. * Endianness definition throughout the CAN signals was inconsistent. Not all signals were correctly defined as big-endian. * Updated the version of .sym file for the definition of the CAN messages to format version 6.0. * Fixed equation that does the conversion from raw ADC reading to voltage (mV). * Fixed the address for reading two diagnostic registers in the Smart Power Switch driver. * Maintenance: * TI CCS version 12.0.0, including TI ARM CGT 20.2.6, are now the defaults. * Update the Axivion static code analysis to version 7.4.6. For a detailed list of changes, please refer to the documentation at https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.4.1/general/changelog.html. --- .gitattributes | 3 + .gitignore | 5 + CITATION.cff | 4 +- conf/bms/schema/slave.schema.json | 31 +- conf/cc/cc-options.yaml | 2 +- conf/env/paths_linux.txt | 8 +- conf/env/paths_win32.txt | 12 +- conf/guidelines/rules.json | 7 +- conf/tpl/c.c | 4 +- conf/tpl/c.h | 4 +- conf/tpl/test_c.c | 4 +- conf/tpl/test_c.h | 4 +- .../hardware/{dummy => .dummy} | 0 .../style-guide/examples/c-004.c | 4 +- .../style-guide/guidelines_rst.rst | 4 +- .../state-machine-example/state-machine.c | 4 +- .../state-machine-example/state-machine.h | 4 +- docs/general/changelog.rst | 59 +- docs/general/commit-msgs/next-release.txt | 6 + docs/general/commit-msgs/release-v1.0.0.txt | 1 + docs/general/commit-msgs/release-v1.0.1.txt | 9 + docs/general/commit-msgs/release-v1.0.2.txt | 8 + docs/general/commit-msgs/release-v1.1.0.txt | 8 + docs/general/commit-msgs/release-v1.1.1.txt | 8 + docs/general/commit-msgs/release-v1.1.2.txt | 4 + docs/general/commit-msgs/release-v1.2.0.txt | 8 + docs/general/commit-msgs/release-v1.2.1.txt | 8 + docs/general/commit-msgs/release-v1.3.0.txt | 8 + docs/general/commit-msgs/release-v1.4.0.txt | 11 + docs/general/commit-msgs/release-v1.4.1.txt | 19 + docs/general/releases.csv | 1 + docs/general/releases.rst | 190 +- .../getting-started/software-installation.rst | 10 +- .../maxim-max17841b-v1.0.0.rst | 81 +- .../maxim-max17841b-v1.0.0_block_diagram.png | Bin 0 -> 16319 bytes .../maxim-max17841b-v1.0.0_block_diagram.pptx | 0 ...maxim-max17841b-v1.0.0_debug_connector.csv | 13 + ...axim-max17841b-v1.0.0_master_connector.csv | 41 + .../maxim-max17841b-v1.0.0_rendering.png | Bin 0 -> 117987 bytes ...xim-max17841b-v1.0.0_uartrx_connectors.csv | 3 + ...xim-max17841b-v1.0.0_uarttx_connectors.csv | 3 + docs/hardware/master.rst | 1 + .../ti-tms570lc4357-changelog.rst | 15 + .../ti-tms570lc4357-v1.1.5.rst | 15 + docs/macros.txt | 12 +- .../architecture/img/axivion_architecture.svg | 430 ++-- .../build-process/misc/libproject-example.c | 4 +- .../build-process/misc/libproject-example.h | 4 +- docs/software/modules/driver/can/can.rst | 27 +- .../modules/driver/can/can_how-to.rst | 187 +- .../modules/driver/can/can_how-to_tx.c | 118 + docs/software/modules/driver/can/wscript | 89 + .../driver/ts/murata/ncu15xh103f6sxx.rst | 16 + .../software/modules/driver/ts/ts-sensors.rst | 3 + .../modules/driver/ts/ts-short-names.csv | 1 + .../modules/engine/database/database_how-to.c | 4 +- .../modules/task/ftask/ftask_how-to.c | 4 +- docs/spelling_wordlist.txt | 2 + docs/tools/debugger/debugger-lauterbach.rst | 17 +- docs/tools/static-analysis/axivion.rst | 3 +- ide.bat | 7 + src/app/application/algorithm/algorithm.c | 4 +- src/app/application/algorithm/algorithm.h | 4 +- .../algorithm/config/algorithm_cfg.c | 4 +- .../algorithm/config/algorithm_cfg.h | 4 +- .../algorithm/moving_average/moving_average.c | 4 +- .../algorithm/moving_average/moving_average.h | 4 +- .../soc/counting/soc_counting.c | 4 +- .../soc/counting/soc_counting.h | 4 +- .../soc/counting/soc_counting_cfg.c | 4 +- .../soc/counting/soc_counting_cfg.h | 4 +- .../state_estimation/soc/debug/soc_debug.c | 4 +- .../state_estimation/soc/debug/soc_debug.h | 4 +- .../soc/debug/soc_debug_cfg.c | 4 +- .../soc/debug/soc_debug_cfg.h | 4 +- .../state_estimation/soc/none/soc_none.c | 4 +- .../state_estimation/soc/none/soc_none.h | 4 +- .../state_estimation/soc/none/soc_none_cfg.c | 4 +- .../state_estimation/soc/none/soc_none_cfg.h | 4 +- .../soe/counting/soe_counting.c | 4 +- .../soe/counting/soe_counting.h | 4 +- .../soe/counting/soe_counting_cfg.c | 4 +- .../soe/counting/soe_counting_cfg.h | 4 +- .../state_estimation/soe/debug/soe_debug.c | 4 +- .../state_estimation/soe/debug/soe_debug.h | 4 +- .../soe/debug/soe_debug_cfg.c | 4 +- .../soe/debug/soe_debug_cfg.h | 4 +- .../state_estimation/soe/none/soe_none.c | 4 +- .../state_estimation/soe/none/soe_none.h | 4 +- .../state_estimation/soe/none/soe_none_cfg.c | 4 +- .../state_estimation/soe/none/soe_none_cfg.h | 4 +- .../sof/trapezoid/sof_trapezoid.c | 104 +- .../sof/trapezoid/sof_trapezoid.h | 4 +- .../sof/trapezoid/sof_trapezoid_cfg.c | 55 +- .../sof/trapezoid/sof_trapezoid_cfg.h | 205 +- .../state_estimation/soh/debug/soh_debug.c | 4 +- .../state_estimation/soh/debug/soh_debug.h | 4 +- .../soh/debug/soh_debug_cfg.c | 4 +- .../soh/debug/soh_debug_cfg.h | 4 +- .../state_estimation/soh/none/soh_none.c | 4 +- .../state_estimation/soh/none/soh_none.h | 4 +- .../state_estimation/soh/none/soh_none_cfg.c | 4 +- .../state_estimation/soh/none/soh_none_cfg.h | 4 +- .../state_estimation/state_estimation.c | 4 +- .../state_estimation/state_estimation.h | 4 +- src/app/application/bal/bal.c | 4 +- src/app/application/bal/bal.h | 4 +- .../bal/history/bal_strategy_history.c | 4 +- .../bal/history/bal_strategy_history.h | 4 +- .../application/bal/none/bal_strategy_none.c | 4 +- .../application/bal/none/bal_strategy_none.h | 4 +- .../bal/voltage/bal_strategy_voltage.c | 4 +- .../bal/voltage/bal_strategy_voltage.h | 4 +- src/app/application/bms/bms.c | 556 ++++- src/app/application/bms/bms.h | 80 +- src/app/application/config/bal_cfg.c | 4 +- src/app/application/config/bal_cfg.h | 4 +- src/app/application/config/battery_cell_cfg.c | 4 +- src/app/application/config/battery_cell_cfg.h | 4 +- .../application/config/battery_system_cfg.c | 4 +- .../application/config/battery_system_cfg.h | 55 +- src/app/application/config/bms_cfg.h | 26 +- src/app/application/config/plausibility_cfg.h | 4 +- src/app/application/config/soa_cfg.c | 4 +- src/app/application/config/soa_cfg.h | 4 +- .../application/plausibility/plausibility.c | 4 +- .../application/plausibility/plausibility.h | 4 +- src/app/application/redundancy/redundancy.c | 10 +- src/app/application/redundancy/redundancy.h | 4 +- src/app/application/soa/soa.c | 4 +- src/app/application/soa/soa.h | 4 +- src/app/driver/adc/adc.c | 17 +- src/app/driver/adc/adc.h | 6 +- src/app/driver/afe/api/afe.h | 4 +- src/app/driver/afe/api/afe_dma.h | 4 +- src/app/driver/afe/api/afe_plausibility.c | 4 +- src/app/driver/afe/api/afe_plausibility.h | 4 +- .../afe/debug/default/api/debug_default_afe.c | 4 +- .../afe/debug/default/api/debug_default_afe.h | 4 +- .../debug/default/api/debug_default_afe_dma.c | 4 +- .../debug/default/api/debug_default_afe_dma.h | 4 +- .../debug/default/config/debug_default_cfg.c | 4 +- .../debug/default/config/debug_default_cfg.h | 4 +- .../driver/afe/debug/default/debug_default.c | 14 +- .../driver/afe/debug/default/debug_default.h | 4 +- .../driver/afe/ltc/6806/config/ltc_6806_cfg.c | 4 +- .../driver/afe/ltc/6806/config/ltc_6806_cfg.h | 4 +- src/app/driver/afe/ltc/6806/ltc_6806.c | 4 +- .../afe/ltc/6813-1/config/ltc_6813-1_cfg.c | 4 +- .../afe/ltc/6813-1/config/ltc_6813-1_cfg.h | 4 +- src/app/driver/afe/ltc/6813-1/ltc_6813-1.c | 4 +- src/app/driver/afe/ltc/api/ltc_afe.c | 4 +- .../afe/ltc/common/config/ltc_afe_dma_cfg.c | 4 +- .../afe/ltc/common/config/ltc_afe_dma_cfg.h | 4 +- .../driver/afe/ltc/common/config/ltc_cfg.h | 4 +- src/app/driver/afe/ltc/common/ltc.h | 4 +- src/app/driver/afe/ltc/common/ltc_afe_dma.c | 4 +- src/app/driver/afe/ltc/common/ltc_afe_dma.h | 4 +- src/app/driver/afe/ltc/common/ltc_defs.h | 4 +- src/app/driver/afe/maxim/api/mxm_afe.c | 4 +- .../driver/afe/maxim/common/config/mxm_cfg.c | 4 +- .../driver/afe/maxim/common/config/mxm_cfg.h | 4 +- src/app/driver/afe/maxim/common/mxm_17841b.c | 4 +- src/app/driver/afe/maxim/common/mxm_17841b.h | 4 +- src/app/driver/afe/maxim/common/mxm_1785x.c | 4 +- src/app/driver/afe/maxim/common/mxm_1785x.h | 4 +- .../driver/afe/maxim/common/mxm_1785x_tools.c | 4 +- .../driver/afe/maxim/common/mxm_1785x_tools.h | 4 +- .../afe/maxim/common/mxm_41b_register_map.h | 4 +- src/app/driver/afe/maxim/common/mxm_afe_dma.c | 4 +- src/app/driver/afe/maxim/common/mxm_afe_dma.h | 4 +- .../afe/maxim/common/mxm_basic_defines.h | 4 +- .../afe/maxim/common/mxm_battery_management.c | 4 +- .../afe/maxim/common/mxm_battery_management.h | 4 +- .../driver/afe/maxim/common/mxm_bitextract.c | 4 +- .../driver/afe/maxim/common/mxm_bitextract.h | 4 +- src/app/driver/afe/maxim/common/mxm_crc8.c | 4 +- src/app/driver/afe/maxim/common/mxm_crc8.h | 4 +- .../afe/maxim/common/mxm_register_map.h | 4 +- .../driver/afe/maxim/common/mxm_registry.c | 4 +- .../driver/afe/maxim/common/mxm_registry.h | 4 +- src/app/driver/afe/maxim/max17852/mxm_17852.c | 4 +- src/app/driver/afe/nxp/api/nxp_afe.c | 4 +- src/app/driver/afe/nxp/api/nxp_afe.h | 4 +- .../afe/nxp/mc33775a/api/nxp_mc33775a_afe.c | 4 +- .../afe/nxp/mc33775a/config/nxp_afe_dma_cfg.c | 4 +- .../afe/nxp/mc33775a/config/nxp_afe_dma_cfg.h | 4 +- .../nxp/mc33775a/config/nxp_mc33775a_cfg.c | 4 +- .../nxp/mc33775a/config/nxp_mc33775a_cfg.h | 4 +- src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.c | 4 +- src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.h | 4 +- .../driver/afe/nxp/mc33775a/nxp_mc33775a.c | 4 +- .../driver/afe/nxp/mc33775a/nxp_mc33775a.h | 4 +- .../afe/nxp/mc33775a/nxp_mc33775a_defs.h | 4 +- src/app/driver/can/can.c | 125 +- src/app/driver/can/can.h | 18 +- src/app/driver/can/cbs/can_helper.c | 4 +- src/app/driver/can/cbs/can_helper.h | 6 +- src/app/driver/can/cbs/rx/can_cbs_rx.h | 147 ++ .../can_cbs_rx_current-sensor.c} | 121 +- .../driver/can/cbs/{ => rx}/can_cbs_rx_imd.c | 50 +- .../driver/can/cbs/{ => rx}/can_cbs_rx_misc.c | 53 +- .../can_cbs_rx_state-request.c} | 61 +- .../can/cbs/{can_cbs.h => tx/can_cbs_tx.h} | 245 +- .../can_cbs_tx_cell-temperatures.c} | 122 +- .../can_cbs_tx_cell-voltages.c} | 75 +- .../can_cbs_tx_limit-values.c} | 34 +- .../can_cbs_tx_minimum-maximum-values.c} | 61 +- .../can_cbs_tx_pack-state-estimation.c} | 135 +- .../can/cbs/{ => tx}/can_cbs_tx_state.c | 199 +- .../tx/can_cbs_tx_string-state-estimation.c | 173 ++ .../can_cbs_tx_system-values.c} | 87 +- src/app/driver/checksum/checksum.c | 4 +- src/app/driver/checksum/checksum.h | 4 +- src/app/driver/config/can_cfg.c | 280 +-- src/app/driver/config/can_cfg.h | 224 +- .../config/can_cfg_rx-message-definitions.h | 275 +++ src/app/driver/config/can_cfg_rx.c | 103 + .../config/can_cfg_tx-message-definitions.h | 316 +++ src/app/driver/config/can_cfg_tx.c | 111 + .../driver/config/can_cfg_tx_boot-message.c | 175 ++ .../driver/config/can_cfg_tx_boot-message.h | 80 + src/app/driver/config/contactor_cfg.c | 32 +- src/app/driver/config/contactor_cfg.h | 55 +- src/app/driver/config/dma_cfg.c | 4 +- src/app/driver/config/dma_cfg.h | 4 +- src/app/driver/config/fram_cfg.c | 4 +- src/app/driver/config/fram_cfg.h | 4 +- src/app/driver/config/interlock_cfg.c | 4 +- src/app/driver/config/interlock_cfg.h | 4 +- src/app/driver/config/nxpfs85xx_cfg.c | 4 +- src/app/driver/config/nxpfs85xx_cfg.h | 4 +- src/app/driver/config/pex_cfg.c | 4 +- src/app/driver/config/pex_cfg.h | 4 +- src/app/driver/config/spi_cfg.c | 4 +- src/app/driver/config/spi_cfg.h | 4 +- src/app/driver/config/sps_cfg.c | 4 +- src/app/driver/config/sps_cfg.h | 27 +- src/app/driver/config/tsi_plausibility_cfg.h | 4 +- src/app/driver/contactor/contactor.c | 318 +-- src/app/driver/contactor/contactor.h | 86 +- src/app/driver/crc/crc.c | 4 +- src/app/driver/crc/crc.h | 4 +- src/app/driver/dma/dma.c | 4 +- src/app/driver/dma/dma.h | 4 +- src/app/driver/foxmath/foxmath.c | 4 +- src/app/driver/foxmath/foxmath.h | 4 +- src/app/driver/fram/fram.c | 4 +- src/app/driver/fram/fram.h | 4 +- src/app/driver/htsensor/htsensor.c | 4 +- src/app/driver/htsensor/htsensor.h | 4 +- src/app/driver/i2c/i2c.c | 4 +- src/app/driver/i2c/i2c.h | 4 +- .../driver/imd/bender/ir155/bender_ir155.c | 4 +- .../driver/imd/bender/ir155/bender_ir155.h | 4 +- .../imd/bender/ir155/bender_ir155_helper.c | 4 +- .../imd/bender/ir155/bender_ir155_helper.h | 4 +- .../bender/ir155/config/bender_ir155_cfg.h | 4 +- src/app/driver/imd/bender/ir155/wscript | 2 +- .../imd/bender/iso165c/bender_iso165c.c | 85 +- .../imd/bender/iso165c/bender_iso165c.h | 24 +- .../iso165c/config/bender_iso165c_cfg.c | 4 +- .../iso165c/config/bender_iso165c_cfg.h | 12 +- src/app/driver/imd/bender/iso165c/wscript | 2 +- src/app/driver/imd/imd.c | 4 +- src/app/driver/imd/imd.h | 4 +- src/app/driver/imd/none/no-imd.c | 4 +- src/app/driver/imd/none/no-imd.h | 4 +- src/app/driver/imd/none/wscript | 2 +- src/app/driver/interlock/interlock.c | 4 +- src/app/driver/interlock/interlock.h | 4 +- src/app/driver/io/io.c | 4 +- src/app/driver/io/io.h | 4 +- src/app/driver/led/led.c | 4 +- src/app/driver/led/led.h | 4 +- src/app/driver/mcu/mcu.c | 4 +- src/app/driver/mcu/mcu.h | 4 +- src/app/driver/meas/meas.c | 4 +- src/app/driver/meas/meas.h | 4 +- src/app/driver/pex/pex.c | 4 +- src/app/driver/pex/pex.h | 4 +- src/app/driver/pwm/pwm.c | 4 +- src/app/driver/pwm/pwm.h | 4 +- src/app/driver/rtc/rtc.c | 4 +- src/app/driver/rtc/rtc.h | 4 +- src/app/driver/sbc/nxpfs85xx.c | 4 +- src/app/driver/sbc/nxpfs85xx.h | 4 +- src/app/driver/sbc/sbc.c | 4 +- src/app/driver/sbc/sbc.h | 4 +- src/app/driver/spi/spi.c | 4 +- src/app/driver/spi/spi.h | 4 +- src/app/driver/spi/spi_cfg-helper.h | 4 +- src/app/driver/sps/sps.c | 12 +- src/app/driver/sps/sps.h | 4 +- src/app/driver/sps/sps_types.h | 4 +- src/app/driver/ts/api/tsi.h | 4 +- src/app/driver/ts/api/tsi_limits.c | 4 +- src/app/driver/ts/beta.c | 4 +- src/app/driver/ts/beta.h | 4 +- .../b57251v5103j060/epcos_b57251v5103j060.c | 4 +- .../b57251v5103j060/epcos_b57251v5103j060.h | 4 +- .../epcos_b57251v5103j060_lookup-table.c | 4 +- .../epcos_b57251v5103j060_polynomial.c | 4 +- .../b57861s0103f045/epcos_b57861s0103f045.c | 4 +- .../b57861s0103f045/epcos_b57861s0103f045.h | 4 +- .../epcos_b57861s0103f045_lookup-table.c | 4 +- .../epcos_b57861s0103f045_polynomial.c | 4 +- src/app/driver/ts/fake/none/fake_none.c | 4 +- src/app/driver/ts/fake/none/fake_none.h | 4 +- .../lookup-table/fake_none_lookup-table.c | 4 +- .../none/polynomial/fake_none_polynomial.c | 4 +- .../murata_ncu15xh103f6sxx_lookup-table.c | 75 + .../ncu15xh103f6sxx/murata_ncu15xh103f6sxx.c | 167 ++ .../ncu15xh103f6sxx/murata_ncu15xh103f6sxx.h | 121 + .../murata_ncu15xh103f6sxx_polynomial.c | 75 + src/app/driver/ts/temperature_sensor_defs.h | 4 +- .../vishay_ntcalug01a103g_lookup-table.c | 4 +- .../vishay_ntcalug01a103g_polynomial.c | 4 +- .../ntcalug01a103g/vishay_ntcalug01a103g.c | 4 +- .../ntcalug01a103g/vishay_ntcalug01a103g.h | 4 +- .../vishay_ntcle317e4103sba_lookup-table.c | 4 +- .../vishay_ntcle317e4103sba.c | 4 +- .../vishay_ntcle317e4103sba.h | 4 +- src/app/driver/wscript | 32 +- src/app/engine/config/database_cfg.c | 4 +- src/app/engine/config/database_cfg.h | 20 +- src/app/engine/config/diag_cfg.c | 11 +- src/app/engine/config/diag_cfg.h | 31 +- src/app/engine/config/sys_cfg.c | 10 +- src/app/engine/config/sys_cfg.h | 4 +- src/app/engine/config/sys_mon_cfg.c | 4 +- src/app/engine/config/sys_mon_cfg.h | 4 +- src/app/engine/database/database.c | 4 +- src/app/engine/database/database.h | 4 +- src/app/engine/database/database_helper.c | 4 +- src/app/engine/database/database_helper.h | 4 +- src/app/engine/diag/cbs/diag_cbs.h | 17 +- src/app/engine/diag/cbs/diag_cbs_afe.c | 4 +- src/app/engine/diag/cbs/diag_cbs_bms.c | 88 + src/app/engine/diag/cbs/diag_cbs_can.c | 4 +- src/app/engine/diag/cbs/diag_cbs_contactor.c | 26 +- .../engine/diag/cbs/diag_cbs_current-sensor.c | 4 +- src/app/engine/diag/cbs/diag_cbs_current.c | 4 +- .../engine/diag/cbs/diag_cbs_deep-discharge.c | 4 +- src/app/engine/diag/cbs/diag_cbs_dummy.c | 4 +- src/app/engine/diag/cbs/diag_cbs_fram.c | 4 +- src/app/engine/diag/cbs/diag_cbs_i2c.c | 4 +- src/app/engine/diag/cbs/diag_cbs_insulation.c | 4 +- src/app/engine/diag/cbs/diag_cbs_interlock.c | 4 +- .../engine/diag/cbs/diag_cbs_plausibility.c | 4 +- .../diag/cbs/diag_cbs_power-measurement.c | 4 +- src/app/engine/diag/cbs/diag_cbs_sbc.c | 4 +- src/app/engine/diag/cbs/diag_cbs_sys-mon.c | 4 +- .../engine/diag/cbs/diag_cbs_temperature.c | 4 +- src/app/engine/diag/cbs/diag_cbs_voltage.c | 4 +- src/app/engine/diag/diag.c | 16 +- src/app/engine/diag/diag.h | 4 +- src/app/engine/hwinfo/masterinfo.c | 4 +- src/app/engine/hwinfo/masterinfo.h | 4 +- src/app/engine/sys/sys.c | 4 +- src/app/engine/sys/sys.h | 4 +- src/app/engine/sys_mon/sys_mon.c | 4 +- src/app/engine/sys_mon/sys_mon.h | 4 +- src/app/engine/wscript | 1 + src/app/main/fassert.c | 4 +- src/app/main/fstartup.c | 4 +- src/app/main/include/config/version_cfg.h | 4 +- src/app/main/include/fassert.h | 4 +- src/app/main/include/fstartup.h | 4 +- src/app/main/include/fstd_types.h | 4 +- src/app/main/include/fsystem.h | 4 +- src/app/main/include/general.h | 4 +- src/app/main/include/main.h | 4 +- src/app/main/main.c | 4 +- src/app/task/config/ftask_cfg.c | 10 +- src/app/task/config/ftask_cfg.h | 4 +- src/app/task/ftask/freertos/ftask_freertos.c | 4 +- src/app/task/ftask/ftask.c | 4 +- src/app/task/ftask/ftask.h | 8 +- src/app/task/os/freertos/os_freertos.c | 4 +- .../freertos/os_freertos_config-validation.h | 4 +- src/app/task/os/os.c | 4 +- src/app/task/os/os.h | 4 +- src/doxygen_src.h | 4 +- src/opt/cells/config/lg_inr18650mj1.c | 4 +- src/opt/cells/config/lg_inr18650mj1.h | 4 +- src/opt/cells/config/pana_ncr18650bd.h | 4 +- tests/axivion/README.md | 4 + .../addon-test/run_axivion_addon_tests.bat | 14 +- tests/axivion/architecture_config.json | 6 +- tests/axivion/ci_config.json | 6 +- tests/axivion/compiler-errata/.clang-format | 2 + tests/axivion/compiler-errata/README.md | 28 + ...ler_errata_ti-cgt-arm_20.2.6.lts_tests.bat | 85 + tests/axivion/compiler_config.json | 28 +- .../config-test/run_axivion_config_tests.bat | 14 +- .../axivion/qualification-test/.clang-format | 2 + tests/axivion/qualification-test/README.md | 22 + .../run_axivion_qualification_kit_tests.bat | 85 + tests/axivion/rule_config_addon.json | 6 +- tests/axivion/rule_config_bad_tokens.json | 6 +- tests/axivion/rule_config_c.json | 6 +- tests/axivion/rule_config_c.py | 2 +- tests/axivion/rule_config_metric_lines.json | 6 +- tests/axivion/rule_config_names.json | 6 +- tests/axivion/scripts/README.md | 21 +- .../axivion/scripts/start_local_analysis.bat | 21 + .../scripts/wrapper_make_race_pdfs.bat | 2 +- tests/c-std/c-std-test-inline-helper.h | 4 +- tests/c-std/c-std-test.c | 4 +- tests/can/check_ids.py | 432 ++++ tests/can/check_implemented.py | 4 +- tests/ccs/ccs1200/ccs1200_cc-options.yaml | 112 + tests/ccs/ccs1200/ccs1200_linker_pulls.json | 5 + tests/ccs/ccs1200/ccs1200_paths_linux.txt | 4 + tests/ccs/ccs1200/ccs1200_paths_win32.txt | 10 + tests/ccs/ccs1200/ccs1200_remarks.txt | 28 + tests/dbc/check_parseable.py | 110 + tests/dbc/overlapping-signals.dbc | 89 + tests/dbc/overlapping-signals.py | 67 + tests/dbc/overlapping-signals.sym | 35 + tests/env/packages/env_test_pathspec.py | 20 +- .../tests/c-004_tests/c-004_test5.c | 2 +- .../algorithm/config/test_algorithm_cfg.c | 4 +- .../moving_average/test_moving_average.c | 4 +- .../soc/counting/test_soc_counting.c | 4 +- .../soc/counting/test_soc_counting_cfg.c | 4 +- .../soc/debug/test_soc_debug.c | 4 +- .../soc/debug/test_soc_debug_cfg.c | 4 +- .../state_estimation/soc/none/test_soc_none.c | 4 +- .../soc/none/test_soc_none_cfg.c | 4 +- .../soe/counting/test_soe_counting.c | 4 +- .../soe/counting/test_soe_counting_cfg.c | 4 +- .../soe/debug/test_soe_debug.c | 4 +- .../soe/debug/test_soe_debug_cfg.c | 4 +- .../state_estimation/soe/none/test_soe_none.c | 4 +- .../soe/none/test_soe_none_cfg.c | 4 +- .../sof/trapezoid/test_sof_trapezoid.c | 4 +- .../sof/trapezoid/test_sof_trapezoid_cfg.c | 4 +- .../soh/debug/test_soh_debug.c | 4 +- .../soh/debug/test_soh_debug_cfg.c | 4 +- .../state_estimation/soh/none/test_soh_none.c | 4 +- .../soh/none/test_soh_none_cfg.c | 4 +- .../state_estimation/test_state_estimation.c | 4 +- .../application/algorithm/test_algorithm.c | 4 +- .../bal/history/test_bal_strategy_history.c | 4 +- .../bal/none/test_bal_strategy_none.c | 4 +- tests/unit/app/application/bal/test_bal.c | 4 +- .../bal/voltage/test_bal_strategy_voltage.c | 4 +- tests/unit/app/application/bms/test_bms.c | 32 +- .../app/application/config/test_bal_cfg.c | 4 +- .../config/test_battery_cell_cfg.c | 4 +- .../config/test_battery_system_cfg.c | 4 +- .../app/application/config/test_soa_cfg.c | 4 +- .../plausibility/test_plausibility.c | 4 +- .../application/redundancy/test_redundancy.c | 4 +- tests/unit/app/application/soa/test_soa.c | 4 +- tests/unit/app/driver/adc/test_adc.c | 4 +- .../driver/afe/api/test_afe_plausibility.c | 4 +- .../default/api/test_debug_default_afe.c | 4 +- .../default/api/test_debug_default_afe_dma.c | 4 +- .../default/config/test_debug_default_cfg.c | 4 +- .../afe/debug/default/test_debug_default.c | 4 +- .../afe/ltc/6806/config/test_ltc_6806_cfg.c | 4 +- .../app/driver/afe/ltc/6806/test_ltc_6806.c | 4 +- .../ltc/6806/test_ltc_6806_pec_in_arrays.c | 4 +- .../ltc/6813-1/config/test_ltc_6813-1_cfg.c | 4 +- .../driver/afe/ltc/6813-1/test_ltc_6813-1.c | 4 +- .../6813-1/test_ltc_6813-1_pec_in_arrays.c | 4 +- .../app/driver/afe/ltc/api/test_ltc_afe.c | 4 +- .../ltc/common/config/test_ltc_afe_dma_cfg.c | 4 +- .../driver/afe/ltc/common/test_ltc_afe_dma.c | 4 +- .../app/driver/afe/maxim/api/test_mxm_afe.c | 4 +- .../afe/maxim/common/config/test_mxm_cfg.c | 4 +- .../driver/afe/maxim/common/test_mxm_17841b.c | 4 +- .../driver/afe/maxim/common/test_mxm_1785x.c | 4 +- .../afe/maxim/common/test_mxm_1785x_tools.c | 4 +- .../afe/maxim/common/test_mxm_afe_dma.c | 4 +- .../common/test_mxm_battery_management.c | 4 +- .../afe/maxim/common/test_mxm_bitextract.c | 4 +- .../driver/afe/maxim/common/test_mxm_crc8.c | 4 +- .../afe/maxim/common/test_mxm_register_map.c | 4 +- .../afe/maxim/common/test_mxm_registry.c | 4 +- .../afe/maxim/max17852/test_mxm_17852.c | 4 +- .../app/driver/afe/nxp/api/test_nxp_afe.c | 4 +- .../nxp/mc33775a/api/test_nxp_mc33775a_afe.c | 4 +- .../mc33775a/config/test_nxp_afe_dma_cfg.c | 4 +- .../mc33775a/config/test_nxp_mc33775a_cfg.c | 4 +- .../afe/nxp/mc33775a/test_nxp_afe_dma.c | 4 +- .../afe/nxp/mc33775a/test_nxp_mc33775a-ll.c | 4 +- .../afe/nxp/mc33775a/test_nxp_mc33775a.c | 4 +- .../test_can_cbs_rx_current-sensor.c} | 10 +- .../can/cbs/{ => rx}/test_can_cbs_rx_imd.c | 6 +- .../can/cbs/{ => rx}/test_can_cbs_rx_misc.c | 6 +- .../test_can_cbs_rx_state-request.c} | 86 +- .../unit/app/driver/can/cbs/test_can_helper.c | 6 +- .../test_can_cbs_tx_cell-temperatures.c} | 18 +- .../test_can_cbs_tx_cell-voltages.c} | 18 +- .../test_can_cbs_tx_limit-values.c} | 18 +- .../test_can_cbs_tx_minimum-maximum-values.c} | 29 +- .../test_can_cbs_tx_pack-state-estimation.c} | 26 +- .../can/cbs/{ => tx}/test_can_cbs_tx_state.c | 6 +- .../test_can_cbs_tx_string-state-estimation.c | 123 + .../test_can_cbs_tx_system-values.c} | 18 +- tests/unit/app/driver/can/test_can.c | 78 +- .../unit/app/driver/checksum/test_checksum.c | 4 +- tests/unit/app/driver/config/test_can_cfg.c | 5 +- .../unit/app/driver/config/test_can_cfg_rx.c | 88 + .../unit/app/driver/config/test_can_cfg_tx.c | 88 + .../config/test_can_cfg_tx_boot-message.c | 90 + .../app/driver/config/test_contactor_cfg.c | 4 +- tests/unit/app/driver/config/test_dma_cfg.c | 4 +- tests/unit/app/driver/config/test_fram_cfg.c | 4 +- .../app/driver/config/test_interlock_cfg.c | 4 +- .../app/driver/config/test_nxpfs85xx_cfg.c | 4 +- tests/unit/app/driver/config/test_pex_cfg.c | 4 +- tests/unit/app/driver/config/test_spi_cfg.c | 4 +- tests/unit/app/driver/config/test_sps_cfg.c | 4 +- .../app/driver/contactor/test_contactor.c | 89 +- tests/unit/app/driver/crc/test_crc.c | 4 +- tests/unit/app/driver/dma/test_dma.c | 4 +- tests/unit/app/driver/foxmath/test_foxmath.c | 4 +- tests/unit/app/driver/fram/test_fram.c | 4 +- .../unit/app/driver/htsensor/test_htsensor.c | 4 +- tests/unit/app/driver/i2c/test_i2c.c | 4 +- .../imd/bender/ir155/test_bender_ir155.c | 4 +- .../bender/ir155/test_bender_ir155_helper.c | 4 +- .../iso165c/config/test_bender_iso165c_cfg.c | 4 +- .../imd/bender/iso165c/test_bender_iso165c.c | 23 +- tests/unit/app/driver/imd/none/test_no-imd.c | 4 +- tests/unit/app/driver/imd/test_imd.c | 4 +- .../app/driver/interlock/test_interlock.c | 4 +- tests/unit/app/driver/io/test_io.c | 4 +- tests/unit/app/driver/led/test_led.c | 4 +- tests/unit/app/driver/mcu/test_mcu.c | 4 +- tests/unit/app/driver/meas/test_meas.c | 4 +- tests/unit/app/driver/pex/test_pex.c | 4 +- tests/unit/app/driver/pwm/test_pwm.c | 4 +- tests/unit/app/driver/rtc/test_rtc.c | 4 +- tests/unit/app/driver/sbc/test_nxpfs85xx.c | 4 +- tests/unit/app/driver/sbc/test_sbc.c | 4 +- tests/unit/app/driver/spi/test_spi.c | 4 +- tests/unit/app/driver/sps/test_sps.c | 4 +- .../unit/app/driver/ts/api/test_tsi_limits.c | 4 +- .../test_epcos_b57251v5103j060_lookup-table.c | 4 +- .../test_epcos_b57251v5103j060_polynomial.c | 4 +- .../test_epcos_b57251v5103j060.c | 4 +- .../test_epcos_b57861s0103f045_lookup-table.c | 4 +- .../test_epcos_b57861s0103f045_polynomial.c | 4 +- .../test_epcos_b57861s0103f045.c | 4 +- .../test_fake_none_lookup-table.c | 4 +- .../polynomial/test_fake_none_polynomial.c | 4 +- .../app/driver/ts/fake/none/test_fake_none.c | 4 +- ...test_murata_ncu15xh103f6sxx_lookup-table.c | 79 + .../test_murata_ncu15xh103f6sxx_polynomial.c | 80 + .../test_murata_ncu15xh103f6sxx.c | 80 + tests/unit/app/driver/ts/test_beta.c | 4 +- .../test_vishay_ntcalug01a103g_lookup-table.c | 4 +- .../test_vishay_ntcalug01a103g_polynomial.c | 4 +- .../test_vishay_ntcalug01a103g.c | 4 +- ...est_vishay_ntcle317e4103sba_lookup-table.c | 4 +- .../test_vishay_ntcle317e4103sba.c | 4 +- .../app/engine/config/test_database_cfg.c | 4 +- tests/unit/app/engine/config/test_diag_cfg.c | 4 +- tests/unit/app/engine/config/test_sys_cfg.c | 9 +- .../unit/app/engine/config/test_sys_mon_cfg.c | 4 +- .../unit/app/engine/database/test_database.c | 4 +- .../engine/database/test_database_helper.c | 4 +- .../app/engine/diag/cbs/test_diag_cbs_afe.c | 4 +- .../app/engine/diag/cbs/test_diag_cbs_bms.c | 118 + .../app/engine/diag/cbs/test_diag_cbs_can.c | 4 +- .../engine/diag/cbs/test_diag_cbs_contactor.c | 58 +- .../diag/cbs/test_diag_cbs_current-sensor.c | 4 +- .../engine/diag/cbs/test_diag_cbs_current.c | 4 +- .../diag/cbs/test_diag_cbs_deep-discharge.c | 4 +- .../app/engine/diag/cbs/test_diag_cbs_dummy.c | 4 +- .../app/engine/diag/cbs/test_diag_cbs_fram.c | 4 +- .../app/engine/diag/cbs/test_diag_cbs_i2c.c | 4 +- .../diag/cbs/test_diag_cbs_insulation.c | 4 +- .../engine/diag/cbs/test_diag_cbs_interlock.c | 4 +- .../diag/cbs/test_diag_cbs_plausibility.c | 4 +- .../cbs/test_diag_cbs_power-measurement.c | 4 +- .../app/engine/diag/cbs/test_diag_cbs_sbc.c | 4 +- .../engine/diag/cbs/test_diag_cbs_sys-mon.c | 4 +- .../diag/cbs/test_diag_cbs_temperature.c | 4 +- .../engine/diag/cbs/test_diag_cbs_voltage.c | 4 +- tests/unit/app/engine/diag/test_diag.c | 4 +- .../unit/app/engine/hwinfo/test_masterinfo.c | 4 +- tests/unit/app/engine/sys/test_sys.c | 4 +- tests/unit/app/engine/sys_mon/test_sys_mon.c | 4 +- tests/unit/app/main/test_fassert.c | 4 +- tests/unit/app/main/test_fstartup.c | 4 +- tests/unit/app/main/test_main.c | 4 +- tests/unit/app/task/config/test_ftask_cfg.c | 8 +- .../task/ftask/freertos/test_ftask_freertos.c | 4 +- tests/unit/app/task/ftask/test_ftask.c | 8 +- .../app/task/os/freertos/test_os_freertos.c | 4 +- tests/unit/app/task/os/test_os.c | 4 +- tests/unit/doxygen_tests.h | 4 +- .../opt/cells/config/test_lg_inr18650mj1.c | 4 +- tests/unit/support/test_algorithm_stubs.h | 4 +- tests/unit/support/test_assert_helper.h | 4 +- ...test_can_mpu_prototype_queue_create_stub.h | 4 +- tests/unit/support/test_pec_helper.h | 4 +- tests/variants/lib-build/lib-build_main.c | 4 +- tools/dbc/foxbms.dbc | 932 ++----- tools/dbc/foxbms.sym | 2152 ++++++++--------- tools/dbc/symbol_creator.py | 29 +- tools/gui/fgui/__init__.py | 2 +- tools/ide/vscode/c_cpp_properties.json.jinja2 | 3 + tools/ide/vscode/cspell.json.jinja2 | 37 +- tools/ide/vscode/settings.json.jinja2 | 14 +- tools/utils/cmd/find_base_conda.bat | 4 +- tools/utils/conda-update-env.bat | 2 +- tools/utils/update_version.py | 258 +- tools/utils/verify_checksums.py | 116 + tools/waf-tools/f_guidelines.py | 2 +- wscript | 25 +- 618 files changed, 9350 insertions(+), 5818 deletions(-) rename docs/developer-manual/hardware/{dummy => .dummy} (100%) create mode 100644 docs/general/commit-msgs/next-release.txt create mode 100644 docs/general/commit-msgs/release-v1.0.0.txt create mode 100644 docs/general/commit-msgs/release-v1.0.1.txt create mode 100644 docs/general/commit-msgs/release-v1.0.2.txt create mode 100644 docs/general/commit-msgs/release-v1.1.0.txt create mode 100644 docs/general/commit-msgs/release-v1.1.1.txt create mode 100644 docs/general/commit-msgs/release-v1.1.2.txt create mode 100644 docs/general/commit-msgs/release-v1.2.0.txt create mode 100644 docs/general/commit-msgs/release-v1.2.1.txt create mode 100644 docs/general/commit-msgs/release-v1.3.0.txt create mode 100644 docs/general/commit-msgs/release-v1.4.0.txt create mode 100644 docs/general/commit-msgs/release-v1.4.1.txt create mode 100644 docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_block_diagram.png create mode 100644 docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_block_diagram.pptx create mode 100644 docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_debug_connector.csv create mode 100644 docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_master_connector.csv create mode 100644 docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_rendering.png create mode 100644 docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_uartrx_connectors.csv create mode 100644 docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_uarttx_connectors.csv create mode 100644 docs/hardware/master/ti-tms570lc4357-vx.x.x/ti-tms570lc4357-v1.1.5.rst create mode 100644 docs/software/modules/driver/can/can_how-to_tx.c create mode 100644 docs/software/modules/driver/can/wscript create mode 100644 docs/software/modules/driver/ts/murata/ncu15xh103f6sxx.rst create mode 100644 src/app/driver/can/cbs/rx/can_cbs_rx.h rename src/app/driver/can/cbs/{can_cbs_rx_current_sensor.c => rx/can_cbs_rx_current-sensor.c} (75%) rename src/app/driver/can/cbs/{ => rx}/can_cbs_rx_imd.c (78%) rename src/app/driver/can/cbs/{ => rx}/can_cbs_rx_misc.c (77%) rename src/app/driver/can/cbs/{can_cbs_rx_command.c => rx/can_cbs_rx_state-request.c} (81%) rename src/app/driver/can/cbs/{can_cbs.h => tx/can_cbs_tx.h} (51%) rename src/app/driver/can/cbs/{can_cbs_tx_temperature.c => tx/can_cbs_tx_cell-temperatures.c} (68%) rename src/app/driver/can/cbs/{can_cbs_tx_voltage.c => tx/can_cbs_tx_cell-voltages.c} (73%) rename src/app/driver/can/cbs/{can_cbs_tx_limits.c => tx/can_cbs_tx_limit-values.c} (85%) rename src/app/driver/can/cbs/{can_cbs_tx_minmax.c => tx/can_cbs_tx_minimum-maximum-values.c} (84%) rename src/app/driver/can/cbs/{can_cbs_tx_state_estimation.c => tx/can_cbs_tx_pack-state-estimation.c} (60%) rename src/app/driver/can/cbs/{ => tx}/can_cbs_tx_state.c (67%) create mode 100644 src/app/driver/can/cbs/tx/can_cbs_tx_string-state-estimation.c rename src/app/driver/can/cbs/{can_cbs_tx_system_values.c => tx/can_cbs_tx_system-values.c} (77%) create mode 100644 src/app/driver/config/can_cfg_rx-message-definitions.h create mode 100644 src/app/driver/config/can_cfg_rx.c create mode 100644 src/app/driver/config/can_cfg_tx-message-definitions.h create mode 100644 src/app/driver/config/can_cfg_tx.c create mode 100644 src/app/driver/config/can_cfg_tx_boot-message.c create mode 100644 src/app/driver/config/can_cfg_tx_boot-message.h create mode 100644 src/app/driver/ts/murata/ncu15xh103f6sxx/lookup-table/murata_ncu15xh103f6sxx_lookup-table.c create mode 100644 src/app/driver/ts/murata/ncu15xh103f6sxx/murata_ncu15xh103f6sxx.c create mode 100644 src/app/driver/ts/murata/ncu15xh103f6sxx/murata_ncu15xh103f6sxx.h create mode 100644 src/app/driver/ts/murata/ncu15xh103f6sxx/polynomial/murata_ncu15xh103f6sxx_polynomial.c create mode 100644 src/app/engine/diag/cbs/diag_cbs_bms.c create mode 100644 tests/axivion/compiler-errata/.clang-format create mode 100644 tests/axivion/compiler-errata/README.md create mode 100644 tests/axivion/compiler-errata/run_axivion_compiler_errata_ti-cgt-arm_20.2.6.lts_tests.bat create mode 100644 tests/axivion/qualification-test/.clang-format create mode 100644 tests/axivion/qualification-test/README.md create mode 100644 tests/axivion/qualification-test/run_axivion_qualification_kit_tests.bat create mode 100644 tests/can/check_ids.py create mode 100644 tests/ccs/ccs1200/ccs1200_cc-options.yaml create mode 100644 tests/ccs/ccs1200/ccs1200_linker_pulls.json create mode 100644 tests/ccs/ccs1200/ccs1200_paths_linux.txt create mode 100644 tests/ccs/ccs1200/ccs1200_paths_win32.txt create mode 100644 tests/ccs/ccs1200/ccs1200_remarks.txt create mode 100644 tests/dbc/check_parseable.py create mode 100644 tests/dbc/overlapping-signals.dbc create mode 100644 tests/dbc/overlapping-signals.py create mode 100644 tests/dbc/overlapping-signals.sym rename tests/unit/app/driver/can/cbs/{test_can_cbs_rx_current_sensor.c => rx/test_can_cbs_rx_current-sensor.c} (96%) rename tests/unit/app/driver/can/cbs/{ => rx}/test_can_cbs_rx_imd.c (98%) rename tests/unit/app/driver/can/cbs/{ => rx}/test_can_cbs_rx_misc.c (98%) rename tests/unit/app/driver/can/cbs/{test_can_cbs_rx_command.c => rx/test_can_cbs_rx_state-request.c} (81%) rename tests/unit/app/driver/can/cbs/{test_can_cbs_tx_temperature.c => tx/test_can_cbs_tx_cell-temperatures.c} (93%) rename tests/unit/app/driver/can/cbs/{test_can_cbs_tx_voltage.c => tx/test_can_cbs_tx_cell-voltages.c} (93%) rename tests/unit/app/driver/can/cbs/{test_can_cbs_tx_limits.c => tx/test_can_cbs_tx_limit-values.c} (93%) rename tests/unit/app/driver/can/cbs/{test_can_cbs_tx_minmax.c => tx/test_can_cbs_tx_minimum-maximum-values.c} (89%) rename tests/unit/app/driver/can/cbs/{test_can_cbs_tx_state_estimation.c => tx/test_can_cbs_tx_pack-state-estimation.c} (92%) rename tests/unit/app/driver/can/cbs/{ => tx}/test_can_cbs_tx_state.c (98%) create mode 100644 tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_string-state-estimation.c rename tests/unit/app/driver/can/cbs/{test_can_cbs_tx_system_values.c => tx/test_can_cbs_tx_system-values.c} (93%) create mode 100644 tests/unit/app/driver/config/test_can_cfg_rx.c create mode 100644 tests/unit/app/driver/config/test_can_cfg_tx.c create mode 100644 tests/unit/app/driver/config/test_can_cfg_tx_boot-message.c create mode 100644 tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/lookup-table/test_murata_ncu15xh103f6sxx_lookup-table.c create mode 100644 tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/polynomial/test_murata_ncu15xh103f6sxx_polynomial.c create mode 100644 tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/test_murata_ncu15xh103f6sxx.c create mode 100644 tests/unit/app/engine/diag/cbs/test_diag_cbs_bms.c create mode 100644 tools/utils/verify_checksums.py diff --git a/.gitattributes b/.gitattributes index 79c5ba65..240a7c27 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,3 +12,6 @@ tools/waf linguist-vendored # files tracked with Git LFS *.zip filter=lfs diff=lfs merge=lfs -text + +tests/axivion/qualification-test/qualification-kit/**/*.json -diff -merge -text +tests/axivion/qualification-test/qualification-kit/**/*.py -diff -merge -text diff --git a/.gitignore b/.gitignore index 7a3951e5..a2570c1a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,8 @@ __pycache__ /qa-chain/* *.log +*log*.txt +*log/* *.patch *.diff @@ -51,3 +53,6 @@ __pycache__ *.exe /races.txt + +# CAN log files +*.asc diff --git a/CITATION.cff b/CITATION.cff index 853ab666..eb9a9532 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -46,5 +46,5 @@ keywords: - "BMS" message: "If the foxBMS project contributes to a project that leads to a scientific publication, please acknowledge this fact by citing." title: "foxBMS - The Most Advanced Open Source BMS Platform: foxBMS 2" -version: "1.4.0" -date-released: 2022-07-29 +version: "1.4.1" +date-released: 2022-10-27 diff --git a/conf/bms/schema/slave.schema.json b/conf/bms/schema/slave.schema.json index fb5faa8a..c6c361a4 100644 --- a/conf/bms/schema/slave.schema.json +++ b/conf/bms/schema/slave.schema.json @@ -132,6 +132,7 @@ "type": "string", "enum": [ "epcos", + "murata", "vishay", "fake" ] @@ -175,7 +176,7 @@ "properties": { "manufacturer": { "enum": [ - "vishay" + "murata" ] } } @@ -184,8 +185,7 @@ "properties": { "model": { "enum": [ - "ntcalug01a103g", - "ntcle317e4103sba" + "ncu15xh103f6sxx" ] } } @@ -195,7 +195,7 @@ "properties": { "manufacturer": { "enum": [ - "fake" + "vishay" ] } } @@ -204,10 +204,31 @@ "properties": { "model": { "enum": [ - "none" + "ntcalug01a103g", + "ntcle317e4103sba" ] } } + }, + "else": { + "if": { + "properties": { + "manufacturer": { + "enum": [ + "fake" + ] + } + } + }, + "then": { + "properties": { + "model": { + "enum": [ + "none" + ] + } + } + } } } } diff --git a/conf/cc/cc-options.yaml b/conf/cc/cc-options.yaml index 7ad83710..b3fc59a3 100644 --- a/conf/cc/cc-options.yaml +++ b/conf/cc/cc-options.yaml @@ -35,7 +35,7 @@ # - "This product includes parts of foxBMS®" # - "This product is derived from foxBMS®" -FOXBMS_2_CCS_VERSION_STRICT: "v20.2.5.LTS" +FOXBMS_2_CCS_VERSION_STRICT: "v20.2.6.LTS" INCLUDE_PATHS: win32: diff --git a/conf/env/paths_linux.txt b/conf/env/paths_linux.txt index 25a51a0f..4832b935 100644 --- a/conf/env/paths_linux.txt +++ b/conf/env/paths_linux.txt @@ -1,4 +1,4 @@ -/opt/ti/ccs1100/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/bin -/opt/ti/ccs1100/ccs/tools/compiler/ti-cgt-arm_20.2.5.LTS/lib -/opt/ti/ccs1100/ccs/utils/bin -/opt/ti/ccs1100/ccs/utils/tiobj2bin +/opt/ti/ccs1200/ccs/tools/compiler/ti-cgt-arm_20.2.6.LTS/bin +/opt/ti/ccs1200/ccs/tools/compiler/ti-cgt-arm_20.2.6.LTS/lib +/opt/ti/ccs1200/ccs/utils/bin +/opt/ti/ccs1200/ccs/utils/tiobj2bin diff --git a/conf/env/paths_win32.txt b/conf/env/paths_win32.txt index 2fa3f930..03d30799 100644 --- a/conf/env/paths_win32.txt +++ b/conf/env/paths_win32.txt @@ -1,10 +1,10 @@ -C:\ti\ccs1100\ccs\tools\compiler\ti-cgt-arm_20.2.5.LTS\bin -C:\ti\ccs1100\ccs\tools\compiler\ti-cgt-arm_20.2.5.LTS\lib -C:\ti\ccs1100\ccs\utils\bin -C:\ti\ccs1100\ccs\utils\cygwin -C:\ti\ccs1100\ccs\utils\tiobj2bin +C:\ti\ccs1200\ccs\tools\compiler\ti-cgt-arm_20.2.6.LTS\bin +C:\ti\ccs1200\ccs\tools\compiler\ti-cgt-arm_20.2.6.LTS\lib +C:\ti\ccs1200\ccs\utils\bin +C:\ti\ccs1200\ccs\utils\cygwin +C:\ti\ccs1200\ccs\utils\tiobj2bin C:\ti\Hercules\HALCoGen\v04.07.01 C:\Program Files\LLVM\13.0.0\bin C:\Ruby\Ruby272-x64\bin C:\MinGW64\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\mingw64\bin -C:\Bauhaus\7.4.0\bin +C:\Bauhaus\7.4.6\bin diff --git a/conf/guidelines/rules.json b/conf/guidelines/rules.json index 69f79c51..983580bc 100644 --- a/conf/guidelines/rules.json +++ b/conf/guidelines/rules.json @@ -22,6 +22,7 @@ "**/*~", "**/__pycache__/**", "**/foxbms-2_axivion_report.json", + "**/*.asc", ".git/**", ".lock-waf_*_build", ".mypy_cache/**", @@ -49,6 +50,7 @@ "src/os/safertos/**/*.asm", "src/os/safertos/**/*.c", "src/os/safertos/**/*.h", + "tests/axivion/qualification-test/qualification-kit/**", "tests/scripts/waf-core/general/**", "tests/scripts/waf-core/init/**", "tests/scripts/waf-core/install/**", @@ -125,19 +127,15 @@ "posix_3.206": { "name": "GENERAL:004", "exclude": [ - "**/*.dbc", "**/*.patch", - "**/*.sym", "tools/utils/git-hooks/pre-commit" ] }, "trailing_whitespace": { "name": "GENERAL:005", "exclude": [ - "**/*.dbc", "**/*.dil", "**/*.patch", - "**/*.sym", "tools/gui/data/pcan_view_v2.0.trc" ] }, @@ -374,6 +372,7 @@ "docs/developer-manual/style-guide/examples/c-028*.c", "docs/developer-manual/style-guide/state-machine-example/state-machine.c", "docs/software/build-process/misc/libproject-example.c", + "docs/software/modules/driver/can/can_how-to_tx.c", "docs/software/modules/engine/database/database_how-to.c", "docs/software/modules/task/ftask/ftask_how-to.c", "src/**", diff --git a/conf/tpl/c.c b/conf/tpl/c.c index 9fec40f7..096b4adc 100644 --- a/conf/tpl/c.c +++ b/conf/tpl/c.c @@ -43,8 +43,8 @@ * @file c.c * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup SOME_GROUP * @prefix ABC * diff --git a/conf/tpl/c.h b/conf/tpl/c.h index 3e82c49f..6b1167a7 100644 --- a/conf/tpl/c.h +++ b/conf/tpl/c.h @@ -43,8 +43,8 @@ * @file c.h * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup SOME_GROUP * @prefix ABC * diff --git a/conf/tpl/test_c.c b/conf/tpl/test_c.c index 76c0a48c..ba07033a 100644 --- a/conf/tpl/test_c.c +++ b/conf/tpl/test_c.c @@ -43,8 +43,8 @@ * @file test_c.c * @author foxBMS Team * @date 2020-08-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/conf/tpl/test_c.h b/conf/tpl/test_c.h index a46ce62d..62170652 100644 --- a/conf/tpl/test_c.h +++ b/conf/tpl/test_c.h @@ -43,8 +43,8 @@ * @file test_c.h * @author foxBMS Team * @date 2020-08-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/docs/developer-manual/hardware/dummy b/docs/developer-manual/hardware/.dummy similarity index 100% rename from docs/developer-manual/hardware/dummy rename to docs/developer-manual/hardware/.dummy diff --git a/docs/developer-manual/style-guide/examples/c-004.c b/docs/developer-manual/style-guide/examples/c-004.c index 5839d27e..7f3e0038 100644 --- a/docs/developer-manual/style-guide/examples/c-004.c +++ b/docs/developer-manual/style-guide/examples/c-004.c @@ -43,8 +43,8 @@ * @file c-004.c * @author foxBMS Team * @date 2021-04-06 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup SOME_GROUP * @prefix ABC * diff --git a/docs/developer-manual/style-guide/guidelines_rst.rst b/docs/developer-manual/style-guide/guidelines_rst.rst index d1c194d7..6088121b 100644 --- a/docs/developer-manual/style-guide/guidelines_rst.rst +++ b/docs/developer-manual/style-guide/guidelines_rst.rst @@ -96,8 +96,8 @@ Examples: Headings (``RST:005``) ---------------------- -We follow the convention of the Python Developer's Guide for -`reStructuredText Markup `_. +We follow the convention of the +*Python Developer's Guide for reStructuredText Markup*. Use the following rules to create headings: - # with overline, for parts diff --git a/docs/developer-manual/style-guide/state-machine-example/state-machine.c b/docs/developer-manual/style-guide/state-machine-example/state-machine.c index 056f7c1a..86022d81 100644 --- a/docs/developer-manual/style-guide/state-machine-example/state-machine.c +++ b/docs/developer-manual/style-guide/state-machine-example/state-machine.c @@ -43,8 +43,8 @@ * @file state-machine.c * @author foxBMS Team * @date 2020-10-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup STATE_MACHINE * @prefix EG * diff --git a/docs/developer-manual/style-guide/state-machine-example/state-machine.h b/docs/developer-manual/style-guide/state-machine-example/state-machine.h index ce600ace..160b9050 100644 --- a/docs/developer-manual/style-guide/state-machine-example/state-machine.h +++ b/docs/developer-manual/style-guide/state-machine-example/state-machine.h @@ -43,8 +43,8 @@ * @file state-machine.h * @author foxBMS Team * @date 2020-10-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup STATE_MACHINE * @prefix EG * diff --git a/docs/general/changelog.rst b/docs/general/changelog.rst index de6ac588..7b9c0cb8 100644 --- a/docs/general/changelog.rst +++ b/docs/general/changelog.rst @@ -41,6 +41,57 @@ Versioning follows then these rules: - increasing ``MINOR`` adds functionality in a backwards compatible manner - increasing ``PATCH`` fixes bugs in a backwards compatible manner +******************** +[1.4.1] - 2022-10-27 +******************** + +|foxbms| updated to TI ARM CGT 20.2.6.LTS. +Installation instructions are found at :numref:`css_install`. + +Added +===== + +- The new default compiler set in ``conf/env/paths_win32.txt`` and + ``conf/env/paths_linux.txt`` is now TI ARM CGT v20.2.6.LTS (shipped with CCS + ``12.0.0``). +- Added driver for *Murata NCU15XH103F6Sxx* temperature sensor + +Changed +======= + +- Updated the hardware design files (e.g., schematics, layout, BOM and STEP + file etc.) of the |bms-master| to ``v1.1.5`` (see + :ref:`CHANGELOG_FOR_MASTER_TMS570_V1_1_5`). +- Updated documentation of the interface using the |max17841b| transceiver + chip. +- The implementation of the CAN driver has been changed to simplify adding + new messages. + Furthermore it is now possible to force a certain style on how CAN messages + are defined in the symbol/dbc files as well as in the source code. + For further information see :ref:`HOW_TO_USE_THE_CAN_MODULE`. +- Updated version of ``.sym`` file for the definition of the CAN messages and + signals to v6.0 (from 5.0). +- Update the static code analysis to Axivion 7.4.6 (from 7.4.0). + +Deprecated +========== + +Removed +======= + +- Unused calculation of MOL, RSL and MSL curves for trapezoid algorithm in + ``SOF`` module. + +Fixed +===== + +- In ``ADC`` module, corrected formula making the conversion from raw ADC + reading to voltage in mV. +- The address of two diagnostic registers in the Smart Power Switch driver + was wrong. +- Endianness definition throughout the CAN signals was inconsistent. Not all + signals were correctly defined as big-endian. + ******************** [1.4.0] - 2022-07-29 ******************** @@ -127,11 +178,11 @@ Fixed [1.3.0] - 2022-05-30 ******************** -|foxbms| updated to TI ARM CGT 20.2.5.LTS. Installation instructions are found -at :numref:`css_install`. +|foxbms| updated to TI ARM CGT 20.2.5.LTS. +Installation instructions are found at :numref:`css_install`. -|foxbms| updated to LLVM 13.0.0. Installation instructions are found at -:numref:`llvm_install`. +|foxbms| updated to LLVM 13.0.0. +Installation instructions are found at :numref:`llvm_install`. Added ===== diff --git a/docs/general/commit-msgs/next-release.txt b/docs/general/commit-msgs/next-release.txt new file mode 100644 index 00000000..e89cc99e --- /dev/null +++ b/docs/general/commit-msgs/next-release.txt @@ -0,0 +1,6 @@ + release of foxBMS 2 (vx.y.z) + +* + +For a detailed list of changes, please refer to the documentation at +https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/vx.y.z/general/changelog.html. diff --git a/docs/general/commit-msgs/release-v1.0.0.txt b/docs/general/commit-msgs/release-v1.0.0.txt new file mode 100644 index 00000000..47b2ca19 --- /dev/null +++ b/docs/general/commit-msgs/release-v1.0.0.txt @@ -0,0 +1 @@ +Initial commit of foxBMS 2 (v1.0.0) diff --git a/docs/general/commit-msgs/release-v1.0.1.txt b/docs/general/commit-msgs/release-v1.0.1.txt new file mode 100644 index 00000000..c44d95fc --- /dev/null +++ b/docs/general/commit-msgs/release-v1.0.1.txt @@ -0,0 +1,9 @@ +Bugfix release of foxBMS 2 (v1.0.1) + +* updated the documentation +* updated master board +* minor toolchain improvements + +For a detailed list of changes, please refer to the documentation +at +https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.0.1/general/changelog.html diff --git a/docs/general/commit-msgs/release-v1.0.2.txt b/docs/general/commit-msgs/release-v1.0.2.txt new file mode 100644 index 00000000..9cb27ea7 --- /dev/null +++ b/docs/general/commit-msgs/release-v1.0.2.txt @@ -0,0 +1,8 @@ +Bugfix release of foxBMS 2 (v1.0.2) + +* updated the documentation +* minor toolchain improvements + +For a detailed list of changes, please refer to the documentation +at +https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.0.2/general/changelog.html diff --git a/docs/general/commit-msgs/release-v1.1.0.txt b/docs/general/commit-msgs/release-v1.1.0.txt new file mode 100644 index 00000000..15cc2af1 --- /dev/null +++ b/docs/general/commit-msgs/release-v1.1.0.txt @@ -0,0 +1,8 @@ +Minor release of foxBMS 2 (v1.1.0) + +* Release of new master schematic +* Implementation of CAN messages + +For a detailed list of changes, please refer to the documentation +at +https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.1.0/general/changelog.html diff --git a/docs/general/commit-msgs/release-v1.1.1.txt b/docs/general/commit-msgs/release-v1.1.1.txt new file mode 100644 index 00000000..aba73589 --- /dev/null +++ b/docs/general/commit-msgs/release-v1.1.1.txt @@ -0,0 +1,8 @@ +Bugfix release of foxBMS 2 (v1.1.1) + +fixed a CAN message decoding bug +added missing CAN messages + +For a detailed list of changes, please refer to the documentation +at +https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.1.1/general/changelog.html diff --git a/docs/general/commit-msgs/release-v1.1.2.txt b/docs/general/commit-msgs/release-v1.1.2.txt new file mode 100644 index 00000000..b976feec --- /dev/null +++ b/docs/general/commit-msgs/release-v1.1.2.txt @@ -0,0 +1,4 @@ +Bugfix release of foxBMS 2 (v1.1.2) + +added Axivion configuration +added system block diagram diff --git a/docs/general/commit-msgs/release-v1.2.0.txt b/docs/general/commit-msgs/release-v1.2.0.txt new file mode 100644 index 00000000..5a5a9b37 --- /dev/null +++ b/docs/general/commit-msgs/release-v1.2.0.txt @@ -0,0 +1,8 @@ +Minor release of foxBMS 2 (v1.2.0) + +* Initial release of the hardware design files (e.g., schematics, layout, BOM and STEP file etc.) of the BMS-Master Board (hardware version: ``v1.1.1``) +* Added new drivers for port expander, interlock, humidity/temperature sensor and LED +* Support for second CAN interface +* Renamed the measurement IC (MIC) driver to analog front-end driver (AFE) + +For a detailed list of changes, please refer to the documentation at https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.2.0/general/changelog.html. diff --git a/docs/general/commit-msgs/release-v1.2.1.txt b/docs/general/commit-msgs/release-v1.2.1.txt new file mode 100644 index 00000000..5d58f635 --- /dev/null +++ b/docs/general/commit-msgs/release-v1.2.1.txt @@ -0,0 +1,8 @@ +Minor release of foxBMS 2 (v1.2.1) + +* Added documentation for slave LTC-based interface and slaves +* improved MAXIM MAX17852 and MAX17841B driver +* make git a required software installation in order to work with the foxBMS 2 repository +* update conda environment + +For a detailed list of changes, please refer to the documentation at https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.2.1/general/changelog.html. diff --git a/docs/general/commit-msgs/release-v1.3.0.txt b/docs/general/commit-msgs/release-v1.3.0.txt new file mode 100644 index 00000000..f79a2b0d --- /dev/null +++ b/docs/general/commit-msgs/release-v1.3.0.txt @@ -0,0 +1,8 @@ +Minor release of foxBMS 2 (v1.3.0) + +* Added master and slave hardware documentation +* Added CRC checks in the FRAM driver +* Enhanced insulation monitoring driver +* Added Bender IR155 driver + +For a detailed list of changes, please refer to the documentation at https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.3.0/general/changelog.html. diff --git a/docs/general/commit-msgs/release-v1.4.0.txt b/docs/general/commit-msgs/release-v1.4.0.txt new file mode 100644 index 00000000..9e8b7b0c --- /dev/null +++ b/docs/general/commit-msgs/release-v1.4.0.txt @@ -0,0 +1,11 @@ +Minor release of foxBMS 2 (v1.4.0) + +* foxBMS 2 has been certified as open source hardware by the Open Source Hardware Association (OSHWA UID DE000128). +* Added AFE driver for the NXP monitoring IC MC33775A. +* Increased delay between chip select activation and start of SPI transmission and the delay between end of SPI transmission and chip select deactivation to avoid SPI transmission errors for AFEs. +* Activated CAN2 message boxes within the HALCoGen configuration. +* Updated Master board hardware reference to version v1.1.3. +* Several new unit tests have been added. +* Improved the Axivion configuration to ensure style guide conforming source code and fixed in the same step several style guide violations + +For a detailed list of changes, please refer to the documentation at https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.4.0/general/changelog.html. diff --git a/docs/general/commit-msgs/release-v1.4.1.txt b/docs/general/commit-msgs/release-v1.4.1.txt new file mode 100644 index 00000000..07ee4bf6 --- /dev/null +++ b/docs/general/commit-msgs/release-v1.4.1.txt @@ -0,0 +1,19 @@ +Bugfix release of foxBMS 2 (v1.4.1) + +* The BMS Master hardware has been updated to v1.1.5. +* CAN: + * The implementation of the CAN driver has been changed to simplify adding + new messages. + * Endianness definition throughout the CAN signals was inconsistent. Not all + signals were correctly defined as big-endian. + * Updated the version of .sym file for the definition of the CAN messages to + format version 6.0. +* Fixed equation that does the conversion from raw ADC reading to voltage (mV). +* Fixed the address for reading two diagnostic registers in the Smart Power + Switch driver. +* Maintenance: + * TI CCS version 12.0.0, including TI ARM CGT 20.2.6, are now the defaults. + * Update the Axivion static code analysis to version 7.4.6. + +For a detailed list of changes, please refer to the documentation at +https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.4.1/general/changelog.html. diff --git a/docs/general/releases.csv b/docs/general/releases.csv index 83fc290f..99e5541f 100644 --- a/docs/general/releases.csv +++ b/docs/general/releases.csv @@ -1,4 +1,5 @@ foxBMS 2; Release Date; Permanent link to documentation +v1.4.1; 2022-10-27; https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.4.1/ v1.4.0; 2022-07-29; https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.4.0/ v1.3.0; 2022-05-30; https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.3.0/ v1.2.1; 2021-12-08; https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v1.2.1/ diff --git a/docs/general/releases.rst b/docs/general/releases.rst index 44693a95..b4a0cdbc 100644 --- a/docs/general/releases.rst +++ b/docs/general/releases.rst @@ -17,7 +17,8 @@ Releases ----------------- The following tables describe the different versions of |foxbms| that were -released. The first line is the most recent one, the last one the oldest one. +released. +The first line is the most recent one, the last one the oldest one. The changes between two releases are described in the :ref:`CHANGELOG`. @@ -27,9 +28,186 @@ The changes between two releases are described in the :ref:`CHANGELOG`. :delim: ; :file: ./releases.csv -Release Information -------------------- +Detailed Release Procedure +-------------------------- -Releases are commits on the master branch with an annotated tag. If we would -release for example version 0.0.42, we would check out the master branch and -then execute ``git tag -a v0.0.42``. +This description is for documenting purposes only, so that others know how we, +the :ref:`TEAM`, create public releases. +Releases are created from commits of the ``master`` branch of an Fraunhofer +internal git repository. +A release is assembled by running the described procedure after the ``master`` +branch has been bumped to a version, which identifier matches the regular +expression ``\d+\.\d+\.\d+`` +(the internal development version number is always ``x.y.z``, except for the +commit that bumps the version to a releasable version). + +.. note:: + + This description uses two different directories: + + - ``C:\release-bot\foxbms-2``: local checkout of the internal repository. + - ``C:\release-bot\foxbms-2-publishing-mirror``: local checkout of the + internal repository that is synced to |foxbms_repository|. + +The release is internally created by the ``The foxBMS ReleaseBot`` and these +steps are automated. +The git configuration of the ``The foxBMS ReleaseBot`` is + +.. code-block:: console + + C:\release-bot\foxbms-2-publishing-mirror>git config user.name "The foxBMS ReleaseBot" + C:\release-bot\foxbms-2-publishing-mirror>git config user.mail "info@foxbms.org" + +For this documentation we assume that the version to be created and released +is ``1.0.0``. + +Defining release status of repository ++++++++++++++++++++++++++++++++++++++ + +#. Defining the version number of the release. +#. Creation of a version bump branch ``bump-version`` + + .. code-block:: console + + C:\release-bot\foxbms-2>git checkout -b bump-version + +#. Bump the version number in all relevant files and commit the changes to the + new branch: + + .. code-block:: console + + C:\release-bot\foxbms-2>tools\utils\cmd\run-script.bat tools\utils\update_version.py --from x.y.z --to 1.0.0 + C:\release-bot\foxbms-2>tools\utils\cmd\run-script.bat tools\utils\update_doxygen_header.py + C:\release-bot\foxbms-2>git add . + C:\release-bot\foxbms-2>git commit -m "bump version to v1.0.0" + C:\release-bot\foxbms-2>git tag -a v1.0.0-version-bump -m "bump version to v1.0.0" + +#. Merge the branch back to ``master`` branch and remove the version bumping + branch + + .. code-block:: console + + C:\release-bot\foxbms-2>git checkout master + C:\release-bot\foxbms-2>git merge bump-version + C:\release-bot\foxbms-2>git branch -D bump-version + +#. Tag the ``master`` branch with ``v1.0.0``: + + .. code-block:: console + + C:\release-bot\foxbms-2>git tag -a v1.0.0 -m "v1.0.0" + +#. Make the ``master`` branch a development branch again (note the reverted + order of ``from`` and ``to``: ``--from 1.0.0 --to x.y.z``): + + .. code-block:: console + + C:\release-bot\foxbms-2>tools\utils\cmd\run-script.bat tools\utils\update_version.py --from 1.0.0 --to x.y.z + +#. Push all this work: + + .. code-block:: console + + C:\release-bot\foxbms-2>git push origin master --follow-tags + + +Creation of the release branch +++++++++++++++++++++++++++++++ + +#. Creation of the release branch at the created version tag ``v1.0.0``: + + .. code-block:: console + + C:\release-bot\foxbms-2>git checkout v1.0.0 + C:\release-bot\foxbms-2>git checkout -b release-v1.0.0 + +#. Run script to remove confidential and non-releasable files and information. +#. Commit all changes to the release branch ``release-v1.0.0`` and tag this + commit as release: + + .. code-block:: console + + C:\release-bot\foxbms-2>git add . + C:\release-bot\foxbms-2>git commit -m "branch for GitHub release version 1.0.0" + C:\release-bot\foxbms-2>git tag -a gh-1.0.0 -m "gh-1.0.0" + +#. Make a clean build to make sure everything works as expected: + + .. code-block:: console + + C:\release-bot\foxbms-2>waf configure + C:\release-bot\foxbms-2>waf build_all + +#. Clean the repository from all generated files: + + .. code-block:: console + + C:\release-bot\foxbms-2>git clean -xdf + + +Publication of the release branch ++++++++++++++++++++++++++++++++++ + +#. Create release branch in the publishing mirror and check it out: + + .. code-block:: console + + C:\release-bot\foxbms-2-publishing-mirror>git checkout -b gh-release-v1.0.0 + C:\release-bot\foxbms-2-publishing-mirror>git commit -m "update branch for GitHub release version 1.0.0" + +#. Remove all files from the current checkout: + + .. code-block:: console + + C:\release-bot\foxbms-2-publishing-mirror>git rm -r "*" + +#. Copy files from release branch in the internal repository to the release + branch of the publishing repository and add them: + + .. code-block:: console + + C:\release-bot\foxbms-2-publishing-mirror>xcopy C:\release-bot\foxbms-2 . /s /e + C:\release-bot\foxbms-2-publishing-mirror>git add . -f + C:\release-bot\foxbms-2-publishing-mirror>git commit -F docs\general\commit-msgs\release-v1.0.0.txt + +#. Create a dummy tag (annotated or not does not make a difference here) and + make sure everything works as expected (no problems are expected to happen): + + .. code-block:: console + + C:\release-bot\foxbms-2-publishing-mirror>git tag v1.0.0 + C:\release-bot\foxbms-2-publishing-mirror>waf configure + C:\release-bot\foxbms-2-publishing-mirror>waf build_all + +#. Delete the temporary tag ``v1.0.0``: + + .. code-block:: console + + C:\release-bot\foxbms-2-publishing-mirror>git checkout master + C:\release-bot\foxbms-2-publishing-mirror>git tag -d v1.0.0 + +#. Merge the ``gh-release-v1.0.0`` branch to the ``master`` branch and create + an annotated tag ``v1.0.0`` on ``master`` branch: + + .. code-block:: console + + C:\release-bot\foxbms-2-publishing-mirror>git merge gh-release-v1.0.0 + C:\release-bot\foxbms-2-publishing-mirror>git branch -D gh-release-v1.0.0 + +#. Push to the publishing repository: + + .. code-block:: console + + C:\release-bot\foxbms-2-publishing-mirror>git push origin master --follow-tags + +#. The ``master`` branch of the publishing mirror is automatically synced to + |foxbms_repository|. + +Finishing the release ++++++++++++++++++++++ + +After that process, we + +- create `GitHub release `_, +- update the documentation on |docs.foxbms.org| and +- post a news entry on the website |foxbms.org|. diff --git a/docs/getting-started/software-installation.rst b/docs/getting-started/software-installation.rst index b26e383b..5b4ac2be 100644 --- a/docs/getting-started/software-installation.rst +++ b/docs/getting-started/software-installation.rst @@ -70,9 +70,9 @@ later steps of this manual. :caption: Downloading a release :name: download-foxbms-2 - C:\Users\vulpes\Documents>curl -Ss -L -o foxbms-2-v1.4.0.zip https://github.com/foxBMS/foxbms-2/archive/v1.4.0.zip - C:\Users\vulpes\Documents>tar -x -f foxbms-2-v1.4.0.zip - C:\Users\vulpes\Documents>ren foxbms-2-1.4.0 foxbms-2 + C:\Users\vulpes\Documents>curl -Ss -L -o foxbms-2-v1.4.1.zip https://github.com/foxBMS/foxbms-2/archive/v1.4.1.zip + C:\Users\vulpes\Documents>tar -x -f foxbms-2-v1.4.1.zip + C:\Users\vulpes\Documents>ren foxbms-2-1.4.1 foxbms-2 C:\Users\vulpes\Documents>cd foxbms-2 .. note:: @@ -126,8 +126,8 @@ Download `Code Composer Studio`_ (CCS) version |version_ccs| and run the installer (chose ``Windows single file installer for CCS IDE``). Do **not** change the default installation directory chosen by the installer and let the installer proceed with the installation into the installation -directory (i.e. ``C:\ti\...`` for CCS ``10.3.1``). Select the -``Hercules™ Safety MCUs`` option during the installation. +directory (e.g., ``C:\ti\ccs1031`` for CCS ``10.3.1``). +Select the ``Hercules™ Safety MCUs`` option during the installation. Installing Code Composer Studio may take a while. diff --git a/docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0.rst b/docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0.rst index d9629a95..b293cf2f 100644 --- a/docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0.rst +++ b/docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0.rst @@ -30,8 +30,16 @@ Overview The |bms-interface| is used to enable communication between the |bms-master| and the |bms-slaves|. +A 3D rendering from the TOP side view of the |bms-interface| is shown in +:numref:`Fig. %s `. The |bms-interface| is intended to be used together with a |bms-master|. +.. _interface-max17841b_v1.0.0_rendering: +.. figure:: ./maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_rendering.png + :width: 80 % + + 3D rendering of the |bms-interface| + -------------- Specifications -------------- @@ -40,7 +48,8 @@ Specifications Mechanical Dimensions ^^^^^^^^^^^^^^^^^^^^^ -The size of the PCB is 70 |_| |mm| |_| x |_| 120 |_| |mm|. +The size of the PCB is 70 |_| |mm| |_| x |_| 120 |_| |mm|. A 3D-model and a +drawing of the PCB can be found in :ref:`DESIGN_RESOURCES` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Battery Management UART Insulation @@ -67,6 +76,38 @@ The PCB design complies with the following parameters: - Creepage distance: 12.5 |_| |mm| +^^^^^^^^^^^^^ +Block Diagram +^^^^^^^^^^^^^ + +A block diagram of the |bms-interface| is shown in +:numref:`Fig. %s `. + +.. _interface-max17841b_v1.0.0_block_diagram: +.. figure:: ./maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_block_diagram.png + :width: 100 % + + Block diagram of the |bms-interface| + +Each |max17841b| communication chip from |mxm| provides one UART channel. +Each channel is comprised of a RX and a TX signal, each using one insulation +transformer. +The |max17841b| chips are directly connected to the MCU via |spi|. + +^^^^^^^^^^^^^^^^^^^^^^^^^^ +Schematic and Board Layout +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +More information about the board schematic and layout files can be found in +section :ref:`DESIGN_RESOURCES`. +For better debugging, there are test-points on the PCB for all relevant IO +signals. In addition to test-points, a pin header (J101) allows an easier +connection to a logic analyzer. + +--------- +Functions +--------- + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Maxim Battery Management UART communication ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -75,6 +116,42 @@ The |bms-interface| offers up to two isolated Maxim Battery Management UART communication channels using the |max17841b| transceiver chip from |mxm|. The |max17841b| transceivers are controlled by the SPI signals from the |bms-master|. +The UART RX signals are available on the connectors J102 and J104. +The pinout of the connectors is described in +:numref:`Table %s `. + +.. csv-table:: UART RX Input Connectors + :name: interface-max17841b_v1.0.0_uartrx_connectors + :header-rows: 1 + :delim: ; + :file: ./maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_uartrx_connectors.csv + +The UART TX signals are available on the connectors J103 and J105. +The pinout of the connectors is described in +:numref:`Table %s `. + +.. csv-table:: UART TX Output Connectors + :name: interface-max17841b_v1.0.0_uarttx_connectors + :header-rows: 1 + :delim: ; + :file: ./maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_uarttx_connectors.csv For the connection to the |bms-master|, a 40-pole mezzanine connector (J100) -is used. +is used. The pinout and pin usage is described in +:numref:`Table %s ` + +.. csv-table:: Signal connector to |bms-master| + :name: interface-max17841b_v1.0.0_master_connector + :header-rows: 1 + :delim: ; + :file: ./maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_master_connector.csv + +All important IO signals are connected to a pin header (J101) to provide an +easy connection to a logic analyzer. The pinout of this header is described in +:numref:`Table %s ` + +.. csv-table:: Debug connector + :name: interface-max17841b_v1.0.0_debug_connector + :header-rows: 1 + :delim: ; + :file: ./maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_debug_connector.csv diff --git a/docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_block_diagram.png b/docs/hardware/interfaces/maxim-max17841b-vx.x.x/maxim-max17841b-v1.0.0/maxim-max17841b-v1.0.0_block_diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..1d70fcca9aa267f732467572fe89322910173971 GIT binary patch literal 16319 zcmeHucT|*3lkb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a3j0}3B83=GL`gaIqnq{t!#oC`Q%~u=&g|hSF;(_WoecpFx>zv- zKCE*dd=Z9B*m!g>=(aY_Tla@ekd^f7M;ed6=*bsA&sd{PG7@Fd6GA_PZ;$aA70zNG zPK3*L0@`W3U>Z3cvDWtw*8Z5ru8g#Ja+mBw155JOX*b za1n(OaN=4CrjMeMzY1@lS;kENt?Oyhi?}_GVgH8N{DSDsgg?lNHCyAcY20<~vfh^( zwfebnu@Jx=A5IJ(Y)VQqhK&CK3~edGf*go~O(|QR+5Y=55@`J2bz;^WZBoeFFC^*| p$QwK Architecture (Hier.) -Exported from Gravis 7.4.0 (2022-05-10) +Exported from Gravis 7.4.6 (2022-10-20) @@ -111,12 +111,12 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal > - - @@ -125,27 +125,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Measurement +Temperature Sensors - - - @@ -154,27 +154,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -SPI +Analog Front-End - - - @@ -183,27 +183,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -IO +FRAM - - - @@ -212,17 +212,17 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Analog Front-End +Interlock - @@ -256,12 +256,12 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal > - - @@ -270,27 +270,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Contactor +SPI - - - @@ -299,27 +299,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -DMA +Contactor - - - @@ -328,27 +328,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -FRAM +MCU - - - @@ -357,27 +357,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -ADC +Common - - - @@ -386,27 +386,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -MCU +ADC - - - @@ -415,27 +415,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Common +Measurement - - - @@ -444,27 +444,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Power Supply +DMA - - - @@ -473,27 +473,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Temperature Sensors +IO - - - @@ -502,17 +502,17 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Interlock +Power Supply - @@ -628,12 +628,12 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal > - - @@ -642,27 +642,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Plausibility +BMS - - - @@ -671,17 +671,17 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -BMS +Plausibility - @@ -723,13 +723,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -746,13 +746,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -889,12 +889,12 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal > - - @@ -903,27 +903,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -System +Diagnosis - - - @@ -932,27 +932,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -System Monitoring +System - - - @@ -961,17 +961,17 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -Diagnosis +System Monitoring - @@ -1029,12 +1029,12 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal > - - @@ -1043,27 +1043,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -core components +fassert - - - @@ -1072,27 +1072,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -fassert +main - - - @@ -1101,27 +1101,27 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -version information +core components - - - @@ -1130,17 +1130,17 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + -main +version information - @@ -1310,13 +1310,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1333,13 +1333,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1353,15 +1353,17 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal > - - + - + + - - - - + - + - + @@ -1441,13 +1441,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1503,13 +1503,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1526,13 +1526,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1549,13 +1549,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1572,13 +1572,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1618,13 +1618,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1641,13 +1641,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1664,13 +1664,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1733,13 +1733,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1756,13 +1756,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1848,13 +1848,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1871,13 +1871,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1894,13 +1894,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1917,13 +1917,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1940,13 +1940,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1963,13 +1963,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -1986,13 +1986,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2009,13 +2009,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2032,13 +2032,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2055,13 +2055,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2078,13 +2078,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2101,13 +2101,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2124,13 +2124,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2147,13 +2147,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2170,13 +2170,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2193,13 +2193,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2216,13 +2216,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2239,13 +2239,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2262,13 +2262,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2285,13 +2285,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2308,13 +2308,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + @@ -2331,13 +2331,13 @@ font-family="MS Shell Dlg 2" font-size="11" font-weight="400" font-style="normal - + - + diff --git a/docs/software/build-process/misc/libproject-example.c b/docs/software/build-process/misc/libproject-example.c index f40d197d..237c556b 100644 --- a/docs/software/build-process/misc/libproject-example.c +++ b/docs/software/build-process/misc/libproject-example.c @@ -43,8 +43,8 @@ * @file libproject-example.c * @author foxBMS Team * @date 2020-10-06 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup USER_LIB * @prefix SUPER * diff --git a/docs/software/build-process/misc/libproject-example.h b/docs/software/build-process/misc/libproject-example.h index fbe81644..86ee3e1d 100644 --- a/docs/software/build-process/misc/libproject-example.h +++ b/docs/software/build-process/misc/libproject-example.h @@ -43,8 +43,8 @@ * @file libproject-example.h * @author foxBMS Team * @date 2020-10-06 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup USER_LIB * @prefix SUPER * diff --git a/docs/software/modules/driver/can/can.rst b/docs/software/modules/driver/can/can.rst index 356f0bb9..2df8a2a6 100644 --- a/docs/software/modules/driver/can/can.rst +++ b/docs/software/modules/driver/can/can.rst @@ -45,17 +45,19 @@ The sent message parameters are: - CAN ID of message to be sent. - data length code, number of bytes to send. Default 8, maximum 8. -- repetition time, period of transmission in ms. Must be a multiple of 10. -- repetition phase, delay for the first transmission. Avoids sending all - messages with same period at the same time. +- repetition time, period of transmission in ms. + Must be a multiple of 10. +- repetition phase, delay for the first transmission. + Avoids sending all messages with same period at the same time. - byte order, endianness (big or little endian) of CAN data. - callback function, pointer to the function that is called when the message has to be sent. -- multiplexer, pointer to a number. This is used to multiplex data in CAN - messages. A static variable must be defined to be used as multiplexer. +- multiplexer, pointer to a number. + This is used to multiplex data in CAN messages. + A static variable must be defined to be used as multiplexer. -The data of the CAN message is divided into signals. Data for each signal -is prepared within the callback function. +The data of the CAN message is divided into signals. +Data for each signal is prepared within the callback function. The developer must implement the signals as needed by the application. Two helper functions are defined for this task, @@ -79,12 +81,13 @@ store the CAN message in the variable used by the low-level driver for the actual transmission. The function ``CAN_PeriodicTransmit()`` is called every 10ms by the 10ms task. -It parses all the elements of ``can_txMessages[]``. If the time has been -reached to send the messages, the corresponding callback function is called. +It parses all the elements of ``can_txMessages[]``. +If the time has been reached to send the messages, the corresponding callback +function is called. -The message is then sent with the function ``CAN_DataSend()``. The function -``CAN_DataSend()`` can also be used to send a CAN message directly anywhere -else in the code. +The message is then sent with the function ``CAN_DataSend()``. +The function ``CAN_DataSend()`` can also be used to send a CAN message directly +anywhere else in the code. Messages to receive ^^^^^^^^^^^^^^^^^^^ diff --git a/docs/software/modules/driver/can/can_how-to.rst b/docs/software/modules/driver/can/can_how-to.rst index 56e61fc4..571608b1 100644 --- a/docs/software/modules/driver/can/can_how-to.rst +++ b/docs/software/modules/driver/can/can_how-to.rst @@ -6,14 +6,191 @@ How to Use the CAN Module ========================= -|tbc| +How to add a new CAN Message +---------------------------- -Use the CAN4 interface ----------------------- +#. Add the new CAN message to the symbol file (``tools/dbc/foxbms.sym``). + + #. If the message is |foxbms| specific prefix it with ``foxBMS``. + #. Set the DLC + #. Add a comment that follows the pattern + + - ``optional comment text (in:, fv:tx) optional comment text`` + for files that are transmitted and + - ``optional comment text (in:, fv:rx) optional comment text`` + for files that are received as seen by the |foxbms| hardware. + +#. Export the symbol file as dbc file. +#. Declare the callback function in + + - in file ``src\app\driver\can\cbs\tx\can_cbs_tx.h`` for + the transmit callbacks + - in file ``src\app\driver\can\cbs\rx\can_cbs_rx.h`` for + the receive callbacks + +#. Implement a callback. + If the message handling suites in any of the existing callback + implementation files (``src/app/driver/can/cbs/tx/*`` or respectively + ``src/app/driver/can/cbs/rx/*``), implement the callback there, otherwise + create a new file (and accompanying test file) and implement the callback + there. + +#. Add the message ID and message details: + + - in file ``src/app/driver/config/can_cfg_tx-message-definitions.h`` for + transmit messages + - in file ``src/app/driver/config/can_cfg_rx-message-definitions.h`` for + receive messages + +#. Add the message to the callback array in + + - in file ``src/app/driver/config/can_cfg_tx.c`` for transmit messages in + the array ``can_txMessages`` + - in file ``src/app/driver/config/can_cfg_rx.c`` for receive messages in the + array ``can_rxMessages`` + +#. Verify that the CAN message is defined and implemented as expected by + |foxbms| guidelines: + + .. code-block:: console + :caption: Verify CAN message definition and callback implementation + :name: can-message-implementation-verification + + C:\Users\vulpes\Documents\foxbms-2>python tests/can/check_ids.py + C:\Users\vulpes\Documents\foxbms-2>python tests/can/check_implemented.py + +.. warning:: + + These script do no syntactical or similar checks of the implementation. + These scripts do text based comparisons in order to help to get a consistent + style for the CAN message implementations. + **The correct implementation etc. must be checked by compiling and debugging.** + +Example for a Transmit Message +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Creating the Transmit Message +""""""""""""""""""""""""""""" + +In this example a message to transmit the |foxbms| system status is +implemented. +The name of the message is therefore ``BmsState`` (following PascalCase naming +convention). +In the symbol file the message is implemented as ``foxBMS_BmsState`` (prefix +``foxBMS`` followed by the message name) with the ID ``0x220``. +As the message is transmitted from the point of view of the BMS, the comment in +the symbol file must be +``Message containing the foxBMS system state (in:can_cbs_tx_state.c:CANTX_BmsState, fv:tx)``. +The new dbc file must be exported. + +Required Macros +""""""""""""""" + +The name of the macro to be implemented in +``src/app/driver/config/can_cfg_tx-message-definitions.h`` needs to be prefixed +with ``CANTX_ID`` (``CANTX`` is the module prefix) followed by the message name +in uppercase (``BMS_STATE``), i.e., the full macro name is +``CANTX_BMS_STATE_ID``. +The macro for the period of the transmitted message must be defined: Module +prefix ``CANTX`` followed by the message name (``BMS_STATE``) and the period in +milliseconds (``PERIOD_ms``), i.e., the full macro name is +``CANTX_BMS_STATE_PERIOD_ms``. +Last, the macro for the phase of the transmitted message must be defined: +Module prefix ``CANTX`` followed by the message name (``BMS_STATE``) and the +phase in milliseconds (``PHASE_ms``) i.e., the full macro name is +``CANTX_BMS_STATE_PHASE_ms``. + +.. literalinclude:: ./can_how-to_tx.c + :language: C + :linenos: + :start-after: example-can-message-id-macro-start + :end-before: example-can-message-id-macro-end + :caption: Adding the new message ID to the transmit message definition file + ``src/app/driver/config/can_cfg_tx-message-definitions.h`` + :name: adding-the-new-message-id + +Now the details of the ID need to be added in an additional macro, that is then +used for the initialization of the transmitted messages macro. +The macro must be named Module prefix (``CANTX``) followed by the message name +(``BMS_STATE``) and suffixed with ``MESSAGE``. + +.. literalinclude:: ./can_how-to_tx.c + :language: C + :linenos: + :start-after: example-can-message-id-details-start + :end-before: example-can-message-id-details-end + :caption: Adding the details of the new message ID to the transmit message + definition file + ``src/app/driver/config/can_cfg_tx-message-definitions.h`` + :name: adding-the-details-to-the-new-message + +Callback Function +""""""""""""""""" + +The callback declaration must be done in file +``src\app\driver\can\cbs\tx\can_cbs_tx.h``. + +.. literalinclude:: ./can_how-to_tx.c + :language: C + :linenos: + :start-after: example-can-tx-messages-callback-declaration-start + :end-before: example-can-tx-messages-callback-declaration-end + :caption: Declaration of the callback function in + ``src\app\driver\can\cbs\tx\can_cbs_tx.h`` + :name: callback-declaration + +The callback definition must be done in the appropriate implementation file, +i.e., for the BMS state message in +``src\app\driver\can\cbs\tx\can_cbs_tx_state.c``. + +.. literalinclude:: ./can_how-to_tx.c + :language: C + :linenos: + :start-after: example-can-tx-messages-callback-definition-start + :end-before: example-can-tx-messages-callback-definition-end + :caption: Definition of the callback function in + ``src\app\driver\can\cbs\tx\can_cbs_tx_state.c`` + :name: callback-definition + +Required Variables Adaptations +"""""""""""""""""""""""""""""" + +The message needs to be added the transmitted messages array as follows: + +.. literalinclude:: ./can_how-to_tx.c + :language: C + :linenos: + :start-after: example-can-tx-messages-configuration-start + :end-before: example-can-tx-messages-configuration-end + :caption: Adding the new message to the registry of transmitted messages + ``src/app/driver/config/can_cfg_tx.c`` + :name: adding-the-the-new-message-to-the-tx-registry + + +Verification +"""""""""""" + +Run the check scripts to verify that the messages are implemented as described +in this how-to's guidelines. + +.. code-block:: console + :caption: Verify CAN transmit message definition and callback implementation + + C:\Users\vulpes\Documents\foxbms-2>python tests/can/check_ids.py + C:\Users\vulpes\Documents\foxbms-2>python tests/can/check_implemented.py + +Example for a Receive Message +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The implementation of a receive message is done analogous, by replacing ``tx`` +with ``rx`` in paths, prefixes, function names etc. + +Using the CAN4 interface +------------------------ If the CAN Module should be extended to the CAN4 interface, a workaround for a -bug in |halcogen| has to be applied. For details, please refer to -:ref:`HALCOGEN_TOOL_DOCUMENTATION`. +bug in |halcogen| has to be applied. +For details, please refer to :ref:`HALCOGEN_TOOL_DOCUMENTATION`. Further Reading --------------- diff --git a/docs/software/modules/driver/can/can_how-to_tx.c b/docs/software/modules/driver/can/can_how-to_tx.c new file mode 100644 index 00000000..ff05d604 --- /dev/null +++ b/docs/software/modules/driver/can/can_how-to_tx.c @@ -0,0 +1,118 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_how-to_tx.c + * @author foxBMS Team + * @date 2022-09-12 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup SOME_GROUP + * @prefix CAN + * + * @brief Documentation file to show how a new CAN message is added to the + * project. + * + */ + +/*========== Includes =======================================================*/ +#include "general.h" + +#include "can_cfg.h" + +/*========== Macros and Definitions =========================================*/ + +/* example-can-message-id-macro-start */ +/** CAN message ID to send state */ +#define CANTX_BMS_STATE_ID (0x220u) +/** Periodicity of CAN state messages in ms */ +#define CANTX_BMS_STATE_PERIOD_ms (100u) +/** Phase of CAN state messages in ms */ +#define CANTX_BMS_STATE_PHASE_ms (0u) +/* example-can-message-id-macro-end */ + +/* example-can-message-id-details-start */ +#define CANTX_BMS_STATE_MESSAGE \ + { \ + .dlc = CAN_DEFAULT_DLC, \ + .id = CANTX_BMS_STATE_ID, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_BMS_STATE_PERIOD_ms, .phase = CANTX_BMS_STATE_PHASE_ms \ + } +/* example-can-message-id-details-end */ + +/*========== Static Constant and Variable Definitions =======================*/ + +/*========== Extern Constant and Variable Definitions =======================*/ +/* example-can-tx-messages-callback-declaration-start */ +extern uint32_t CANTX_BmsState( + CAN_MESSAGE_PROPERTIES_s message, + uint8_t *pCanData, + uint8_t *pMuxId, + const CAN_SHIM_s *const kpkCanShim); +/* example-can-tx-messages-callback-declaration-end */ + +/* example-can-tx-messages-configuration-start */ +const CAN_TX_MESSAGE_TYPE_s can_txMessages[] = { + /* other messages */ + {CAN_NODE_1, CANTX_BMS_STATE_MESSAGE, &CANTX_BmsState, NULL_PTR}, /*!< BMS state */ +}; +/* example-can-tx-messages-configuration-end */ + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ +/* example-can-tx-messages-callback-definition-start */ +extern uint32_t CANTX_BmsState( + CAN_MESSAGE_PROPERTIES_s message, + uint8_t *pCanData, + uint8_t *pMuxId, + const CAN_SHIM_s *const kpkCanShim) { + /* Do message handling stuff */ + return 0; +} +/* example-can-tx-messages-callback-definition-end */ + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ diff --git a/docs/software/modules/driver/can/wscript b/docs/software/modules/driver/can/wscript new file mode 100644 index 00000000..ea73dbd8 --- /dev/null +++ b/docs/software/modules/driver/can/wscript @@ -0,0 +1,89 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (c) 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# We kindly request you to use one or more of the following phrases to refer to +# foxBMS in your hardware, software, documentation or advertising materials: +# +# - "This product uses parts of foxBMS®" +# - "This product includes parts of foxBMS®" +# - "This product is derived from foxBMS®" + +"""Build Script: ``./docs/software/modules/engine/database/wscript`` +==================================================================== + +Builds the database example + +This build script is not meant to be reused! + +""" + +import os + + +def build(bld): + """Build the database object""" + source = ["can_how-to_tx.c"] + dummy_txt = "/* dummy file */\n" + dummy_headers = ["mcu", "HL_can", "os"] + for i in dummy_headers: + bld.path.find_or_declare(f"{i}.h").write(dummy_txt) + includes = [ + ".", + os.path.join("..", "..", "..", "..", "..", "src", "app", "driver", "config"), + os.path.join("..", "..", "..", "..", "..", "src", "app", "main", "include"), + os.path.join("..", "..", "..", "..", "..", "src", "app", "engine", "database"), + os.path.join("..", "..", "..", "..", "..", "src", "app", "engine", "config"), + os.path.join( + "..", "..", "..", "..", "..", "src", "app", "application", "config" + ), + ] + cflags = bld.env.CFLAGS_FOXBMS + bld.path.find_or_declare("needed-for-build.h").write( + "/* dummy file */\n" + "extern void OS_EnterTaskCritical();\n" + "extern void OS_ExitTaskCritical();\n" + ) + bld.add_group() + bld( + features="c", + source=source, + defines=[ + "MCU_ADC1_MAX_NR_CHANNELS=1", + "OS_QUEUE=void", + "canBASE_t=void", + 'canREG1="((uint32_t *)0xFFF7DC00U)"', + ], + includes=includes, + cflags=(cflags + ["--diag_suppress=179", "--diag_suppress=552"]), + idx=1, + ) diff --git a/docs/software/modules/driver/ts/murata/ncu15xh103f6sxx.rst b/docs/software/modules/driver/ts/murata/ncu15xh103f6sxx.rst new file mode 100644 index 00000000..418cd736 --- /dev/null +++ b/docs/software/modules/driver/ts/murata/ncu15xh103f6sxx.rst @@ -0,0 +1,16 @@ +.. include:: ./../../../../../macros.txt +.. include:: ./../../../../../units.txt + +.. + Comments: + Murata is the name of the sensor manufacturer + +.. spelling:: + Murata + +.. _MURATA_NCU15XH103F6SXX: + +MURATA NCU15XH103F6SXX +====================== + +|tbc| diff --git a/docs/software/modules/driver/ts/ts-sensors.rst b/docs/software/modules/driver/ts/ts-sensors.rst index 55d60eb9..36576c07 100644 --- a/docs/software/modules/driver/ts/ts-sensors.rst +++ b/docs/software/modules/driver/ts/ts-sensors.rst @@ -14,6 +14,8 @@ Supported Temperature Sensors Epcos Epc Fak + Murata + Mur Vishay Vis @@ -30,6 +32,7 @@ implement the :ref:`temperature_sensor_api`. ./epcos/b57251v5103j060.rst ./epcos/b57861s0103f045.rst ./fake/none.rst + ./murata/ncu15xh103f6sxx.rst ./vishay/ntcalug01a103g.rst ./vishay/ntcle317e4103sba.rst diff --git a/docs/software/modules/driver/ts/ts-short-names.csv b/docs/software/modules/driver/ts/ts-short-names.csv index dc47a10a..90f74dec 100644 --- a/docs/software/modules/driver/ts/ts-short-names.csv +++ b/docs/software/modules/driver/ts/ts-short-names.csv @@ -2,5 +2,6 @@ Manufacturer;Model;*Short Name* Epcos;B57251V5103J060;Epc00 Epcos;B57861S0103F045;Epc01 Fake;none;Fak00 +Murata;NCU15XH103F6XXS;Mur00 Vishay;NTCALUG01A103G;Vis00 Vishay;NTCLE317E4103SBA;Vis01 diff --git a/docs/software/modules/engine/database/database_how-to.c b/docs/software/modules/engine/database/database_how-to.c index f281d65c..7396e34a 100644 --- a/docs/software/modules/engine/database/database_how-to.c +++ b/docs/software/modules/engine/database/database_how-to.c @@ -43,8 +43,8 @@ * @file database_how-to.c * @author foxBMS Team * @date 2021-04-12 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup SOME_GROUP * @prefix DATA * diff --git a/docs/software/modules/task/ftask/ftask_how-to.c b/docs/software/modules/task/ftask/ftask_how-to.c index 18d4c37d..d1986625 100644 --- a/docs/software/modules/task/ftask/ftask_how-to.c +++ b/docs/software/modules/task/ftask/ftask_how-to.c @@ -43,8 +43,8 @@ * @file ftask_how-to.c * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup SOME_GROUP * @prefix FTSK * diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt index 86030d66..b6561012 100644 --- a/docs/spelling_wordlist.txt +++ b/docs/spelling_wordlist.txt @@ -51,6 +51,7 @@ enum enums expander extern +Farnell ferroelectric fiducial filename @@ -61,6 +62,7 @@ foxbms foxBMS foxmath fram +Fraunhofer freertos freeRTOS functionalities diff --git a/docs/tools/debugger/debugger-lauterbach.rst b/docs/tools/debugger/debugger-lauterbach.rst index 68cd0b62..66db9d14 100644 --- a/docs/tools/debugger/debugger-lauterbach.rst +++ b/docs/tools/debugger/debugger-lauterbach.rst @@ -19,8 +19,9 @@ Please carefully read the for Lauterbach. After setting up the hardware connection you should be able to load -the Trace32 application. For details on where to find a ready configuration -for |foxbms|, please refer to :numref:`WAF_TOOL_LAUTERBACH`. +the Trace32 application. +For details on where to find a ready configuration for |foxbms|, please refer +to :numref:`WAF_TOOL_LAUTERBACH`. .. figure:: lauterbach-buttons.png :alt: Buttons in the Lauterbach Trace32 environment @@ -40,11 +41,13 @@ the target and start with an attached debugger. Using a trace probe ^^^^^^^^^^^^^^^^^^^ Lauterbach supplies in addition to the debug probes also a trace probe for the -TMS570LC4357 target. Please refer to their customer support for details. +TMS570LC4357 target. +Please refer to their customer support for details. The setup of `Fraunhofer IISB`_ consists of a LA-3505 debugger connected to a LA-3580 trace probe with the LA-7992 parallel preprocessor for ARM/Cortex -architectures. |foxbms| features a compliant Mictor-38 connector in order -to be able to connect trace ports with up to 8 bit. If you need more bandwidth, -please contact us. The standard design can be adapted to up to 32 bit trace -bandwidth. +architectures. +|foxbms| features a compliant Mictor-38 connector in order to be able to +connect trace ports with up to 8 bit. If you need more bandwidth, please +contact us. +The standard design can be adapted to up to 32 bit trace bandwidth. diff --git a/docs/tools/static-analysis/axivion.rst b/docs/tools/static-analysis/axivion.rst index 30768264..ae62d777 100644 --- a/docs/tools/static-analysis/axivion.rst +++ b/docs/tools/static-analysis/axivion.rst @@ -82,7 +82,8 @@ Running the Tests ^^^^^^^^^^^^^^^^^ Press :kbd:`Ctrl + Shift + B` and run the task *axivion analysis*. This task -runs the Axivion analysis script ``tests/axivion/scripts/start_analysis.bat``. +runs the Axivion analysis script +``tests/axivion/scripts/start_local_analysis.bat``. Issues ^^^^^^ diff --git a/ide.bat b/ide.bat index fd36cdef..824d195a 100644 --- a/ide.bat +++ b/ide.bat @@ -79,6 +79,13 @@ @EXIT /b 1 ) +@IF NOT EXIST %~dp0\.vscode\settings.json ( + @ECHO VS code settings do not exist. + @ECHO Creating VS Code setup^.^.^. + @%~dp0\waf configure + @ECHO Done^.^.^. +) + @PUSHD %~dp0 @start "foxBMS Development" /b %VS_CODE% . @IF %ERRORLEVEL% NEQ 0 ( diff --git a/src/app/application/algorithm/algorithm.c b/src/app/application/algorithm/algorithm.c index dc47ee30..6ba830f7 100644 --- a/src/app/application/algorithm/algorithm.c +++ b/src/app/application/algorithm/algorithm.c @@ -43,8 +43,8 @@ * @file algorithm.c * @author foxBMS Team * @date 2017-12-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ALGORITHMS * @prefix ALGO * diff --git a/src/app/application/algorithm/algorithm.h b/src/app/application/algorithm/algorithm.h index e39771ca..03446215 100644 --- a/src/app/application/algorithm/algorithm.h +++ b/src/app/application/algorithm/algorithm.h @@ -43,8 +43,8 @@ * @file algorithm.h * @author foxBMS Team * @date 2017-12-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ALGORITHMS * @prefix ALGO * diff --git a/src/app/application/algorithm/config/algorithm_cfg.c b/src/app/application/algorithm/config/algorithm_cfg.c index 7df3470e..3a4474cc 100644 --- a/src/app/application/algorithm/config/algorithm_cfg.c +++ b/src/app/application/algorithm/config/algorithm_cfg.c @@ -43,8 +43,8 @@ * @file algorithm_cfg.c * @author foxBMS Team * @date 2017-12-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ALGORITHMS_CONFIGURATION * @prefix ALGO * diff --git a/src/app/application/algorithm/config/algorithm_cfg.h b/src/app/application/algorithm/config/algorithm_cfg.h index b5f541fc..1b6a5093 100644 --- a/src/app/application/algorithm/config/algorithm_cfg.h +++ b/src/app/application/algorithm/config/algorithm_cfg.h @@ -43,8 +43,8 @@ * @file algorithm_cfg.h * @author foxBMS Team * @date 2017-12-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ALGORITHMS_CONFIGURATION * @prefix ALGO * diff --git a/src/app/application/algorithm/moving_average/moving_average.c b/src/app/application/algorithm/moving_average/moving_average.c index fcc144d9..dd909223 100644 --- a/src/app/application/algorithm/moving_average/moving_average.c +++ b/src/app/application/algorithm/moving_average/moving_average.c @@ -43,8 +43,8 @@ * @file moving_average.c * @author foxBMS Team * @date 2017-12-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ALGORITHMS * @prefix ALGO * diff --git a/src/app/application/algorithm/moving_average/moving_average.h b/src/app/application/algorithm/moving_average/moving_average.h index 3fd8c3b3..4ce00363 100644 --- a/src/app/application/algorithm/moving_average/moving_average.h +++ b/src/app/application/algorithm/moving_average/moving_average.h @@ -43,8 +43,8 @@ * @file moving_average.h * @author foxBMS Team * @date 2017-12-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ALGORITHMS * @prefix ALGO * diff --git a/src/app/application/algorithm/state_estimation/soc/counting/soc_counting.c b/src/app/application/algorithm/state_estimation/soc/counting/soc_counting.c index c0a87dd5..28e2138f 100644 --- a/src/app/application/algorithm/state_estimation/soc/counting/soc_counting.c +++ b/src/app/application/algorithm/state_estimation/soc/counting/soc_counting.c @@ -43,8 +43,8 @@ * @file soc_counting.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/counting/soc_counting.h b/src/app/application/algorithm/state_estimation/soc/counting/soc_counting.h index 83618424..a5a6e8eb 100644 --- a/src/app/application/algorithm/state_estimation/soc/counting/soc_counting.h +++ b/src/app/application/algorithm/state_estimation/soc/counting/soc_counting.h @@ -43,8 +43,8 @@ * @file soc_counting.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/counting/soc_counting_cfg.c b/src/app/application/algorithm/state_estimation/soc/counting/soc_counting_cfg.c index 6321c6c8..f57bd2e1 100644 --- a/src/app/application/algorithm/state_estimation/soc/counting/soc_counting_cfg.c +++ b/src/app/application/algorithm/state_estimation/soc/counting/soc_counting_cfg.c @@ -43,8 +43,8 @@ * @file soc_counting_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/counting/soc_counting_cfg.h b/src/app/application/algorithm/state_estimation/soc/counting/soc_counting_cfg.h index d038fbc6..a6280c95 100644 --- a/src/app/application/algorithm/state_estimation/soc/counting/soc_counting_cfg.h +++ b/src/app/application/algorithm/state_estimation/soc/counting/soc_counting_cfg.h @@ -43,8 +43,8 @@ * @file soc_counting_cfg.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/debug/soc_debug.c b/src/app/application/algorithm/state_estimation/soc/debug/soc_debug.c index cf689191..47b538b7 100644 --- a/src/app/application/algorithm/state_estimation/soc/debug/soc_debug.c +++ b/src/app/application/algorithm/state_estimation/soc/debug/soc_debug.c @@ -43,8 +43,8 @@ * @file soc_debug.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/debug/soc_debug.h b/src/app/application/algorithm/state_estimation/soc/debug/soc_debug.h index e85a86f5..cf4d6198 100644 --- a/src/app/application/algorithm/state_estimation/soc/debug/soc_debug.h +++ b/src/app/application/algorithm/state_estimation/soc/debug/soc_debug.h @@ -43,8 +43,8 @@ * @file soc_debug.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/debug/soc_debug_cfg.c b/src/app/application/algorithm/state_estimation/soc/debug/soc_debug_cfg.c index 61196196..9201a55a 100644 --- a/src/app/application/algorithm/state_estimation/soc/debug/soc_debug_cfg.c +++ b/src/app/application/algorithm/state_estimation/soc/debug/soc_debug_cfg.c @@ -43,8 +43,8 @@ * @file soc_debug_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/debug/soc_debug_cfg.h b/src/app/application/algorithm/state_estimation/soc/debug/soc_debug_cfg.h index f1ee3920..3d25d6b3 100644 --- a/src/app/application/algorithm/state_estimation/soc/debug/soc_debug_cfg.h +++ b/src/app/application/algorithm/state_estimation/soc/debug/soc_debug_cfg.h @@ -43,8 +43,8 @@ * @file soc_debug_cfg.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/none/soc_none.c b/src/app/application/algorithm/state_estimation/soc/none/soc_none.c index c60a18fa..3b036f26 100644 --- a/src/app/application/algorithm/state_estimation/soc/none/soc_none.c +++ b/src/app/application/algorithm/state_estimation/soc/none/soc_none.c @@ -43,8 +43,8 @@ * @file soc_none.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/none/soc_none.h b/src/app/application/algorithm/state_estimation/soc/none/soc_none.h index 803736c4..039b6d00 100644 --- a/src/app/application/algorithm/state_estimation/soc/none/soc_none.h +++ b/src/app/application/algorithm/state_estimation/soc/none/soc_none.h @@ -43,8 +43,8 @@ * @file soc_none.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/none/soc_none_cfg.c b/src/app/application/algorithm/state_estimation/soc/none/soc_none_cfg.c index aa450060..46a304b0 100644 --- a/src/app/application/algorithm/state_estimation/soc/none/soc_none_cfg.c +++ b/src/app/application/algorithm/state_estimation/soc/none/soc_none_cfg.c @@ -43,8 +43,8 @@ * @file soc_none_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soc/none/soc_none_cfg.h b/src/app/application/algorithm/state_estimation/soc/none/soc_none_cfg.h index f503be01..4fb9933f 100644 --- a/src/app/application/algorithm/state_estimation/soc/none/soc_none_cfg.h +++ b/src/app/application/algorithm/state_estimation/soc/none/soc_none_cfg.h @@ -43,8 +43,8 @@ * @file soc_none_cfg.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOC * diff --git a/src/app/application/algorithm/state_estimation/soe/counting/soe_counting.c b/src/app/application/algorithm/state_estimation/soe/counting/soe_counting.c index 72d3a12f..c6e091f2 100644 --- a/src/app/application/algorithm/state_estimation/soe/counting/soe_counting.c +++ b/src/app/application/algorithm/state_estimation/soe/counting/soe_counting.c @@ -43,8 +43,8 @@ * @file soe_counting.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/counting/soe_counting.h b/src/app/application/algorithm/state_estimation/soe/counting/soe_counting.h index f74196e0..c3707f58 100644 --- a/src/app/application/algorithm/state_estimation/soe/counting/soe_counting.h +++ b/src/app/application/algorithm/state_estimation/soe/counting/soe_counting.h @@ -43,8 +43,8 @@ * @file soe_counting.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/counting/soe_counting_cfg.c b/src/app/application/algorithm/state_estimation/soe/counting/soe_counting_cfg.c index f9ff5e9b..246bff5b 100644 --- a/src/app/application/algorithm/state_estimation/soe/counting/soe_counting_cfg.c +++ b/src/app/application/algorithm/state_estimation/soe/counting/soe_counting_cfg.c @@ -43,8 +43,8 @@ * @file soe_counting_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/counting/soe_counting_cfg.h b/src/app/application/algorithm/state_estimation/soe/counting/soe_counting_cfg.h index 0cdf27f0..9e0390a2 100644 --- a/src/app/application/algorithm/state_estimation/soe/counting/soe_counting_cfg.h +++ b/src/app/application/algorithm/state_estimation/soe/counting/soe_counting_cfg.h @@ -43,8 +43,8 @@ * @file soe_counting_cfg.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/debug/soe_debug.c b/src/app/application/algorithm/state_estimation/soe/debug/soe_debug.c index eb2ddc8c..2e4ba39d 100644 --- a/src/app/application/algorithm/state_estimation/soe/debug/soe_debug.c +++ b/src/app/application/algorithm/state_estimation/soe/debug/soe_debug.c @@ -43,8 +43,8 @@ * @file soe_debug.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/debug/soe_debug.h b/src/app/application/algorithm/state_estimation/soe/debug/soe_debug.h index 5e04adfe..c928ad7b 100644 --- a/src/app/application/algorithm/state_estimation/soe/debug/soe_debug.h +++ b/src/app/application/algorithm/state_estimation/soe/debug/soe_debug.h @@ -43,8 +43,8 @@ * @file soe_debug.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/debug/soe_debug_cfg.c b/src/app/application/algorithm/state_estimation/soe/debug/soe_debug_cfg.c index 31149fe2..7ef38cd4 100644 --- a/src/app/application/algorithm/state_estimation/soe/debug/soe_debug_cfg.c +++ b/src/app/application/algorithm/state_estimation/soe/debug/soe_debug_cfg.c @@ -43,8 +43,8 @@ * @file soe_debug_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/debug/soe_debug_cfg.h b/src/app/application/algorithm/state_estimation/soe/debug/soe_debug_cfg.h index 3cbf546f..c107b27d 100644 --- a/src/app/application/algorithm/state_estimation/soe/debug/soe_debug_cfg.h +++ b/src/app/application/algorithm/state_estimation/soe/debug/soe_debug_cfg.h @@ -43,8 +43,8 @@ * @file soe_debug_cfg.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/none/soe_none.c b/src/app/application/algorithm/state_estimation/soe/none/soe_none.c index d063e9a9..f713ea39 100644 --- a/src/app/application/algorithm/state_estimation/soe/none/soe_none.c +++ b/src/app/application/algorithm/state_estimation/soe/none/soe_none.c @@ -43,8 +43,8 @@ * @file soe_none.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/none/soe_none.h b/src/app/application/algorithm/state_estimation/soe/none/soe_none.h index 67a841d8..1ca98141 100644 --- a/src/app/application/algorithm/state_estimation/soe/none/soe_none.h +++ b/src/app/application/algorithm/state_estimation/soe/none/soe_none.h @@ -43,8 +43,8 @@ * @file soe_none.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/none/soe_none_cfg.c b/src/app/application/algorithm/state_estimation/soe/none/soe_none_cfg.c index 8e651e03..d433f4c4 100644 --- a/src/app/application/algorithm/state_estimation/soe/none/soe_none_cfg.c +++ b/src/app/application/algorithm/state_estimation/soe/none/soe_none_cfg.c @@ -43,8 +43,8 @@ * @file soe_none_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/soe/none/soe_none_cfg.h b/src/app/application/algorithm/state_estimation/soe/none/soe_none_cfg.h index 9f08deaf..72ab9a09 100644 --- a/src/app/application/algorithm/state_estimation/soe/none/soe_none_cfg.h +++ b/src/app/application/algorithm/state_estimation/soe/none/soe_none_cfg.h @@ -43,8 +43,8 @@ * @file soe_none_cfg.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOE * diff --git a/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid.c b/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid.c index 3e35b306..bb2a0bcc 100644 --- a/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid.c +++ b/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid.c @@ -43,8 +43,8 @@ * @file sof_trapezoid.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION_CONFIGURATION * @prefix SOF * @@ -69,12 +69,9 @@ /*========== Static Constant and Variable Definitions =======================*/ /** @{ - * module-local static Variables that are calculated at startup and used later to avoid divisions at runtime + * module-local static variable that is calculated at startup and used later to avoid divisions at runtime */ static SOF_CURVE_s sof_curveRecommendedOperatingCurrent; -static SOF_CURVE_s sof_curveMol; -static SOF_CURVE_s sof_curveRsl; -static SOF_CURVE_s sof_curveMsl; /** @} */ /** local copies of database tables */ @@ -350,17 +347,6 @@ static SOF_CURRENT_LIMITS_s SOF_MinimumOfTwoSofValues( extern void SOF_Init(void) { /* Calculating SOF curve for the recommended operating current */ SOF_CalculateCurves(&sof_recommendedCurrent, &sof_curveRecommendedOperatingCurrent); - -#if BMS_CHECK_SOF_CURRENT_LIMITS == true - /* Calculating SOF curve for maximum operating limit */ - SOF_CalculateCurves(&sof_maximumOperatingLimit, &sof_curveMol); - - /* Calculating SOF curve for recommended safety limit */ - SOF_CalculateCurves(&sof_recommendedSafetyLimit, &sof_curveRsl); - - /* Calculating SOF curve for maximum safety limit */ - SOF_CalculateCurves(&sof_configMaximumSafetyLimit, &sof_curveMsl); -#endif } extern void SOF_Calculation(void) { @@ -416,80 +402,6 @@ extern void SOF_Calculation(void) { sof_tableSofValues.recommendedPeakChargeCurrent_mA[s] = 0.0f; sof_tableSofValues.recommendedPeakDischargeCurrent_mA[s] = 0.0f; } - -#if BMS_CHECK_SOF_CURRENT_LIMITS == true - /* Calculate maximum allowed current MOL level */ - SOF_CalculateVoltageBasedCurrentLimit( - (float)sof_tableMinimumMaximumValues.minimumCellVoltage_mV[s], - (float)sof_tableMinimumMaximumValues.maximumCellVoltage_mV[s], - &voltageBasedSof, - &sof_maximumOperatingLimit, - &sof_curveMol); - SOF_CalculateTemperatureBasedCurrentLimit( - (float)sof_tableMinimumMaximumValues.minimumTemperature_ddegC[s], - (float)sof_tableMinimumMaximumValues.maximumTemperature_ddegC[s], - &temperatureBasedSof, - &sof_maximumOperatingLimit, - &sof_curveMol); - allowedCurrent = SOF_MinimumOfTwoSofValues(voltageBasedSof, temperatureBasedSof); - sof_tableSofValues.continuousMolChargeCurrent_mA[s] = allowedCurrent.continuousChargeCurrent_mA; - sof_tableSofValues.continuousMolDischargeCurrent_mA[s] = allowedCurrent.continuousDischargeCurrent_mA; - sof_tableSofValues.peakMolChargeCurrent_mA[s] = allowedCurrent.peakChargeCurrent_mA; - sof_tableSofValues.peakMolDischargeCurrent_mA[s] = allowedCurrent.peakDischargeCurrent_mA; - - /* Calculate maximum allowed current RSL level */ - SOF_CalculateVoltageBasedCurrentLimit( - (float)sof_tableMinimumMaximumValues.minimumCellVoltage_mV[s], - (float)sof_tableMinimumMaximumValues.maximumCellVoltage_mV[s], - &voltageBasedSof, - &sof_recommendedSafetyLimit, - &sof_curveRsl); - SOF_CalculateTemperatureBasedCurrentLimit( - (float)sof_tableMinimumMaximumValues.minimumTemperature_ddegC[s], - (float)sof_tableMinimumMaximumValues.maximumTemperature_ddegC[s], - &temperatureBasedSof, - &sof_recommendedSafetyLimit, - &sof_curveRsl); - allowedCurrent = SOF_MinimumOfTwoSofValues(voltageBasedSof, temperatureBasedSof); - sof_tableSofValues.continuousRslChargeCurrent_mA[s] = allowedCurrent.continuousChargeCurrent_mA; - sof_tableSofValues.continuousRslDischargeCurrent_mA[s] = allowedCurrent.continuousDischargeCurrent_mA; - sof_tableSofValues.peakRslChargeCurrent_mA[s] = allowedCurrent.peakChargeCurrent_mA; - sof_tableSofValues.peakRslDischargeCurrent_mA[s] = allowedCurrent.peakDischargeCurrent_mA; - - /* Calculate maximum allowed current MSL level */ - SOF_CalculateVoltageBasedCurrentLimit( - (float)sof_tableMinimumMaximumValues.minimumCellVoltage_mV[s], - (float)sof_tableMinimumMaximumValues.maximumCellVoltage_mV[s], - &voltageBasedSof, - &sof_configMaximumSafetyLimit, - &sof_curveMsl); - SOF_CalculateTemperatureBasedCurrentLimit( - (float)sof_tableMinimumMaximumValues.minimumTemperature_ddegC[s], - (float)sof_tableMinimumMaximumValues.maximumTemperature_ddegC[s], - &temperatureBasedSof, - &sof_configMaximumSafetyLimit, - &sof_curveMsl); - allowedCurrent = SOF_MinimumOfTwoSofValues(voltageBasedSof, temperatureBasedSof); - sof_tableSofValues.continuousMslChargeCurrent_mA[s] = allowedCurrent.continuousChargeCurrent_mA; - sof_tableSofValues.continuousMslDischargeCurrent_mA[s] = allowedCurrent.continuousDischargeCurrent_mA; - sof_tableSofValues.peakMslChargeCurrent_mA[s] = allowedCurrent.peakChargeCurrent_mA; - sof_tableSofValues.peakMslDischargeCurrent_mA[s] = allowedCurrent.peakDischargeCurrent_mA; -#else /* BMS_CHECK_SOF_CURRENT_LIMITS == false */ - sof_tableSofValues.continuousMolChargeCurrent_mA[s] = BC_CURRENT_MAX_CHARGE_MOL_mA; - sof_tableSofValues.continuousMolDischargeCurrent_mA[s] = BC_CURRENT_MAX_DISCHARGE_MOL_mA; - sof_tableSofValues.peakMolChargeCurrent_mA[s] = BC_CURRENT_MAX_CHARGE_MOL_mA; - sof_tableSofValues.peakMolDischargeCurrent_mA[s] = BC_CURRENT_MAX_DISCHARGE_MOL_mA; - - sof_tableSofValues.continuousRslChargeCurrent_mA[s] = BC_CURRENT_MAX_CHARGE_RSL_mA; - sof_tableSofValues.continuousRslDischargeCurrent_mA[s] = BC_CURRENT_MAX_DISCHARGE_RSL_mA; - sof_tableSofValues.peakRslChargeCurrent_mA[s] = BC_CURRENT_MAX_CHARGE_RSL_mA; - sof_tableSofValues.peakRslDischargeCurrent_mA[s] = BC_CURRENT_MAX_DISCHARGE_RSL_mA; - - sof_tableSofValues.continuousMslChargeCurrent_mA[s] = BC_CURRENT_MAX_CHARGE_MSL_mA; - sof_tableSofValues.continuousMslDischargeCurrent_mA[s] = BC_CURRENT_MAX_DISCHARGE_MSL_mA; - sof_tableSofValues.peakMslChargeCurrent_mA[s] = BC_CURRENT_MAX_CHARGE_MSL_mA; - sof_tableSofValues.peakMslDischargeCurrent_mA[s] = BC_CURRENT_MAX_DISCHARGE_MSL_mA; -#endif /* BMS_CHECK_SOF_CURRENT_LIMITS == true */ } if (minCharge_mA > (float)BS_MAXIMUM_STRING_CURRENT_mA) { @@ -505,6 +417,16 @@ extern void SOF_Calculation(void) { sof_tableSofValues.recommendedPeakPackChargeCurrent_mA = (float)nrClosedStrings * minCharge_mA; sof_tableSofValues.recommendedPeakPackDischargeCurrent_mA = (float)nrClosedStrings * minDischarge_mA; + /* Check if currently a transition into ERROR state in the BMS state + * machine is ongoing. Set allowed current to 0 if this is the case. + */ + if (BMS_IsTransitionToErrorStateActive() == true) { + sof_tableSofValues.recommendedContinuousPackChargeCurrent_mA = 0.0f; + sof_tableSofValues.recommendedContinuousPackDischargeCurrent_mA = 0.0f; + sof_tableSofValues.recommendedPeakPackChargeCurrent_mA = 0.0f; + sof_tableSofValues.recommendedPeakPackDischargeCurrent_mA = 0.0f; + } + DATA_WRITE_DATA(&sof_tableSofValues); } diff --git a/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid.h b/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid.h index 4ced08c9..8c2e4a1b 100644 --- a/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid.h +++ b/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid.h @@ -43,8 +43,8 @@ * @file sof_trapezoid.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOF * diff --git a/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid_cfg.c b/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid_cfg.c index 8f36e86e..81fb1d6c 100644 --- a/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid_cfg.c +++ b/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid_cfg.c @@ -43,8 +43,8 @@ * @file sof_trapezoid_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOF * @@ -78,57 +78,6 @@ const SOF_CONFIG_s sof_recommendedCurrent = { .limitLowerCellVoltage_mV = SOF_VOLTAGE_LIMIT_DISCHARGE_mV, .cutoffLowerCellVoltage_mV = SOF_VOLTAGE_CUTOFF_DISCHARGE_mV}; -const SOF_CONFIG_s sof_maximumOperatingLimit = { - .maximumChargeCurrent_mA = SOF_MOL_STRING_CURRENT_CONTINUOUS_CHARGE_mA, - .maximumDischargeCurrent_mA = SOF_MOL_STRING_CURRENT_CONTINUOUS_DISCHARGE_mA, - .limpHomeCurrent_mA = SOF_MOL_STRING_CURRENT_LIMP_HOME_mA, - .cutoffLowTemperatureDischarge_ddegC = SOF_MOL_TEMPERATURE_LOW_CUTOFF_DISCHARGE_ddegC, - .limitLowTemperatureDischarge_ddegC = SOF_MOL_TEMPERATURE_LOW_LIMIT_DISCHARGE_ddegC, - .cutoffLowTemperatureCharge_ddegC = SOF_MOL_TEMPERATURE_LOW_CUTOFF_CHARGE_ddegC, - .limitLowTemperatureCharge_ddegC = SOF_MOL_TEMPERATURE_LOW_LIMIT_CHARGE_ddegC, - .cutoffHighTemperatureDischarge_ddegC = SOF_MOL_TEMPERATURE_HIGH_CUTOFF_DISCHARGE_ddegC, - .limitHighTemperatureDischarge_ddegC = SOF_MOL_TEMPERATURE_HIGH_LIMIT_DISCHARGE_ddegC, - .cutoffHighTemperatureCharge_ddegC = SOF_MOL_TEMPERATURE_HIGH_CUTOFF_CHARGE_ddegC, - .limitHighTemperatureCharge_ddegC = SOF_MOL_TEMPERATURE_HIGH_LIMIT_CHARGE_ddegC, - .limitUpperCellVoltage_mV = SOF_MOL_VOLTAGE_LIMIT_CHARGE_mV, - .cutoffUpperCellVoltage_mV = SOF_MOL_VOLTAGE_CUTOFF_CHARGE_mV, - .limitLowerCellVoltage_mV = SOF_MOL_VOLTAGE_LIMIT_DISCHARGE_mV, - .cutoffLowerCellVoltage_mV = SOF_MOL_VOLTAGE_CUTOFF_DISCHARGE_mV}; - -const SOF_CONFIG_s sof_recommendedSafetyLimit = { - .maximumChargeCurrent_mA = SOF_RSL_STRING_CURRENT_CONTINUOUS_CHARGE_mA, - .maximumDischargeCurrent_mA = SOF_RSL_STRING_CURRENT_CONTINUOUS_DISCHARGE_mA, - .limpHomeCurrent_mA = SOF_RSL_STRING_CURRENT_LIMP_HOME_mA, - .cutoffLowTemperatureDischarge_ddegC = SOF_RSL_TEMPERATURE_LOW_CUTOFF_DISCHARGE_ddegC, - .limitLowTemperatureDischarge_ddegC = SOF_RSL_TEMPERATURE_LOW_LIMIT_DISCHARGE_ddegC, - .cutoffLowTemperatureCharge_ddegC = SOF_RSL_TEMPERATURE_LOW_CUTOFF_CHARGE_ddegC, - .limitLowTemperatureCharge_ddegC = SOF_RSL_TEMPERATURE_LOW_LIMIT_CHARGE_ddegC, - .cutoffHighTemperatureDischarge_ddegC = SOF_RSL_TEMPERATURE_HIGH_CUTOFF_DISCHARGE_ddegC, - .limitHighTemperatureDischarge_ddegC = SOF_RSL_TEMPERATURE_HIGH_LIMIT_DISCHARGE_ddegC, - .cutoffHighTemperatureCharge_ddegC = SOF_RSL_TEMPERATURE_HIGH_CUTOFF_CHARGE_ddegC, - .limitHighTemperatureCharge_ddegC = SOF_RSL_TEMPERATURE_HIGH_LIMIT_CHARGE_ddegC, - .limitUpperCellVoltage_mV = SOF_RSL_VOLTAGE_LIMIT_CHARGE_mV, - .cutoffUpperCellVoltage_mV = SOF_RSL_VOLTAGE_CUTOFF_CHARGE_mV, - .limitLowerCellVoltage_mV = SOF_RSL_VOLTAGE_LIMIT_DISCHARGE_mV, - .cutoffLowerCellVoltage_mV = SOF_RSL_VOLTAGE_CUTOFF_DISCHARGE_mV}; - -const SOF_CONFIG_s sof_configMaximumSafetyLimit = { - .maximumChargeCurrent_mA = SOF_MSL_STRING_CURRENT_CONTINUOUS_CHARGE_mA, - .maximumDischargeCurrent_mA = SOF_MSL_STRING_CURRENT_CONTINUOUS_DISCHARGE_mA, - .limpHomeCurrent_mA = SOF_MSL_STRING_CURRENT_LIMP_HOME_mA, - .cutoffLowTemperatureDischarge_ddegC = SOF_MSL_TEMPERATURE_LOW_CUTOFF_DISCHARGE_ddegC, - .limitLowTemperatureDischarge_ddegC = SOF_MSL_TEMPERATURE_LOW_LIMIT_DISCHARGE_ddegC, - .cutoffLowTemperatureCharge_ddegC = SOF_MSL_TEMPERATURE_LOW_CUTOFF_CHARGE_ddegC, - .limitLowTemperatureCharge_ddegC = SOF_MSL_TEMPERATURE_LOW_LIMIT_CHARGE_ddegC, - .cutoffHighTemperatureDischarge_ddegC = SOF_MSL_TEMPERATURE_HIGH_CUTOFF_DISCHARGE_ddegC, - .limitHighTemperatureDischarge_ddegC = SOF_MSL_TEMPERATURE_HIGH_LIMIT_DISCHARGE_ddegC, - .cutoffHighTemperatureCharge_ddegC = SOF_MSL_TEMPERATURE_HIGH_CUTOFF_CHARGE_ddegC, - .limitHighTemperatureCharge_ddegC = SOF_MSL_TEMPERATURE_HIGH_LIMIT_CHARGE_ddegC, - .limitUpperCellVoltage_mV = SOF_MSL_VOLTAGE_LIMIT_CHARGE_mV, - .cutoffUpperCellVoltage_mV = SOF_MSL_VOLTAGE_CUTOFF_CHARGE_mV, - .limitLowerCellVoltage_mV = SOF_MSL_VOLTAGE_LIMIT_DISCHARGE_mV, - .cutoffLowerCellVoltage_mV = SOF_MSL_VOLTAGE_CUTOFF_DISCHARGE_mV}; - /*========== Static Function Prototypes =====================================*/ /*========== Static Function Implementations ================================*/ diff --git a/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid_cfg.h b/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid_cfg.h index 35313f8d..540fe859 100644 --- a/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid_cfg.h +++ b/src/app/application/algorithm/state_estimation/sof/trapezoid/sof_trapezoid_cfg.h @@ -43,8 +43,8 @@ * @file sof_trapezoid_cfg.h * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION_CONFIGURATION * @prefix SOF * @@ -58,37 +58,21 @@ /*========== Includes =======================================================*/ #include "general.h" +#include "battery_cell_cfg.h" + /*========== Macros and Definitions =========================================*/ /** * Maximum current in mA in charge direction that a string can sustain. * Normally set once for the specific battery cell from data sheet */ -#define SOF_STRING_CURRENT_CONTINUOUS_CHARGE_mA (120000.00f) - -/** - * Different alarm levels for the maximum continuous charge current in mA. - * @{ - */ -#define SOF_MOL_STRING_CURRENT_CONTINUOUS_CHARGE_mA (10000.00f) -#define SOF_RSL_STRING_CURRENT_CONTINUOUS_CHARGE_mA (11500.00f) -#define SOF_MSL_STRING_CURRENT_CONTINUOUS_CHARGE_mA (12200.00f) -/**@}*/ +#define SOF_STRING_CURRENT_CONTINUOUS_CHARGE_mA ((float)BC_CURRENT_MAX_CHARGE_MOL_mA) /** * Maximum current in mA in discharge direction that a string can deliver. * Normally set once for the specific battery cell from data sheet. */ -#define SOF_STRING_CURRENT_CONTINUOUS_DISCHARGE_mA (120000.00f) - -/** - * Different alarm levels for the maximum continuous string discharge current in mA. - * @{ - */ -#define SOF_MOL_STRING_CURRENT_CONTINUOUS_DISCHARGE_mA (10000.00f) -#define SOF_RSL_STRING_CURRENT_CONTINUOUS_DISCHARGE_mA (11500.00f) -#define SOF_MSL_STRING_CURRENT_CONTINUOUS_DISCHARGE_mA (12200.00f) -/**@}*/ +#define SOF_STRING_CURRENT_CONTINUOUS_DISCHARGE_mA ((float)BC_CURRENT_MAX_DISCHARGE_MOL_mA) /** * Current in mA that the string should be able to discharge when in @@ -97,224 +81,81 @@ */ #define SOF_STRING_CURRENT_LIMP_HOME_mA (20000.00f) -/** - * Different alarm levels for the limp home current in mA - * @{ - */ -#define SOF_MOL_STRING_CURRENT_LIMP_HOME_mA (20000.00f) -#define SOF_RSL_STRING_CURRENT_LIMP_HOME_mA (20000.00f) -#define SOF_MSL_STRING_CURRENT_LIMP_HOME_mA (20000.00f) -/**@}*/ - /** * Cold temperature in deci °C where the derating of maximum discharge * current starts, i.e., below this temperature battery pack should not deliver * full discharge current. */ -#define SOF_TEMPERATURE_LOW_CUTOFF_DISCHARGE_ddegC (0) - -/** - * Different alarm levels for the cold temperature in deci °C where the - * derating of maximum discharge current starts, i.e., below this temperature - * battery pack should not deliver full discharge current. - * @{ - */ -#define SOF_MOL_TEMPERATURE_LOW_CUTOFF_DISCHARGE_ddegC (0) -#define SOF_RSL_TEMPERATURE_LOW_CUTOFF_DISCHARGE_ddegC (0) -#define SOF_MSL_TEMPERATURE_LOW_CUTOFF_DISCHARGE_ddegC (0) -/**@}*/ +#define SOF_TEMPERATURE_LOW_CUTOFF_DISCHARGE_ddegC (BC_TEMPERATURE_MIN_DISCHARGE_MOL_ddegC) /** * Cold temperature in deci °C where the derating of maximum discharge * current is fully applied, i.e., below this temperature battery pack should * not deliver any current in discharge direction. */ -#define SOF_TEMPERATURE_LOW_LIMIT_DISCHARGE_ddegC (-100) - -/** - * Different alarm levels for the cold temperature in deci °C where the - * derating of maximum discharge current is fully applied. Below this - * temperature the battery pack should not deliver any current in discharge - * direction. - * @{ - */ -#define SOF_MOL_TEMPERATURE_LOW_LIMIT_DISCHARGE_ddegC (-100) -#define SOF_RSL_TEMPERATURE_LOW_LIMIT_DISCHARGE_ddegC (-100) -#define SOF_MSL_TEMPERATURE_LOW_LIMIT_DISCHARGE_ddegC (-100) -/**@}*/ +#define SOF_TEMPERATURE_LOW_LIMIT_DISCHARGE_ddegC (BC_TEMPERATURE_MIN_DISCHARGE_MSL_ddegC) /** * Cold temperature in deci °C where the derating of maximum charge current * starts, i.e., below this temperature battery pack should not deliver full * charge current. */ -#define SOF_TEMPERATURE_LOW_CUTOFF_CHARGE_ddegC (0) - -/** - * Different alarm levels for the cold temperature in deci °C where the - * derating of maximum charge current starts, i.e., below this temperature - * battery pack should not deliver full charge current - * @{ - */ -#define SOF_MOL_TEMPERATURE_LOW_CUTOFF_CHARGE_ddegC (0) -#define SOF_RSL_TEMPERATURE_LOW_CUTOFF_CHARGE_ddegC (0) -#define SOF_MSL_TEMPERATURE_LOW_CUTOFF_CHARGE_ddegC (0) -/**@}*/ +#define SOF_TEMPERATURE_LOW_CUTOFF_CHARGE_ddegC (BC_TEMPERATURE_MIN_CHARGE_MOL_ddegC) /** * Cold temperature in deci °C where the derating of maximum charge current * is fully applied, i.e., below this temperature battery pack should not * deliver any current in charge direction. */ -#define SOF_TEMPERATURE_LOW_LIMIT_CHARGE_ddegC (-100) - -/** - * Different alarm levels for the cold temperature in deci °C where the - * derating of maximum charge current is fully applied. Below this temperature - * the battery pack should not deliver any current in charge direction. - * @{ - */ -#define SOF_MOL_TEMPERATURE_LOW_LIMIT_CHARGE_ddegC (-100) -#define SOF_RSL_TEMPERATURE_LOW_LIMIT_CHARGE_ddegC (-100) -#define SOF_MSL_TEMPERATURE_LOW_LIMIT_CHARGE_ddegC (-100) -/**@}*/ +#define SOF_TEMPERATURE_LOW_LIMIT_CHARGE_ddegC (BC_TEMPERATURE_MIN_CHARGE_MSL_ddegC) /** * Hot temperature in deci °C where the derating of maximum discharge * current starts, i.e., above this temperature battery pack should not deliver * full discharge current. */ -#define SOF_TEMPERATURE_HIGH_CUTOFF_DISCHARGE_ddegC (450) - -/** - * Different alarm levels for the high temperature in deci °C where the - * derating of maximum discharge current starts, i.e., above this temperature - * battery pack should not deliver full discharge current - * @{ - */ -#define SOF_MOL_TEMPERATURE_HIGH_CUTOFF_DISCHARGE_ddegC (450) -#define SOF_RSL_TEMPERATURE_HIGH_CUTOFF_DISCHARGE_ddegC (450) -#define SOF_MSL_TEMPERATURE_HIGH_CUTOFF_DISCHARGE_ddegC (450) -/**@}*/ +#define SOF_TEMPERATURE_HIGH_CUTOFF_DISCHARGE_ddegC (BC_TEMPERATURE_MAX_DISCHARGE_MOL_ddegC) /** * Hot temperature in deci °C where the derating of maximum discharge * current is fully applied, i.e., above this temperature battery pack should * not deliver any current in discharge direction. */ -#define SOF_TEMPERATURE_HIGH_LIMIT_DISCHARGE_ddegC (550) - -/** - * Different alarm levels for the high temperature in deci °C where the - * derating of maximum discharge current is fully applied. Above this - * temperature the battery pack should not deliver any current in discharge - * direction. - * @{ - */ -#define SOF_MOL_TEMPERATURE_HIGH_LIMIT_DISCHARGE_ddegC (550) -#define SOF_RSL_TEMPERATURE_HIGH_LIMIT_DISCHARGE_ddegC (550) -#define SOF_MSL_TEMPERATURE_HIGH_LIMIT_DISCHARGE_ddegC (550) -/**@}*/ +#define SOF_TEMPERATURE_HIGH_LIMIT_DISCHARGE_ddegC (BC_TEMPERATURE_MAX_DISCHARGE_MSL_ddegC) /** * Hot temperature in deci °C where the derating of maximum charge current * starts, i.e., above this temperature battery pack should not deliver full * charge current. */ -#define SOF_TEMPERATURE_HIGH_CUTOFF_CHARGE_ddegC (450) - -/** - * Different alarm levels for the high temperature in deci °C where the - * derating of maximum charge current starts, i.e., above this temperature - * battery pack should not deliver full charge current - * @{ - */ -#define SOF_MOL_TEMPERATURE_HIGH_CUTOFF_CHARGE_ddegC (450) -#define SOF_RSL_TEMPERATURE_HIGH_CUTOFF_CHARGE_ddegC (450) -#define SOF_MSL_TEMPERATURE_HIGH_CUTOFF_CHARGE_ddegC (450) -/**@}*/ +#define SOF_TEMPERATURE_HIGH_CUTOFF_CHARGE_ddegC (BC_TEMPERATURE_MAX_CHARGE_MOL_ddegC) /** * Hot temperature in deci °C where the derating of maximum charge current * is fully applied, i.e., above this temperature battery pack should not * deliver any current in charge direction. */ -#define SOF_TEMPERATURE_HIGH_LIMIT_CHARGE_ddegC (550) - -/** - * Different alarm levels for the high temperature in deci °C where the - * derating of maximum charge current is fully applied. Above this temperature - * the battery pack should not deliver any current in charge direction. - * @{ - */ -#define SOF_MOL_TEMPERATURE_HIGH_LIMIT_CHARGE_ddegC (550) -#define SOF_RSL_TEMPERATURE_HIGH_LIMIT_CHARGE_ddegC (550) -#define SOF_MSL_TEMPERATURE_HIGH_LIMIT_CHARGE_ddegC (550) -/**@}*/ +#define SOF_TEMPERATURE_HIGH_LIMIT_CHARGE_ddegC (BC_TEMPERATURE_MAX_CHARGE_MSL_ddegC) /** * Above this voltage value battery pack should not be exposed to full current in charge direction. */ -#define SOF_VOLTAGE_CUTOFF_CHARGE_mV (2400) - -/** - * Different alarm levels for the upper voltage limit where the derating of - * maximum charge current starts. Above this value the battery pack - * should not deliver full current in charge direction. - * @{ - */ -#define SOF_MOL_VOLTAGE_CUTOFF_CHARGE_mV (2400) -#define SOF_RSL_VOLTAGE_CUTOFF_CHARGE_mV (2400) -#define SOF_MSL_VOLTAGE_CUTOFF_CHARGE_mV (2400) -/**@}*/ +#define SOF_VOLTAGE_CUTOFF_CHARGE_mV (BC_VOLTAGE_MAX_MOL_mV) /** * Above this voltage value battery pack should not be exposed to any current in charge direction. */ -#define SOF_VOLTAGE_LIMIT_CHARGE_mV (2550) - -/** - * Different alarm levels for the upper voltage limit where the derating of - * maximum charge current is fully applied. Above this value the battery pack - * should not deliver any current in charge direction. - * @{ - */ -#define SOF_MOL_VOLTAGE_LIMIT_CHARGE_mV (2550) -#define SOF_RSL_VOLTAGE_LIMIT_CHARGE_mV (2550) -#define SOF_MSL_VOLTAGE_LIMIT_CHARGE_mV (2550) -/**@}*/ +#define SOF_VOLTAGE_LIMIT_CHARGE_mV (BC_VOLTAGE_MAX_RSL_mV) /** * Below this voltage value battery pack should not deliver full current in discharge direction. */ -#define SOF_VOLTAGE_CUTOFF_DISCHARGE_mV (2000) - -/** - * Different alarm levels for the lower voltage limit where the derating of - * maximum discharge current starts. Below this value the battery pack - * should not deliver full current in discharge direction. - * @{ - */ -#define SOF_MOL_VOLTAGE_CUTOFF_DISCHARGE_mV (2000) -#define SOF_RSL_VOLTAGE_CUTOFF_DISCHARGE_mV (2000) -#define SOF_MSL_VOLTAGE_CUTOFF_DISCHARGE_mV (2000) -/**@}*/ +#define SOF_VOLTAGE_CUTOFF_DISCHARGE_mV (BC_VOLTAGE_MIN_MOL_mV) /** * Below this voltage value battery pack should not deliver any current in discharge direction. */ -#define SOF_VOLTAGE_LIMIT_DISCHARGE_mV (1750) - -/** - * Different alarm levels for the lower voltage limit where the derating of - * maximum discharge is fully applied. Below this value the battery pack - * should not deliver any current in discharge direction. - * @{ - */ -#define SOF_MOL_VOLTAGE_LIMIT_DISCHARGE_mV (1750) -#define SOF_RSL_VOLTAGE_LIMIT_DISCHARGE_mV (1750) -#define SOF_MSL_VOLTAGE_LIMIT_DISCHARGE_mV (1750) -/**@}*/ +#define SOF_VOLTAGE_LIMIT_DISCHARGE_mV (BC_VOLTAGE_MIN_RSL_mV) /** * structure for configuration of SoF Calculation @@ -355,16 +196,6 @@ typedef struct { */ extern const SOF_CONFIG_s sof_recommendedCurrent; -/** - * Configuration values for the SOF window of the different alarm levels (MOL, - * RSL and MSL) - * @{ - */ -extern const SOF_CONFIG_s sof_maximumOperatingLimit; -extern const SOF_CONFIG_s sof_recommendedSafetyLimit; -extern const SOF_CONFIG_s sof_configMaximumSafetyLimit; -/**@}*/ - /*========== Extern Function Prototypes =====================================*/ /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ diff --git a/src/app/application/algorithm/state_estimation/soh/debug/soh_debug.c b/src/app/application/algorithm/state_estimation/soh/debug/soh_debug.c index 9516320b..7b0b00db 100644 --- a/src/app/application/algorithm/state_estimation/soh/debug/soh_debug.c +++ b/src/app/application/algorithm/state_estimation/soh/debug/soh_debug.c @@ -43,8 +43,8 @@ * @file soh_debug.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOH * diff --git a/src/app/application/algorithm/state_estimation/soh/debug/soh_debug.h b/src/app/application/algorithm/state_estimation/soh/debug/soh_debug.h index 2e797bea..64ccef94 100644 --- a/src/app/application/algorithm/state_estimation/soh/debug/soh_debug.h +++ b/src/app/application/algorithm/state_estimation/soh/debug/soh_debug.h @@ -43,8 +43,8 @@ * @file soh_debug.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOH * diff --git a/src/app/application/algorithm/state_estimation/soh/debug/soh_debug_cfg.c b/src/app/application/algorithm/state_estimation/soh/debug/soh_debug_cfg.c index 1876d59e..e8747776 100644 --- a/src/app/application/algorithm/state_estimation/soh/debug/soh_debug_cfg.c +++ b/src/app/application/algorithm/state_estimation/soh/debug/soh_debug_cfg.c @@ -43,8 +43,8 @@ * @file soh_debug_cfg.c * @author foxBMS Team * @date 2021-12-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOH * diff --git a/src/app/application/algorithm/state_estimation/soh/debug/soh_debug_cfg.h b/src/app/application/algorithm/state_estimation/soh/debug/soh_debug_cfg.h index 16ebbdf6..11c2b0c3 100644 --- a/src/app/application/algorithm/state_estimation/soh/debug/soh_debug_cfg.h +++ b/src/app/application/algorithm/state_estimation/soh/debug/soh_debug_cfg.h @@ -43,8 +43,8 @@ * @file soh_debug_cfg.h * @author foxBMS Team * @date 2021-12-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOH * diff --git a/src/app/application/algorithm/state_estimation/soh/none/soh_none.c b/src/app/application/algorithm/state_estimation/soh/none/soh_none.c index 1157bd41..c1d8eb74 100644 --- a/src/app/application/algorithm/state_estimation/soh/none/soh_none.c +++ b/src/app/application/algorithm/state_estimation/soh/none/soh_none.c @@ -43,8 +43,8 @@ * @file soh_none.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOH * diff --git a/src/app/application/algorithm/state_estimation/soh/none/soh_none.h b/src/app/application/algorithm/state_estimation/soh/none/soh_none.h index d55e92f7..315dca13 100644 --- a/src/app/application/algorithm/state_estimation/soh/none/soh_none.h +++ b/src/app/application/algorithm/state_estimation/soh/none/soh_none.h @@ -43,8 +43,8 @@ * @file soh_none.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOH * diff --git a/src/app/application/algorithm/state_estimation/soh/none/soh_none_cfg.c b/src/app/application/algorithm/state_estimation/soh/none/soh_none_cfg.c index 12bbc66e..2316ce15 100644 --- a/src/app/application/algorithm/state_estimation/soh/none/soh_none_cfg.c +++ b/src/app/application/algorithm/state_estimation/soh/none/soh_none_cfg.c @@ -43,8 +43,8 @@ * @file soh_none_cfg.c * @author foxBMS Team * @date 2021-12-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOH * diff --git a/src/app/application/algorithm/state_estimation/soh/none/soh_none_cfg.h b/src/app/application/algorithm/state_estimation/soh/none/soh_none_cfg.h index 5f772f47..57c9a2bc 100644 --- a/src/app/application/algorithm/state_estimation/soh/none/soh_none_cfg.h +++ b/src/app/application/algorithm/state_estimation/soh/none/soh_none_cfg.h @@ -43,8 +43,8 @@ * @file soh_none_cfg.h * @author foxBMS Team * @date 2021-12-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOH * diff --git a/src/app/application/algorithm/state_estimation/state_estimation.c b/src/app/application/algorithm/state_estimation/state_estimation.c index ba8845d2..a9cfcac9 100644 --- a/src/app/application/algorithm/state_estimation/state_estimation.c +++ b/src/app/application/algorithm/state_estimation/state_estimation.c @@ -43,8 +43,8 @@ * @file state_estimation.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SE * diff --git a/src/app/application/algorithm/state_estimation/state_estimation.h b/src/app/application/algorithm/state_estimation/state_estimation.h index edff32e4..5803f7eb 100644 --- a/src/app/application/algorithm/state_estimation/state_estimation.h +++ b/src/app/application/algorithm/state_estimation/state_estimation.h @@ -43,8 +43,8 @@ * @file state_estimation.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SE * diff --git a/src/app/application/bal/bal.c b/src/app/application/bal/bal.c index 11cdc97f..32675089 100644 --- a/src/app/application/bal/bal.c +++ b/src/app/application/bal/bal.c @@ -43,8 +43,8 @@ * @file bal.c * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix BAL * diff --git a/src/app/application/bal/bal.h b/src/app/application/bal/bal.h index 3fd03a57..7bf2b153 100644 --- a/src/app/application/bal/bal.h +++ b/src/app/application/bal/bal.h @@ -43,8 +43,8 @@ * @file bal.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix BAL * diff --git a/src/app/application/bal/history/bal_strategy_history.c b/src/app/application/bal/history/bal_strategy_history.c index 124fb8ee..2d7b400f 100644 --- a/src/app/application/bal/history/bal_strategy_history.c +++ b/src/app/application/bal/history/bal_strategy_history.c @@ -43,8 +43,8 @@ * @file bal_strategy_history.c * @author foxBMS Team * @date 2020-05-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix BAL * diff --git a/src/app/application/bal/history/bal_strategy_history.h b/src/app/application/bal/history/bal_strategy_history.h index 3a496005..6ba29873 100644 --- a/src/app/application/bal/history/bal_strategy_history.h +++ b/src/app/application/bal/history/bal_strategy_history.h @@ -43,8 +43,8 @@ * @file bal_strategy_history.h * @author foxBMS Team * @date 2020-05-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix BALS * diff --git a/src/app/application/bal/none/bal_strategy_none.c b/src/app/application/bal/none/bal_strategy_none.c index 62f927c7..94ca875d 100644 --- a/src/app/application/bal/none/bal_strategy_none.c +++ b/src/app/application/bal/none/bal_strategy_none.c @@ -43,8 +43,8 @@ * @file bal_strategy_none.c * @author foxBMS Team * @date 2020-07-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix BAL * diff --git a/src/app/application/bal/none/bal_strategy_none.h b/src/app/application/bal/none/bal_strategy_none.h index f1fea3f1..b9b685f3 100644 --- a/src/app/application/bal/none/bal_strategy_none.h +++ b/src/app/application/bal/none/bal_strategy_none.h @@ -43,8 +43,8 @@ * @file bal_strategy_none.h * @author foxBMS Team * @date 2020-08-03 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix BALS * diff --git a/src/app/application/bal/voltage/bal_strategy_voltage.c b/src/app/application/bal/voltage/bal_strategy_voltage.c index 5b2ed2dc..80a89bb9 100644 --- a/src/app/application/bal/voltage/bal_strategy_voltage.c +++ b/src/app/application/bal/voltage/bal_strategy_voltage.c @@ -43,8 +43,8 @@ * @file bal_strategy_voltage.c * @author foxBMS Team * @date 2020-05-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix BAL * diff --git a/src/app/application/bal/voltage/bal_strategy_voltage.h b/src/app/application/bal/voltage/bal_strategy_voltage.h index 1516eb54..7c2cc637 100644 --- a/src/app/application/bal/voltage/bal_strategy_voltage.h +++ b/src/app/application/bal/voltage/bal_strategy_voltage.h @@ -43,8 +43,8 @@ * @file bal_strategy_voltage.h * @author foxBMS Team * @date 2020-05-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix BALS * diff --git a/src/app/application/bms/bms.c b/src/app/application/bms/bms.c index 7cbb4db6..1878b2af 100644 --- a/src/app/application/bms/bms.c +++ b/src/app/application/bms/bms.c @@ -43,8 +43,8 @@ * @file bms.c * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix BMS * @@ -58,7 +58,6 @@ #include "afe.h" #include "bal.h" -#include "contactor.h" #include "database.h" #include "diag.h" #include "foxmath.h" @@ -85,33 +84,36 @@ * contains the state of the bms state machine */ static BMS_STATE_s bms_state = { - .timer = 0, - .stateRequest = BMS_STATE_NO_REQUEST, - .state = BMS_STATEMACH_UNINITIALIZED, - .substate = BMS_ENTRY, - .laststate = BMS_STATEMACH_UNINITIALIZED, - .lastsubstate = BMS_ENTRY, - .triggerentry = 0u, - .ErrRequestCounter = 0u, - .initFinished = STD_NOT_OK, - .counter = 0u, - .OscillationTimeout = 0u, - .PrechargeTryCounter = 0u, - .powerPath = BMS_POWER_PATH_OPEN, - .closedStrings = {0u}, - .closedPrechargeContactors = {0u}, - .numberOfClosedStrings = 0u, - .deactivatedStrings = {0}, - .firstClosedString = 0u, - .stringOpenTimeout = 0u, - .nextstringclosedtimer = 0u, - .stringCloseTimeout = 0u, - .nextstate = BMS_STATEMACH_STANDBY, - .restTimer_10ms = BS_RELAXATION_PERIOD_10ms, - .currentFlowState = BMS_RELAXATION, - .remainingDelay_ms = BMS_NO_ACTIVE_DELAY_TIME_ms, - .minimumActiveDelay_ms = BMS_NO_ACTIVE_DELAY_TIME_ms, - .transitionToErrorState = false, + .timer = 0, + .stateRequest = BMS_STATE_NO_REQUEST, + .state = BMS_STATEMACH_UNINITIALIZED, + .substate = BMS_ENTRY, + .laststate = BMS_STATEMACH_UNINITIALIZED, + .lastsubstate = BMS_ENTRY, + .triggerentry = 0u, + .ErrRequestCounter = 0u, + .initFinished = STD_NOT_OK, + .counter = 0u, + .OscillationTimeout = 0u, + .PrechargeTryCounter = 0u, + .powerPath = BMS_POWER_PATH_OPEN, + .closedStrings = {0u}, + .closedPrechargeContactors = {0u}, + .numberOfClosedStrings = 0u, + .deactivatedStrings = {0}, + .firstClosedString = 0u, + .stringOpenTimeout = 0u, + .nextstringclosedtimer = 0u, + .stringCloseTimeout = 0u, + .nextstate = BMS_STATEMACH_STANDBY, + .restTimer_10ms = BS_RELAXATION_PERIOD_10ms, + .currentFlowState = BMS_RELAXATION, + .remainingDelay_ms = BMS_NO_ACTIVE_DELAY_TIME_ms, + .minimumActiveDelay_ms = BMS_NO_ACTIVE_DELAY_TIME_ms, + .transitionToErrorState = false, + .timeAboveContactorBreakCurrent_ms = 0u, + .stringToBeOpened = 0u, + .contactorToBeOpened = CONT_UNDEFINED, }; /** local copies of database tables */ @@ -184,6 +186,15 @@ static bool BMS_IsAnyFatalErrorFlagSet(void); */ static STD_RETURN_TYPE_e BMS_IsBatterySystemStateOkay(void); +/** + * @brief Checks if the contactor feedback for a specific contactor is valid + * need to be opened. + * @details Reads error flag database entry and checks if the feedback for this + * specific contactor is valid or not. + * @return true if no error detected feedback is valid, otherwise false + */ +static bool BMS_IsContactorFeedbackValid(uint8_t stringNumber, CONT_TYPE_e contactorType); + /** Get latest database entries for static module variables */ static void BMS_GetMeasurementValues(void); @@ -268,6 +279,32 @@ static int32_t BMS_GetAverageStringCurrent(DATA_BLOCK_PACK_VALUES_s *pPackValues */ static void BMS_UpdateBatsysState(DATA_BLOCK_PACK_VALUES_s *pPackValues); +/** + * @brief Get first string contactor that should be opened depending on the + * actual current flow direction + * @details Check the mounting direction of the contactors and open the + * contactor that is mounted in the preferred current flow direction. + * Open the plus contactor first if, there is no contactor in + * preferred direction to the curren flow to open available. This may + * be either because both contactors are installed in the same + * direction or because the contactors are bidirectional. + * @param stringNumber string that will be opened + * @param flowDirection current flow direction (charging or discharging) + * @return #CONT_TYPE_e contactor that should be opened + */ +static CONT_TYPE_e BMS_GetFirstContactorToBeOpened(uint8_t stringNumber, BMS_CURRENT_FLOW_STATE_e flowDirection); + +/** + * @brief Get second string contactor that should be opened + * @details Mounting direction of the contactor does not need to be checked + * for the second contactor as the current has already been + * interrupted opening the first contactor. + * @param stringNumber string that will be opened + * @param firstOpenedContactorType type of first contactor that has been opened + * @return #CONT_TYPE_e contactor that should be opened + */ +static CONT_TYPE_e BMS_GetSecondContactorToBeOpened(uint8_t stringNumber, CONT_TYPE_e firstOpenedContactorType); + /*========== Static Function Implementations ================================*/ static BMS_RETURN_TYPE_e BMS_CheckStateRequest(BMS_STATE_REQUEST_e statereq) { @@ -451,6 +488,37 @@ static STD_RETURN_TYPE_e BMS_IsBatterySystemStateOkay(void) { return retVal; } +static bool BMS_IsContactorFeedbackValid(uint8_t stringNumber, CONT_TYPE_e contactorType) { + FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); + FAS_ASSERT(contactorType != CONT_UNDEFINED); + bool feedbackValid = false; + /* Read latest error flags from database */ + DATA_BLOCK_ERRORSTATE_s tableErrorFlags = {.header.uniqueId = DATA_BLOCK_ID_ERRORSTATE}; + DATA_READ_DATA(&tableErrorFlags); + /* Check if contactor feedback is valid */ + switch (contactorType) { + case CONT_PLUS: + if (tableErrorFlags.stringPlusContactor[stringNumber] == 0u) { + feedbackValid = true; + } + break; + case CONT_MINUS: + if (tableErrorFlags.stringMinusContactor[stringNumber] == 0u) { + feedbackValid = true; + } + break; + case CONT_PRECHARGE: + if (tableErrorFlags.prechargeContactor[stringNumber] == 0u) { + feedbackValid = true; + } + break; + default: + /* CONT_UNDEFINED already prevent via assert */ + break; + } + return feedbackValid; +} + static uint8_t BMS_GetHighestString(BMS_CONSIDER_PRECHARGE_e precharge, DATA_BLOCK_PACK_VALUES_s *pPackValues) { FAS_ASSERT(pPackValues != NULL_PTR); uint8_t highest_string_index = BMS_NO_STRING_AVAILABLE; @@ -622,6 +690,97 @@ static void BMS_UpdateBatsysState(DATA_BLOCK_PACK_VALUES_s *pPackValues) { } } +static CONT_TYPE_e BMS_GetFirstContactorToBeOpened(uint8_t stringNumber, BMS_CURRENT_FLOW_STATE_e flowDirection) { + FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); + /* AXIVION Routine Generic-MissingParameterAssert: flowDirection: parameter accepts all defined enums */ + CONT_TYPE_e contactorToBeOpened = CONT_UNDEFINED; + CONT_CURRENT_BREAKING_DIRECTION_e breakingDirection = CONT_BIDIRECTIONAL; + /* Required preferred opening direction dependent on the current direction */ + if (flowDirection == BMS_CHARGING) { + breakingDirection = CONT_CHARGING_DIRECTION; + } else { + breakingDirection = CONT_DISCHARGING_DIRECTION; + } + /* Iterate over contactor array and search for wanted contactor */ + uint8_t contactor = 0u; + for (; contactor < BS_NR_OF_CONTACTORS; contactor++) { + /* Search for: + * 1. contactor from requested string + * 2. contactor mounted in preferred opening direction or is bidirectional + * 3. is no precharge contactor */ + bool correctString = (bool)(stringNumber == cont_contactorStates[contactor].stringIndex); + bool inPreferredDirection = (bool)(breakingDirection == cont_contactorStates[contactor].breakingDirection); + bool hasNoPreferredDirection = (bool)(cont_contactorStates[contactor].breakingDirection == CONT_BIDIRECTIONAL); + bool noPrechargeContactor = (bool)(cont_contactorStates[contactor].type != CONT_PRECHARGE); + if (correctString && noPrechargeContactor && (inPreferredDirection || hasNoPreferredDirection)) { + contactorToBeOpened = cont_contactorStates[contactor].type; + break; + } + } + if (contactor == BS_NR_OF_CONTACTORS) { + /* No contactor mounted in preferred current direction found. Select + * the PLUS contactor found in array cont_contactorStates from the + * passed string */ + for (contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { + /* Search for: + * 1. contactor from requested string + * 2. is PLUS contactor */ + if ((stringNumber == cont_contactorStates[contactor].stringIndex) && + (cont_contactorStates[contactor].type == CONT_PLUS)) { + contactorToBeOpened = cont_contactorStates[contactor].type; + break; + } + } + } + if (contactor == BS_NR_OF_CONTACTORS) { + /* No PLUS contactor found. Select MINUS contactor found in array + * cont_contactorStates from the passed string */ + for (contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { + /* Search for: + * 1. contactor from requested string + * 2. is PLUS contactor */ + if ((stringNumber == cont_contactorStates[contactor].stringIndex) && + (cont_contactorStates[contactor].type == CONT_MINUS)) { + contactorToBeOpened = cont_contactorStates[contactor].type; + break; + } + } + } + if (contactor == BS_NR_OF_CONTACTORS) { + /* No PLUS or MAIN_MINUS contactor found in requested string. */ + FAS_ASSERT(FAS_TRAP); + } + return contactorToBeOpened; +} + +static CONT_TYPE_e BMS_GetSecondContactorToBeOpened(uint8_t stringNumber, CONT_TYPE_e firstOpenedContactorType) { + FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); + FAS_ASSERT((firstOpenedContactorType != CONT_UNDEFINED) && (firstOpenedContactorType != CONT_PRECHARGE)); + CONT_TYPE_e contactorToBeOpened = CONT_UNDEFINED; + /* Check what contactor has already been opened and select the other one */ + if (firstOpenedContactorType == CONT_PLUS) { + contactorToBeOpened = CONT_MINUS; + } else { + contactorToBeOpened = CONT_PLUS; + } + /* Iterate over contactor array and search for wanted contactor */ + uint8_t contactor = 0u; + for (; contactor < BS_NR_OF_CONTACTORS; contactor++) { + /* Search for specific contactor from requested string */ + if ((stringNumber == cont_contactorStates[contactor].stringIndex) && + (contactorToBeOpened == cont_contactorStates[contactor].type)) { + contactorToBeOpened = cont_contactorStates[contactor].type; + break; + } + } + if (contactor == BS_NR_OF_CONTACTORS) { + /* No PLUS or MAIN_MINUS contactor found in requested string. + * Apparently, only one contactor has been defined for this string */ + FAS_ASSERT(FAS_TRAP); + } + return contactorToBeOpened; +} + /*========== Extern Function Implementations ================================*/ extern STD_RETURN_TYPE_e BMS_GetInitializationState(void) { @@ -647,15 +806,16 @@ BMS_RETURN_TYPE_e BMS_SetStateRequest(BMS_STATE_REQUEST_e statereq) { } void BMS_Trigger(void) { - BMS_STATE_REQUEST_e statereq = BMS_STATE_NO_REQUEST; - DATA_BLOCK_SYSTEMSTATE_s systemstate = {.header.uniqueId = DATA_BLOCK_ID_SYSTEMSTATE}; - uint32_t timestamp = OS_GetTickCount(); - static uint32_t nextOpenWireCheck = 0; - STD_RETURN_TYPE_e retVal = STD_NOT_OK; - static uint8_t stringNumber = 0u; - static uint8_t nextStringNumber = 0u; - CONT_ELECTRICAL_STATE_TYPE_e contstate = CONT_SWITCH_OFF; - STD_RETURN_TYPE_e contRetVal = STD_NOT_OK; + BMS_STATE_REQUEST_e statereq = BMS_STATE_NO_REQUEST; + DATA_BLOCK_SYSTEMSTATE_s systemstate = {.header.uniqueId = DATA_BLOCK_ID_SYSTEMSTATE}; + uint32_t timestamp = OS_GetTickCount(); + static uint32_t nextOpenWireCheck = 0; + STD_RETURN_TYPE_e retVal = STD_NOT_OK; + static uint8_t stringNumber = 0u; + static uint8_t nextStringNumber = 0u; + CONT_ELECTRICAL_STATE_TYPE_e contactorState = CONT_SWITCH_UNDEFINED; + bool contactorFeedbackValid = false; + STD_RETURN_TYPE_e contRetVal = STD_NOT_OK; if (bms_state.state != BMS_STATEMACH_UNINITIALIZED) { BMS_GetMeasurementValues(); @@ -715,6 +875,8 @@ void BMS_Trigger(void) { /****************************INITIALIZATION***************************/ case BMS_STATEMACH_INITIALIZATION: BMS_SAVELASTSTATES(); + /* Reset ALERT mode flag */ + DIAG_Handler(DIAG_ID_ALERT_MODE, DIAG_EVENT_OK, DIAG_SYSTEM, 0u); bms_state.initFinished = STD_OK; bms_state.timer = BMS_STATEMACH_LONGTIME; bms_state.state = BMS_STATEMACH_INITIALIZED; @@ -748,7 +910,7 @@ void BMS_Trigger(void) { } else if (bms_state.substate == BMS_CHECK_ERROR_FLAGS) { if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; @@ -758,22 +920,16 @@ void BMS_Trigger(void) { break; } } else if (bms_state.substate == BMS_CHECK_STATE_REQUESTS) { - if (BMS_CheckCanRequests() == BMS_REQ_ID_STANDBY) { - bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; - bms_state.nextstate = BMS_STATEMACH_STANDBY; - bms_state.substate = BMS_ENTRY; - break; - } else { - bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.substate = BMS_CHECK_ERROR_FLAGS; - break; - } + bms_state.timer = BMS_STATEMACH_SHORTTIME; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; + bms_state.nextstate = BMS_STATEMACH_STANDBY; + bms_state.substate = BMS_ENTRY; + break; } break; /****************************OPEN CONTACTORS**************************/ - case BMS_STATEMACH_OPENCONTACTORS: + case BMS_STATEMACH_OPEN_CONTACTORS: BMS_SAVELASTSTATES(); if (bms_state.substate == BMS_ENTRY) { @@ -782,57 +938,130 @@ void BMS_Trigger(void) { bms_state.substate = BMS_OPEN_ALL_PRECHARGES; break; } else if (bms_state.substate == BMS_OPEN_ALL_PRECHARGES) { - for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) { - if (bs_stringsWithPrecharge[s] == BS_STRING_WITH_PRECHARGE) { - CONT_OpenPrecharge(s); - bms_state.closedPrechargeContactors[s] = 0u; - } - } - /* Now go to string opening */ + /* Precharge contactors can always be opened as the precharge + * resistor limits the maximum current */ + CONT_OpenAllPrechargeContactors(); + + /* Now go to string opening - open one string after another */ stringNumber = BS_NR_OF_STRINGS - 1u; /* Select last string */ - bms_state.substate = BMS_OPEN_STRINGS; + bms_state.substate = BMS_OPEN_FIRST_STRING_CONTACTOR; bms_state.timer = BMS_TIME_WAIT_AFTER_OPENING_PRECHARGE; - } else if (bms_state.substate == BMS_OPEN_STRINGS) { - CONT_OpenString(stringNumber); - bms_state.timer = BMS_TIME_WAIT_AFTER_OPENING_STRING; - bms_state.substate = BMS_CHECK_STRING_OPEN; - bms_state.stringOpenTimeout = BMS_STRING_OPEN_TIMEOUT; + } else if (bms_state.substate == BMS_OPEN_FIRST_STRING_CONTACTOR) { + /* Precharge contactors have been opened -> start opening first string contactor */ + /* TODO: Check if precharge contactors have been opened? */ + + if ((bms_tablePackValues.invalidStringCurrent[stringNumber] == 0u) && + (MATH_AbsInt32_t(bms_tablePackValues.stringCurrent_mA[stringNumber]) < + BS_MAIN_CONTACTORS_MAXIMUM_BREAK_CURRENT_mA)) { + /* Current is below maximum break current -> open first contactor + * Check the mounting direction of the contactors and open the contactor that is mounted in the + * preferred current flow direction. Open the plus contactor first if, there is no contactor + * in preferred direction to the curren flow to open available. This may be either because both + * contactors are installed in the same direction or because the contactors are bidirectional. + */ + const BMS_CURRENT_FLOW_STATE_e flowDirection = + BMS_GetCurrentFlowDirection(bms_tablePackValues.stringCurrent_mA[stringNumber]); + bms_state.contactorToBeOpened = BMS_GetFirstContactorToBeOpened(stringNumber, flowDirection); + bms_state.stringToBeOpened = stringNumber; + /* Open first contactor */ + CONT_OpenContactor(stringNumber, bms_state.contactorToBeOpened); + bms_state.timer = BMS_WAIT_TIME_AFTER_OPENING_STRING_CONTACTOR; + bms_state.substate = BMS_OPEN_SECOND_STRING_CONTACTOR; + bms_state.stringOpenTimeout = BMS_STRING_OPEN_TIMEOUT; + } else { + /* Current is above maximum contactor break current -> contactor can not be opened */ + bms_state.timeAboveContactorBreakCurrent_ms += BMS_STATEMACHINE_TASK_CYCLE_CONTEXT_MS; + if (bms_state.timeAboveContactorBreakCurrent_ms > BS_MAIN_FUSE_MAXIMUM_TRIGGER_DURATION_ms) { + /* Fuse should have been triggered by now but apparently has not yet. Do not wait any + * longer. Activate ALERT mode and nevertheless start opening the contactors */ + DIAG_Handler(DIAG_ID_ALERT_MODE, DIAG_EVENT_NOT_OK, DIAG_SYSTEM, 0u); + const BMS_CURRENT_FLOW_STATE_e flowDirection = + BMS_GetCurrentFlowDirection(bms_tablePackValues.stringCurrent_mA[stringNumber]); + bms_state.contactorToBeOpened = BMS_GetFirstContactorToBeOpened(stringNumber, flowDirection); + bms_state.stringToBeOpened = stringNumber; + /* Open first contactor */ + CONT_OpenContactor(bms_state.stringToBeOpened, bms_state.contactorToBeOpened); + bms_state.timer = BMS_WAIT_TIME_AFTER_OPENING_STRING_CONTACTOR; + bms_state.substate = BMS_OPEN_SECOND_STRING_CONTACTOR; + } + } break; - } else if (bms_state.substate == BMS_CHECK_STRING_OPEN) { - contstate = CONT_GetState(stringNumber); - if (contstate == CONT_SWITCH_OFF) { + } else if (bms_state.substate == BMS_OPEN_SECOND_STRING_CONTACTOR) { + /* Check if first contactor has been opened correctly */ + contactorState = CONT_GetContactorState(bms_state.stringToBeOpened, bms_state.contactorToBeOpened); + contactorFeedbackValid = + BMS_IsContactorFeedbackValid(bms_state.stringToBeOpened, bms_state.contactorToBeOpened); + /* If we want to open the contactors because of a feedback + * error for this contactor, the statement will never be true. + * Thus, also continue if a feedback error for this contactor + * is detected as we are not able to get a valid feedback + * information at this point */ + if ((contactorState == CONT_SWITCH_OFF) || (contactorFeedbackValid == false)) { + /* First contactor opened correctly. + * Open second contactor. Pass first opened contactor into function */ + bms_state.contactorToBeOpened = + BMS_GetSecondContactorToBeOpened(stringNumber, bms_state.contactorToBeOpened); + /* Open second contactor */ + CONT_OpenContactor(bms_state.stringToBeOpened, bms_state.contactorToBeOpened); + bms_state.timer = BMS_WAIT_TIME_AFTER_OPENING_STRING_CONTACTOR; + bms_state.substate = BMS_CHECK_SECOND_STRING_CONTACTOR; + } else { + /* String not opened, re-issue closing request */ + CONT_OpenContactor(bms_state.stringToBeOpened, bms_state.contactorToBeOpened); + bms_state.timer = BMS_STATEMACH_SHORTTIME; + /* TODO: add timeout */ + } + } else if (bms_state.substate == BMS_CHECK_SECOND_STRING_CONTACTOR) { + /* Check if second contactor has been opened correctly */ + contactorState = CONT_GetContactorState(bms_state.stringToBeOpened, bms_state.contactorToBeOpened); + contactorFeedbackValid = + BMS_IsContactorFeedbackValid(bms_state.stringToBeOpened, bms_state.contactorToBeOpened); + /* If we want to open the contactors because of a feedback + * error for this contactor, the statement will never be true. + * Thus, also continue if a feedback error for this contactor + * is detected as we are not able to get a valid feedback + * information at this point */ + if ((contactorState == CONT_SWITCH_OFF) || (contactorFeedbackValid == false)) { + /* Opening for this string finished. Reset state variables used for opening */ + bms_state.contactorToBeOpened = CONT_UNDEFINED; + bms_state.stringToBeOpened = 0u; + /* String opened. Decrement string counter */ if (bms_state.numberOfClosedStrings > 0u) { bms_state.numberOfClosedStrings--; } bms_state.closedStrings[stringNumber] = 0u; if (stringNumber > 0u) { + /* Not all strings opened yet -> open next string */ stringNumber--; - bms_state.substate = BMS_OPEN_STRINGS; + bms_state.substate = BMS_OPEN_FIRST_STRING_CONTACTOR; bms_state.timer = BMS_STATEMACH_SHORTTIME; break; } else { + /* All strings opened -> prepare to leave state BMS_STATEMACH_OPEN_CONTACTORS */ bms_state.substate = BMS_OPEN_STRINGS_EXIT; bms_state.timer = BMS_STATEMACH_SHORTTIME; } break; } else if (bms_state.stringOpenTimeout == 0u) { - /* String takes too long to close, go to next string */ + /* String takes too long to open, go to next string */ bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.substate = BMS_OPEN_STRINGS; + bms_state.substate = BMS_OPEN_FIRST_STRING_CONTACTOR; break; } else { /* String not opened, re-issue closing request */ - CONT_OpenString(nextStringNumber); + CONT_OpenContactor(bms_state.stringToBeOpened, bms_state.contactorToBeOpened); bms_state.timer = BMS_STATEMACH_SHORTTIME; break; } } else if (bms_state.substate == BMS_OPEN_STRINGS_EXIT) { if (bms_state.nextstate == BMS_STATEMACH_STANDBY) { + /* Opening due to STANDBY request -> switch to BMS_STATEMACH_STANDBY */ bms_state.timer = BMS_STATEMACH_SHORTTIME; bms_state.state = BMS_STATEMACH_STANDBY; bms_state.substate = BMS_ENTRY; break; } else { + /* Opening due to detected error -> switch to BMS_STATEMACH_ERROR */ bms_state.timer = BMS_STATEMACH_SHORTTIME; bms_state.state = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; @@ -859,7 +1088,7 @@ void BMS_Trigger(void) { } else if (bms_state.substate == BMS_CHECK_ERROR_FLAGS_INTERLOCK) { if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; @@ -875,7 +1104,7 @@ void BMS_Trigger(void) { } else if (bms_state.substate == BMS_CHECK_ERROR_FLAGS) { if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; @@ -931,43 +1160,67 @@ void BMS_Trigger(void) { } if (stringNumber == BMS_NO_STRING_AVAILABLE) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; } bms_state.firstClosedString = stringNumber; if (bms_state.OscillationTimeout == 0u) { - bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.substate = BMS_PRECHARGE_CLOSE_PRECHARGE; + /* Close MINUS string contactor */ + if (CONT_CloseContactor(bms_state.firstClosedString, CONT_MINUS) == STD_OK) { + bms_state.stringCloseTimeout = BMS_STRING_CLOSE_TIMEOUT; + bms_state.timer = BMS_WAIT_TIME_AFTER_CLOSING_STRING_CONTACTOR; + bms_state.substate = BMS_PRECHARGE_CLOSE_PRECHARGE; + } else { + /* Invalid contactor requested */ + bms_state.timer = BMS_STATEMACH_SHORTTIME; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; + bms_state.nextstate = BMS_STATEMACH_ERROR; + bms_state.substate = BMS_ENTRY; + } } else if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { /* If precharge re-enter timeout not elapsed, wait (and check errors while waiting) */ bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; } break; } else if (bms_state.substate == BMS_PRECHARGE_CLOSE_PRECHARGE) { - bms_state.OscillationTimeout = BMS_OSCILLATION_TIMEOUT; - contRetVal = CONT_ClosePrecharge(bms_state.firstClosedString); - bms_state.closedPrechargeContactors[stringNumber] = 1u; - if (contRetVal == STD_OK) { - bms_state.timer = BMS_TIME_WAIT_AFTER_CLOSING_PRECHARGE; - bms_state.substate = BMS_CHECK_ERROR_FLAGS_CLOSINGPRECHARGE; - bms_state.PrechargeTryCounter = 0u; - } else { + /* Check if MINUS contactor has been successfully closed */ + contactorState = CONT_GetContactorState(bms_state.firstClosedString, CONT_MINUS); + if (contactorState == CONT_SWITCH_ON) { + bms_state.OscillationTimeout = BMS_OSCILLATION_TIMEOUT; + contRetVal = CONT_ClosePrecharge(bms_state.firstClosedString); + bms_state.closedPrechargeContactors[stringNumber] = 1u; + if (contRetVal == STD_OK) { + bms_state.timer = BMS_TIME_WAIT_AFTER_CLOSING_PRECHARGE; + bms_state.substate = BMS_CHECK_ERROR_FLAGS_CLOSINGPRECHARGE; + bms_state.PrechargeTryCounter = 0u; + } else { + bms_state.timer = BMS_STATEMACH_SHORTTIME; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; + bms_state.nextstate = BMS_STATEMACH_ERROR; + bms_state.substate = BMS_ENTRY; + } + } else if (bms_state.stringCloseTimeout == 0u) { + /* String takes too long to close */ bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; + } else { + /* String not closed, re-issue closing request */ + CONT_CloseContactor(bms_state.firstClosedString, CONT_MINUS); + bms_state.timer = BMS_STATEMACH_SHORTTIME; } break; } else if (bms_state.substate == BMS_CHECK_ERROR_FLAGS_CLOSINGPRECHARGE) { if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; @@ -979,7 +1232,7 @@ void BMS_Trigger(void) { } else if (bms_state.substate == BMS_CHECK_STATE_REQUESTS) { if (BMS_CheckCanRequests() == BMS_REQ_ID_STANDBY) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_STANDBY; bms_state.substate = BMS_ENTRY; break; @@ -988,15 +1241,21 @@ void BMS_Trigger(void) { bms_state.substate = BMS_PRECHARGE_CHECK_VOLTAGES; } } else if (bms_state.substate == BMS_PRECHARGE_CHECK_VOLTAGES) { - retVal = BMS_CheckPrecharge(bms_state.firstClosedString, &bms_tablePackValues); - if (retVal == STD_OK) { - CONT_CloseString(bms_state.firstClosedString); - bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.substate = BMS_CLOSE_FIRST_STRING_PRECHARGE_STATE; + contactorState = CONT_GetContactorState(bms_state.firstClosedString, CONT_PRECHARGE); + retVal = BMS_CheckPrecharge(bms_state.firstClosedString, &bms_tablePackValues); + /* Check if precharge contactor is closed and precharge is finished */ + if ((contactorState == CONT_SWITCH_ON) && (retVal == STD_OK)) { + /* Successfully precharged. Close string PLUS contactor */ + CONT_CloseContactor(bms_state.firstClosedString, CONT_PLUS); + bms_state.stringCloseTimeout = BMS_STRING_CLOSE_TIMEOUT; + bms_state.timer = BMS_WAIT_TIME_AFTER_CLOSING_STRING_CONTACTOR; + bms_state.substate = BMS_CHECK_CLOSE_SECOND_STRING_CONTACTOR_PRECHARGE_STATE; break; } else { + /* Precharging failed. Open precharge contactor. */ + contRetVal = CONT_OpenPrecharge(bms_state.firstClosedString); + /* Check if retry limit has been reached */ if (bms_state.PrechargeTryCounter < (BMS_PRECHARGE_TRIES - 1u)) { - contRetVal = CONT_OpenPrecharge(bms_state.firstClosedString); bms_state.closedPrechargeContactors[stringNumber] = 0u; if (contRetVal == STD_OK) { bms_state.timer = BMS_TIME_WAIT_AFTERPRECHARGEFAIL; @@ -1004,44 +1263,38 @@ void BMS_Trigger(void) { bms_state.PrechargeTryCounter++; } else { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; } break; } else { - contRetVal = CONT_OpenPrecharge(bms_state.firstClosedString); bms_state.closedPrechargeContactors[stringNumber] = 0u; bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; } } - } else if (bms_state.substate == BMS_CLOSE_FIRST_STRING_PRECHARGE_STATE) { - CONT_CloseString(bms_state.firstClosedString); - bms_state.stringCloseTimeout = BMS_STRING_CLOSE_TIMEOUT; - bms_state.timer = BMS_TIME_WAIT_AFTER_STRING_CLOSED; - bms_state.substate = BMS_CHECK_CLOSE_FIRST_STRING_PRECHARGE_STATE; - } else if (bms_state.substate == BMS_CHECK_CLOSE_FIRST_STRING_PRECHARGE_STATE) { - contstate = CONT_GetState(bms_state.firstClosedString); - if (contstate == CONT_SWITCH_ON) { + } else if (bms_state.substate == BMS_CHECK_CLOSE_SECOND_STRING_CONTACTOR_PRECHARGE_STATE) { + contactorState = CONT_GetContactorState(bms_state.firstClosedString, CONT_PLUS); + if (contactorState == CONT_SWITCH_ON) { bms_state.closedStrings[bms_state.firstClosedString] = 1u; bms_state.numberOfClosedStrings++; - bms_state.timer = BMS_TIME_WAIT_AFTER_STRING_CLOSED; + bms_state.timer = BMS_WAIT_TIME_AFTER_CLOSING_STRING_CONTACTOR; bms_state.substate = BMS_CHECK_ERROR_FLAGS_PRECHARGE_CLOSINGSTRINGS; break; } else if (bms_state.stringCloseTimeout == 0u) { /* String takes too long to close */ bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; } else { /* String not closed, re-issue closing request */ - CONT_CloseString(bms_state.firstClosedString); + CONT_CloseContactor(bms_state.firstClosedString, CONT_PLUS); bms_state.timer = BMS_STATEMACH_SHORTTIME; bms_state.substate = BMS_CHECK_ERROR_FLAGS_PRECHARGE_FIRST_STRING; break; @@ -1049,20 +1302,20 @@ void BMS_Trigger(void) { } else if (bms_state.substate == BMS_CHECK_ERROR_FLAGS_PRECHARGE_FIRST_STRING) { if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; } else { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.substate = BMS_CHECK_CLOSE_FIRST_STRING_PRECHARGE_STATE; + bms_state.substate = BMS_CHECK_CLOSE_SECOND_STRING_CONTACTOR_PRECHARGE_STATE; break; } } else if (bms_state.substate == BMS_CHECK_ERROR_FLAGS_PRECHARGE_CLOSINGSTRINGS) { /* Always make one error check after the first string was closed successfully */ if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; @@ -1076,15 +1329,35 @@ void BMS_Trigger(void) { if (contRetVal == STD_OK) { bms_state.closedPrechargeContactors[stringNumber] = 0u; bms_state.timer = BMS_TIME_WAIT_AFTER_OPENING_PRECHARGE; - bms_state.state = BMS_STATEMACH_NORMAL; - bms_state.substate = BMS_ENTRY; + bms_state.substate = BMS_PRECHARGE_CHECK_OPEN_PRECHARGE; } else { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; } break; + } else if (bms_state.substate == BMS_PRECHARGE_CHECK_OPEN_PRECHARGE) { + contactorState = CONT_GetContactorState(bms_state.firstClosedString, CONT_PRECHARGE); + if (contactorState == CONT_SWITCH_OFF) { + bms_state.timer = BMS_STATEMACH_SHORTTIME; + bms_state.state = BMS_STATEMACH_NORMAL; + bms_state.substate = BMS_ENTRY; + break; + } else if (bms_state.stringCloseTimeout == 0u) { + /* Precharge contactor takes too long to open */ + bms_state.timer = BMS_STATEMACH_SHORTTIME; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; + bms_state.nextstate = BMS_STATEMACH_ERROR; + bms_state.substate = BMS_ENTRY; + break; + } else { + /* Precharge contactor not opened, re-issue open request */ + CONT_OpenPrecharge(bms_state.firstClosedString); + bms_state.timer = BMS_STATEMACH_SHORTTIME; + bms_state.substate = BMS_CHECK_ERROR_FLAGS_PRECHARGE_FIRST_STRING; + break; + } } else { FAS_ASSERT(FAS_TRAP); } @@ -1111,9 +1384,10 @@ void BMS_Trigger(void) { break; } else if (bms_state.substate == BMS_CHECK_ERROR_FLAGS) { if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { - bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_ERROR; - bms_state.substate = BMS_ENTRY; + bms_state.timer = BMS_STATEMACH_SHORTTIME; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; + bms_state.nextstate = BMS_STATEMACH_ERROR; + bms_state.substate = BMS_ENTRY; break; } else { bms_state.timer = BMS_STATEMACH_SHORTTIME; @@ -1123,7 +1397,7 @@ void BMS_Trigger(void) { } else if (bms_state.substate == BMS_CHECK_STATE_REQUESTS) { if (BMS_CheckCanRequests() == BMS_REQ_ID_STANDBY) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_STANDBY; bms_state.substate = BMS_ENTRY; break; @@ -1150,11 +1424,11 @@ void BMS_Trigger(void) { (BMS_GetStringVoltageDifference(nextStringNumber, &bms_tablePackValues) <= BMS_NEXT_STRING_VOLTAGE_LIMIT_MV) && (BMS_GetAverageStringCurrent(&bms_tablePackValues) <= BMS_AVERAGE_STRING_CURRENT_LIMIT_MA)) { - /* Voltage/current conditions suitable to close a further string */ - CONT_CloseString(nextStringNumber); + /* Voltage/current conditions suitable to close a further string. Close first string contactor */ + CONT_CloseContactor(nextStringNumber, CONT_MINUS); bms_state.nextstringclosedtimer = BMS_STRING_CLOSE_TIMEOUT; - bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.substate = BMS_CHECK_STRING_CLOSED; + bms_state.timer = BMS_WAIT_TIME_AFTER_CLOSING_STRING_CONTACTOR; + bms_state.substate = BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR; break; } } else { @@ -1162,37 +1436,57 @@ void BMS_Trigger(void) { bms_state.substate = BMS_CHECK_ERROR_FLAGS; break; } + } else if (bms_state.substate == BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR) { + contactorState = CONT_GetContactorState(nextStringNumber, CONT_MINUS); + if (contactorState == CONT_SWITCH_ON) { + /* First string contactor closed. Close second string contactor */ + CONT_CloseContactor(nextStringNumber, CONT_PLUS); + bms_state.timer = BMS_WAIT_TIME_AFTER_CLOSING_STRING_CONTACTOR; + bms_state.substate = BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR; + } else if (bms_state.stringCloseTimeout == 0u) { + /* String takes too long to close */ + bms_state.timer = BMS_STATEMACH_SHORTTIME; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; + bms_state.nextstate = BMS_STATEMACH_ERROR; + bms_state.substate = BMS_ENTRY; + break; + } else { + /* String minus contactor has not been closed successfully. Re-trigger closing */ + CONT_CloseContactor(nextStringNumber, CONT_MINUS); + bms_state.timer = BMS_STATEMACH_SHORTTIME; + } + break; } else if (bms_state.substate == BMS_CHECK_STRING_CLOSED) { - contstate = CONT_GetState(nextStringNumber); - if (contstate == CONT_SWITCH_ON) { + contactorState = CONT_GetContactorState(nextStringNumber, CONT_PLUS); + if (contactorState == CONT_SWITCH_ON) { bms_state.numberOfClosedStrings++; bms_state.closedStrings[nextStringNumber] = 1u; - bms_state.nextstringclosedtimer = BMS_TIME_WAIT_AFTER_STRING_CLOSED; + bms_state.nextstringclosedtimer = BMS_WAIT_TIME_BETWEEN_CLOSING_STRINGS; /* Go to begin of NORMAL case to redo the full procedure with error check and request check */ bms_state.substate = BMS_CHECK_ERROR_FLAGS; break; } else if (bms_state.stringCloseTimeout == 0u) { /* String takes too long to close */ bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; } else if (BMS_IsBatterySystemStateOkay() == STD_NOT_OK) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_ERROR; bms_state.substate = BMS_ENTRY; break; } else if (BMS_CheckCanRequests() == BMS_REQ_ID_STANDBY) { bms_state.timer = BMS_STATEMACH_SHORTTIME; - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_STANDBY; bms_state.substate = BMS_ENTRY; break; } else { /* String not closed, re-issue closing request */ - CONT_CloseString(nextStringNumber); + CONT_CloseContactor(nextStringNumber, CONT_PLUS); bms_state.timer = BMS_STATEMACH_SHORTTIME; break; } @@ -1248,7 +1542,7 @@ void BMS_Trigger(void) { /* Verify that all contactors are opened and switch to * STANDBY state afterwards */ - bms_state.state = BMS_STATEMACH_OPENCONTACTORS; + bms_state.state = BMS_STATEMACH_OPEN_CONTACTORS; bms_state.nextstate = BMS_STATEMACH_STANDBY; bms_state.substate = BMS_ENTRY; break; diff --git a/src/app/application/bms/bms.h b/src/app/application/bms/bms.h index e28d61fb..dae654fc 100644 --- a/src/app/application/bms/bms.h +++ b/src/app/application/bms/bms.h @@ -43,8 +43,8 @@ * @file bms.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix BMS * @@ -60,6 +60,8 @@ #include "battery_system_cfg.h" #include "bms_cfg.h" +#include "contactor.h" + /*========== Macros and Definitions =========================================*/ /** Symbolic names for battery system state */ @@ -90,7 +92,7 @@ typedef enum { BMS_STATEMACH_INITIALIZATION, BMS_STATEMACH_INITIALIZED, BMS_STATEMACH_IDLE, - BMS_STATEMACH_OPENCONTACTORS, + BMS_STATEMACH_OPEN_CONTACTORS, BMS_STATEMACH_STANDBY, BMS_STATEMACH_PRECHARGE, BMS_STATEMACH_NORMAL, @@ -130,41 +132,42 @@ typedef enum { BMS_PRECHARGE_CLOSE_PRECHARGE, BMS_PRECHARGE_CHECK_VOLTAGES, BMS_PRECHARGE_OPEN_PRECHARGE, + BMS_PRECHARGE_CHECK_OPEN_PRECHARGE, BMS_OPEN_FIRST_CONTACTOR, BMS_OPEN_SECOND_CONTACTOR_MINUS, BMS_OPEN_SECOND_CONTACTOR_PLUS, - BMS_CLOSE_FIRST_STRING_PRECHARGE_STATE, - BMS_CHECK_CLOSE_FIRST_STRING_PRECHARGE_STATE, + BMS_CHECK_CLOSE_SECOND_STRING_CONTACTOR_PRECHARGE_STATE, BMS_CHECK_ERROR_FLAGS_PRECHARGE, BMS_CHECK_ERROR_FLAGS_PRECHARGE_FIRST_STRING, BMS_PRECHARGE_CLOSE_NEXT_STRING, + BMS_CLOSE_SECOND_CONTACTOR_PLUS, BMS_CHECK_STRING_CLOSED, BMS_CHECK_ERROR_FLAGS_PRECHARGE_CLOSINGSTRINGS, BMS_CHECK_ERROR_FLAGS_CLOSINGPRECHARGE, BMS_NORMAL_CLOSE_NEXT_STRING, + BMS_NORMAL_CLOSE_SECOND_STRING_CONTACTOR, BMS_OPEN_ALL_PRECHARGES, BMS_CHECK_ALL_PRECHARGES_OPEN, BMS_OPEN_STRINGS_ENTRY, - BMS_OPEN_STRINGS, - BMS_CHECK_STRING_OPEN, + BMS_OPEN_FIRST_STRING_CONTACTOR, + BMS_OPEN_SECOND_STRING_CONTACTOR, + BMS_CHECK_SECOND_STRING_CONTACTOR, BMS_OPEN_STRINGS_EXIT, } BMS_STATEMACH_SUB_e; -/** State requests for the BMS statemachine */ +/** State requests for the BMS state machine */ typedef enum { BMS_STATE_INIT_REQUEST, /*!< request for initialization */ BMS_STATE_ERROR_REQUEST, /*!< request for ERROR state */ BMS_STATE_NO_REQUEST, /*!< dummy request for no request */ } BMS_STATE_REQUEST_e; -/** - * Possible return values when state requests are made to the BMS statemachine - */ +/** Possible return values when state requests are made to the BMS state machine */ typedef enum { BMS_OK, /*!< request was successful */ BMS_REQUEST_PENDING, /*!< error: another request is currently processed */ BMS_ILLEGAL_REQUEST, /*!< error: request can not be executed */ - BMS_ALREADY_INITIALIZED, /*!< error: BMS statemachine already initialized */ + BMS_ALREADY_INITIALIZED, /*!< error: BMS state machine already initialized */ } BMS_RETURN_TYPE_e; /** Power path type (discharge or charge) */ @@ -181,31 +184,34 @@ typedef enum { */ typedef struct { uint16_t timer; /*!< time in ms before the state machine processes the next state, e.g. in counts of 1ms */ - BMS_STATE_REQUEST_e stateRequest; /*!< current state request made to the state machine */ - BMS_STATEMACH_e state; /*!< current state of State Machine */ - BMS_STATEMACH_SUB_e substate; /*!< current substate of the state machine */ - BMS_STATEMACH_e laststate; /*!< previous state of the state machine */ - BMS_STATEMACH_SUB_e lastsubstate; /*!< previous substate of the state machine */ - uint32_t ErrRequestCounter; /*!< counts the number of illegal requests to the LTC state machine */ - STD_RETURN_TYPE_e initFinished; /*!< #STD_OK if the initialization has passed, #STD_NOT_OK otherwise */ - uint8_t triggerentry; /*!< counter for re-entrance protection (function running flag) */ - uint8_t counter; /*!< general purpose counter */ - BMS_CURRENT_FLOW_STATE_e currentFlowState; /*!< state of battery system */ - uint32_t restTimer_10ms; /*!< timer until battery system is at rest */ - uint16_t OscillationTimeout; /*!< timeout to prevent oscillation of contactors */ - uint8_t PrechargeTryCounter; /*!< timeout to prevent oscillation of contactors */ - BMS_POWER_PATH_TYPE_e powerPath; /*!< power path type (discharge or charge) */ - uint8_t numberOfClosedStrings; /*!< number of closed strings */ - uint16_t stringOpenTimeout; /*!< timeout to abort if string opening takes too long */ - uint32_t nextstringclosedtimer; /*!< timer to wait if the next string was closed */ - uint16_t stringCloseTimeout; /*!< timeout to abort if a string takes too long to close */ - BMS_STATEMACH_e nextstate; /*!< next state of the State Machine */ - uint8_t firstClosedString; /*!< strings with highest or lowest voltage, that was closed first */ - uint16_t prechargeOpenTimeout; /*!< timeout to abort if string opening takes too long */ - uint16_t prechargeCloseTimeout; /*!< timeout to abort if a string takes too long to close */ - uint32_t remainingDelay_ms; /*!< time until statemachine should switch to error state */ - uint32_t minimumActiveDelay_ms; /*!< minimum delay time of all active fatal errors */ - bool transitionToErrorState; /*!< flag if fatal error has been detected and delay is active */ + BMS_STATE_REQUEST_e stateRequest; /*!< current state request made to the state machine */ + BMS_STATEMACH_e state; /*!< current state of State Machine */ + BMS_STATEMACH_SUB_e substate; /*!< current substate of the state machine */ + BMS_STATEMACH_e laststate; /*!< previous state of the state machine */ + BMS_STATEMACH_SUB_e lastsubstate; /*!< previous substate of the state machine */ + uint32_t ErrRequestCounter; /*!< counts the number of illegal requests to the LTC state machine */ + STD_RETURN_TYPE_e initFinished; /*!< #STD_OK if the initialization has passed, #STD_NOT_OK otherwise */ + uint8_t triggerentry; /*!< counter for re-entrance protection (function running flag) */ + uint8_t counter; /*!< general purpose counter */ + BMS_CURRENT_FLOW_STATE_e currentFlowState; /*!< state of battery system */ + uint32_t restTimer_10ms; /*!< timer until battery system is at rest */ + uint16_t OscillationTimeout; /*!< timeout to prevent oscillation of contactors */ + uint8_t PrechargeTryCounter; /*!< timeout to prevent oscillation of contactors */ + BMS_POWER_PATH_TYPE_e powerPath; /*!< power path type (discharge or charge) */ + uint8_t numberOfClosedStrings; /*!< number of closed strings */ + uint16_t stringOpenTimeout; /*!< timeout to abort if string opening takes too long */ + uint32_t nextstringclosedtimer; /*!< timer to wait if the next string was closed */ + uint16_t stringCloseTimeout; /*!< timeout to abort if a string takes too long to close */ + BMS_STATEMACH_e nextstate; /*!< next state of the State Machine */ + uint8_t firstClosedString; /*!< strings with highest or lowest voltage, that was closed first */ + uint16_t prechargeOpenTimeout; /*!< timeout to abort if string opening takes too long */ + uint16_t prechargeCloseTimeout; /*!< timeout to abort if a string takes too long to close */ + uint32_t remainingDelay_ms; /*!< time until state machine should switch to error state */ + uint32_t minimumActiveDelay_ms; /*!< minimum delay time of all active fatal errors */ + uint32_t timeAboveContactorBreakCurrent_ms; /*!< duration of current flow above maximum contactor break current */ + uint8_t stringToBeOpened; /*!< string that is currently opened */ + CONT_TYPE_e contactorToBeOpened; /*!< contactor that is currently opened */ + bool transitionToErrorState; /*!< flag if fatal error has been detected and delay is active */ uint8_t closedPrechargeContactors[BS_NR_OF_STRINGS]; /*!< strings whose precharge contactors are closed */ uint8_t closedStrings[BS_NR_OF_STRINGS]; /*!< strings whose contactors are closed */ uint8_t deactivatedStrings[BS_NR_OF_STRINGS]; /*!< Deactivated strings after error detection, cannot be closed */ diff --git a/src/app/application/config/bal_cfg.c b/src/app/application/config/bal_cfg.c index cdaacfe8..2e61fd1e 100644 --- a/src/app/application/config/bal_cfg.c +++ b/src/app/application/config/bal_cfg.c @@ -43,8 +43,8 @@ * @file bal_cfg.c * @author foxBMS Team * @date 2022-02-26 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix BAL * diff --git a/src/app/application/config/bal_cfg.h b/src/app/application/config/bal_cfg.h index 77da6401..130e5796 100644 --- a/src/app/application/config/bal_cfg.h +++ b/src/app/application/config/bal_cfg.h @@ -43,8 +43,8 @@ * @file bal_cfg.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix BAL * diff --git a/src/app/application/config/battery_cell_cfg.c b/src/app/application/config/battery_cell_cfg.c index 05c1afbd..4bef96fc 100644 --- a/src/app/application/config/battery_cell_cfg.c +++ b/src/app/application/config/battery_cell_cfg.c @@ -43,8 +43,8 @@ * @file battery_cell_cfg.c * @author foxBMS Team * @date 2020-10-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup BATTERY_CELL_CONFIGURATION * @prefix BC * diff --git a/src/app/application/config/battery_cell_cfg.h b/src/app/application/config/battery_cell_cfg.h index d6c5690f..b743d611 100644 --- a/src/app/application/config/battery_cell_cfg.h +++ b/src/app/application/config/battery_cell_cfg.h @@ -43,8 +43,8 @@ * @file battery_cell_cfg.h * @author foxBMS Team * @date 2017-03-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup BATTERY_CELL_CONFIGURATION * @prefix BC * diff --git a/src/app/application/config/battery_system_cfg.c b/src/app/application/config/battery_system_cfg.c index c7aaef43..31d4fc43 100644 --- a/src/app/application/config/battery_system_cfg.c +++ b/src/app/application/config/battery_system_cfg.c @@ -43,8 +43,8 @@ * @file battery_system_cfg.c * @author foxBMS Team * @date 2019-12-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup BATTERY_SYSTEM_CONFIGURATION * @prefix BS * diff --git a/src/app/application/config/battery_system_cfg.h b/src/app/application/config/battery_system_cfg.h index c78a649b..6ab46d8c 100644 --- a/src/app/application/config/battery_system_cfg.h +++ b/src/app/application/config/battery_system_cfg.h @@ -43,8 +43,8 @@ * @file battery_system_cfg.h * @author foxBMS Team * @date 2019-12-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup BATTERY_SYSTEM_CONFIGURATION * @prefix BS * @@ -71,11 +71,7 @@ typedef enum { BS_STRING_WITHOUT_PRECHARGE, } BS_STRING_PRECHARGE_PRESENT_e; -/** - * Symbolic identifiers for strings. - * Currently unused. - * Added for future compatibility. - */ +/** Symbolic identifiers for strings. */ typedef enum { BS_STRING0 = 0u, BS_STRING1 = 1u, @@ -218,6 +214,28 @@ typedef enum { #endif /* CURRENT_SENSOR_PRESENT == true */ +/** + * @brief Maximum break current of main contactors. + * @details The contacts of the main contactors can be welded, when attempting + * to interrupt the current flow while a current higher than the + * maximum break current of the contactor is flowing. + * + * Thus, the contactors will not be opened if the floating current is + * above this value. The fuse should trigger to interrupt current + * flows above this value. + */ +#define BS_MAIN_CONTACTORS_MAXIMUM_BREAK_CURRENT_mA (500000) + +/** + * @brief Maximum fuse trigger duration + * @details If the current is above #BS_MAIN_CONTACTORS_MAXIMUM_BREAK_CURRENT_mA, + * the BMS state machine will wait this time until the fuse triggers so + * that the current will be interrupted by the fuse and not the + * contactors. After this time, the BMS will nevertheless try to open + * the contactors. + */ +#define BS_MAIN_FUSE_MAXIMUM_TRIGGER_DURATION_ms (30000u) + /** * @brief Maximum string current limit in mA that is used in the SOA module * to check for string overcurrent @@ -256,23 +274,6 @@ typedef enum { */ #define BALANCING_DEFAULT_INACTIVE (true) -/** - * @ingroup CONFIG_BATTERYSYSTEM - * @brief Checking if current is in SOF limits of cells. - * @details If set to true the current is checked against the SOF limits. - * If set to false the current is checked against the constant values - * for charging and discharging: - * - #BC_CURRENT_MAX_DISCHARGE_MSL_mA - * - #BC_CURRENT_MAX_DISCHARGE_RSL_mA - * - #BC_CURRENT_MAX_DISCHARGE_MOL_mA - * - * - #BC_CURRENT_MAX_CHARGE_MSL_mA - * - #BC_CURRENT_MAX_CHARGE_RSL_mA - * - #BC_CURRENT_MAX_CHARGE_MOL_mA - * @ptype bool - */ -#define BMS_CHECK_SOF_CURRENT_LIMITS (true) - /** * @ingroup CONFIG_BATTERYSYSTEM * @brief Defines behaviour if an insulation error is detected @@ -299,7 +300,9 @@ typedef enum { /** Number of contactors in addition to string contactors (e.g., PRECHARGE).*/ #define BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS (1u) -/** Number of contactors. One per string + main and precharge */ +/** Total number of contactors in system: + * - Two contactors per string (string+ and string-) + * - One optional precharge contactor for each string */ #define BS_NR_OF_CONTACTORS ((2u * BS_NR_OF_STRINGS) + BS_NR_OF_CONTACTORS_OUTSIDE_STRINGS) /** @@ -391,6 +394,8 @@ typedef enum { #define BS_ERROR_OPEN_WIRE_PERIOD_ms (30000) /**@}*/ +FAS_STATIC_ASSERT((BS_NR_OF_STRINGS <= (uint8_t)UINT8_MAX), "This code assumes BS_NR_OF_STRINGS fits into uint8_t"); + /*========== Extern Constant and Variable Declarations ======================*/ /** Precharge presence of not for each string */ extern BS_STRING_PRECHARGE_PRESENT_e bs_stringsWithPrecharge[BS_NR_OF_STRINGS]; diff --git a/src/app/application/config/bms_cfg.h b/src/app/application/config/bms_cfg.h index 72a1413c..664d8d7e 100644 --- a/src/app/application/config/bms_cfg.h +++ b/src/app/application/config/bms_cfg.h @@ -43,8 +43,8 @@ * @file bms_cfg.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix BMS * @@ -95,28 +95,31 @@ #endif /** - * @brief BMS statemachine short time definition in #BMS_Trigger() calls + * @brief BMS state machine short time definition in #BMS_Trigger() calls * until next state/substate is processed */ #define BMS_STATEMACH_SHORTTIME (1u) /** - * @brief BMS statemachine medium time definition in #BMS_Trigger() calls + * @brief BMS state machine medium time definition in #BMS_Trigger() calls * until next state/substate is processed */ #define BMS_STATEMACH_MEDIUMTIME (5u) /** - * @brief BMS statemachine long time definition in #BMS_Trigger() calls until + * @brief BMS state machine long time definition in #BMS_Trigger() calls until * next state/substate is processed */ #define BMS_STATEMACH_LONGTIME (10u) -/** Time in #BMS_Trigger() calls to wait after closing a string */ -#define BMS_TIME_WAIT_AFTER_STRING_CLOSED (20u) +/** Time in #BMS_Trigger() calls to wait after closing any string minus or string plus contactor */ +#define BMS_WAIT_TIME_AFTER_CLOSING_STRING_CONTACTOR (20u) -/** Time in #BMS_Trigger() calls to wait after opening a string */ -#define BMS_TIME_WAIT_AFTER_OPENING_STRING (10u) +/** Time in #BMS_Trigger() calls to wait after opening any string minus or string plus contactor */ +#define BMS_WAIT_TIME_AFTER_OPENING_STRING_CONTACTOR (10u) + +/** Time in #BMS_Trigger() calls to wait between closing complete strings */ +#define BMS_WAIT_TIME_BETWEEN_CLOSING_STRINGS (10u) /** * @brief Timeout in #BMS_Trigger() calls when closing a string after which @@ -124,7 +127,10 @@ */ #define BMS_STRING_CLOSE_TIMEOUT (500u) -/** Timeout in #BMS_Trigger() calls to wait after opening a string */ +/** + * @brief Timeout in #BMS_Trigger() calls when opening a string after which + * the state machines goes to error if the string still has not opened + */ #define BMS_STRING_OPEN_TIMEOUT (1000u) /** diff --git a/src/app/application/config/plausibility_cfg.h b/src/app/application/config/plausibility_cfg.h index 75879545..d56c0700 100644 --- a/src/app/application/config/plausibility_cfg.h +++ b/src/app/application/config/plausibility_cfg.h @@ -43,8 +43,8 @@ * @file plausibility_cfg.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION_CONFIGURATION * @prefix PL * diff --git a/src/app/application/config/soa_cfg.c b/src/app/application/config/soa_cfg.c index e0d6e595..9e879285 100644 --- a/src/app/application/config/soa_cfg.c +++ b/src/app/application/config/soa_cfg.c @@ -43,8 +43,8 @@ * @file soa_cfg.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION_CONFIGURATION * @prefix SOA * diff --git a/src/app/application/config/soa_cfg.h b/src/app/application/config/soa_cfg.h index 19de6d77..7142c9c8 100644 --- a/src/app/application/config/soa_cfg.h +++ b/src/app/application/config/soa_cfg.h @@ -43,8 +43,8 @@ * @file soa_cfg.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION_CONFIGURATION * @prefix SOA * diff --git a/src/app/application/plausibility/plausibility.c b/src/app/application/plausibility/plausibility.c index a44c0077..1f7e4b44 100644 --- a/src/app/application/plausibility/plausibility.c +++ b/src/app/application/plausibility/plausibility.c @@ -43,8 +43,8 @@ * @file plausibility.c * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix PL * diff --git a/src/app/application/plausibility/plausibility.h b/src/app/application/plausibility/plausibility.h index fc7970aa..5a4ae380 100644 --- a/src/app/application/plausibility/plausibility.h +++ b/src/app/application/plausibility/plausibility.h @@ -43,8 +43,8 @@ * @file plausibility.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix PL * diff --git a/src/app/application/redundancy/redundancy.c b/src/app/application/redundancy/redundancy.c index 35602221..c50a9748 100644 --- a/src/app/application/redundancy/redundancy.c +++ b/src/app/application/redundancy/redundancy.c @@ -43,8 +43,8 @@ * @file redundancy.c * @author foxBMS Team * @date 2020-07-31 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix MRC * @@ -668,9 +668,11 @@ static void MRC_ValidateBatteryVoltageMeasurement(void) { if (0 != numberOfValidStringVoltages) { /* AXIVION Next Codeline Style MisraC2012Directive-4.1: truncation impossible; we sum INT32 values x times and divide by x, resulting in INT32 */ - mrc_tablePackValues.batteryVoltage_mV = (int32_t)(sumOfStringValues_mV / numberOfValidStringVoltages); + mrc_tablePackValues.batteryVoltage_mV = (int32_t)(sumOfStringValues_mV / numberOfValidStringVoltages); + mrc_tablePackValues.invalidBatteryVoltage = 0u; } else { - mrc_tablePackValues.batteryVoltage_mV = INT32_MAX; + mrc_tablePackValues.batteryVoltage_mV = INT32_MAX; + mrc_tablePackValues.invalidBatteryVoltage = 1u; } } diff --git a/src/app/application/redundancy/redundancy.h b/src/app/application/redundancy/redundancy.h index 787798ba..fe9892a6 100644 --- a/src/app/application/redundancy/redundancy.h +++ b/src/app/application/redundancy/redundancy.h @@ -43,8 +43,8 @@ * @file redundancy.h * @author foxBMS Team * @date 2020-07-31 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix MRC * diff --git a/src/app/application/soa/soa.c b/src/app/application/soa/soa.c index aa3870e6..1603b5c3 100644 --- a/src/app/application/soa/soa.c +++ b/src/app/application/soa/soa.c @@ -43,8 +43,8 @@ * @file soa.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOA * diff --git a/src/app/application/soa/soa.h b/src/app/application/soa/soa.h index bb4b9469..c677fa8b 100644 --- a/src/app/application/soa/soa.h +++ b/src/app/application/soa/soa.h @@ -43,8 +43,8 @@ * @file soa.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup APPLICATION * @prefix SOA * diff --git a/src/app/driver/adc/adc.c b/src/app/driver/adc/adc.c index 7c94af6a..ac90e958 100644 --- a/src/app/driver/adc/adc.c +++ b/src/app/driver/adc/adc.c @@ -43,8 +43,8 @@ * @file adc.c * @author foxBMS Team * @date 2019-01-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix ADC * @@ -78,19 +78,19 @@ static DATA_BLOCK_ADC_VOLTAGE_s adc_adc1Voltages = {.header.uniqueId = DATA_BLOC /** * @brief converts reading from ADC to a voltage in mV. - * @param adcValue_mV value read from ADC + * @param adcCounts digital value read by ADC * @return voltage in mV */ -static float ADC_ConvertVoltage(float adcValue_mV); +static float ADC_ConvertVoltage(uint16_t adcCounts); /*========== Static Function Implementations ================================*/ -static float ADC_ConvertVoltage(float adcValue_mV) { +static float ADC_ConvertVoltage(uint16_t adcCounts) { /* AXIVION Routine Generic-MissingParameterAssert: adcValue_mV: parameter accepts whole range */ /** For details to equation see Equation 28 in Technical Reference Manual SPNU563A - March 2018 page 852 */ - float result_mV = ((ADC_CONV_FACTOR_12BIT * (adcValue_mV - ADC_VREFLOW_mV)) / (ADC_VREFHIGH_mV - ADC_VREFLOW_mV)) - - 0.5f; + float result_mV = (((adcCounts + ADC_CONV_OFFSET) * (ADC_VREFHIGH_mV - ADC_VREFLOW_mV)) / ADC_CONV_FACTOR_12BIT) + + ADC_VREFLOW_mV; return result_mV; } @@ -120,8 +120,7 @@ extern void ADC_Control(void) { case ADC_CONVERSION_FINISHED: adcGetData(adcREG1, adcGROUP1, &adc_adc1RawVoltages[0]); for (uint8_t i = 0u; i < MCU_ADC1_MAX_NR_CHANNELS; i++) { - adc_adc1Voltages.adc1ConvertedVoltages_mV[i] = - ADC_ConvertVoltage((float)(adc_adc1RawVoltages[i].value)); + adc_adc1Voltages.adc1ConvertedVoltages_mV[i] = ADC_ConvertVoltage(adc_adc1RawVoltages[i].value); } DATA_WRITE_DATA(&adc_adc1Voltages); adc_conversionState = ADC_START_CONVERSION; diff --git a/src/app/driver/adc/adc.h b/src/app/driver/adc/adc.h index efb95c9e..7f29763d 100644 --- a/src/app/driver/adc/adc.h +++ b/src/app/driver/adc/adc.h @@ -43,8 +43,8 @@ * @file adc.h * @author foxBMS Team * @date 2019-01-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix ADC * @@ -72,6 +72,8 @@ #define ADC_CONV_FACTOR_12BIT (4096.0f) /** ADC conversion factor, 10 bit conversion */ #define ADC_CONV_FACTOR_10BIT (1024.0f) +/** ADC conversion offset */ +#define ADC_CONV_OFFSET (0.5f) /** End bit position in ADC Groupx Interrupt Flag Register */ #define ADC_CONVERSION_ENDDBIT (8u) diff --git a/src/app/driver/afe/api/afe.h b/src/app/driver/afe/api/afe.h index 90606ea0..158c36ca 100644 --- a/src/app/driver/afe/api/afe.h +++ b/src/app/driver/afe/api/afe.h @@ -43,8 +43,8 @@ * @file afe.h * @author foxBMS Team * @date 2020-05-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix AFE * diff --git a/src/app/driver/afe/api/afe_dma.h b/src/app/driver/afe/api/afe_dma.h index 64ee38f8..81c68858 100644 --- a/src/app/driver/afe/api/afe_dma.h +++ b/src/app/driver/afe/api/afe_dma.h @@ -43,8 +43,8 @@ * @file afe_dma.h * @author foxBMS Team * @date 2020-06-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix AFE * diff --git a/src/app/driver/afe/api/afe_plausibility.c b/src/app/driver/afe/api/afe_plausibility.c index cd2fbc57..1ae00da2 100644 --- a/src/app/driver/afe/api/afe_plausibility.c +++ b/src/app/driver/afe/api/afe_plausibility.c @@ -43,8 +43,8 @@ * @file afe_plausibility.c * @author foxBMS Team * @date 2019-01-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup MODULES * @prefix AFE * diff --git a/src/app/driver/afe/api/afe_plausibility.h b/src/app/driver/afe/api/afe_plausibility.h index 168743e0..f7202b01 100644 --- a/src/app/driver/afe/api/afe_plausibility.h +++ b/src/app/driver/afe/api/afe_plausibility.h @@ -43,8 +43,8 @@ * @file afe_plausibility.h * @author foxBMS Team * @date 2019-01-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup MODULES * @prefix AFE * diff --git a/src/app/driver/afe/debug/default/api/debug_default_afe.c b/src/app/driver/afe/debug/default/api/debug_default_afe.c index f2e5edc9..1c482cc7 100644 --- a/src/app/driver/afe/debug/default/api/debug_default_afe.c +++ b/src/app/driver/afe/debug/default/api/debug_default_afe.c @@ -43,8 +43,8 @@ * @file debug_default_afe.c * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix FAKE * diff --git a/src/app/driver/afe/debug/default/api/debug_default_afe.h b/src/app/driver/afe/debug/default/api/debug_default_afe.h index e27d2c19..c5181cca 100644 --- a/src/app/driver/afe/debug/default/api/debug_default_afe.h +++ b/src/app/driver/afe/debug/default/api/debug_default_afe.h @@ -43,8 +43,8 @@ * @file debug_default_afe.h * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix FAKE * diff --git a/src/app/driver/afe/debug/default/api/debug_default_afe_dma.c b/src/app/driver/afe/debug/default/api/debug_default_afe_dma.c index a304c14c..81ef377d 100644 --- a/src/app/driver/afe/debug/default/api/debug_default_afe_dma.c +++ b/src/app/driver/afe/debug/default/api/debug_default_afe_dma.c @@ -43,8 +43,8 @@ * @file debug_default_afe_dma.c * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix FAKE * diff --git a/src/app/driver/afe/debug/default/api/debug_default_afe_dma.h b/src/app/driver/afe/debug/default/api/debug_default_afe_dma.h index 3b0c9f0f..28e58aae 100644 --- a/src/app/driver/afe/debug/default/api/debug_default_afe_dma.h +++ b/src/app/driver/afe/debug/default/api/debug_default_afe_dma.h @@ -43,8 +43,8 @@ * @file debug_default_afe_dma.h * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix FAKE * diff --git a/src/app/driver/afe/debug/default/config/debug_default_cfg.c b/src/app/driver/afe/debug/default/config/debug_default_cfg.c index 0e0f4c70..5105afc3 100644 --- a/src/app/driver/afe/debug/default/config/debug_default_cfg.c +++ b/src/app/driver/afe/debug/default/config/debug_default_cfg.c @@ -43,8 +43,8 @@ * @file debug_default_cfg.c * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix FAKE * diff --git a/src/app/driver/afe/debug/default/config/debug_default_cfg.h b/src/app/driver/afe/debug/default/config/debug_default_cfg.h index d28de25e..ed22132a 100644 --- a/src/app/driver/afe/debug/default/config/debug_default_cfg.h +++ b/src/app/driver/afe/debug/default/config/debug_default_cfg.h @@ -43,8 +43,8 @@ * @file debug_default_cfg.h * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix FAKE * diff --git a/src/app/driver/afe/debug/default/debug_default.c b/src/app/driver/afe/debug/default/debug_default.c index f589e645..a491cbd9 100644 --- a/src/app/driver/afe/debug/default/debug_default.c +++ b/src/app/driver/afe/debug/default/debug_default.c @@ -43,8 +43,8 @@ * @file debug_default.c * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix FAKE * @@ -72,19 +72,19 @@ #define FAKE_CELL_TEMPERATURE_ddegC ((BC_TEMPERATURE_MAX_CHARGE_MOL_ddegC + BC_TEMPERATURE_MIN_CHARGE_MOL_ddegC) / 2u) /** - * statemachine short time definition in #FAKE_TriggerAfe calls + * state machine short time definition in #FAKE_TriggerAfe calls * until next state is processed */ #define FAKE_FSM_SHORT_TIME (1u) /** - * statemachine medium time definition in #FAKE_TriggerAfe calls + * state machine medium time definition in #FAKE_TriggerAfe calls * until next state/substate is processed */ #define FAKE_FSM_MEDIUM_TIME (5u) /** - * statemachine long time definition in #FAKE_TriggerAfe calls + * state machine long time definition in #FAKE_TriggerAfe calls * until next state/substate is processed */ #define FAKE_FSM_LONG_TIME (10u) @@ -340,8 +340,10 @@ static STD_RETURN_TYPE_e FAKE_SaveFakeVoltageMeasurementData(FAKE_STATE_s *pFake STD_RETURN_TYPE_e successfullSave = STD_OK; for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) { + pFakeState->data.cellVoltage->nrValidCellVoltages[s] = 0u; for (uint16_t i = 0u; i < BS_NR_OF_CELL_BLOCKS_PER_STRING; i++) { pFakeState->data.cellVoltage->cellVoltage_mV[s][i] = FAKE_CELL_VOLTAGE_mV; + pFakeState->data.cellVoltage->nrValidCellVoltages[s] += 1u; } } @@ -438,7 +440,7 @@ static FAKE_FSM_STATES_e FAKE_ProcessRunningState(FAKE_STATE_s *pFakeState) { break; case FAKE_FSM_SUBSTATE_RUNNING_SAVE_TEMPERATURE_MEASUREMENT_DATA: - if (STD_OK == FAKE_SaveFakeVoltageMeasurementData(pFakeState)) { + if (STD_OK == FAKE_SaveFakeTemperatureMeasurementData(pFakeState)) { FAKE_SetSubstate( pFakeState, FAKE_FSM_SUBSTATE_RUNNING_SAVE_VOLTAGE_MEASUREMENT_DATA, FAKE_FSM_LONG_TIME); } else { diff --git a/src/app/driver/afe/debug/default/debug_default.h b/src/app/driver/afe/debug/default/debug_default.h index 8b3b0522..df828cca 100644 --- a/src/app/driver/afe/debug/default/debug_default.h +++ b/src/app/driver/afe/debug/default/debug_default.h @@ -43,8 +43,8 @@ * @file debug_default.h * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix FAKE * diff --git a/src/app/driver/afe/ltc/6806/config/ltc_6806_cfg.c b/src/app/driver/afe/ltc/6806/config/ltc_6806_cfg.c index 148e661b..f06b2f47 100644 --- a/src/app/driver/afe/ltc/6806/config/ltc_6806_cfg.c +++ b/src/app/driver/afe/ltc/6806/config/ltc_6806_cfg.c @@ -43,8 +43,8 @@ * @file ltc_6806_cfg.c * @author foxBMS Team * @date 2015-02-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix LTC * diff --git a/src/app/driver/afe/ltc/6806/config/ltc_6806_cfg.h b/src/app/driver/afe/ltc/6806/config/ltc_6806_cfg.h index 11255af0..299eec1b 100644 --- a/src/app/driver/afe/ltc/6806/config/ltc_6806_cfg.h +++ b/src/app/driver/afe/ltc/6806/config/ltc_6806_cfg.h @@ -43,8 +43,8 @@ * @file ltc_6806_cfg.h * @author foxBMS Team * @date 2015-02-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix LTC * diff --git a/src/app/driver/afe/ltc/6806/ltc_6806.c b/src/app/driver/afe/ltc/6806/ltc_6806.c index 29fdfcb2..d807a45b 100644 --- a/src/app/driver/afe/ltc/6806/ltc_6806.c +++ b/src/app/driver/afe/ltc/6806/ltc_6806.c @@ -43,8 +43,8 @@ * @file ltc_6806.c * @author foxBMS Team * @date 2019-09-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix LTC * diff --git a/src/app/driver/afe/ltc/6813-1/config/ltc_6813-1_cfg.c b/src/app/driver/afe/ltc/6813-1/config/ltc_6813-1_cfg.c index 801ba694..974da980 100644 --- a/src/app/driver/afe/ltc/6813-1/config/ltc_6813-1_cfg.c +++ b/src/app/driver/afe/ltc/6813-1/config/ltc_6813-1_cfg.c @@ -43,8 +43,8 @@ * @file ltc_6813-1_cfg.c * @author foxBMS Team * @date 2015-02-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix LTC * diff --git a/src/app/driver/afe/ltc/6813-1/config/ltc_6813-1_cfg.h b/src/app/driver/afe/ltc/6813-1/config/ltc_6813-1_cfg.h index 2b93f363..36927c7e 100644 --- a/src/app/driver/afe/ltc/6813-1/config/ltc_6813-1_cfg.h +++ b/src/app/driver/afe/ltc/6813-1/config/ltc_6813-1_cfg.h @@ -43,8 +43,8 @@ * @file ltc_6813-1_cfg.h * @author foxBMS Team * @date 2015-02-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix LTC * diff --git a/src/app/driver/afe/ltc/6813-1/ltc_6813-1.c b/src/app/driver/afe/ltc/6813-1/ltc_6813-1.c index d2f95c56..bc045913 100644 --- a/src/app/driver/afe/ltc/6813-1/ltc_6813-1.c +++ b/src/app/driver/afe/ltc/6813-1/ltc_6813-1.c @@ -43,8 +43,8 @@ * @file ltc_6813-1.c * @author foxBMS Team * @date 2019-09-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix LTC * diff --git a/src/app/driver/afe/ltc/api/ltc_afe.c b/src/app/driver/afe/ltc/api/ltc_afe.c index 4f571e9e..0a3f5a82 100644 --- a/src/app/driver/afe/ltc/api/ltc_afe.c +++ b/src/app/driver/afe/ltc/api/ltc_afe.c @@ -43,8 +43,8 @@ * @file ltc_afe.c * @author foxBMS Team * @date 2020-05-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix AFE * diff --git a/src/app/driver/afe/ltc/common/config/ltc_afe_dma_cfg.c b/src/app/driver/afe/ltc/common/config/ltc_afe_dma_cfg.c index 67080932..660fdafb 100644 --- a/src/app/driver/afe/ltc/common/config/ltc_afe_dma_cfg.c +++ b/src/app/driver/afe/ltc/common/config/ltc_afe_dma_cfg.c @@ -43,8 +43,8 @@ * @file ltc_afe_dma_cfg.c * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix DMA * diff --git a/src/app/driver/afe/ltc/common/config/ltc_afe_dma_cfg.h b/src/app/driver/afe/ltc/common/config/ltc_afe_dma_cfg.h index 52957deb..72ad5ac8 100644 --- a/src/app/driver/afe/ltc/common/config/ltc_afe_dma_cfg.h +++ b/src/app/driver/afe/ltc/common/config/ltc_afe_dma_cfg.h @@ -43,8 +43,8 @@ * @file ltc_afe_dma_cfg.h * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix DMA * diff --git a/src/app/driver/afe/ltc/common/config/ltc_cfg.h b/src/app/driver/afe/ltc/common/config/ltc_cfg.h index 52f5eecf..b08ff66c 100644 --- a/src/app/driver/afe/ltc/common/config/ltc_cfg.h +++ b/src/app/driver/afe/ltc/common/config/ltc_cfg.h @@ -43,8 +43,8 @@ * @file ltc_cfg.h * @author foxBMS Team * @date 2015-02-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix LTC * diff --git a/src/app/driver/afe/ltc/common/ltc.h b/src/app/driver/afe/ltc/common/ltc.h index c422d828..e3ffd18b 100644 --- a/src/app/driver/afe/ltc/common/ltc.h +++ b/src/app/driver/afe/ltc/common/ltc.h @@ -43,8 +43,8 @@ * @file ltc.h * @author foxBMS Team * @date 2015-09-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix LTC * diff --git a/src/app/driver/afe/ltc/common/ltc_afe_dma.c b/src/app/driver/afe/ltc/common/ltc_afe_dma.c index 20f59a9f..ecc17f94 100644 --- a/src/app/driver/afe/ltc/common/ltc_afe_dma.c +++ b/src/app/driver/afe/ltc/common/ltc_afe_dma.c @@ -43,8 +43,8 @@ * @file ltc_afe_dma.c * @author foxBMS Team * @date 2020-05-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix AFE * diff --git a/src/app/driver/afe/ltc/common/ltc_afe_dma.h b/src/app/driver/afe/ltc/common/ltc_afe_dma.h index 596224ae..97e6aec8 100644 --- a/src/app/driver/afe/ltc/common/ltc_afe_dma.h +++ b/src/app/driver/afe/ltc/common/ltc_afe_dma.h @@ -43,8 +43,8 @@ * @file ltc_afe_dma.h * @author foxBMS Team * @date 2020-05-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix AFE * diff --git a/src/app/driver/afe/ltc/common/ltc_defs.h b/src/app/driver/afe/ltc/common/ltc_defs.h index 4e5a2223..de207eb6 100644 --- a/src/app/driver/afe/ltc/common/ltc_defs.h +++ b/src/app/driver/afe/ltc/common/ltc_defs.h @@ -43,8 +43,8 @@ * @file ltc_defs.h * @author foxBMS Team * @date 2015-09-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix LTC * diff --git a/src/app/driver/afe/maxim/api/mxm_afe.c b/src/app/driver/afe/maxim/api/mxm_afe.c index 2c53c377..7622475d 100644 --- a/src/app/driver/afe/maxim/api/mxm_afe.c +++ b/src/app/driver/afe/maxim/api/mxm_afe.c @@ -43,8 +43,8 @@ * @file mxm_afe.c * @author foxBMS Team * @date 2020-06-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix AFE * diff --git a/src/app/driver/afe/maxim/common/config/mxm_cfg.c b/src/app/driver/afe/maxim/common/config/mxm_cfg.c index 77f5a18e..0379c3a7 100644 --- a/src/app/driver/afe/maxim/common/config/mxm_cfg.c +++ b/src/app/driver/afe/maxim/common/config/mxm_cfg.c @@ -43,8 +43,8 @@ * @file mxm_cfg.c * @author foxBMS Team * @date 2019-01-09 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/config/mxm_cfg.h b/src/app/driver/afe/maxim/common/config/mxm_cfg.h index 34257a6d..8e4c0d4f 100644 --- a/src/app/driver/afe/maxim/common/config/mxm_cfg.h +++ b/src/app/driver/afe/maxim/common/config/mxm_cfg.h @@ -43,8 +43,8 @@ * @file mxm_cfg.h * @author foxBMS Team * @date 2019-01-09 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_17841b.c b/src/app/driver/afe/maxim/common/mxm_17841b.c index cdd8e3f5..6dc03bee 100644 --- a/src/app/driver/afe/maxim/common/mxm_17841b.c +++ b/src/app/driver/afe/maxim/common/mxm_17841b.c @@ -43,8 +43,8 @@ * @file mxm_17841b.c * @author foxBMS Team * @date 2018-12-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_17841b.h b/src/app/driver/afe/maxim/common/mxm_17841b.h index 242f1186..57acee47 100644 --- a/src/app/driver/afe/maxim/common/mxm_17841b.h +++ b/src/app/driver/afe/maxim/common/mxm_17841b.h @@ -43,8 +43,8 @@ * @file mxm_17841b.h * @author foxBMS Team * @date 2018-12-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_1785x.c b/src/app/driver/afe/maxim/common/mxm_1785x.c index 4cad0ac2..5a530fe9 100644 --- a/src/app/driver/afe/maxim/common/mxm_1785x.c +++ b/src/app/driver/afe/maxim/common/mxm_1785x.c @@ -43,8 +43,8 @@ * @file mxm_1785x.c * @author foxBMS Team * @date 2019-01-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_1785x.h b/src/app/driver/afe/maxim/common/mxm_1785x.h index 15a42bc6..03f79bc4 100644 --- a/src/app/driver/afe/maxim/common/mxm_1785x.h +++ b/src/app/driver/afe/maxim/common/mxm_1785x.h @@ -43,8 +43,8 @@ * @file mxm_1785x.h * @author foxBMS Team * @date 2019-01-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_1785x_tools.c b/src/app/driver/afe/maxim/common/mxm_1785x_tools.c index e1932ffd..4ba3609d 100644 --- a/src/app/driver/afe/maxim/common/mxm_1785x_tools.c +++ b/src/app/driver/afe/maxim/common/mxm_1785x_tools.c @@ -43,8 +43,8 @@ * @file mxm_1785x_tools.c * @author foxBMS Team * @date 2020-07-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_1785x_tools.h b/src/app/driver/afe/maxim/common/mxm_1785x_tools.h index f72b965f..f3679611 100644 --- a/src/app/driver/afe/maxim/common/mxm_1785x_tools.h +++ b/src/app/driver/afe/maxim/common/mxm_1785x_tools.h @@ -43,8 +43,8 @@ * @file mxm_1785x_tools.h * @author foxBMS Team * @date 2020-07-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_41b_register_map.h b/src/app/driver/afe/maxim/common/mxm_41b_register_map.h index 64d00e0c..2f15b400 100644 --- a/src/app/driver/afe/maxim/common/mxm_41b_register_map.h +++ b/src/app/driver/afe/maxim/common/mxm_41b_register_map.h @@ -43,8 +43,8 @@ * @file mxm_41b_register_map.h * @author foxBMS Team * @date 2020-06-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_afe_dma.c b/src/app/driver/afe/maxim/common/mxm_afe_dma.c index 21f270d2..1635cbb0 100644 --- a/src/app/driver/afe/maxim/common/mxm_afe_dma.c +++ b/src/app/driver/afe/maxim/common/mxm_afe_dma.c @@ -43,8 +43,8 @@ * @file mxm_afe_dma.c * @author foxBMS Team * @date 2020-06-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix AFE * diff --git a/src/app/driver/afe/maxim/common/mxm_afe_dma.h b/src/app/driver/afe/maxim/common/mxm_afe_dma.h index ae7a3c01..bcc1c274 100644 --- a/src/app/driver/afe/maxim/common/mxm_afe_dma.h +++ b/src/app/driver/afe/maxim/common/mxm_afe_dma.h @@ -43,8 +43,8 @@ * @file mxm_afe_dma.h * @author foxBMS Team * @date 2020-06-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix AFE * diff --git a/src/app/driver/afe/maxim/common/mxm_basic_defines.h b/src/app/driver/afe/maxim/common/mxm_basic_defines.h index d466b6f3..e1003660 100644 --- a/src/app/driver/afe/maxim/common/mxm_basic_defines.h +++ b/src/app/driver/afe/maxim/common/mxm_basic_defines.h @@ -43,8 +43,8 @@ * @file mxm_basic_defines.h * @author foxBMS Team * @date 2020-02-11 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_battery_management.c b/src/app/driver/afe/maxim/common/mxm_battery_management.c index 022f9c8a..536ec905 100644 --- a/src/app/driver/afe/maxim/common/mxm_battery_management.c +++ b/src/app/driver/afe/maxim/common/mxm_battery_management.c @@ -43,8 +43,8 @@ * @file mxm_battery_management.c * @author foxBMS Team * @date 2019-01-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_battery_management.h b/src/app/driver/afe/maxim/common/mxm_battery_management.h index 9f23c8d2..895cdf59 100644 --- a/src/app/driver/afe/maxim/common/mxm_battery_management.h +++ b/src/app/driver/afe/maxim/common/mxm_battery_management.h @@ -43,8 +43,8 @@ * @file mxm_battery_management.h * @author foxBMS Team * @date 2019-01-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_bitextract.c b/src/app/driver/afe/maxim/common/mxm_bitextract.c index 7482b9e3..45316a8d 100644 --- a/src/app/driver/afe/maxim/common/mxm_bitextract.c +++ b/src/app/driver/afe/maxim/common/mxm_bitextract.c @@ -43,8 +43,8 @@ * @file mxm_bitextract.c * @author foxBMS Team * @date 2019-01-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_bitextract.h b/src/app/driver/afe/maxim/common/mxm_bitextract.h index 528a5195..9f80889c 100644 --- a/src/app/driver/afe/maxim/common/mxm_bitextract.h +++ b/src/app/driver/afe/maxim/common/mxm_bitextract.h @@ -43,8 +43,8 @@ * @file mxm_bitextract.h * @author foxBMS Team * @date 2019-01-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_crc8.c b/src/app/driver/afe/maxim/common/mxm_crc8.c index 8e69307a..b8defe87 100644 --- a/src/app/driver/afe/maxim/common/mxm_crc8.c +++ b/src/app/driver/afe/maxim/common/mxm_crc8.c @@ -43,8 +43,8 @@ * @file mxm_crc8.c * @author foxBMS Team * @date 2019-02-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_crc8.h b/src/app/driver/afe/maxim/common/mxm_crc8.h index 4ccfe2cd..70e29f8c 100644 --- a/src/app/driver/afe/maxim/common/mxm_crc8.h +++ b/src/app/driver/afe/maxim/common/mxm_crc8.h @@ -43,8 +43,8 @@ * @file mxm_crc8.h * @author foxBMS Team * @date 2019-02-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_register_map.h b/src/app/driver/afe/maxim/common/mxm_register_map.h index e9e02e1f..0cda4e25 100644 --- a/src/app/driver/afe/maxim/common/mxm_register_map.h +++ b/src/app/driver/afe/maxim/common/mxm_register_map.h @@ -43,8 +43,8 @@ * @file mxm_register_map.h * @author foxBMS Team * @date 2019-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_registry.c b/src/app/driver/afe/maxim/common/mxm_registry.c index f53b005e..a99b6ea2 100644 --- a/src/app/driver/afe/maxim/common/mxm_registry.c +++ b/src/app/driver/afe/maxim/common/mxm_registry.c @@ -43,8 +43,8 @@ * @file mxm_registry.c * @author foxBMS Team * @date 2020-07-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/common/mxm_registry.h b/src/app/driver/afe/maxim/common/mxm_registry.h index 3057b2c4..f4343784 100644 --- a/src/app/driver/afe/maxim/common/mxm_registry.h +++ b/src/app/driver/afe/maxim/common/mxm_registry.h @@ -43,8 +43,8 @@ * @file mxm_registry.h * @author foxBMS Team * @date 2020-07-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/maxim/max17852/mxm_17852.c b/src/app/driver/afe/maxim/max17852/mxm_17852.c index a736975f..c202e46b 100644 --- a/src/app/driver/afe/maxim/max17852/mxm_17852.c +++ b/src/app/driver/afe/maxim/max17852/mxm_17852.c @@ -43,8 +43,8 @@ * @file mxm_17852.c * @author foxBMS Team * @date 2021-11-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MXM * diff --git a/src/app/driver/afe/nxp/api/nxp_afe.c b/src/app/driver/afe/nxp/api/nxp_afe.c index 6aaea2ad..07f3d3de 100644 --- a/src/app/driver/afe/nxp/api/nxp_afe.c +++ b/src/app/driver/afe/nxp/api/nxp_afe.c @@ -43,8 +43,8 @@ * @file nxp_afe.c * @author foxBMS Team * @date 2020-05-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix AFE * diff --git a/src/app/driver/afe/nxp/api/nxp_afe.h b/src/app/driver/afe/nxp/api/nxp_afe.h index 06960c05..3b37a77b 100644 --- a/src/app/driver/afe/nxp/api/nxp_afe.h +++ b/src/app/driver/afe/nxp/api/nxp_afe.h @@ -43,8 +43,8 @@ * @file nxp_afe.h * @author foxBMS Team * @date 2021-06-04 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix NXP * diff --git a/src/app/driver/afe/nxp/mc33775a/api/nxp_mc33775a_afe.c b/src/app/driver/afe/nxp/mc33775a/api/nxp_mc33775a_afe.c index b20d907f..6bc04238 100644 --- a/src/app/driver/afe/nxp/mc33775a/api/nxp_mc33775a_afe.c +++ b/src/app/driver/afe/nxp/mc33775a/api/nxp_mc33775a_afe.c @@ -43,8 +43,8 @@ * @file nxp_mc33775a_afe.c * @author foxBMS Team * @date 2020-05-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix N775 * diff --git a/src/app/driver/afe/nxp/mc33775a/config/nxp_afe_dma_cfg.c b/src/app/driver/afe/nxp/mc33775a/config/nxp_afe_dma_cfg.c index 3c3347b6..7ab1e14d 100644 --- a/src/app/driver/afe/nxp/mc33775a/config/nxp_afe_dma_cfg.c +++ b/src/app/driver/afe/nxp/mc33775a/config/nxp_afe_dma_cfg.c @@ -43,8 +43,8 @@ * @file nxp_afe_dma_cfg.c * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix DMA * diff --git a/src/app/driver/afe/nxp/mc33775a/config/nxp_afe_dma_cfg.h b/src/app/driver/afe/nxp/mc33775a/config/nxp_afe_dma_cfg.h index aa38049d..fc867856 100644 --- a/src/app/driver/afe/nxp/mc33775a/config/nxp_afe_dma_cfg.h +++ b/src/app/driver/afe/nxp/mc33775a/config/nxp_afe_dma_cfg.h @@ -43,8 +43,8 @@ * @file nxp_afe_dma_cfg.h * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix DMA * diff --git a/src/app/driver/afe/nxp/mc33775a/config/nxp_mc33775a_cfg.c b/src/app/driver/afe/nxp/mc33775a/config/nxp_mc33775a_cfg.c index 234a7cba..757bc2d1 100644 --- a/src/app/driver/afe/nxp/mc33775a/config/nxp_mc33775a_cfg.c +++ b/src/app/driver/afe/nxp/mc33775a/config/nxp_mc33775a_cfg.c @@ -43,8 +43,8 @@ * @file nxp_mc33775a_cfg.c * @author foxBMS Team * @date 2020-05-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix N775 * diff --git a/src/app/driver/afe/nxp/mc33775a/config/nxp_mc33775a_cfg.h b/src/app/driver/afe/nxp/mc33775a/config/nxp_mc33775a_cfg.h index 375f9687..f8aa355d 100644 --- a/src/app/driver/afe/nxp/mc33775a/config/nxp_mc33775a_cfg.h +++ b/src/app/driver/afe/nxp/mc33775a/config/nxp_mc33775a_cfg.h @@ -43,8 +43,8 @@ * @file nxp_mc33775a_cfg.h * @author foxBMS Team * @date 2020-05-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix N775 * diff --git a/src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.c b/src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.c index 38e195f2..dd9abb97 100644 --- a/src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.c +++ b/src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.c @@ -43,8 +43,8 @@ * @file nxp_afe_dma.c * @author foxBMS Team * @date 2020-05-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix AFE * diff --git a/src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.h b/src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.h index 2654dd34..17530999 100644 --- a/src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.h +++ b/src/app/driver/afe/nxp/mc33775a/nxp_afe_dma.h @@ -43,8 +43,8 @@ * @file nxp_afe_dma.h * @author foxBMS Team * @date 2020-05-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix AFE * diff --git a/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.c b/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.c index f9a5bda4..a01f03d6 100644 --- a/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.c +++ b/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.c @@ -43,8 +43,8 @@ * @file nxp_mc33775a.c * @author foxBMS Team * @date 2020-05-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix N775 * diff --git a/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.h b/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.h index 7dc96ad1..7469cd6e 100644 --- a/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.h +++ b/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.h @@ -43,8 +43,8 @@ * @file nxp_mc33775a.h * @author foxBMS Team * @date 2020-05-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix N775 * diff --git a/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a_defs.h b/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a_defs.h index 79ab445d..ce955b3e 100644 --- a/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a_defs.h +++ b/src/app/driver/afe/nxp/mc33775a/nxp_mc33775a_defs.h @@ -43,8 +43,8 @@ * @file nxp_mc33775a_defs.h * @author foxBMS Team * @date 2020-09-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix N775 * diff --git a/src/app/driver/can/can.c b/src/app/driver/can/can.c index 48dd98be..57945baa 100644 --- a/src/app/driver/can/can.c +++ b/src/app/driver/can/can.c @@ -43,8 +43,8 @@ * @file can.c * @author foxBMS Team * @date 2019-12-04 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CAN * @@ -77,24 +77,6 @@ /** upper limit of timestamp counts for a valid CAN timing */ #define CAN_TIMING_UPPER_LIMIT_COUNTS (105u) -/** maximum distance from release that can be encoded in the boot message */ -#define CAN_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE (31u) -#if CAN_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE > UINT8_MAX -#error "This code assumes that the define is smaller or equal to UINT8_MAX") -#endif - -/** bit position of boot message byte 3 version control flag */ -#define CAN_BOOT_MESSAGE_BYTE_3_BIT_VERSION_CONTROL (0u) - -/** bit position of boot message byte 3 dirty flag */ -#define CAN_BOOT_MESSAGE_BYTE_3_BIT_DIRTY_FLAG (1u) - -/** bit position of boot message byte 3 release distance overflow flag */ -#define CAN_BOOT_MESSAGE_BYTE_3_BIT_DISTANCE_OVERFLOW_FLAG (2u) - -/** bit position of boot message byte 3 release distance counter */ -#define CAN_BOOT_MESSAGE_BYTE_3_BIT_DISTANCE_COUNTER (3u) - /** return value of function canGetData if no data was lost during reception */ #define CAN_HAL_RETVAL_NO_DATA_LOST (1u) @@ -202,7 +184,7 @@ static void CAN_InitializeTransceiver(void) { static void CAN_ValidateConfiguredTxMessagePeriod(void) { for (uint16_t i = 0u; i < can_txLength; i++) { - if (can_txMessages[i].repetitionTime == 0u) { + if (can_txMessages[i].timing.period == 0u) { FAS_ASSERT(FAS_TRAP); } } @@ -218,7 +200,7 @@ extern void CAN_Initialize(void) { extern STD_RETURN_TYPE_e CAN_DataSend(canBASE_t *pNode, uint32_t id, uint8 *pData) { FAS_ASSERT(pNode != NULL_PTR); FAS_ASSERT(pData != NULL_PTR); - FAS_ASSERT((pNode == CAN1_NODE) || (pNode == CAN2_NODE)); + FAS_ASSERT((pNode == CAN_NODE_1) || (pNode == CAN_NODE_2)); /* AXIVION Routine Generic-MissingParameterAssert: id: parameter accepts whole range */ STD_RETURN_TYPE_e result = STD_NOT_OK; @@ -256,19 +238,14 @@ static STD_RETURN_TYPE_e CAN_PeriodicTransmit(void) { uint8_t data[8] = {0}; for (uint16_t i = 0u; i < can_txLength; i++) { - if (((counterTicks * CAN_TICK_ms) % (can_txMessages[i].repetitionTime)) == can_txMessages[i].repetitionPhase) { + if (((counterTicks * CAN_TICK_ms) % (can_txMessages[i].timing.period)) == can_txMessages[i].timing.phase) { if (can_txMessages[i].callbackFunction != NULL_PTR) { can_txMessages[i].callbackFunction( - can_txMessages[i].id, - can_txMessages[i].dlc, - can_txMessages[i].endianness, - data, - can_txMessages[i].pMuxId, - &can_kShim); + can_txMessages[i].message, data, can_txMessages[i].pMuxId, &can_kShim); /* CAN messages are currently discarded if all message boxes * are full. They will not be retransmitted within the next * call of CAN_PeriodicTransmit() */ - CAN_DataSend(can_txMessages[i].canNode, can_txMessages[i].id, data); + CAN_DataSend(can_txMessages[i].canNode, can_txMessages[i].message.id, data); retVal = STD_OK; } } @@ -353,19 +330,15 @@ static void CAN_CheckCanTiming(void) { } extern void CAN_ReadRxBuffer(void) { - CAN_BUFFERELEMENT_s can_rxBuffer = {0}; + CAN_BUFFER_ELEMENT_s can_rxBuffer = {0}; if (ftsk_allQueuesCreated == true) { while (OS_ReceiveFromQueue(ftsk_canRxQueue, (void *)&can_rxBuffer, 0u) == OS_SUCCESS) { /* data queue was not empty */ for (uint16_t i = 0u; i < can_rxLength; i++) { - if ((can_rxBuffer.canNode == can_rxMessages[i].canNode) && (can_rxBuffer.id == can_rxMessages[i].id)) { + if ((can_rxBuffer.canNode == can_rxMessages[i].canNode) && + (can_rxBuffer.id == can_rxMessages[i].message.id)) { if (can_rxMessages[i].callbackFunction != NULL_PTR) { - can_rxMessages[i].callbackFunction( - can_rxMessages[i].id, - can_rxMessages[i].dlc, - can_rxMessages[i].endianness, - can_rxBuffer.data, - &can_kShim); + can_rxMessages[i].callbackFunction(can_rxMessages[i].message, can_rxBuffer.data, &can_kShim); } } } @@ -447,8 +420,8 @@ static void CAN_TxInterrupt(canBASE_t *pNode, uint32 messageBox) { static void CAN_RxInterrupt(canBASE_t *pNode, uint32 messageBox) { FAS_ASSERT(pNode != NULL_PTR); - CAN_BUFFERELEMENT_s can_rxBuffer = {0u}; - uint8_t messageData[CAN_DLC] = {0u}; + CAN_BUFFER_ELEMENT_s can_rxBuffer = {0u}; + uint8_t messageData[CAN_DEFAULT_DLC] = {0u}; /** * Read even if queues are not created, otherwise message boxes get full. * Possible return values: @@ -498,78 +471,6 @@ void UNIT_TEST_WEAK_IMPL canMessageNotification(canBASE_t *node, uint32 messageB } } -extern STD_RETURN_TYPE_e CAN_TransmitBootMessage(void) { - uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))}; - - /* Set major number */ - data[CAN_BYTE_0_POSITION] = ver_foxbmsVersionInformation.major; - /* Set minor number */ - data[CAN_BYTE_1_POSITION] = ver_foxbmsVersionInformation.minor; - /* Set patch number */ - data[CAN_BYTE_2_POSITION] = ver_foxbmsVersionInformation.patch; - - /* intermediate variable for message byte 3 */ - uint8_t versionControlByte = 0u; - - /* Set version control flags */ - if (ver_foxbmsVersionInformation.underVersionControl == true) { - versionControlByte |= (0x01u << CAN_BOOT_MESSAGE_BYTE_3_BIT_VERSION_CONTROL); - } - if (ver_foxbmsVersionInformation.isDirty == true) { - versionControlByte |= (0x01u << CAN_BOOT_MESSAGE_BYTE_3_BIT_DIRTY_FLAG); - } - /* Set overflow flag (if release distance is larger than 31) */ - if (ver_foxbmsVersionInformation.distanceFromLastRelease > CAN_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE) { - /* we need to set the overflow flag */ - versionControlByte |= (0x01u << CAN_BOOT_MESSAGE_BYTE_3_BIT_DISTANCE_OVERFLOW_FLAG); - } - - /* Set release distance (capped to maximum value) */ - const uint8_t distanceCapped = (uint8_t)MATH_MinimumOfTwoUint16_t( - ver_foxbmsVersionInformation.distanceFromLastRelease, (uint16_t)CAN_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE); - versionControlByte |= (distanceCapped << CAN_BOOT_MESSAGE_BYTE_3_BIT_DISTANCE_COUNTER); - - /* assign assembled byte to databyte */ - data[CAN_BYTE_3_POSITION] = versionControlByte; - - /* Read out device register with unique ID */ - const uint32_t deviceRegister = systemREG1->DEVID; - - /* Set unique ID */ - data[CAN_BYTE_4_POSITION] = (uint8_t)((deviceRegister >> 24u) & 0xFFu); - data[CAN_BYTE_5_POSITION] = (uint8_t)((deviceRegister >> 16u) & 0xFFu); - data[CAN_BYTE_6_POSITION] = (uint8_t)((deviceRegister >> 8u) & 0xFFu); - data[CAN_BYTE_7_POSITION] = (uint8_t)(deviceRegister & 0xFFu); - - STD_RETURN_TYPE_e retval = CAN_DataSend(CAN1_NODE, CAN_ID_BOOT_MESSAGE, &data[0]); - - return retval; -} - -extern STD_RETURN_TYPE_e CAN_TransmitDieId(void) { - uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))}; - - /* Read out device register with die ID low and high */ - const uint32_t dieIdLow = systemREG1->DIEIDL; - const uint32_t dieIdHigh = systemREG1->DIEIDH; - - /* set die ID */ - /* AXIVION Disable Style Generic-NoMagicNumbers: The magic numbers are used to divide down the registers into the CAN message */ - data[CAN_BYTE_0_POSITION] = (uint8_t)((dieIdHigh >> 24u) & 0xFFu); - data[CAN_BYTE_1_POSITION] = (uint8_t)((dieIdHigh >> 16u) & 0xFFu); - data[CAN_BYTE_2_POSITION] = (uint8_t)((dieIdHigh >> 8u) & 0xFFu); - data[CAN_BYTE_3_POSITION] = (uint8_t)(dieIdHigh & 0xFFu); - data[CAN_BYTE_4_POSITION] = (uint8_t)((dieIdLow >> 24u) & 0xFFu); - data[CAN_BYTE_5_POSITION] = (uint8_t)((dieIdLow >> 16u) & 0xFFu); - data[CAN_BYTE_6_POSITION] = (uint8_t)((dieIdLow >> 8u) & 0xFFu); - data[CAN_BYTE_7_POSITION] = (uint8_t)(dieIdLow & 0xFFu); - /* AXIVION Enable Style Generic-NoMagicNumbers: */ - - STD_RETURN_TYPE_e retval = CAN_DataSend(CAN1_NODE, CAN_ID_DIE_ID, &data[0]); - - return retval; -} - /*========== Getter for static Variables (Unit Test) ========================*/ #ifdef UNITY_UNIT_TEST extern CAN_STATE_s *TEST_CAN_GetCANState(void) { diff --git a/src/app/driver/can/can.h b/src/app/driver/can/can.h index a20b0a07..4891c4bd 100644 --- a/src/app/driver/can/can.h +++ b/src/app/driver/can/can.h @@ -43,8 +43,8 @@ * @file can.h * @author foxBMS Team * @date 2019-12-04 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CAN * @@ -89,7 +89,7 @@ typedef struct { /** * @brief Sends over CAN the data passed in parameters. - * This function goes over the messageboxes and marks the ones that should + * This function goes over the message boxes and marks the ones that should * be sent. * @param[in,out] pNode CAN interface to use * @param[in] id ID of message to send @@ -148,18 +148,6 @@ extern bool CAN_IsCurrentSensorCcPresent(uint8_t stringNumber); */ extern bool CAN_IsCurrentSensorEcPresent(uint8_t stringNumber); -/** - * @brief Transmit startup boot message - * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK - */ -extern STD_RETURN_TYPE_e CAN_TransmitBootMessage(void); - -/** - * @brief Transmit chip id - * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK - */ -extern STD_RETURN_TYPE_e CAN_TransmitDieId(void); - /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ #ifdef UNITY_UNIT_TEST extern CAN_STATE_s *TEST_CAN_GetCANState(void); diff --git a/src/app/driver/can/cbs/can_helper.c b/src/app/driver/can/cbs/can_helper.c index 0a02672f..d200c21e 100644 --- a/src/app/driver/can/cbs/can_helper.c +++ b/src/app/driver/can/cbs/can_helper.c @@ -43,8 +43,8 @@ * @file can_helper.c * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CAN * diff --git a/src/app/driver/can/cbs/can_helper.h b/src/app/driver/can/cbs/can_helper.h index 5dabd1c2..dac4df04 100644 --- a/src/app/driver/can/cbs/can_helper.h +++ b/src/app/driver/can/cbs/can_helper.h @@ -43,8 +43,8 @@ * @file can_helper.h * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CAN * @@ -105,7 +105,7 @@ extern void CAN_TxPrepareSignalData(float *pSignal, CAN_SIGNAL_TYPE_s signalProp * This function takes the raw signal data and * applies offset and factor to convert * the raw value. - * @param[out] pSignalConverted coverted signal data + * @param[out] pSignalConverted converted signal data * @param[in] signalRaw raw signal data * @param[in] signalProperties signal properties (factor, offset, min, max) */ diff --git a/src/app/driver/can/cbs/rx/can_cbs_rx.h b/src/app/driver/can/cbs/rx/can_cbs_rx.h new file mode 100644 index 00000000..734e8a77 --- /dev/null +++ b/src/app/driver/can/cbs/rx/can_cbs_rx.h @@ -0,0 +1,147 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_cbs_rx.h + * @author foxBMS Team + * @date 2021-04-20 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup DRIVER + * @prefix CANRX + * + * @brief CAN callbacks header + * + */ + +#ifndef FOXBMS__CAN_CBS_RX_H_ +#define FOXBMS__CAN_CBS_RX_H_ + +/*========== Includes =======================================================*/ +#include "general.h" + +#include "can_cfg.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Extern Constant and Variable Declarations ======================*/ + +/*========== Extern Function Prototypes =====================================*/ + +/** RX callback functions @{ */ +/** + * @brief can rx callback function for IMD info messages + * @param[in] message contains the message ID, DLC and endianness + * @param[in] kpkCanData payload of can frame + * @param[in] kpkCanShim shim to the database entries + */ +extern uint32_t CANRX_ImdInfo( + CAN_MESSAGE_PROPERTIES_s message, + const uint8_t *const kpkCanData, + const CAN_SHIM_s *const kpkCanShim); +/** + * @brief can rx callback function for IMD response messages + * @param[in] message contains the message ID, DLC and endianness + * @param[in] kpkCanData payload of can frame + * @param[in] kpkCanShim shim to the database entries + */ +extern uint32_t CANRX_ImdResponse( + CAN_MESSAGE_PROPERTIES_s message, + const uint8_t *const kpkCanData, + const CAN_SHIM_s *const kpkCanShim); +/** + * @brief can rx callback function for state requests + * @param[in] message contains the message ID, DLC and endianness + * @param[in] kpkCanData payload of can frame + * @param[in] kpkCanShim shim to the database entries + */ +extern uint32_t CANRX_BmsStateRequest( + CAN_MESSAGE_PROPERTIES_s message, + const uint8_t *const kpkCanData, + const CAN_SHIM_s *const kpkCanShim); +/** + * @brief can rx callback function for SW reset + * @param[in] message contains the message ID, DLC and endianness + * @param[in] kpkCanData payload of can frame + * @param[in] kpkCanShim shim to the database entries + */ +extern uint32_t CANRX_SoftwareReset( + CAN_MESSAGE_PROPERTIES_s message, + const uint8_t *const kpkCanData, + const CAN_SHIM_s *const kpkCanShim); +/** + * @brief can rx callback function for current sensor measurements + * @param[in] message contains the message ID, DLC and endianness + * @param[in] kpkCanData payload of can frame + * @param[in] kpkCanShim shim to the database entries + */ +extern uint32_t CANRX_CurrentSensor( + CAN_MESSAGE_PROPERTIES_s message, + const uint8_t *const kpkCanData, + const CAN_SHIM_s *const kpkCanShim); +/** + * @brief can rx callback function for debug messages + * @param[in] message contains the message ID, DLC and endianness + * @param[in] kpkCanData payload of can frame + * @param[in] kpkCanShim shim to the database entries + */ +extern uint32_t CANRX_Debug( + CAN_MESSAGE_PROPERTIES_s message, + const uint8_t *const kpkCanData, + const CAN_SHIM_s *const kpkCanShim); +/** + * @brief can rx callback function for SW version + * @param[in] message contains the message ID, DLC and endianness + * @param[in] kpkCanData payload of can frame + * @param[in] kpkCanShim shim to the database entries + */ +extern uint32_t CANRX_SoftwareVersion( + CAN_MESSAGE_PROPERTIES_s message, + const uint8_t *const kpkCanData, + const CAN_SHIM_s *const kpkCanShim); +/** @} */ + +/*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ +#ifdef UNITY_UNIT_TEST + +#endif + +#endif /* FOXBMS__CAN_CBS_RX_H_ */ diff --git a/src/app/driver/can/cbs/can_cbs_rx_current_sensor.c b/src/app/driver/can/cbs/rx/can_cbs_rx_current-sensor.c similarity index 75% rename from src/app/driver/can/cbs/can_cbs_rx_current_sensor.c rename to src/app/driver/can/cbs/rx/can_cbs_rx_current-sensor.c index 500b0395..7e5bcca8 100644 --- a/src/app/driver/can/cbs/can_cbs_rx_current_sensor.c +++ b/src/app/driver/can/cbs/rx/can_cbs_rx_current-sensor.c @@ -40,32 +40,33 @@ */ /** - * @file can_cbs_rx_current_sensor.c + * @file can_cbs_rx_current-sensor.c * @author foxBMS Team * @date 2021-04-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANRX * * @brief CAN driver Rx callback implementation * @details CAN Rx callback for current sensor measurements */ /*========== Includes =======================================================*/ -#include "can_cbs.h" +#include "can_cbs_rx.h" +#include "can_cfg_rx-message-definitions.h" #include "can_helper.h" /*========== Macros and Definitions =========================================*/ /** Overcurrent flag */ -#define CAN_CURRENT_SENSOR_DIAGNOSIS_OVERCURRENT (0x1u) +#define CANRX_CURRENT_SENSOR_DIAGNOSIS_OVERCURRENT_BITMASK (0x1u) /** Actual measurement error flag */ -#define CAN_CURRENT_SENSOR_DIAGNOSIS_ACTUAL_MEASUREMENT_ERROR (0x2u) +#define CANRX_CURRENT_SENSOR_DIAGNOSIS_ACTUAL_MEASUREMENT_ERROR_BITMASK (0x2u) /** Any measurement error flag */ -#define CAN_CURRENT_SENSOR_DIAGNOSIS_ANY_MEASUREMENT_ERROR (0x4u) +#define CANRX_CURRENT_SENSOR_DIAGNOSIS_ANY_MEASUREMENT_ERROR_BITMASK (0x4u) /** System error flag */ -#define CAN_CURRENT_SENSOR_DIAGNOSIS_SYSTEM_ERROR (0x8u) +#define CANRX_CURRENT_SENSOR_DIAGNOSIS_SYSTEM_ERROR_BITMASK (0x8u) /*========== Static Constant and Variable Definitions =======================*/ @@ -76,14 +77,12 @@ /*========== Static Function Implementations ================================*/ /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_RxCurrentSensor( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANRX_CurrentSensor( + CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(((message.id >= CANRX_STRING0_CURRENT_ID) && (message.id <= CANRX_STRING0_ENERGY_COUNTER_ID))); + FAS_ASSERT(message.dlc == CANRX_CURRENT_SENSOR_MESSAGES_DLC); FAS_ASSERT(kpkCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); @@ -95,74 +94,54 @@ extern uint32_t CAN_RxCurrentSensor( const CAN_SIGNAL_TYPE_s currentSensorStatus = {7u, 8u, 1.0f, 0.0f, 0.0f, 255.0f}; const CAN_SIGNAL_TYPE_s currentSensorData = {23u, 32u, 1.0f, 0.0f, -2147483648.0f, 2147483648.0f}; - uint64_t message = 0u; - uint64_t canSignal = 0u; + uint64_t messageData = 0u; + uint64_t canSignal = 0u; int32_t sensorSignalValue = 0; uint8_t diagInfo = 0u; uint8_t stringNumber = 0u; - if (id <= CAN_ID_STRING0_ENERGY_COUNTER) { + if (message.id <= CANRX_STRING0_ENERGY_COUNTER_ID) { stringNumber = 0u; - } else if (id <= CAN_ID_STRING1_ENERGY_COUNTER) { - stringNumber = 1u; - } else { - stringNumber = 2u; } - CAN_RxGetMessageDataFromCanData(&message, kpkCanData, endianness); + CAN_RxGetMessageDataFromCanData(&messageData, kpkCanData, message.endianness); /* Get status*/ CAN_RxGetSignalDataFromMessageData( - message, currentSensorStatus.bitStart, currentSensorStatus.bitLength, &canSignal, endianness); + messageData, currentSensorStatus.bitStart, currentSensorStatus.bitLength, &canSignal, message.endianness); /* only high nibble contains diag info */ diagInfo = canSignal & 0xF0u; diagInfo >>= 4u; - if ((diagInfo & CAN_CURRENT_SENSOR_DIAGNOSIS_OVERCURRENT) != 0u) { + if ((diagInfo & CANRX_CURRENT_SENSOR_DIAGNOSIS_OVERCURRENT_BITMASK) != 0u) { /* Overcurrent detected. This feature is currently not supported. */ } - if ((diagInfo & CAN_CURRENT_SENSOR_DIAGNOSIS_ACTUAL_MEASUREMENT_ERROR) != 0u) { - switch (id) { - case CAN_ID_STRING0_CURRENT: /* Current status */ - case CAN_ID_STRING1_CURRENT: - case CAN_ID_STRING2_CURRENT: + if ((diagInfo & CANRX_CURRENT_SENSOR_DIAGNOSIS_ACTUAL_MEASUREMENT_ERROR_BITMASK) != 0u) { + switch (message.id) { + case CANRX_STRING0_CURRENT_ID: /* Current status */ kpkCanShim->pTableCurrentSensor->invalidCurrentMeasurement[stringNumber] = 1; break; - case CAN_ID_STRING0_VOLTAGE1: /* Voltage status */ - case CAN_ID_STRING1_VOLTAGE1: - case CAN_ID_STRING2_VOLTAGE1: + case CANRX_STRING0_VOLTAGE1_ID: /* Voltage status */ kpkCanShim->pTableCurrentSensor->invalidHighVoltageMeasurement[stringNumber][0] = 1; break; - case CAN_ID_STRING0_VOLTAGE2: - case CAN_ID_STRING1_VOLTAGE2: - case CAN_ID_STRING2_VOLTAGE2: + case CANRX_STRING0_VOLTAGE2_ID: kpkCanShim->pTableCurrentSensor->invalidHighVoltageMeasurement[stringNumber][1] = 1; break; - case CAN_ID_STRING0_VOLTAGE3: - case CAN_ID_STRING1_VOLTAGE3: - case CAN_ID_STRING2_VOLTAGE3: + case CANRX_STRING0_VOLTAGE3_ID: kpkCanShim->pTableCurrentSensor->invalidHighVoltageMeasurement[stringNumber][2] = 1; break; - case CAN_ID_STRING0_TEMPERATURE: /* Temperature status */ - case CAN_ID_STRING1_TEMPERATURE: - case CAN_ID_STRING2_TEMPERATURE: + case CANRX_STRING0_TEMPERATURE_ID: /* Temperature status */ kpkCanShim->pTableCurrentSensor->invalidSensorTemperatureMeasurement[stringNumber] = 1; break; - case CAN_ID_STRING0_POWER: /* Power status */ - case CAN_ID_STRING1_POWER: - case CAN_ID_STRING2_POWER: + case CANRX_STRING0_POWER_ID: /* Power status */ kpkCanShim->pTableCurrentSensor->invalidPowerMeasurement[stringNumber] = 1; break; - case CAN_ID_STRING0_CURRENT_COUNTER: /* CC status */ - case CAN_ID_STRING1_CURRENT_COUNTER: - case CAN_ID_STRING2_CURRENT_COUNTER: + case CANRX_STRING0_CURRENT_COUNTER_ID: /* CC status */ kpkCanShim->pTableCurrentSensor->invalidCurrentCountingMeasurement[stringNumber] = 1; break; - case CAN_ID_STRING0_ENERGY_COUNTER: /* EC status */ - case CAN_ID_STRING1_ENERGY_COUNTER: - case CAN_ID_STRING2_ENERGY_COUNTER: + case CANRX_STRING0_ENERGY_COUNTER_ID: /* EC status */ kpkCanShim->pTableCurrentSensor->invalidEnergyCountingMeasurement[stringNumber] = 1; break; default: @@ -180,8 +159,8 @@ extern uint32_t CAN_RxCurrentSensor( kpkCanShim->pTableCurrentSensor->invalidEnergyCountingMeasurement[stringNumber] = 0; } - if (((diagInfo & CAN_CURRENT_SENSOR_DIAGNOSIS_ANY_MEASUREMENT_ERROR) != 0u) || - ((diagInfo & CAN_CURRENT_SENSOR_DIAGNOSIS_SYSTEM_ERROR) != 0u)) { + if (((diagInfo & CANRX_CURRENT_SENSOR_DIAGNOSIS_ANY_MEASUREMENT_ERROR_BITMASK) != 0u) || + ((diagInfo & CANRX_CURRENT_SENSOR_DIAGNOSIS_SYSTEM_ERROR_BITMASK) != 0u)) { kpkCanShim->pTableCurrentSensor->invalidCurrentMeasurement[stringNumber] = 1; kpkCanShim->pTableCurrentSensor->invalidHighVoltageMeasurement[stringNumber][0] = 1; kpkCanShim->pTableCurrentSensor->invalidHighVoltageMeasurement[stringNumber][1] = 1; @@ -194,12 +173,10 @@ extern uint32_t CAN_RxCurrentSensor( /* Get measurement */ CAN_RxGetSignalDataFromMessageData( - message, currentSensorData.bitStart, currentSensorData.bitLength, &canSignal, endianness); - switch (id) { + messageData, currentSensorData.bitStart, currentSensorData.bitLength, &canSignal, message.endianness); + switch (message.id) { /* Current measurement */ - case CAN_ID_STRING0_CURRENT: - case CAN_ID_STRING1_CURRENT: - case CAN_ID_STRING2_CURRENT: + case CANRX_STRING0_CURRENT_ID: sensorSignalValue = (int32_t)canSignal; kpkCanShim->pTableCurrentSensor->current_mA[stringNumber] = sensorSignalValue; kpkCanShim->pTableCurrentSensor->newCurrent++; @@ -208,9 +185,7 @@ extern uint32_t CAN_RxCurrentSensor( kpkCanShim->pTableCurrentSensor->timestampCurrent[stringNumber] = OS_GetTickCount(); break; /* Voltage measurement U1 */ - case CAN_ID_STRING0_VOLTAGE1: - case CAN_ID_STRING1_VOLTAGE1: - case CAN_ID_STRING2_VOLTAGE1: + case CANRX_STRING0_VOLTAGE1_ID: sensorSignalValue = (int32_t)canSignal; kpkCanShim->pTableCurrentSensor->highVoltage_mV[stringNumber][0] = sensorSignalValue; kpkCanShim->pTableCurrentSensor->previousTimestampHighVoltage[stringNumber][0] = @@ -218,9 +193,7 @@ extern uint32_t CAN_RxCurrentSensor( kpkCanShim->pTableCurrentSensor->timestampHighVoltage[stringNumber][0] = OS_GetTickCount(); break; /* Voltage measurement U2 */ - case CAN_ID_STRING0_VOLTAGE2: - case CAN_ID_STRING1_VOLTAGE2: - case CAN_ID_STRING2_VOLTAGE2: + case CANRX_STRING0_VOLTAGE2_ID: sensorSignalValue = (int32_t)canSignal; kpkCanShim->pTableCurrentSensor->highVoltage_mV[stringNumber][1] = sensorSignalValue; kpkCanShim->pTableCurrentSensor->previousTimestampHighVoltage[stringNumber][1] = @@ -228,9 +201,7 @@ extern uint32_t CAN_RxCurrentSensor( kpkCanShim->pTableCurrentSensor->timestampHighVoltage[stringNumber][1] = OS_GetTickCount(); break; /* Voltage measurement U3 */ - case CAN_ID_STRING0_VOLTAGE3: - case CAN_ID_STRING1_VOLTAGE3: - case CAN_ID_STRING2_VOLTAGE3: + case CANRX_STRING0_VOLTAGE3_ID: sensorSignalValue = (int32_t)canSignal; kpkCanShim->pTableCurrentSensor->highVoltage_mV[stringNumber][2] = sensorSignalValue; kpkCanShim->pTableCurrentSensor->previousTimestampHighVoltage[stringNumber][2] = @@ -238,16 +209,12 @@ extern uint32_t CAN_RxCurrentSensor( kpkCanShim->pTableCurrentSensor->timestampHighVoltage[stringNumber][2] = OS_GetTickCount(); break; /* Temperature measurement */ - case CAN_ID_STRING0_TEMPERATURE: - case CAN_ID_STRING1_TEMPERATURE: - case CAN_ID_STRING2_TEMPERATURE: + case CANRX_STRING0_TEMPERATURE_ID: sensorSignalValue = (int32_t)canSignal; kpkCanShim->pTableCurrentSensor->sensorTemperature_ddegC[stringNumber] = sensorSignalValue; break; /* Power measurement */ - case CAN_ID_STRING0_POWER: - case CAN_ID_STRING1_POWER: - case CAN_ID_STRING2_POWER: + case CANRX_STRING0_POWER_ID: sensorSignalValue = (int32_t)canSignal; kpkCanShim->pTableCurrentSensor->power_W[stringNumber] = sensorSignalValue; kpkCanShim->pTableCurrentSensor->newPower++; @@ -256,9 +223,7 @@ extern uint32_t CAN_RxCurrentSensor( kpkCanShim->pTableCurrentSensor->timestampPower[stringNumber] = OS_GetTickCount(); break; /* CC measurement */ - case CAN_ID_STRING0_CURRENT_COUNTER: - case CAN_ID_STRING1_CURRENT_COUNTER: - case CAN_ID_STRING2_CURRENT_COUNTER: + case CANRX_STRING0_CURRENT_COUNTER_ID: sensorSignalValue = (int32_t)canSignal; kpkCanShim->pTableCurrentSensor->previousTimestampCurrentCounting[stringNumber] = kpkCanShim->pTableCurrentSensor->timestampCurrentCounting[stringNumber]; @@ -266,9 +231,7 @@ extern uint32_t CAN_RxCurrentSensor( kpkCanShim->pTableCurrentSensor->currentCounter_As[stringNumber] = sensorSignalValue; break; /* EC measurement */ - case CAN_ID_STRING0_ENERGY_COUNTER: - case CAN_ID_STRING1_ENERGY_COUNTER: - case CAN_ID_STRING2_ENERGY_COUNTER: + case CANRX_STRING0_ENERGY_COUNTER_ID: sensorSignalValue = (int32_t)canSignal; kpkCanShim->pTableCurrentSensor->energyCounter_Wh[stringNumber] = sensorSignalValue; kpkCanShim->pTableCurrentSensor->previousTimestampEnergyCounting[stringNumber] = diff --git a/src/app/driver/can/cbs/can_cbs_rx_imd.c b/src/app/driver/can/cbs/rx/can_cbs_rx_imd.c similarity index 78% rename from src/app/driver/can/cbs/can_cbs_rx_imd.c rename to src/app/driver/can/cbs/rx/can_cbs_rx_imd.c index a30a0249..8eec2a18 100644 --- a/src/app/driver/can/cbs/can_cbs_rx_imd.c +++ b/src/app/driver/can/cbs/rx/can_cbs_rx_imd.c @@ -43,17 +43,18 @@ * @file can_cbs_rx_imd.c * @author foxBMS Team * @date 2021-04-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANRX * * @brief CAN driver Rx callback implementation * @details CAN Rx callback for IMD messages */ /*========== Includes =======================================================*/ -#include "can_cbs.h" +#include "can_cbs_rx.h" +#include "can_cfg_rx-message-definitions.h" #include "can_helper.h" #include "foxmath.h" @@ -68,24 +69,21 @@ /*========== Static Function Implementations ================================*/ /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_RxImdInfo( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANRX_ImdInfo( + CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim) { /* This handler is only implemented for little endian */ - FAS_ASSERT(endianness == CAN_LITTLE_ENDIAN); - - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ - const uint8_t boundedDlc = MATH_MinimumOfTwoUint8_t(dlc, CAN_MAX_DLC); + FAS_ASSERT(message.endianness == CAN_LITTLE_ENDIAN); + FAS_ASSERT(message.id == CANRX_IMD_INFO_ID); + FAS_ASSERT(message.dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ FAS_ASSERT(kpkCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); - CAN_BUFFERELEMENT_s canMessage = {0}; - uint32_t retVal = 1u; + CAN_BUFFER_ELEMENT_s canMessage = {0}; + uint32_t retVal = 1u; + const uint8_t boundedDlc = MATH_MinimumOfTwoUint8_t(message.dlc, CAN_MAX_DLC); - canMessage.id = id; + canMessage.id = message.id; for (uint8_t i = 0; i < boundedDlc; i++) { canMessage.data[i] = kpkCanData[i]; } @@ -95,25 +93,23 @@ extern uint32_t CAN_RxImdInfo( return retVal; } -extern uint32_t CAN_RxImdResponse( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANRX_ImdResponse( + CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim) { /* This handler is only implemented for little endian */ - FAS_ASSERT(endianness == CAN_LITTLE_ENDIAN); - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.endianness == CAN_LITTLE_ENDIAN); + FAS_ASSERT(message.id == CANRX_IMD_RESPONSE_ID); + FAS_ASSERT(message.dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ FAS_ASSERT(kpkCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); - const uint8_t boundedDlc = MATH_MinimumOfTwoUint8_t(dlc, CAN_MAX_DLC); + const uint8_t boundedDlc = MATH_MinimumOfTwoUint8_t(message.dlc, CAN_MAX_DLC); - CAN_BUFFERELEMENT_s canMessage = {0}; - uint32_t retVal = 1u; + CAN_BUFFER_ELEMENT_s canMessage = {0}; + uint32_t retVal = 1u; - canMessage.id = id; + canMessage.id = message.id; for (uint8_t i = 0; i < boundedDlc; i++) { canMessage.data[i] = kpkCanData[i]; } diff --git a/src/app/driver/can/cbs/can_cbs_rx_misc.c b/src/app/driver/can/cbs/rx/can_cbs_rx_misc.c similarity index 77% rename from src/app/driver/can/cbs/can_cbs_rx_misc.c rename to src/app/driver/can/cbs/rx/can_cbs_rx_misc.c index 294e5729..7fdb62c8 100644 --- a/src/app/driver/can/cbs/can_cbs_rx_misc.c +++ b/src/app/driver/can/cbs/rx/can_cbs_rx_misc.c @@ -43,17 +43,18 @@ * @file can_cbs_rx_misc.c * @author foxBMS Team * @date 2021-04-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANRX * * @brief CAN driver Rx callback implementation * @details CAN Rx callback for miscellanous messages */ /*========== Includes =======================================================*/ -#include "can_cbs.h" +#include "can_cbs_rx.h" +#include "can_cfg_rx-message-definitions.h" #include "can_helper.h" #include "diag.h" @@ -68,41 +69,36 @@ /*========== Static Function Implementations ================================*/ /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_RxSwReset( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANRX_SoftwareReset( + CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim) { /* This handler is only implemented for little endian */ - FAS_ASSERT(endianness == CAN_LITTLE_ENDIAN); - - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.endianness == CAN_LITTLE_ENDIAN); + FAS_ASSERT(message.id == CANRX_SOFTWARE_RESET_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(kpkCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); return 0; } -extern uint32_t CAN_RxDebug( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANRX_Debug( + CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANRX_DEBUG_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(kpkCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; - uint64_t signalData = 0; + uint64_t messageData = 0u; + uint64_t signalData = 0; - CAN_RxGetMessageDataFromCanData(&message, kpkCanData, endianness); + CAN_RxGetMessageDataFromCanData(&messageData, kpkCanData, message.endianness); uint64_t bitStart = 0; uint8_t bitLength = 8; - CAN_RxGetSignalDataFromMessageData(message, bitStart, bitLength, &signalData, endianness); + CAN_RxGetSignalDataFromMessageData(messageData, bitStart, bitLength, &signalData, message.endianness); switch ((uint8_t)signalData) { case 0xAA: @@ -117,17 +113,14 @@ extern uint32_t CAN_RxDebug( return 0; } -extern uint32_t CAN_RxSwVersion( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANRX_SoftwareVersion( + CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim) { /* This handler is only implemented for little endian */ - FAS_ASSERT(endianness == CAN_LITTLE_ENDIAN); - - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.endianness == CAN_LITTLE_ENDIAN); + FAS_ASSERT(message.id == CANRX_SOFTWARE_VERSION_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(kpkCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); return 0; diff --git a/src/app/driver/can/cbs/can_cbs_rx_command.c b/src/app/driver/can/cbs/rx/can_cbs_rx_state-request.c similarity index 81% rename from src/app/driver/can/cbs/can_cbs_rx_command.c rename to src/app/driver/can/cbs/rx/can_cbs_rx_state-request.c index 97b0fc15..f6931395 100644 --- a/src/app/driver/can/cbs/can_cbs_rx_command.c +++ b/src/app/driver/can/cbs/rx/can_cbs_rx_state-request.c @@ -40,13 +40,13 @@ */ /** - * @file can_cbs_rx_command.c + * @file can_cbs_rx_state-request.c * @author foxBMS Team * @date 2021-07-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANRX * * @brief CAN driver Rx callback implementation * @details CAN Rx callback for command message @@ -56,7 +56,8 @@ #include "bms_cfg.h" #include "bal.h" -#include "can_cbs.h" +#include "can_cbs_rx.h" +#include "can_cfg_rx-message-definitions.h" #include "can_helper.h" #include "diag.h" #include "os.h" @@ -72,7 +73,7 @@ * - The new request is different than the old request. * - The old request is older than the timespan set in this define. */ -#define CAN_CAN_REQUEST_UPDATE_TIME_ms (3000u) +#define CANRX_CAN_REQUEST_UPDATE_TIME_ms (3000u) /*========== Static Constant and Variable Definitions =======================*/ @@ -87,29 +88,29 @@ * - sys mon violation flags * @param[in] signalData if it is 1u, flags are cleared */ -static void CAN_ClearAllPersistentFlags(uint64_t signalData); +static void CANRX_ClearAllPersistentFlags(uint64_t signalData); /** * @brief handles the mode request * @param[in] signalData extracted signal data * @param[in,out] kpkCanShim can shim with database entries */ -static void CAN_HandleModeRequest(uint64_t signalData, const CAN_SHIM_s *const kpkCanShim); +static void CANRX_HandleModeRequest(uint64_t signalData, const CAN_SHIM_s *const kpkCanShim); /** * @brief handles the balancing request * @param[in] signalData extracted signal data */ -static void CAN_HandleBalancingRequest(uint64_t signalData); +static void CANRX_HandleBalancingRequest(uint64_t signalData); /** * @brief sets the balancing threshold * @param[in] signalData extracted signal data */ -static void CAN_SetBalancingThreshold(uint64_t signalData); +static void CANRX_SetBalancingThreshold(uint64_t signalData); /*========== Static Function Implementations ================================*/ -static void CAN_ClearAllPersistentFlags(uint64_t signalData) { +static void CANRX_ClearAllPersistentFlags(uint64_t signalData) { /* AXIVION Routine Generic-MissingParameterAssert: signalData: parameter accepts whole range */ if (signalData == 1u) { /* clear deep discharge */ @@ -121,7 +122,7 @@ static void CAN_ClearAllPersistentFlags(uint64_t signalData) { } } -static void CAN_HandleModeRequest(uint64_t signalData, const CAN_SHIM_s *const kpkCanShim) { +static void CANRX_HandleModeRequest(uint64_t signalData, const CAN_SHIM_s *const kpkCanShim) { FAS_ASSERT(kpkCanShim != NULL_PTR); /* AXIVION Routine Generic-MissingParameterAssert: signalData: parameter accepts whole range */ @@ -149,7 +150,7 @@ static void CAN_HandleModeRequest(uint64_t signalData, const CAN_SHIM_s *const k kpkCanShim->pTableStateRequest->stateRequestViaCan = stateRequest; if ((kpkCanShim->pTableStateRequest->stateRequestViaCan != kpkCanShim->pTableStateRequest->previousStateRequestViaCan) || - (OS_CheckTimeHasPassed(kpkCanShim->pTableStateRequest->header.timestamp, CAN_CAN_REQUEST_UPDATE_TIME_ms))) { + (OS_CheckTimeHasPassed(kpkCanShim->pTableStateRequest->header.timestamp, CANRX_CAN_REQUEST_UPDATE_TIME_ms))) { kpkCanShim->pTableStateRequest->stateRequestViaCanPending = stateRequest; } if (kpkCanShim->pTableStateRequest->stateCounter == (uint8_t)UINT8_MAX) { @@ -160,7 +161,7 @@ static void CAN_HandleModeRequest(uint64_t signalData, const CAN_SHIM_s *const k } } -static void CAN_HandleBalancingRequest(uint64_t signalData) { +static void CANRX_HandleBalancingRequest(uint64_t signalData) { /* AXIVION Routine Generic-MissingParameterAssert: signalData: parameter accepts whole range */ /* AXIVION Next Codeline Style MisraC2012-2.2 MisraC2012-14.3: Depending on implementation STD_NOT_OK might be returned. */ if (BAL_GetInitializationState() == STD_OK) { @@ -172,7 +173,7 @@ static void CAN_HandleBalancingRequest(uint64_t signalData) { } } -static void CAN_SetBalancingThreshold(uint64_t signalData) { +static void CANRX_SetBalancingThreshold(uint64_t signalData) { /* cap signal data to UINT16_MAX */ int32_t cappedSignalData = (int32_t)signalData; if (signalData > (uint64_t)UINT16_MAX) { @@ -182,42 +183,40 @@ static void CAN_SetBalancingThreshold(uint64_t signalData) { } /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_RxRequest( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANRX_BmsStateRequest( + CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANRX_BMS_STATE_REQUEST_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(kpkCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); DATA_READ_DATA(kpkCanShim->pTableStateRequest); - uint64_t message = 0; - CAN_RxGetMessageDataFromCanData(&message, kpkCanData, endianness); + uint64_t messageData = 0u; + CAN_RxGetMessageDataFromCanData(&messageData, kpkCanData, message.endianness); uint64_t signalData = 0; /* Get mode request */ /* AXIVION Next Codeline Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ - CAN_RxGetSignalDataFromMessageData(message, 1u, 2u, &signalData, endianness); - CAN_HandleModeRequest(signalData, kpkCanShim); + CAN_RxGetSignalDataFromMessageData(messageData, 1u, 2u, &signalData, message.endianness); + CANRX_HandleModeRequest(signalData, kpkCanShim); /* check for reset flag */ /* AXIVION Next Codeline Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ - CAN_RxGetSignalDataFromMessageData(message, 2u, 1u, &signalData, endianness); - CAN_ClearAllPersistentFlags(signalData); + CAN_RxGetSignalDataFromMessageData(messageData, 2u, 1u, &signalData, message.endianness); + CANRX_ClearAllPersistentFlags(signalData); /* Get balancing request */ /* AXIVION Next Codeline Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ - CAN_RxGetSignalDataFromMessageData(message, 8u, 1u, &signalData, endianness); - CAN_HandleBalancingRequest(signalData); + CAN_RxGetSignalDataFromMessageData(messageData, 8u, 1u, &signalData, message.endianness); + CANRX_HandleBalancingRequest(signalData); /* Get balancing threshold */ /* AXIVION Next Codeline Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ - CAN_RxGetSignalDataFromMessageData(message, 23u, 8u, &signalData, endianness); - CAN_SetBalancingThreshold(signalData); + CAN_RxGetSignalDataFromMessageData(messageData, 23u, 8u, &signalData, message.endianness); + CANRX_SetBalancingThreshold(signalData); /* TODO: Implement missing signals */ diff --git a/src/app/driver/can/cbs/can_cbs.h b/src/app/driver/can/cbs/tx/can_cbs_tx.h similarity index 51% rename from src/app/driver/can/cbs/can_cbs.h rename to src/app/driver/can/cbs/tx/can_cbs_tx.h index dddcfa9a..974f302e 100644 --- a/src/app/driver/can/cbs/can_cbs.h +++ b/src/app/driver/can/cbs/tx/can_cbs_tx.h @@ -40,20 +40,20 @@ */ /** - * @file can_cbs.h + * @file can_cbs_tx.h * @author foxBMS Team * @date 2021-04-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANTX * * @brief CAN callbacks header * */ -#ifndef FOXBMS__CAN_CBS_H_ -#define FOXBMS__CAN_CBS_H_ +#ifndef FOXBMS__CAN_CBS_TX_H_ +#define FOXBMS__CAN_CBS_TX_H_ /*========== Includes =======================================================*/ #include "general.h" @@ -68,318 +68,165 @@ /** TX callback functions @{ */ /** * @brief can tx callback function for state - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxState( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_BmsState( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for detail state - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxDetailState( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_BmsStateDetails( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for cell voltages - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxVoltage( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_CellVoltages( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for cell temperatures - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxCellTemperature( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_CellTemperatures( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for limit values - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxLimitValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_LimitValues( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for min/max values - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxMinimumMaximumValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_MinimumMaximumValues( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for state estimation values - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxStateEstimation( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_PackStateEstimation( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for pack values values - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxPackValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_PackValues( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for string state values - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxStringState( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringState( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for string values - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxStringValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringValuesP0( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for string minimum and maximum values - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxStringMinimumMaximumValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringMinimumMaximumValues( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for string state estimation - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxStringStateEstimation( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringStateEstimation( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** * @brief can tx callback function for string values 2 - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian + * @param[in] message contains the message ID, DLC and endianness * @param[in] pCanData payload of can frame * @param[in] pMuxId multiplexer for multiplexed CAN messages * @param[in] kpkCanShim shim to the database entries */ -extern uint32_t CAN_TxStringValues2( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringValuesP1( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** @} */ -/** RX callback functions @{ */ -/** - * @brief can rx callback function for IMD info messages - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian - * @param[in] kpkCanData payload of can frame - * @param[in] kpkCanShim shim to the database entries - */ -extern uint32_t CAN_RxImdInfo( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, - const uint8_t *const kpkCanData, - const CAN_SHIM_s *const kpkCanShim); -/** - * @brief can rx callback function for IMD response messages - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian - * @param[in] kpkCanData payload of can frame - * @param[in] kpkCanShim shim to the database entries - */ -extern uint32_t CAN_RxImdResponse( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, - const uint8_t *const kpkCanData, - const CAN_SHIM_s *const kpkCanShim); -/** - * @brief can rx callback function for state requests - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian - * @param[in] kpkCanData payload of can frame - * @param[in] kpkCanShim shim to the database entries - */ -extern uint32_t CAN_RxRequest( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, - const uint8_t *const kpkCanData, - const CAN_SHIM_s *const kpkCanShim); -/** - * @brief can rx callback function for SW reset - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian - * @param[in] kpkCanData payload of can frame - * @param[in] kpkCanShim shim to the database entries - */ -extern uint32_t CAN_RxSwReset( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, - const uint8_t *const kpkCanData, - const CAN_SHIM_s *const kpkCanShim); -/** - * @brief can rx callback function for current sensor measurements - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian - * @param[in] kpkCanData payload of can frame - * @param[in] kpkCanShim shim to the database entries - */ -extern uint32_t CAN_RxCurrentSensor( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, - const uint8_t *const kpkCanData, - const CAN_SHIM_s *const kpkCanShim); -/** - * @brief can rx callback function for debug messages - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian - * @param[in] kpkCanData payload of can frame - * @param[in] kpkCanShim shim to the database entries - */ -extern uint32_t CAN_RxDebug( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, - const uint8_t *const kpkCanData, - const CAN_SHIM_s *const kpkCanShim); -/** - * @brief can rx callback function for SW version - * @param[in] id CAN ID - * @param[in] dlc CAN Data Length Code - * @param[in] endianness big or little endian - * @param[in] kpkCanData payload of can frame - * @param[in] kpkCanShim shim to the database entries - */ -extern uint32_t CAN_RxSwVersion( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, - const uint8_t *const kpkCanData, - const CAN_SHIM_s *const kpkCanShim); -/** @} */ - /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ #ifdef UNITY_UNIT_TEST #endif -#endif /* FOXBMS__CAN_CBS_H_ */ +#endif /* FOXBMS__CAN_CBS_TX_H_ */ diff --git a/src/app/driver/can/cbs/can_cbs_tx_temperature.c b/src/app/driver/can/cbs/tx/can_cbs_tx_cell-temperatures.c similarity index 68% rename from src/app/driver/can/cbs/can_cbs_tx_temperature.c rename to src/app/driver/can/cbs/tx/can_cbs_tx_cell-temperatures.c index d71372ad..c10154d5 100644 --- a/src/app/driver/can/cbs/can_cbs_tx_temperature.c +++ b/src/app/driver/can/cbs/tx/can_cbs_tx_cell-temperatures.c @@ -40,20 +40,21 @@ */ /** - * @file can_cbs_tx_temperature.c + * @file can_cbs_tx_cell-temperatures.c * @author foxBMS Team * @date 2021-04-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANTX * * @brief CAN driver Tx callback implementation * @details CAN Tx callback for cell temperatures */ /*========== Includes =======================================================*/ -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" #include "foxmath.h" @@ -66,28 +67,28 @@ * Parameters: * bit start, bit length, factor, offset, minimum value, maximum value */ -static const CAN_SIGNAL_TYPE_s can_cellTemperatureMultiplexer = {7u, 8u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cell0TemperatureInvalidFlag = {8u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cell1TemperatureInvalidFlag = {9u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cell2TemperatureInvalidFlag = {10u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cell3TemperatureInvalidFlag = {11u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cell4TemperatureInvalidFlag = {12u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cell5TemperatureInvalidFlag = {13u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cell0Temperature_degC = {23u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; -static const CAN_SIGNAL_TYPE_s can_cell1Temperature_degC = {31u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; -static const CAN_SIGNAL_TYPE_s can_cell2Temperature_degC = {39u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; -static const CAN_SIGNAL_TYPE_s can_cell3Temperature_degC = {47u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; -static const CAN_SIGNAL_TYPE_s can_cell4Temperature_degC = {55u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; -static const CAN_SIGNAL_TYPE_s can_cell5Temperature_degC = {63u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellTemperatureMultiplexer = {7u, 8u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell0TemperatureInvalidFlag = {8u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell1TemperatureInvalidFlag = {9u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell2TemperatureInvalidFlag = {10u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell3TemperatureInvalidFlag = {11u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell4TemperatureInvalidFlag = {12u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell5TemperatureInvalidFlag = {13u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell0Temperature_degC = {23u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell1Temperature_degC = {31u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell2Temperature_degC = {39u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell3Temperature_degC = {47u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell4Temperature_degC = {55u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cell5Temperature_degC = {63u, 8u, 1.0f, 0.0f, -128.0f, 127.0f}; /*========== Extern Constant and Variable Definitions =======================*/ /*========== Static Function Prototypes =====================================*/ /** - * @brief Helper function for CAN_TxCellTemperature() + * @brief Helper function for CANTX_CellTemperatures() * - * Used in the CAN_TxCellTemperature() callback to set + * Used in the CANTX_CellTemperatures() callback to set * invalid flag data and temperature data * in the CAN frame. * @@ -98,7 +99,7 @@ static const CAN_SIGNAL_TYPE_s can_cell5Temperature_degC = {63u, 8u, 1.0f, * @param[in] endianness big or little endianness of data * @param[in] kpkCanShim shim to the database entries */ -static void CAN_TxTemperatureSetData( +static void CANTX_TemperatureSetData( uint8_t muxId, uint64_t *pMessage, CAN_SIGNAL_TYPE_s cellTemperatureSignal, @@ -108,7 +109,7 @@ static void CAN_TxTemperatureSetData( /*========== Static Function Implementations ================================*/ -static void CAN_TxTemperatureSetData( +static void CANTX_TemperatureSetData( uint8_t muxId, uint64_t *pMessage, CAN_SIGNAL_TYPE_s cellTemperatureSignal, @@ -125,7 +126,6 @@ static void CAN_TxTemperatureSetData( */ /* start_index end_index string * 000 071 string0 - * 072 143 string1 */ /* Get string, module and cell number */ @@ -167,19 +167,17 @@ static void CAN_TxTemperatureSetData( } /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_TxCellTemperature( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_CellTemperatures( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_CELL_TEMPERATURES_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); FAS_ASSERT(pMuxId != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; + uint64_t messageData = 0u; /* Reset mux if maximum was reached */ if (*pMuxId >= BS_NR_OF_TEMP_SENSORS) { @@ -194,41 +192,71 @@ extern uint32_t CAN_TxCellTemperature( /* Set mux signal in CAN frame */ uint32_t signalData = *pMuxId / 6u; /* 6 temperatures per module */ CAN_TxSetMessageDataWithSignalData( - &message, - can_cellTemperatureMultiplexer.bitStart, - can_cellTemperatureMultiplexer.bitLength, + &messageData, + cantx_cellTemperatureMultiplexer.bitStart, + cantx_cellTemperatureMultiplexer.bitLength, signalData, - endianness); + message.endianness); /* Set other signals in CAN frame */ /* Each temperature frame contains 6 temperatures, with a correspond invalid flag*/ - CAN_TxTemperatureSetData( - *pMuxId, &message, can_cell0Temperature_degC, can_cell0TemperatureInvalidFlag, endianness, kpkCanShim); + CANTX_TemperatureSetData( + *pMuxId, + &messageData, + cantx_cell0Temperature_degC, + cantx_cell0TemperatureInvalidFlag, + message.endianness, + kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; - CAN_TxTemperatureSetData( - *pMuxId, &message, can_cell1Temperature_degC, can_cell1TemperatureInvalidFlag, endianness, kpkCanShim); + CANTX_TemperatureSetData( + *pMuxId, + &messageData, + cantx_cell1Temperature_degC, + cantx_cell1TemperatureInvalidFlag, + message.endianness, + kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; - CAN_TxTemperatureSetData( - *pMuxId, &message, can_cell2Temperature_degC, can_cell2TemperatureInvalidFlag, endianness, kpkCanShim); + CANTX_TemperatureSetData( + *pMuxId, + &messageData, + cantx_cell2Temperature_degC, + cantx_cell2TemperatureInvalidFlag, + message.endianness, + kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; - CAN_TxTemperatureSetData( - *pMuxId, &message, can_cell3Temperature_degC, can_cell3TemperatureInvalidFlag, endianness, kpkCanShim); + CANTX_TemperatureSetData( + *pMuxId, + &messageData, + cantx_cell3Temperature_degC, + cantx_cell3TemperatureInvalidFlag, + message.endianness, + kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; - CAN_TxTemperatureSetData( - *pMuxId, &message, can_cell4Temperature_degC, can_cell4TemperatureInvalidFlag, endianness, kpkCanShim); + CANTX_TemperatureSetData( + *pMuxId, + &messageData, + cantx_cell4Temperature_degC, + cantx_cell4TemperatureInvalidFlag, + message.endianness, + kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; - CAN_TxTemperatureSetData( - *pMuxId, &message, can_cell5Temperature_degC, can_cell5TemperatureInvalidFlag, endianness, kpkCanShim); + CANTX_TemperatureSetData( + *pMuxId, + &messageData, + cantx_cell5Temperature_degC, + cantx_cell5TemperatureInvalidFlag, + message.endianness, + kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; /* All signal data copied in CAN frame, now copy data in the buffer that will be use to send the frame */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); return 0; } diff --git a/src/app/driver/can/cbs/can_cbs_tx_voltage.c b/src/app/driver/can/cbs/tx/can_cbs_tx_cell-voltages.c similarity index 73% rename from src/app/driver/can/cbs/can_cbs_tx_voltage.c rename to src/app/driver/can/cbs/tx/can_cbs_tx_cell-voltages.c index 5f4a6609..9ebc7f6e 100644 --- a/src/app/driver/can/cbs/can_cbs_tx_voltage.c +++ b/src/app/driver/can/cbs/tx/can_cbs_tx_cell-voltages.c @@ -40,50 +40,51 @@ */ /** - * @file can_cbs_tx_voltage.c + * @file can_cbs_tx_cell-voltages.c * @author foxBMS Team * @date 2021-04-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANTX * * @brief CAN driver Tx callback implementation * @details CAN Tx callback for cell voltages */ /*========== Includes =======================================================*/ -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" /*========== Macros and Definitions =========================================*/ /*========== Static Constant and Variable Definitions =======================*/ /** the number of voltages per message-frame */ -#define NUMBER_OF_MUX_VOLTAGES_PER_MESSAGE (4u) +#define CANTX_NUMBER_OF_MUX_VOLTAGES_PER_MESSAGE (4u) /** * CAN signals used in this message * Parameters: * bit start, bit length, factor, offset, minimum value, maximum value */ -static const CAN_SIGNAL_TYPE_s can_cellVoltageMultiplexer = {7u, 8u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cellVoltage0InvalidFlag = {12u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cellVoltage1InvalidFlag = {13u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cellVoltage2InvalidFlag = {14u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cellVoltage3InvalidFlag = {15u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; -static const CAN_SIGNAL_TYPE_s can_cellVoltage0_mV = {11u, 13u, 1.0f, 0.0f, 0.0f, 8192.0f}; -static const CAN_SIGNAL_TYPE_s can_cellVoltage1_mV = {30u, 13u, 1.0f, 0.0f, 0.0f, 8192.0f}; -static const CAN_SIGNAL_TYPE_s can_cellVoltage2_mV = {33u, 13u, 1.0f, 0.0f, 0.0f, 8192.0f}; -static const CAN_SIGNAL_TYPE_s can_cellVoltage3_mV = {52u, 13u, 1.0f, 0.0f, 0.0f, 8192.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltageMultiplexer = {7u, 8u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltage0InvalidFlag = {12u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltage1InvalidFlag = {13u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltage2InvalidFlag = {14u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltage3InvalidFlag = {15u, 1u, 1.0f, 0.0f, 0.0f, 1.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltage0_mV = {11u, 13u, 1.0f, 0.0f, 0.0f, 8192.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltage1_mV = {30u, 13u, 1.0f, 0.0f, 0.0f, 8192.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltage2_mV = {33u, 13u, 1.0f, 0.0f, 0.0f, 8192.0f}; +static const CAN_SIGNAL_TYPE_s cantx_cellVoltage3_mV = {52u, 13u, 1.0f, 0.0f, 0.0f, 8192.0f}; /*========== Extern Constant and Variable Definitions =======================*/ /*========== Static Function Prototypes =====================================*/ /** - * @brief Helper function for CAN_TxVoltage() + * @brief Helper function for CANTX_CellVoltages() * - * Used in the CAN_TxVoltage() callback to set + * Used in the CANTX_CellVoltages() callback to set * invalid flag data and voltage data * in the CAN frame. * @@ -94,7 +95,7 @@ static const CAN_SIGNAL_TYPE_s can_cellVoltage3_mV = {52u, 13u, 1.0f, 0. * @param[in] endianness big or little endianness of data * @param[in] kpkCanShim shim to the database entries */ -static void CAN_TxVoltageSetData( +static void CANTX_VoltageSetData( uint8_t muxId, uint64_t *pMessage, CAN_SIGNAL_TYPE_s cellVoltageSignal, @@ -104,7 +105,7 @@ static void CAN_TxVoltageSetData( /*========== Static Function Implementations ================================*/ -static void CAN_TxVoltageSetData( +static void CANTX_VoltageSetData( uint8_t muxId, uint64_t *pMessage, CAN_SIGNAL_TYPE_s cellVoltageSignal, @@ -147,19 +148,17 @@ static void CAN_TxVoltageSetData( } /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_TxVoltage( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_CellVoltages( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_CELL_VOLTAGES_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); FAS_ASSERT(pMuxId != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; + uint64_t messageData = 0u; /* Reset mux if maximum was reached */ if (*pMuxId >= (BS_NR_OF_STRINGS * BS_NR_OF_CELL_BLOCKS_PER_STRING)) { @@ -171,30 +170,34 @@ extern uint32_t CAN_TxVoltage( } /* Set mux signal in CAN frame */ - uint32_t signalData = *pMuxId / NUMBER_OF_MUX_VOLTAGES_PER_MESSAGE; + uint32_t signalData = *pMuxId / CANTX_NUMBER_OF_MUX_VOLTAGES_PER_MESSAGE; CAN_TxSetMessageDataWithSignalData( - &message, - can_cellVoltageMultiplexer.bitStart, - can_cellVoltageMultiplexer.bitLength, + &messageData, + cantx_cellVoltageMultiplexer.bitStart, + cantx_cellVoltageMultiplexer.bitLength, (uint32_t)signalData, - endianness); + message.endianness); /* Set other signals in CAN frame */ - CAN_TxVoltageSetData(*pMuxId, &message, can_cellVoltage0_mV, can_cellVoltage0InvalidFlag, endianness, kpkCanShim); + CANTX_VoltageSetData( + *pMuxId, &messageData, cantx_cellVoltage0_mV, cantx_cellVoltage0InvalidFlag, message.endianness, kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; - CAN_TxVoltageSetData(*pMuxId, &message, can_cellVoltage1_mV, can_cellVoltage1InvalidFlag, endianness, kpkCanShim); + CANTX_VoltageSetData( + *pMuxId, &messageData, cantx_cellVoltage1_mV, cantx_cellVoltage1InvalidFlag, message.endianness, kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; - CAN_TxVoltageSetData(*pMuxId, &message, can_cellVoltage2_mV, can_cellVoltage2InvalidFlag, endianness, kpkCanShim); + CANTX_VoltageSetData( + *pMuxId, &messageData, cantx_cellVoltage2_mV, cantx_cellVoltage2InvalidFlag, message.endianness, kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; - CAN_TxVoltageSetData(*pMuxId, &message, can_cellVoltage3_mV, can_cellVoltage3InvalidFlag, endianness, kpkCanShim); + CANTX_VoltageSetData( + *pMuxId, &messageData, cantx_cellVoltage3_mV, cantx_cellVoltage3InvalidFlag, message.endianness, kpkCanShim); /* Increment multiplexer for next cell */ (*pMuxId)++; /* All signal data copied in CAN frame, now copy data in the buffer that will be use to send the frame */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); return 0; } diff --git a/src/app/driver/can/cbs/can_cbs_tx_limits.c b/src/app/driver/can/cbs/tx/can_cbs_tx_limit-values.c similarity index 85% rename from src/app/driver/can/cbs/can_cbs_tx_limits.c rename to src/app/driver/can/cbs/tx/can_cbs_tx_limit-values.c index 8d536ef9..4ee92260 100644 --- a/src/app/driver/can/cbs/can_cbs_tx_limits.c +++ b/src/app/driver/can/cbs/tx/can_cbs_tx_limit-values.c @@ -40,13 +40,13 @@ */ /** - * @file can_cbs_tx_limits.c + * @file can_cbs_tx_limit-values.c * @author foxBMS Team * @date 2021-07-21 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANTX * * @brief CAN driver Tx callback implementation * @details CAN Tx callback for state messages @@ -55,7 +55,8 @@ /*========== Includes =======================================================*/ #include "battery_cell_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" /*========== Macros and Definitions =========================================*/ @@ -69,21 +70,18 @@ /*========== Static Function Implementations ================================*/ /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_TxLimitValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_LimitValues( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { /* pMuxId is not used here, therefore has to be NULL_PTR */ FAS_ASSERT(pMuxId == NULL_PTR); - - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_LIMIT_VALUES_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; + uint64_t messageData = 0u; DATA_READ_DATA(kpkCanShim->pTableSof); @@ -95,7 +93,7 @@ extern uint32_t CAN_TxLimitValues( signalData = (signalData + offset) * factor; uint64_t data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 11u, 12u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 11u, 12u, data, message.endianness); /* maximum discharge current */ signalData = (float)kpkCanShim->pTableSof->recommendedContinuousPackDischargeCurrent_mA; @@ -104,7 +102,7 @@ extern uint32_t CAN_TxLimitValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 7u, 12u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 12u, data, message.endianness); /* TODO: maximum charge power */ /* TODO: maximum discharge power */ @@ -116,7 +114,7 @@ extern uint32_t CAN_TxLimitValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 63u, 8u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 63u, 8u, data, message.endianness); /* maximum pack voltage */ signalData = (float)(BS_NR_OF_CELL_BLOCKS_PER_STRING * BC_VOLTAGE_MAX_MSL_mV); @@ -125,11 +123,11 @@ extern uint32_t CAN_TxLimitValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 55u, 8u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 55u, 8u, data, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* now copy data in the buffer that will be used to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); return 0; } diff --git a/src/app/driver/can/cbs/can_cbs_tx_minmax.c b/src/app/driver/can/cbs/tx/can_cbs_tx_minimum-maximum-values.c similarity index 84% rename from src/app/driver/can/cbs/can_cbs_tx_minmax.c rename to src/app/driver/can/cbs/tx/can_cbs_tx_minimum-maximum-values.c index 59284811..ed657dd2 100644 --- a/src/app/driver/can/cbs/can_cbs_tx_minmax.c +++ b/src/app/driver/can/cbs/tx/can_cbs_tx_minimum-maximum-values.c @@ -40,13 +40,13 @@ */ /** - * @file can_cbs_tx_minmax.c + * @file can_cbs_tx_minimum-maximum-values.c * @author foxBMS Team * @date 2021-04-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANTX * * @brief CAN driver Tx callback implementation * @details CAN Tx callback for min/max values @@ -54,7 +54,8 @@ /*========== Includes =======================================================*/ #include "bms.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" /*========== Macros and Definitions =========================================*/ @@ -68,21 +69,17 @@ /*========== Static Function Implementations ================================*/ /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_TxMinimumMaximumValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_MinimumMaximumValues( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - /* pMuxId is not used here, therefore has to be NULL_PTR */ - FAS_ASSERT(pMuxId == NULL_PTR); - - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_MINIMUM_MAXIMUM_VALUES_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); + FAS_ASSERT(pMuxId == NULL_PTR); /* pMuxId is not used here, therefore has to be NULL_PTR */ FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; + uint64_t messageData = 0u; DATA_READ_DATA(kpkCanShim->pTableMinMax); @@ -135,7 +132,7 @@ extern uint32_t CAN_TxMinimumMaximumValues( signalData = (signalData + offset) * factor; uint64_t data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 10u, 13u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 10u, 13u, data, message.endianness); /* Maximum cell voltage */ signalData = (float)packMaximumVoltage_mV; @@ -144,7 +141,7 @@ extern uint32_t CAN_TxMinimumMaximumValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 7u, 13u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 13u, data, message.endianness); /* Minimum cell temperature */ signalData = (float)packMinimumTemperature_ddegC; @@ -153,7 +150,7 @@ extern uint32_t CAN_TxMinimumMaximumValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 63u, 8u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 63u, 8u, data, message.endianness); /* Maximum cell temperature */ signalData = (float)packMaximumTemperature_ddegC; @@ -162,33 +159,31 @@ extern uint32_t CAN_TxMinimumMaximumValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 55u, 8u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 55u, 8u, data, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* now copy data in the buffer that will be used to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); return 0; } -extern uint32_t CAN_TxStringMinimumMaximumValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringMinimumMaximumValues( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_STRING_MIN_MAX_VALUES_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); FAS_ASSERT(pMuxId != NULL_PTR); FAS_ASSERT(*pMuxId < BS_NR_OF_STRINGS); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0u; + uint64_t messageData = 0u; /** Database entry with minimum and maximum values does not need to be read * within this callback as it is already read by function - * #CAN_TxMinimumMaximumValues */ + * #CANTX_MinimumMaximumValues */ const uint8_t stringNumber = *pMuxId; /* AXIVION Disable Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ @@ -199,7 +194,7 @@ extern uint32_t CAN_TxStringMinimumMaximumValues( signalData = (signalData + offset) * factor; uint64_t data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 18u, 13u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 18u, 13u, data, message.endianness); /* Maximum cell voltage */ signalData = (float)kpkCanShim->pTableMinMax->maximumCellVoltage_mV[stringNumber]; @@ -208,7 +203,7 @@ extern uint32_t CAN_TxStringMinimumMaximumValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 15u, 13u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 15u, 13u, data, message.endianness); /* Minimum cell temperature */ signalData = (float)kpkCanShim->pTableMinMax->minimumTemperature_ddegC[stringNumber]; @@ -217,7 +212,7 @@ extern uint32_t CAN_TxStringMinimumMaximumValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 44u, 9u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 44u, 9u, data, message.endianness); /* Maximum cell temperature */ signalData = (float)kpkCanShim->pTableMinMax->maximumTemperature_ddegC[stringNumber]; @@ -226,11 +221,11 @@ extern uint32_t CAN_TxStringMinimumMaximumValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 37, 9u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 37, 9u, data, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* now copy data in the buffer that will be use to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); /* Increment multiplexer for next cell */ (*pMuxId)++; diff --git a/src/app/driver/can/cbs/can_cbs_tx_state_estimation.c b/src/app/driver/can/cbs/tx/can_cbs_tx_pack-state-estimation.c similarity index 60% rename from src/app/driver/can/cbs/can_cbs_tx_state_estimation.c rename to src/app/driver/can/cbs/tx/can_cbs_tx_pack-state-estimation.c index 4a3b674c..a1fa9e59 100644 --- a/src/app/driver/can/cbs/can_cbs_tx_state_estimation.c +++ b/src/app/driver/can/cbs/tx/can_cbs_tx_pack-state-estimation.c @@ -40,13 +40,13 @@ */ /** - * @file can_cbs_tx_state_estimation.c + * @file can_cbs_tx_pack-state-estimation.c * @author foxBMS Team * @date 2021-07-21 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANTX * * @brief CAN driver Tx callback implementation * @details CAN Tx callback for state estimation messages @@ -54,7 +54,8 @@ /*========== Includes =======================================================*/ #include "bms.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" #include "foxmath.h" @@ -69,21 +70,17 @@ /*========== Static Function Implementations ================================*/ /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_TxStateEstimation( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_PackStateEstimation( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - /* pMuxId is not used here, therefore has to be NULL_PTR */ - FAS_ASSERT(pMuxId == NULL_PTR); - - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_PACK_STATE_ESTIMATION_ID); + FAS_ASSERT(message.dlc <= CAN_MAX_DLC); FAS_ASSERT(pCanData != NULL_PTR); + FAS_ASSERT(pMuxId == NULL_PTR); /* pMuxId is not used here, therefore has to be NULL_PTR */ FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; + uint64_t messageData = 0u; float minimumStringSoc_perc = FLT_MAX; float maximumStringSoc_perc = FLT_MIN; @@ -153,7 +150,7 @@ extern uint32_t CAN_TxStateEstimation( signalData = (signalData + offset) * factor; uint64_t data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 7u, 14u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 14u, data, message.endianness); /* SOE */ signalData = packSoe_perc; @@ -162,7 +159,7 @@ extern uint32_t CAN_TxStateEstimation( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 9u, 14u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 9u, 14u, data, message.endianness); /* Pack energy */ signalData = packEnergyLeft_Wh; @@ -171,7 +168,7 @@ extern uint32_t CAN_TxStateEstimation( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 47u, 24u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 47u, 24u, data, message.endianness); /* SOH */ signalData = 100.0f; /* TODO */ @@ -180,108 +177,10 @@ extern uint32_t CAN_TxStateEstimation( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 27u, 12u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 27u, 12u, data, message.endianness); /* now copy data in the buffer that will be used to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); - - return 0; -} - -extern uint32_t CAN_TxStringStateEstimation( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, - uint8_t *pCanData, - uint8_t *pMuxId, - const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ - FAS_ASSERT(pCanData != NULL_PTR); - FAS_ASSERT(pMuxId != NULL_PTR); - FAS_ASSERT(*pMuxId < BS_NR_OF_STRINGS); - FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; - - /** Database entry with state estimation values does not need to be read - * within this callback as it is already read by function - * #CAN_TxStateEstimation */ - const uint8_t stringNumber = *pMuxId; - - /* set multiplexer in CAN frame */ - /* AXIVION Disable Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ - uint64_t data = (uint64_t)stringNumber; - CAN_TxSetMessageDataWithSignalData(&message, 7u, 4u, data, endianness); - - /* Minimum SOC */ - float signalData = kpkCanShim->pTableSox->minimumSoc_perc[stringNumber]; - float offset = 0.0f; - float factor = 4.0f; /* convert from perc to 0.25perc */ - signalData = (signalData + offset) * factor; - data = (int64_t)signalData; - /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 3u, 9u, data, endianness); - - /* Average SOC */ - signalData = kpkCanShim->pTableSox->averageSoc_perc[stringNumber]; - offset = 0.0f; - factor = 4.0f; /* convert from perc to 0.25perc */ - signalData = (signalData + offset) * factor; - data = (int64_t)signalData; - /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 10u, 9u, data, endianness); - - /* Maximum SOC */ - signalData = kpkCanShim->pTableSox->maximumSoc_perc[stringNumber]; - offset = 0.0f; - factor = 4.0f; /* convert from perc to 0.25perc */ - signalData = (signalData + offset) * factor; - data = (int64_t)signalData; - /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 17u, 9u, data, endianness); - - /* SOE */ - if (BMS_CHARGING == BMS_GetCurrentFlowDirection(kpkCanShim->pTablePackValues->stringCurrent_mA[stringNumber])) { - signalData = kpkCanShim->pTableSox->maximumSoe_perc[stringNumber]; - } else { - signalData = kpkCanShim->pTableSox->minimumSoe_perc[stringNumber]; - } - offset = 0.0f; - factor = 4.0f; /* convert from perc to 0.25perc */ - signalData = (signalData + offset) * factor; - data = (int64_t)signalData; - /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 24u, 9u, data, endianness); - - /* SOH */ - signalData = 100.0f; - offset = 0.0f; - factor = 4.0f; /* convert from perc to 0.25perc */ - signalData = (signalData + offset) * factor; - data = (int64_t)signalData; - /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 47u, 9u, data, endianness); - - /* String energy */ - signalData = kpkCanShim->pTableSox->minimumSoe_Wh[stringNumber]; - offset = 0.0f; - factor = 0.1f; /* convert from Wh to 10Wh */ - signalData = (signalData + offset) * factor; - data = (int64_t)signalData; - /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 54u, 15u, data, endianness); - /* AXIVION Enable Style Generic-NoMagicNumbers: */ - - /* now copy data in the buffer that will be used to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); - - /* Increment multiplexer for next cell */ - (*pMuxId)++; - - /* Check mux value */ - if (*pMuxId >= BS_NR_OF_STRINGS) { - *pMuxId = 0u; - } + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); return 0; } diff --git a/src/app/driver/can/cbs/can_cbs_tx_state.c b/src/app/driver/can/cbs/tx/can_cbs_tx_state.c similarity index 67% rename from src/app/driver/can/cbs/can_cbs_tx_state.c rename to src/app/driver/can/cbs/tx/can_cbs_tx_state.c index 2357e9f5..34ed11f9 100644 --- a/src/app/driver/can/cbs/can_cbs_tx_state.c +++ b/src/app/driver/can/cbs/tx/can_cbs_tx_state.c @@ -43,10 +43,10 @@ * @file can_cbs_tx_state.c * @author foxBMS Team * @date 2021-07-21 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANTX * * @brief CAN driver Tx callback implementation * @details CAN Tx callback for state messages @@ -54,7 +54,8 @@ /*========== Includes =======================================================*/ #include "bms.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" #include "diag.h" #include "sys_mon.h" @@ -67,10 +68,10 @@ /*========== Static Function Prototypes =====================================*/ /** get a boolean for if any timing error (current or recorded) occurred */ -static bool CAN_AnySysMonTimingIssueDetected(const CAN_SHIM_s *const kpkCanShim); +static bool CANTX_AnySysMonTimingIssueDetected(const CAN_SHIM_s *const kpkCanShim); /*========== Static Function Implementations ================================*/ -static bool CAN_AnySysMonTimingIssueDetected(const CAN_SHIM_s *const kpkCanShim) { +static bool CANTX_AnySysMonTimingIssueDetected(const CAN_SHIM_s *const kpkCanShim) { FAS_ASSERT(kpkCanShim != NULL_PTR); SYSM_TIMING_VIOLATION_RESPONSE_s recordedTimingViolations = {0}; SYSM_GetRecordedTimingViolations(&recordedTimingViolations); @@ -84,21 +85,17 @@ static bool CAN_AnySysMonTimingIssueDetected(const CAN_SHIM_s *const kpkCanShim) } /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_TxState( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_BmsState( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - /* pMuxId is not used here, therefore has to be NULL_PTR */ - FAS_ASSERT(pMuxId == NULL_PTR); - - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_BMS_STATE_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); + FAS_ASSERT(pMuxId == NULL_PTR); /* pMuxId is not used here, therefore has to be NULL_PTR */ FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; + uint64_t messageData = 0u; DATA_READ_DATA(kpkCanShim->pTableErrorState, kpkCanShim->pTableInsulation, kpkCanShim->pTableMsl); @@ -106,42 +103,42 @@ extern uint32_t CAN_TxState( /* State */ uint64_t data = (uint64_t)BMS_GetState(); /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 3u, 4u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 3u, 4u, data, message.endianness); /* Connected strings */ data = (uint64_t)BMS_GetNumberOfConnectedStrings(); /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 7u, 4u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 4u, data, message.endianness); /* General error - implement now */ data = CAN_ConvertBooleanToInteger(DIAG_IsAnyFatalErrorSet()); - CAN_TxSetMessageDataWithSignalData(&message, 11u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 11u, 1u, data, message.endianness); /* General warning: TODO */ /* Emergency shutoff */ data = CAN_ConvertBooleanToInteger(BMS_IsTransitionToErrorStateActive()); - CAN_TxSetMessageDataWithSignalData(&message, 10u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 10u, 1u, data, message.endianness); /* Number of deactivated strings: TODO */ /* sys mon error */ - data = CAN_ConvertBooleanToInteger(CAN_AnySysMonTimingIssueDetected(kpkCanShim)); - CAN_TxSetMessageDataWithSignalData(&message, 12u, 1u, data, endianness); + data = CAN_ConvertBooleanToInteger(CANTX_AnySysMonTimingIssueDetected(kpkCanShim)); + CAN_TxSetMessageDataWithSignalData(&messageData, 12u, 1u, data, message.endianness); /* Insulation monitoring active */ data = CAN_ConvertBooleanToInteger(kpkCanShim->pTableInsulation->isImdRunning); - CAN_TxSetMessageDataWithSignalData(&message, 13u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 13u, 1u, data, message.endianness); /* Error: insulation */ data = CAN_ConvertBooleanToInteger(kpkCanShim->pTableErrorState->criticalLowInsulationResistance); - CAN_TxSetMessageDataWithSignalData(&message, 23u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 23u, 1u, data, message.endianness); /* Insulation resistance */ float signalData = (float)kpkCanShim->pTableInsulation->insulationResistance_kOhm; signalData = signalData * 0.1f; /* convert kOhm to 10kOhm */ data = (uint64_t)signalData; - CAN_TxSetMessageDataWithSignalData(&message, 63u, 8u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 63u, 8u, data, message.endianness); /* Charging complete: TODO */ @@ -153,51 +150,47 @@ extern uint32_t CAN_TxState( /* Error: MCU die temperature */ data = kpkCanShim->pTableErrorState->mcuDieTemperature; - CAN_TxSetMessageDataWithSignalData(&message, 18u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 18u, 1u, data, message.endianness); /* Error: master overtemperature: TODO */ /* Error: master undertemperature: TODO */ /* Error: interlock */ data = kpkCanShim->pTableErrorState->interlock; - CAN_TxSetMessageDataWithSignalData(&message, 22u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 22u, 1u, data, message.endianness); /* Main fuse state: TODO */ /* Error: Can timing */ data = kpkCanShim->pTableErrorState->canTiming; - CAN_TxSetMessageDataWithSignalData(&message, 24u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 24u, 1u, data, message.endianness); /* Error: Overcurrent pack charge */ data = kpkCanShim->pTableMsl->packChargeOvercurrent; - CAN_TxSetMessageDataWithSignalData(&message, 25u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 25u, 1u, data, message.endianness); /* Error: Overcurrent pack discharge */ data = kpkCanShim->pTableMsl->packDischargeOvercurrent; - CAN_TxSetMessageDataWithSignalData(&message, 26u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 26u, 1u, data, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* now copy data in the buffer that will be use to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); return 0; } -extern uint32_t CAN_TxDetailState( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_BmsStateDetails( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - /* pMuxId is not used here, therefore has to be NULL_PTR */ - FAS_ASSERT(pMuxId == NULL_PTR); - - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_BMS_STATE_DETAILS_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); + FAS_ASSERT(pMuxId == NULL_PTR); /* pMuxId is not used here, therefore has to be NULL_PTR */ FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; + uint64_t messageData = 0u; DATA_READ_DATA(kpkCanShim->pTableErrorState); SYSM_TIMING_VIOLATION_RESPONSE_s recordedTimingViolations = {0}; @@ -206,58 +199,56 @@ extern uint32_t CAN_TxDetailState( /* AXIVION Disable Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ /* current violation engine */ uint64_t data = CAN_ConvertBooleanToInteger(kpkCanShim->pTableErrorState->timingViolationEngine); - CAN_TxSetMessageDataWithSignalData(&message, 0u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 0u, 1u, data, message.endianness); /* current violation 1ms */ data = CAN_ConvertBooleanToInteger(kpkCanShim->pTableErrorState->timingViolation1ms); - CAN_TxSetMessageDataWithSignalData(&message, 1u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 1u, 1u, data, message.endianness); /* current violation 10ms */ data = CAN_ConvertBooleanToInteger(kpkCanShim->pTableErrorState->timingViolation10ms); - CAN_TxSetMessageDataWithSignalData(&message, 2u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 2u, 1u, data, message.endianness); /* current violation 100ms */ data = CAN_ConvertBooleanToInteger(kpkCanShim->pTableErrorState->timingViolation100ms); - CAN_TxSetMessageDataWithSignalData(&message, 3u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 3u, 1u, data, message.endianness); /* current violation 100ms algorithm */ data = CAN_ConvertBooleanToInteger(kpkCanShim->pTableErrorState->timingViolation100msAlgo); - CAN_TxSetMessageDataWithSignalData(&message, 4u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 4u, 1u, data, message.endianness); /* recorded violation engine */ data = CAN_ConvertBooleanToInteger(recordedTimingViolations.recordedViolationEngine); - CAN_TxSetMessageDataWithSignalData(&message, 8u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 8u, 1u, data, message.endianness); /* recorded violation 1ms */ data = CAN_ConvertBooleanToInteger(recordedTimingViolations.recordedViolation1ms); - CAN_TxSetMessageDataWithSignalData(&message, 9u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 9u, 1u, data, message.endianness); /* recorded violation 10ms */ data = CAN_ConvertBooleanToInteger(recordedTimingViolations.recordedViolation10ms); - CAN_TxSetMessageDataWithSignalData(&message, 10u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 10u, 1u, data, message.endianness); /* recorded violation 100ms */ data = CAN_ConvertBooleanToInteger(recordedTimingViolations.recordedViolation100ms); - CAN_TxSetMessageDataWithSignalData(&message, 11u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 11u, 1u, data, message.endianness); /* recorded violation 100ms algorithm */ data = CAN_ConvertBooleanToInteger(recordedTimingViolations.recordedViolation100msAlgo); - CAN_TxSetMessageDataWithSignalData(&message, 12u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 12u, 1u, data, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* now copy data in the buffer that will be use to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); return 0; } -extern uint32_t CAN_TxStringState( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringState( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_STRING_STATE_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); FAS_ASSERT(pMuxId != NULL_PTR); FAS_ASSERT(*pMuxId < BS_NR_OF_STRINGS); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; - uint64_t data = 0; + uint64_t messageData = 0u; + uint64_t data = 0; const uint8_t stringNumber = *pMuxId; @@ -272,11 +263,11 @@ extern uint32_t CAN_TxStringState( /* mux value */ data = (uint64_t)stringNumber; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 3u, 4u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 3u, 4u, data, message.endianness); /* String connected */ data = CAN_ConvertBooleanToInteger(BMS_IsStringClosed(stringNumber)); - CAN_TxSetMessageDataWithSignalData(&message, 4u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 4u, 1u, data, message.endianness); /* Balancing active: TODO */ @@ -287,27 +278,27 @@ extern uint32_t CAN_TxStringState( } else { data = 0u; } - CAN_TxSetMessageDataWithSignalData(&message, 6u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 6u, 1u, data, message.endianness); /* Error: Deep-discharge */ data = kpkCanShim->pTableErrorState->deepDischargeDetected[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 7u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 1u, data, message.endianness); /* Error: Overtemperature charge */ data = kpkCanShim->pTableMsl->overtemperatureCharge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 8u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 8u, 1u, data, message.endianness); /* Error: Undertemperature charge */ data = kpkCanShim->pTableMsl->undertemperatureCharge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 9u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 9u, 1u, data, message.endianness); /* Error: Overtemperature discharge */ data = kpkCanShim->pTableMsl->overtemperatureDischarge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 10u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 10u, 1u, data, message.endianness); /* Error: Undertemperature discharge */ data = kpkCanShim->pTableMsl->undertemperatureDischarge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 11u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 11u, 1u, data, message.endianness); /* Error: Overcurrent charge */ if ((kpkCanShim->pTableMsl->cellChargeOvercurrent[stringNumber] == 1u) || @@ -316,7 +307,7 @@ extern uint32_t CAN_TxStringState( } else { data = 0u; } - CAN_TxSetMessageDataWithSignalData(&message, 12u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 12u, 1u, data, message.endianness); /* Error: Overcurrent discharge */ if ((kpkCanShim->pTableMsl->cellDischargeOvercurrent[stringNumber] == 1u) || @@ -325,31 +316,31 @@ extern uint32_t CAN_TxStringState( } else { data = 0u; } - CAN_TxSetMessageDataWithSignalData(&message, 13u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 13u, 1u, data, message.endianness); /* Error: Overvoltage */ data = kpkCanShim->pTableMsl->overVoltage[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 14u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 14u, 1u, data, message.endianness); /* Error: Undervoltage */ data = kpkCanShim->pTableMsl->underVoltage[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 15u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 15u, 1u, data, message.endianness); /* Info: Overtemperature charge - MOL */ data = kpkCanShim->pTableMol->overtemperatureCharge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 16u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 16u, 1u, data, message.endianness); /* Info: Undertemperature charge - MOL */ data = kpkCanShim->pTableMol->undertemperatureCharge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 17u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 17u, 1u, data, message.endianness); /* Info: Overtemperature discharge - MOL */ data = kpkCanShim->pTableMol->overtemperatureDischarge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 18u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 18u, 1u, data, message.endianness); /* Info: Undertemperature discharge - MOL */ data = kpkCanShim->pTableMol->undertemperatureCharge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 19u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 19u, 1u, data, message.endianness); /* Info: Overcurrent charge - MOL */ if ((kpkCanShim->pTableMol->cellChargeOvercurrent[stringNumber] == 1u) || @@ -358,7 +349,7 @@ extern uint32_t CAN_TxStringState( } else { data = 0u; } - CAN_TxSetMessageDataWithSignalData(&message, 20u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 20u, 1u, data, message.endianness); /* Info: Overcurrent discharge - MOL */ if ((kpkCanShim->pTableMol->cellDischargeOvercurrent[stringNumber] == 1u) || @@ -367,31 +358,31 @@ extern uint32_t CAN_TxStringState( } else { data = 0u; } - CAN_TxSetMessageDataWithSignalData(&message, 21u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 21u, 1u, data, message.endianness); /* Info: Overvoltage - MOL */ data = kpkCanShim->pTableMol->overVoltage[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 22u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 22u, 1u, data, message.endianness); /* Info: Undervoltage - MOL */ data = kpkCanShim->pTableMol->underVoltage[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 23u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 23u, 1u, data, message.endianness); /* Warning: Overtemperature charge - RSL */ data = kpkCanShim->pTableRsl->overtemperatureCharge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 24u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 24u, 1u, data, message.endianness); /* Warning: Undertemperature charge - RSL */ data = kpkCanShim->pTableRsl->undertemperatureCharge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 25u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 25u, 1u, data, message.endianness); /* Warning: Overtemperature discharge - RSL */ data = kpkCanShim->pTableRsl->overtemperatureDischarge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 26u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 26u, 1u, data, message.endianness); /* Warning: Undertemperature discharge - RSL */ data = kpkCanShim->pTableRsl->undertemperatureDischarge[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 27u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 27u, 1u, data, message.endianness); /* Warning: Overcurrent charge - RSL */ if ((kpkCanShim->pTableRsl->cellChargeOvercurrent[stringNumber] == 1u) || @@ -400,7 +391,7 @@ extern uint32_t CAN_TxStringState( } else { data = 0u; } - CAN_TxSetMessageDataWithSignalData(&message, 28u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 28u, 1u, data, message.endianness); /* Warning: Overcurrent discharge - RSL */ if ((kpkCanShim->pTableMol->cellDischargeOvercurrent[stringNumber] == 1u) || @@ -409,15 +400,15 @@ extern uint32_t CAN_TxStringState( } else { data = 0u; } - CAN_TxSetMessageDataWithSignalData(&message, 29u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 29u, 1u, data, message.endianness); /* Warning: Overvoltage - RSL */ data = kpkCanShim->pTableRsl->overVoltage[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 30u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 30u, 1u, data, message.endianness); /* Warning: Undervoltage - RSL */ data = kpkCanShim->pTableRsl->underVoltage[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 31u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 31u, 1u, data, message.endianness); /* Error: Positive string contactor: TODO */ /* Error: Negative string contactor: TODO */ @@ -425,22 +416,22 @@ extern uint32_t CAN_TxStringState( /* Error: Daisy-chain base: communication */ data = kpkCanShim->pTableErrorState->spiError[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 35u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 35u, 1u, data, message.endianness); /* Error: Daisy-chain redundancy: communication: TODO */ /* Error: Daisy-chain base: CRC */ data = kpkCanShim->pTableErrorState->crcError[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 37u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 37u, 1u, data, message.endianness); /* Error: Daisy-chain redundancy: CRC: TODO */ /* Error: Daisy-chain base: Voltage out of operating range */ data = kpkCanShim->pTableErrorState->afeCellVoltageError[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 39u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 39u, 1u, data, message.endianness); /* Error: Daisy-chain redundancy: Voltage out of operating range: TODO */ /* Error: Daisy-chain base: Temperature out of operating range */ data = kpkCanShim->pTableErrorState->afeCellTemperatureError[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 41u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 41u, 1u, data, message.endianness); /* Error: Daisy-chain redundancy: Voltage out of operating range: TODO */ @@ -451,54 +442,54 @@ extern uint32_t CAN_TxStringState( } else { data = 0u; } - CAN_TxSetMessageDataWithSignalData(&message, 43u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 43u, 1u, data, message.endianness); /* Error: Coulomb counting measurement */ data = kpkCanShim->pTableErrorState->canTimingCc[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 44u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 44u, 1u, data, message.endianness); /* Error: Energy counting measurement */ data = kpkCanShim->pTableErrorState->canTimingEc[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 45u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 45u, 1u, data, message.endianness); /* Error: Current sensor V1 measurement */ data = kpkCanShim->pTableErrorState->currentSensorTimeoutV1[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 46u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 46u, 1u, data, message.endianness); /* Error: Current sensor V2 measurement: TODO */ /* Error: Current sensor V3 measurement */ data = kpkCanShim->pTableErrorState->currentSensorTimeoutV3[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 48u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 48u, 1u, data, message.endianness); /* Error: Open wire */ data = kpkCanShim->pTableErrorState->open_wire[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 49u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 49u, 1u, data, message.endianness); /* Error: Plausibility: Cell temperature */ data = kpkCanShim->pTableErrorState->plausibilityCheckCelltemperature[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 51u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 51u, 1u, data, message.endianness); /* Error: Plausibility: Cell voltage */ data = kpkCanShim->pTableErrorState->plausibilityCheckCellVoltage[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 52u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 52u, 1u, data, message.endianness); /* Error: Plausibility: String voltage */ data = kpkCanShim->pTableErrorState->plausibilityCheckPackvoltage[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 53u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 53u, 1u, data, message.endianness); /* Error: Plausibility: Cell temperature spread */ data = kpkCanShim->pTableErrorState->plausibilityCheckCelltemperatureSpread[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 54u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 54u, 1u, data, message.endianness); /* Error: Plausibility: Cell voltage spread */ data = kpkCanShim->pTableErrorState->plausibilityCheckCellVoltageSpread[stringNumber]; - CAN_TxSetMessageDataWithSignalData(&message, 55u, 1u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 55u, 1u, data, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* Open wire number: TODO */ /* now copy data in the buffer that will be used to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); /* Increment multiplexer for next cell */ (*pMuxId)++; diff --git a/src/app/driver/can/cbs/tx/can_cbs_tx_string-state-estimation.c b/src/app/driver/can/cbs/tx/can_cbs_tx_string-state-estimation.c new file mode 100644 index 00000000..832d932a --- /dev/null +++ b/src/app/driver/can/cbs/tx/can_cbs_tx_string-state-estimation.c @@ -0,0 +1,173 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_cbs_tx_string-state-estimation.c + * @author foxBMS Team + * @date 2021-07-21 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup DRIVER + * @prefix CANTX + * + * @brief CAN driver Tx callback implementation + * @details CAN Tx callback for state estimation messages + */ + +/*========== Includes =======================================================*/ +#include "bms.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" +#include "can_helper.h" +#include "foxmath.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Static Constant and Variable Definitions =======================*/ + +/*========== Extern Constant and Variable Definitions =======================*/ + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ + +extern uint32_t CANTX_StringStateEstimation( + CAN_MESSAGE_PROPERTIES_s message, + uint8_t *pCanData, + uint8_t *pMuxId, + const CAN_SHIM_s *const kpkCanShim) { + FAS_ASSERT(message.id == CANTX_STRING_STATE_ESTIMATION_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); + FAS_ASSERT(pCanData != NULL_PTR); + FAS_ASSERT(pMuxId != NULL_PTR); + FAS_ASSERT(*pMuxId < BS_NR_OF_STRINGS); + FAS_ASSERT(kpkCanShim != NULL_PTR); + uint64_t messageData = 0u; + + /** Database entry with state estimation values does not need to be read + * within this callback as it is already read by function + * #CANTX_PackStateEstimation */ + const uint8_t stringNumber = *pMuxId; + + /* set multiplexer in CAN frame */ + /* AXIVION Disable Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ + uint64_t data = (uint64_t)stringNumber; + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 4u, data, message.endianness); + + /* Minimum SOC */ + float signalData = kpkCanShim->pTableSox->minimumSoc_perc[stringNumber]; + float offset = 0.0f; + float factor = 4.0f; /* convert from perc to 0.25perc */ + signalData = (signalData + offset) * factor; + data = (int64_t)signalData; + /* set data in CAN frame */ + CAN_TxSetMessageDataWithSignalData(&messageData, 3u, 9u, data, message.endianness); + + /* Average SOC */ + signalData = kpkCanShim->pTableSox->averageSoc_perc[stringNumber]; + offset = 0.0f; + factor = 4.0f; /* convert from perc to 0.25perc */ + signalData = (signalData + offset) * factor; + data = (int64_t)signalData; + /* set data in CAN frame */ + CAN_TxSetMessageDataWithSignalData(&messageData, 10u, 9u, data, message.endianness); + + /* Maximum SOC */ + signalData = kpkCanShim->pTableSox->maximumSoc_perc[stringNumber]; + offset = 0.0f; + factor = 4.0f; /* convert from perc to 0.25perc */ + signalData = (signalData + offset) * factor; + data = (int64_t)signalData; + /* set data in CAN frame */ + CAN_TxSetMessageDataWithSignalData(&messageData, 17u, 9u, data, message.endianness); + + /* SOE */ + if (BMS_CHARGING == BMS_GetCurrentFlowDirection(kpkCanShim->pTablePackValues->stringCurrent_mA[stringNumber])) { + signalData = kpkCanShim->pTableSox->maximumSoe_perc[stringNumber]; + } else { + signalData = kpkCanShim->pTableSox->minimumSoe_perc[stringNumber]; + } + offset = 0.0f; + factor = 4.0f; /* convert from perc to 0.25perc */ + signalData = (signalData + offset) * factor; + data = (int64_t)signalData; + /* set data in CAN frame */ + CAN_TxSetMessageDataWithSignalData(&messageData, 24u, 9u, data, message.endianness); + + /* SOH */ + signalData = 100.0f; + offset = 0.0f; + factor = 4.0f; /* convert from perc to 0.25perc */ + signalData = (signalData + offset) * factor; + data = (int64_t)signalData; + /* set data in CAN frame */ + CAN_TxSetMessageDataWithSignalData(&messageData, 47u, 9u, data, message.endianness); + + /* String energy */ + signalData = kpkCanShim->pTableSox->minimumSoe_Wh[stringNumber]; + offset = 0.0f; + factor = 0.1f; /* convert from Wh to 10Wh */ + signalData = (signalData + offset) * factor; + data = (int64_t)signalData; + /* set data in CAN frame */ + CAN_TxSetMessageDataWithSignalData(&messageData, 54u, 15u, data, message.endianness); + /* AXIVION Enable Style Generic-NoMagicNumbers: */ + + /* now copy data in the buffer that will be used to send data */ + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); + + /* Increment multiplexer for next cell */ + (*pMuxId)++; + + /* Check mux value */ + if (*pMuxId >= BS_NR_OF_STRINGS) { + *pMuxId = 0u; + } + + return 0; +} + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ +#ifdef UNITY_UNIT_TEST + +#endif diff --git a/src/app/driver/can/cbs/can_cbs_tx_system_values.c b/src/app/driver/can/cbs/tx/can_cbs_tx_system-values.c similarity index 77% rename from src/app/driver/can/cbs/can_cbs_tx_system_values.c rename to src/app/driver/can/cbs/tx/can_cbs_tx_system-values.c index c362fe90..21193138 100644 --- a/src/app/driver/can/cbs/can_cbs_tx_system_values.c +++ b/src/app/driver/can/cbs/tx/can_cbs_tx_system-values.c @@ -40,20 +40,21 @@ */ /** - * @file can_cbs_tx_system_values.c + * @file can_cbs_tx_system-values.c * @author foxBMS Team * @date 2021-07-21 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER - * @prefix CAN + * @prefix CANTX * * @brief CAN driver Tx callback implementation * @details CAN Tx callback for pack value and string value messages */ /*========== Includes =======================================================*/ -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" /*========== Macros and Definitions =========================================*/ @@ -67,21 +68,19 @@ /*========== Static Function Implementations ================================*/ /*========== Extern Function Implementations ================================*/ -extern uint32_t CAN_TxPackValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_PackValues( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { /* pMuxId is not used here, therefore has to be NULL_PTR */ FAS_ASSERT(pMuxId == NULL_PTR); - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_PACK_VALUES_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; + uint64_t messageData = 0u; /* Read database entry */ DATA_READ_DATA(kpkCanShim->pTablePackValues); @@ -94,7 +93,7 @@ extern uint32_t CAN_TxPackValues( signalData = (signalData + offset) * factor; uint64_t data = (uint64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 7u, 14u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 14u, data, message.endianness); /* System voltage */ signalData = kpkCanShim->pTablePackValues->highVoltageBusVoltage_mV; @@ -103,7 +102,7 @@ extern uint32_t CAN_TxPackValues( signalData = (signalData + offset) * factor; data = (uint64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 9u, 14u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 9u, 14u, data, message.endianness); /* System current */ signalData = kpkCanShim->pTablePackValues->packCurrent_mA; @@ -112,7 +111,7 @@ extern uint32_t CAN_TxPackValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 41u, 18u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 41u, 18u, data, message.endianness); /* System power */ signalData = kpkCanShim->pTablePackValues->packPower_W; @@ -121,40 +120,38 @@ extern uint32_t CAN_TxPackValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 27u, 18u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 27u, 18u, data, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* now copy data in the buffer that will be used to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); return 0; } -extern uint32_t CAN_TxStringValues( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringValuesP0( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_STRING_VALUES_P0_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); FAS_ASSERT(pMuxId != NULL_PTR); FAS_ASSERT(*pMuxId < BS_NR_OF_STRINGS); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0; - uint64_t data = 0; - float signalData = 0.0f; - float offset = 0.0f; - float factor = 0.0f; + uint64_t messageData = 0u; + uint64_t data = 0; + float signalData = 0.0f; + float offset = 0.0f; + float factor = 0.0f; const uint8_t stringNumber = *pMuxId; /* First signal to transmit cell voltages: get database values */ if (stringNumber == 0u) { /* Do not read pTableMsl and pTableErrorState as they already are read - * with a higher frequency from CAN_TxState callback */ + * with a higher frequency from CANTX_BmsState callback */ DATA_READ_DATA(kpkCanShim->pTablePackValues); } @@ -162,7 +159,7 @@ extern uint32_t CAN_TxStringValues( data = (uint64_t)stringNumber; /* set data in CAN frame */ /* AXIVION Disable Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ - CAN_TxSetMessageDataWithSignalData(&message, 7u, 3u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 3u, data, message.endianness); /* String voltage */ signalData = (float)kpkCanShim->pTablePackValues->stringVoltage_mV[stringNumber]; @@ -171,7 +168,7 @@ extern uint32_t CAN_TxStringValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 4u, 17u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 4u, 17u, data, message.endianness); /* String current */ signalData = (float)kpkCanShim->pTablePackValues->stringCurrent_mA[stringNumber]; @@ -180,7 +177,7 @@ extern uint32_t CAN_TxStringValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 19u, 18u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 19u, 18u, data, message.endianness); /* String power */ signalData = (float)kpkCanShim->pTablePackValues->stringPower_W[stringNumber]; @@ -189,11 +186,11 @@ extern uint32_t CAN_TxStringValues( signalData = (signalData + offset) * factor; data = (int64_t)signalData; /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 33u, 18u, data, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 33u, 18u, data, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* now copy data in the buffer that will be used to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); /* Increment multiplexer for next cell */ (*pMuxId)++; @@ -206,28 +203,26 @@ extern uint32_t CAN_TxStringValues( return 0; } -extern uint32_t CAN_TxStringValues2( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +extern uint32_t CANTX_StringValuesP1( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim) { - FAS_ASSERT(id < CAN_MAX_11BIT_ID); /* Currently standard ID, 11 bit */ - FAS_ASSERT(dlc <= CAN_MAX_DLC); /* Currently max 8 bytes in a CAN frame */ + FAS_ASSERT(message.id == CANTX_STRING_VALUES_P1_ID); + FAS_ASSERT(message.dlc == CAN_FOXBMS_MESSAGES_DEFAULT_DLC); FAS_ASSERT(pCanData != NULL_PTR); FAS_ASSERT(pMuxId != NULL_PTR); FAS_ASSERT(*pMuxId < BS_NR_OF_STRINGS); FAS_ASSERT(kpkCanShim != NULL_PTR); - uint64_t message = 0u; - uint64_t signalData = 0u; + uint64_t messageData = 0u; + uint64_t signalData = 0u; const uint8_t stringNumber = *pMuxId; /* First signal to transmit cell voltages: get database values */ if (stringNumber == 0u) { /* Do not read pTableMsl and pTableErrorState as they already are read - * with a higher frequency from CAN_TxState callback */ + * with a higher frequency from CANTX_BmsState callback */ DATA_READ_DATA(kpkCanShim->pTableCurrentSensor); } @@ -235,18 +230,18 @@ extern uint32_t CAN_TxStringValues2( signalData = (uint64_t)stringNumber; /* set data in CAN frame */ /* AXIVION Disable Style Generic-NoMagicNumbers: Signal data defined in .dbc file. */ - CAN_TxSetMessageDataWithSignalData(&message, 7u, 4u, signalData, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 7u, 4u, signalData, message.endianness); /* String voltage */ OS_EnterTaskCritical(); /* this access has to be protected as it conflicts with the 1ms task */ signalData = (int64_t)kpkCanShim->pTableCurrentSensor->energyCounter_Wh[stringNumber]; OS_ExitTaskCritical(); /* set data in CAN frame */ - CAN_TxSetMessageDataWithSignalData(&message, 15u, 32u, signalData, endianness); + CAN_TxSetMessageDataWithSignalData(&messageData, 15u, 32u, signalData, message.endianness); /* AXIVION Enable Style Generic-NoMagicNumbers: */ /* now copy data in the buffer that will be used to send data */ - CAN_TxSetCanDataWithMessageData(message, pCanData, endianness); + CAN_TxSetCanDataWithMessageData(messageData, pCanData, message.endianness); /* Increment multiplexer for next cell */ (*pMuxId)++; diff --git a/src/app/driver/checksum/checksum.c b/src/app/driver/checksum/checksum.c index 0567d78f..bab1a11f 100644 --- a/src/app/driver/checksum/checksum.c +++ b/src/app/driver/checksum/checksum.c @@ -43,8 +43,8 @@ * @file checksum.c * @author foxBMS Team * @date 2019-12-03 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TODO * @prefix CHK * diff --git a/src/app/driver/checksum/checksum.h b/src/app/driver/checksum/checksum.h index 72165340..b0d2d61b 100644 --- a/src/app/driver/checksum/checksum.h +++ b/src/app/driver/checksum/checksum.h @@ -43,8 +43,8 @@ * @file checksum.h * @author foxBMS Team * @date 2019-12-03 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TODO * @prefix CHK * diff --git a/src/app/driver/config/can_cfg.c b/src/app/driver/config/can_cfg.c index da645411..e3a00d5f 100644 --- a/src/app/driver/config/can_cfg.c +++ b/src/app/driver/config/can_cfg.c @@ -43,8 +43,8 @@ * @file can_cfg.c * @author foxBMS Team * @date 2019-12-04 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix CAN * @@ -59,7 +59,6 @@ /*========== Includes =======================================================*/ #include "can_cfg.h" -#include "can_cbs.h" #include "database.h" #include "ftask.h" @@ -69,283 +68,8 @@ /*========== Static Constant and Variable Definitions =======================*/ -/** Multiplexer values @{*/ -static uint8_t can_voltageMux = 0u; -static uint8_t can_temperatureMux = 0u; -static uint8_t can_stringStateMux = 0u; -static uint8_t can_stringValuesMux = 0u; -static uint8_t can_stringMinMaxMux = 0u; -static uint8_t can_stringStateEstimationMux = 0u; -static uint8_t can_stringValues2Mux = 0u; -/**@}*/ - /*========== Extern Constant and Variable Definitions =======================*/ -/* *************************************** - * Configure TX messages here - ****************************************/ - -/** registry of CAN TX messages */ -const CAN_MSG_TX_TYPE_s can_txMessages[] = { - {CAN1_NODE, - CAN_ID_TX_STATE, - CAN_DLC, - CAN_TX_STATE_PERIOD_MS, - CAN_TX_STATE_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxState, - NULL_PTR}, /*!< State */ - {CAN1_NODE, - CAN_ID_TX_DETAIL_STATE, - CAN_DLC, - CAN_TX_DETAIL_STATE_PERIOD_MS, - CAN_TX_DETAIL_STATE_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxDetailState, - NULL_PTR}, /*!< Detail State */ - {CAN1_NODE, - CAN_ID_TX_VOLTAGES, - CAN_DLC, - CAN_TX_VOLTAGES_PERIOD_MS, - CAN_TX_VOLTAGES_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxVoltage, - &can_voltageMux}, /*!< Cell voltages */ - {CAN1_NODE, - CAN_ID_TX_TEMPERATURES, - CAN_DLC, - CAN_TX_TEMPERATURES_PERIOD_MS, - CAN_TX_TEMPERATURES_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxCellTemperature, - &can_temperatureMux}, /*!< Cell temperatures */ - {CAN1_NODE, - CAN_ID_TX_LIMIT_VALUES, - CAN_DLC, - CAN_TX_LIMIT_VALUES_PERIOD_MS, - CAN_TX_LIMIT_VALUES_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxLimitValues, - NULL_PTR}, /*!< Limits */ - {CAN1_NODE, - CAN_ID_TX_MINIMUM_MAXIMUM_VALUES, - CAN_DLC, - CAN_TX_MINIMUM_MAXIMUM_VALUES_PERIOD_MS, - CAN_TX_MINIMUM_MAXIMUM_VALUES_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxMinimumMaximumValues, - NULL_PTR}, /*!< Pack minimum and maximum values */ - {CAN1_NODE, - CAN_ID_TX_PACK_STATE_ESTIMATION, - CAN_DLC, - CAN_TX_PACK_STATE_ESTIMATION_PERIOD_MS, - CAN_TX_PACK_STATE_ESTIMATION_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxStateEstimation, - NULL_PTR}, /*!< Pack state estimation */ - {CAN1_NODE, - CAN_ID_TX_PACK_VALUES, - CAN_DLC, - CAN_TX_PACK_VALUES_PERIOD_MS, - CAN_TX_PACK_VALUES_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxPackValues, - NULL_PTR}, /*!< Pack values */ - {CAN1_NODE, - CAN_ID_TX_STRING_STATE, - CAN_DLC, - CAN_TX_STRING_STATE_PERIOD_MS, - CAN_TX_STRING_STATE_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxStringState, - &can_stringStateMux}, /*!< String state values */ - {CAN1_NODE, - CAN_ID_TX_STRING_VALUES, - CAN_DLC, - CAN_TX_STRING_VALUES_PERIOD_MS, - CAN_TX_STRING_VALUES_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxStringValues, - &can_stringValuesMux}, /*!< String values */ - {CAN1_NODE, - CAN_ID_TX_STRING_MINIMUM_MAXIMUM, - CAN_DLC, - CAN_TX_STRING_MINIMUM_MAXIMUM_PERIOD_MS, - CAN_TX_STRING_MINIMUM_MAXIMUM_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxStringMinimumMaximumValues, - &can_stringMinMaxMux}, /*!< String minimum maximum values */ - {CAN1_NODE, - CAN_ID_TX_STRING_STATE_ESTIMATION, - CAN_DLC, - CAN_TX_STRING_STATE_ESTIMATION_PERIOD_MS, - CAN_TX_STRING_STATE_ESTIMATION_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxStringStateEstimation, - &can_stringStateEstimationMux}, /*!< String minimum maximum values */ - {CAN1_NODE, - CAN_ID_TX_STRING_VALUES_2, - CAN_DLC, - CAN_TX_STRING_VALUES_2_PERIOD_MS, - CAN_TX_STRING_VALUES_2_PHASE_MS, - CAN_BIG_ENDIAN, - &CAN_TxStringValues2, - &can_stringValues2Mux}, /*!< String minimum maximum values */ -}; - -/* *************************************** - * Configure RX messages here - ****************************************/ - -/** registry of CAN RX messages */ -const CAN_MSG_RX_TYPE_s can_rxMessages[] = { - {CAN1_NODE, CAN_ID_IMD_INFO, CAN_DLC, CAN_LITTLE_ENDIAN, &CAN_RxImdInfo}, /*!< info message from iso165c */ - {CAN1_NODE, - CAN_ID_IMD_RESPONSE, - CAN_DLC, - CAN_LITTLE_ENDIAN, - &CAN_RxImdResponse}, /*!< response message from iso165c */ - - {CAN1_NODE, CAN_ID_COMMAND, CAN_DLC, CAN_BIG_ENDIAN, &CAN_RxRequest}, /*!< state request */ - {CAN1_NODE, CAN_ID_SOFTWARE_RESET, CAN_DLC, CAN_LITTLE_ENDIAN, &CAN_RxSwReset}, /*!< software reset */ - - {CAN1_NODE, - CAN_ID_STRING0_CURRENT, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor I in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING0_VOLTAGE1, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U1 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING0_VOLTAGE2, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U2 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING0_VOLTAGE3, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U3 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING0_TEMPERATURE, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor T in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING0_POWER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor Power in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING0_CURRENT_COUNTER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor C-C in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING0_ENERGY_COUNTER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor E-C in cyclic mode */ - -#if BS_NR_OF_STRINGS > 1u - {CAN1_NODE, - CAN_ID_STRING1_CURRENT, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor I in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING1_VOLTAGE1, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U1 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING1_VOLTAGE2, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U2 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING1_VOLTAGE3, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U3 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING1_TEMPERATURE, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor T in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING1_POWER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor Power in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING1_CURRENT_COUNTER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor C-C in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING1_ENERGY_COUNTER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor E-C in cyclic mode */ - -#if BS_NR_OF_STRINGS > 2u - {CAN1_NODE, - CAN_ID_STRING2_CURRENT, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor I in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING2_VOLTAGE1, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U1 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING2_VOLTAGE2, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U2 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING2_VOLTAGE3, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor U3 in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING2_TEMPERATURE, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor T in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING2_POWER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor Power in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING2_CURRENT_COUNTER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor C-C in cyclic mode */ - {CAN1_NODE, - CAN_ID_STRING2_ENERGY_COUNTER, - CAN_DLC, - CAN_BIG_ENDIAN, - &CAN_RxCurrentSensor}, /*!< current sensor E-C in cyclic mode */ - -#endif /* BS_NR_OF_STRINGS > 2 */ -#endif /* BS_NR_OF_STRINGS > 1 */ - - {CAN1_NODE, CAN_ID_DEBUG, CAN_DLC, CAN_LITTLE_ENDIAN, &CAN_RxDebug}, /*!< debug message */ - {CAN1_NODE, CAN_ID_SW_VERSION, CAN_DLC, CAN_LITTLE_ENDIAN, &CAN_RxSwVersion}, /*!< request SW version */ -}; - -/** length of CAN message arrays @{*/ -const uint8_t can_txLength = sizeof(can_txMessages) / sizeof(can_txMessages[0]); -const uint8_t can_rxLength = sizeof(can_rxMessages) / sizeof(can_rxMessages[0]); -/**@}*/ - /** local copies of database tables */ /**@{*/ static DATA_BLOCK_CELL_VOLTAGE_s can_tableCellVoltages = {.header.uniqueId = DATA_BLOCK_ID_CELL_VOLTAGE}; diff --git a/src/app/driver/config/can_cfg.h b/src/app/driver/config/can_cfg.h index 9f1cedf5..e764bc23 100644 --- a/src/app/driver/config/can_cfg.h +++ b/src/app/driver/config/can_cfg.h @@ -43,8 +43,8 @@ * @file can_cfg.h * @author foxBMS Team * @date 2019-12-04 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CAN * @@ -68,10 +68,13 @@ /*========== Macros and Definitions =========================================*/ /** register on which the CAN interface is connected @{*/ -#define CAN1_NODE (canREG1) -#define CAN2_NODE (canREG2) +#define CAN_NODE_1 (canREG1) +#define CAN_NODE_2 (canREG2) /**@}*/ +#define CAN_NODE_IMD (CAN_NODE_1) +#define CAN_NODE_CURRENT_SENSOR (CAN_NODE_1) + /** * Configuration of CAN transceiver pins to the respective port expander pins. * @{ @@ -86,166 +89,11 @@ #define CAN_MAX_11BIT_ID (2048u) /** Maximum length of Data Length Code */ #define CAN_MAX_DLC (8u) - /** Default DLC */ -#define CAN_DLC (8u) - -/** TX messages - pack related */ - -/** CAN message ID for boot message */ -#define CAN_ID_BOOT_MESSAGE (0x199u) -/** CAN message ID for die id message */ -#define CAN_ID_DIE_ID (0x227u) -/** CAN message ID to send state */ -#define CAN_ID_TX_STATE (0x220u) -/** Periodicity of CAN state messages in ms */ -#define CAN_TX_STATE_PERIOD_MS (100u) -/** Phase of CAN state messages in ms */ -#define CAN_TX_STATE_PHASE_MS (0u) -/** CAN message ID to send detail state */ -#define CAN_ID_TX_DETAIL_STATE (0x226u) -/** Periodicity of CAN detail state messages in ms */ -#define CAN_TX_DETAIL_STATE_PERIOD_MS (1000u) -/** Phase of CAN detail state messages in ms */ -#define CAN_TX_DETAIL_STATE_PHASE_MS (100u) - -/** CAN message ID to send voltages */ -#define CAN_ID_TX_VOLTAGES (0x240u) -/** Periodicity of CAN voltage messages in ms */ -#define CAN_TX_VOLTAGES_PERIOD_MS (100u) -/** Phase of CAN voltage messages in ms */ -#define CAN_TX_VOLTAGES_PHASE_MS (10u) - -/** CAN message ID to send temperatures */ -#define CAN_ID_TX_TEMPERATURES (0x250u) -/** Periodicity of CAN temperature messages in ms */ -#define CAN_TX_TEMPERATURES_PERIOD_MS (200u) -/** Phase of CAN temperature messages in ms */ -#define CAN_TX_TEMPERATURES_PHASE_MS (20u) - -/** CAN message ID to send limit values */ -#define CAN_ID_TX_LIMIT_VALUES (0x224u) -/** Periodicity of CAN limit messages in ms */ -#define CAN_TX_LIMIT_VALUES_PERIOD_MS (100u) -/** Phase of CAN limit messages in ms */ -#define CAN_TX_LIMIT_VALUES_PHASE_MS (30u) - -/** CAN message ID to send minimum and maximum values */ -#define CAN_ID_TX_MINIMUM_MAXIMUM_VALUES (0x223u) -/** Periodicity of CAN minimum and maximum value messages in ms */ -#define CAN_TX_MINIMUM_MAXIMUM_VALUES_PERIOD_MS (100u) -/** Phase of CAN minimum and maximum value messages in ms */ -#define CAN_TX_MINIMUM_MAXIMUM_VALUES_PHASE_MS (40u) - -/** CAN message ID to send pack state estimation values */ -#define CAN_ID_TX_PACK_STATE_ESTIMATION (0x225u) -/** Periodicity of CAN pack state estimation messages in ms */ -#define CAN_TX_PACK_STATE_ESTIMATION_PERIOD_MS (1000u) -/** Phase of CAN pack state estimation messages in ms */ -#define CAN_TX_PACK_STATE_ESTIMATION_PHASE_MS (50u) - -/** CAN message ID to send pack values */ -#define CAN_ID_TX_PACK_VALUES (0x222u) -/** Periodicity of CAN pack values messages in ms */ -#define CAN_TX_PACK_VALUES_PERIOD_MS (100u) -/** Phase of CAN pack values messages in ms */ -#define CAN_TX_PACK_VALUES_PHASE_MS (60u) - -/** TX messages - string related */ - -/** CAN message ID to send string state */ -#define CAN_ID_TX_STRING_STATE (0x221u) -/** Periodicity of CAN string state messages in ms */ -#define CAN_TX_STRING_STATE_PERIOD_MS (100u) -/** Phase of CAN string state messages in ms */ -#define CAN_TX_STRING_STATE_PHASE_MS (70u) - -/** CAN message ID to send string values */ -#define CAN_ID_TX_STRING_VALUES (0x280u) -/** Periodicity of CAN string state messages in ms */ -#define CAN_TX_STRING_VALUES_PERIOD_MS (100u) -/** Phase of CAN string state messages in ms */ -#define CAN_TX_STRING_VALUES_PHASE_MS (80u) - -/** CAN message ID to send string minimum and maximum values */ -#define CAN_ID_TX_STRING_MINIMUM_MAXIMUM (0x281u) -/** Periodicity of CAN string state messages in ms */ -#define CAN_TX_STRING_MINIMUM_MAXIMUM_PERIOD_MS (100u) -/** Phase of CAN string state messages in ms */ -#define CAN_TX_STRING_MINIMUM_MAXIMUM_PHASE_MS (90u) - -/** CAN message ID to send string minimum and maximum values */ -#define CAN_ID_TX_STRING_STATE_ESTIMATION (0x282u) -/** Periodicity of CAN string state messages in ms */ -#define CAN_TX_STRING_STATE_ESTIMATION_PERIOD_MS (1000u) -/** Phase of CAN string state messages in ms */ -#define CAN_TX_STRING_STATE_ESTIMATION_PHASE_MS (0u) - -/** CAN message ID to send string values 2 */ -#define CAN_ID_TX_STRING_VALUES_2 (0x283u) -/** Periodicity of CAN string state messages in ms */ -#define CAN_TX_STRING_VALUES_2_PERIOD_MS (100u) -/** Phase of CAN string state messages in ms */ -#define CAN_TX_STRING_VALUES_2_PHASE_MS (10u) - -/** RX messages */ - -/** CAN message ID to perform a software reset */ -#define CAN_ID_SOFTWARE_RESET (0x95u) - -/** CAN message ID to perform a state request */ -#define CAN_ID_COMMAND (0x230u) - -/** CAN message ID for debug message */ -#define CAN_ID_DEBUG (0x200u) - -/** CAN message ID to get software version */ -#define CAN_ID_SW_VERSION (0x777u) - -/** - * -------------------------CAUTION------------------------- - * The 3 following defines are used by the insulation monitoring device (IMD). - * If they are changed, the IMD will not work anymore - * -------------------------CAUTION------------------------- - */ -/** CAN message ID for info message from iso165c */ -#define CAN_ID_IMD_INFO (0x37u) -/** CAN message ID for request message to iso165c */ -#define CAN_ID_IMD_REQUEST (0x22u) -/** CAN message ID for response message from iso165c */ -#define CAN_ID_IMD_RESPONSE (0x23u) - -/** IDs for the messages from the current sensors */ -/** String 0 @{*/ -#define CAN_ID_STRING0_CURRENT (0x521u) -#define CAN_ID_STRING0_VOLTAGE1 (0x522u) -#define CAN_ID_STRING0_VOLTAGE2 (0x523u) -#define CAN_ID_STRING0_VOLTAGE3 (0x524u) -#define CAN_ID_STRING0_TEMPERATURE (0x525u) -#define CAN_ID_STRING0_POWER (0x526u) -#define CAN_ID_STRING0_CURRENT_COUNTER (0x527u) -#define CAN_ID_STRING0_ENERGY_COUNTER (0x528u) -/**@} - * String 1 @{*/ -#define CAN_ID_STRING1_CURRENT (0x621u) -#define CAN_ID_STRING1_VOLTAGE1 (0x622u) -#define CAN_ID_STRING1_VOLTAGE2 (0x623u) -#define CAN_ID_STRING1_VOLTAGE3 (0x624u) -#define CAN_ID_STRING1_TEMPERATURE (0x625u) -#define CAN_ID_STRING1_POWER (0x626u) -#define CAN_ID_STRING1_CURRENT_COUNTER (0x627u) -#define CAN_ID_STRING1_ENERGY_COUNTER (0x628u) -/**@} - * String 2 @{*/ -#define CAN_ID_STRING2_CURRENT (0x721u) -#define CAN_ID_STRING2_VOLTAGE1 (0x722u) -#define CAN_ID_STRING2_VOLTAGE2 (0x723u) -#define CAN_ID_STRING2_VOLTAGE3 (0x724u) -#define CAN_ID_STRING2_TEMPERATURE (0x725u) -#define CAN_ID_STRING2_POWER (0x726u) -#define CAN_ID_STRING2_CURRENT_COUNTER (0x727u) -#define CAN_ID_STRING2_ENERGY_COUNTER (0x728u) -/**@}*/ +#define CAN_DEFAULT_DLC (8u) +/** Default DLC for messages that are defined by the foxBMS project, i.e., not + * defined by third party software and/or hardware. */ +#define CAN_FOXBMS_MESSAGES_DEFAULT_DLC (8u) /* ************************************************************************************** * CAN BUFFER OPTIONS @@ -305,7 +153,7 @@ typedef struct { canBASE_t *canNode; /*!< CAN node on which the message has been received */ uint32_t id; /*!< ID of the CAN message */ uint8_t data[CAN_MAX_DLC]; /*!< payload of the CAN message */ -} CAN_BUFFERELEMENT_s; +} CAN_BUFFER_ELEMENT_s; /** composite type for storing and passing on the local database table handles */ typedef struct { @@ -326,51 +174,61 @@ typedef struct { DATA_BLOCK_MOL_FLAG_s *pTableMol; /*!< database table with MOL flags */ } CAN_SHIM_s; +/** definition of a CAN message (without data) */ +typedef struct { + uint32_t id; /*!< message ID */ + uint8_t dlc; /*!< data length */ + CAN_ENDIANNESS_e endianness; /*!< Byte order (big or little endian) */ +} CAN_MESSAGE_PROPERTIES_s; + +/** timing information of a CAN TX message */ +typedef struct { + uint32_t period; /*!< CAN message cycle time */ + uint32_t phase; /*!< CAN message startup (first send) offset */ +} CAN_TX_MESSAGE_TIMING_s; + +/** timing information of a CAN RX message */ +typedef struct { + uint32_t period; /*!< expected CAN message cycle time */ +} CAN_RX_MESSAGE_TIMING_s; + /** type definition for tx callback functions used in CAN messages */ typedef uint32_t (*CAN_TxCallbackFunction_f)( - uint32_t ID, - uint8_t DLC, - CAN_ENDIANNESS_e endianness, - uint8_t *candata, + CAN_MESSAGE_PROPERTIES_s message, + uint8_t *canData, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim); /** type definition for rx callback functions used in CAN messages */ typedef uint32_t (*CAN_RxCallbackFunction_f)( - uint32_t ID, - uint8_t DLC, - CAN_ENDIANNESS_e endianness, + CAN_MESSAGE_PROPERTIES_s message, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim); /** type definition for structure of a TX CAN message */ typedef struct { canBASE_t *canNode; /*!< CAN node on which the message is transmitted */ - uint32_t id; /*!< CAN message id */ - uint8_t dlc; /*!< CAN message data length code */ - uint32_t repetitionTime; /*!< CAN message cycle time */ - uint32_t repetitionPhase; /*!< CAN message startup (first send) offset */ - CAN_ENDIANNESS_e endianness; /*!< Byte order (big or little endian) */ + CAN_MESSAGE_PROPERTIES_s message; /*!< CAN message */ + CAN_TX_MESSAGE_TIMING_s timing; /*!< time and phase */ CAN_TxCallbackFunction_f callbackFunction; /*!< CAN message callback after message is sent */ uint8_t *pMuxId; /*!< for multiplexed signals: callback can use this as pointer to a mux variable, NULL_PTR if unused*/ -} CAN_MSG_TX_TYPE_s; +} CAN_TX_MESSAGE_TYPE_s; /** type definition for structure of an RX CAN message */ typedef struct { canBASE_t *canNode; /*!< CAN node on which the message is received */ - uint32_t id; /*!< message ID */ - uint8_t dlc; /*!< data length */ - CAN_ENDIANNESS_e endianness; /*!< Byte order (big or little endian) */ + CAN_MESSAGE_PROPERTIES_s message; /*!< CAN message */ + CAN_RX_MESSAGE_TIMING_s timing; /*!< time and phase */ CAN_RxCallbackFunction_f callbackFunction; /*!< CAN message callback after message is received */ -} CAN_MSG_RX_TYPE_s; +} CAN_RX_MESSAGE_TYPE_s; /** variable for storing and passing on the local database table handles */ extern const CAN_SHIM_s can_kShim; /*========== Extern Constant and Variable Declarations ======================*/ -extern const CAN_MSG_TX_TYPE_s can_txMessages[]; -extern const CAN_MSG_RX_TYPE_s can_rxMessages[]; +extern const CAN_TX_MESSAGE_TYPE_s can_txMessages[]; +extern const CAN_RX_MESSAGE_TYPE_s can_rxMessages[]; /** array length for transmission CAN0 message definition @{*/ extern const uint8_t can_txLength; diff --git a/src/app/driver/config/can_cfg_rx-message-definitions.h b/src/app/driver/config/can_cfg_rx-message-definitions.h new file mode 100644 index 00000000..0d092cc1 --- /dev/null +++ b/src/app/driver/config/can_cfg_rx-message-definitions.h @@ -0,0 +1,275 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_cfg_rx-message-definitions.h + * @author foxBMS Team + * @date 2022-07-01 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup DRIVERS + * @prefix CANRX + * + * @brief Header for the driver for the CAN module + * + */ + +#ifndef FOXBMS__CAN_CFG_RX_MESSAGE_DEFINITIONS_H_ +#define FOXBMS__CAN_CFG_RX_MESSAGE_DEFINITIONS_H_ + +/*========== Includes =======================================================*/ +#include "can_cfg.h" + +/*========== Macros and Definitions =========================================*/ +#define CANRX_NOT_PERIODIC (0u) + +/* Message IDs */ + +/** CAN message ID to perform a software reset */ +#define CANRX_SOFTWARE_RESET_ID (0x95u) +/** Periodicity of CAN software reset messages in ms */ +#define CANRX_SOFTWARE_RESET_PERIOD_ms (CANRX_NOT_PERIODIC) + +/** CAN message ID to perform a state request */ +#define CANRX_BMS_STATE_REQUEST_ID (0x230u) +/** Periodicity of CAN software reset messages in ms */ +#define CANRX_BMS_STATE_REQUEST_PERIOD_ms (CANRX_NOT_PERIODIC) + +/** CAN message ID for debug message */ +#define CANRX_DEBUG_ID (0x200u) +/** Periodicity of CAN software reset messages in ms */ +#define CANRX_DEBUG_PERIOD_ms (CANRX_NOT_PERIODIC) + +/** CAN message ID to get software version */ +#define CANRX_SOFTWARE_VERSION_ID (0x777u) +/** Periodicity of CAN ID to get the software version in ms */ +#define CANRX_SOFTWARE_VERSION_PERIOD_ms (CANRX_NOT_PERIODIC) + +/** + * -------------------------CAUTION------------------------- + * The 3 following defines are used by the insulation monitoring device (IMD). + * If they are changed, the IMD will not work anymore + * -------------------------CAUTION------------------------- + */ +/** CAN message ID for info message from iso165c */ +#define CANRX_IMD_INFO_ID (0x37u) +/** CAN message ID for request message to iso165c */ +#define CANRX_IMD_REQUEST_ID (0x22u) +/** CAN message ID for response message from iso165c */ +#define CANRX_IMD_RESPONSE_ID (0x23u) + +/** IDs for the messages from the current sensors */ +/** String 0 @{*/ +#define CANRX_STRING0_CURRENT_ID (0x521u) +#define CANRX_STRING0_CURRENT_PERIOD_ms (CANRX_NOT_PERIODIC) +#define CANRX_STRING0_VOLTAGE1_ID (0x522u) +#define CANRX_STRING0_VOLTAGE1_PERIOD_ms (CANRX_NOT_PERIODIC) +#define CANRX_STRING0_VOLTAGE2_ID (0x523u) +#define CANRX_STRING0_VOLTAGE2_PERIOD_ms (CANRX_NOT_PERIODIC) +#define CANRX_STRING0_VOLTAGE3_ID (0x524u) +#define CANRX_STRING0_VOLTAGE3_PERIOD_ms (CANRX_NOT_PERIODIC) +#define CANRX_STRING0_TEMPERATURE_ID (0x525u) +#define CANRX_STRING0_TEMPERATURE_PERIOD_ms (CANRX_NOT_PERIODIC) +#define CANRX_STRING0_POWER_ID (0x526u) +#define CANRX_STRING0_POWER_PERIOD_ms (CANRX_NOT_PERIODIC) +#define CANRX_STRING0_CURRENT_COUNTER_ID (0x527u) +#define CANRX_STRING0_CURRENT_COUNTER_PERIOD_ms (CANRX_NOT_PERIODIC) +#define CANRX_STRING0_ENERGY_COUNTER_ID (0x528u) +#define CANRX_STRING0_ENERGY_COUNTER_PERIOD_ms (CANRX_NOT_PERIODIC) +/**@} */ + +/** The Isabellenhuette current sensors use a data length code of 6 */ +#define CANRX_CURRENT_SENSOR_MESSAGES_DLC (6u) + +/* composed Rx messages */ + +/* AXIVION Disable Style Generic-NoUnsafeMacro: These macros MUST only be used + to populate the 'can_rxMessages' array. The type of this array expects data + exactly as it is provided here and therefore these macros are good (for this + and only for this purpose!).*/ +#define CANRX_DEBUG_MESSAGE \ + { \ + .id = CANRX_DEBUG_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_LITTLE_ENDIAN, \ + }, \ + { \ + .period = CANRX_DEBUG_PERIOD_ms \ + } + +#define CANRX_SOFTWARE_VERSION_MESSAGE \ + { \ + .id = CANRX_SOFTWARE_VERSION_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_LITTLE_ENDIAN, \ + }, \ + { \ + .period = CANRX_SOFTWARE_VERSION_PERIOD_ms \ + } + +#define CANRX_IMD_INFO_MESSAGE \ + { \ + .id = CANRX_IMD_INFO_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_LITTLE_ENDIAN, \ + }, \ + { \ + .period = CANRX_NOT_PERIODIC \ + } + +#define CANRX_IMD_RESPONSE_MESSAGE \ + { \ + .id = CANRX_IMD_RESPONSE_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_LITTLE_ENDIAN, \ + }, \ + { \ + .period = CANRX_NOT_PERIODIC \ + } + +#define CANRX_BMS_STATE_REQUEST_MESSAGE \ + { \ + .id = CANRX_BMS_STATE_REQUEST_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_BMS_STATE_REQUEST_PERIOD_ms \ + } + +#define CANRX_SOFTWARE_RESET_MESSAGE \ + { \ + .id = CANRX_SOFTWARE_RESET_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_LITTLE_ENDIAN, \ + }, \ + { \ + .period = CANRX_SOFTWARE_RESET_PERIOD_ms \ + } + +#define CANRX_STRING0_CURRENT_MESSAGE \ + { \ + .id = CANRX_STRING0_CURRENT_ID, \ + .dlc = CANRX_CURRENT_SENSOR_MESSAGES_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_STRING0_CURRENT_PERIOD_ms \ + } + +#define CANRX_STRING0_VOLTAGE1_MESSAGE \ + { \ + .id = CANRX_STRING0_VOLTAGE1_ID, \ + .dlc = CANRX_CURRENT_SENSOR_MESSAGES_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_STRING0_VOLTAGE1_PERIOD_ms \ + } + +#define CANRX_STRING0_VOLTAGE2_MESSAGE \ + { \ + .id = CANRX_STRING0_VOLTAGE2_ID, \ + .dlc = CANRX_CURRENT_SENSOR_MESSAGES_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_STRING0_VOLTAGE2_PERIOD_ms \ + } + +#define CANRX_STRING0_VOLTAGE3_MESSAGE \ + { \ + .id = CANRX_STRING0_VOLTAGE3_ID, \ + .dlc = CANRX_CURRENT_SENSOR_MESSAGES_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_STRING0_VOLTAGE3_PERIOD_ms \ + } + +#define CANRX_STRING0_TEMPERATURE_MESSAGE \ + { \ + .id = CANRX_STRING0_TEMPERATURE_ID, \ + .dlc = CANRX_CURRENT_SENSOR_MESSAGES_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_STRING0_TEMPERATURE_PERIOD_ms \ + } + +#define CANRX_STRING0_POWER_MESSAGE \ + { \ + .id = CANRX_STRING0_POWER_ID, \ + .dlc = CANRX_CURRENT_SENSOR_MESSAGES_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_STRING0_POWER_PERIOD_ms \ + } + +#define CANRX_STRING0_CURRENT_COUNTER_MESSAGE \ + { \ + .id = CANRX_STRING0_CURRENT_COUNTER_ID, \ + .dlc = CANRX_CURRENT_SENSOR_MESSAGES_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_STRING0_CURRENT_COUNTER_PERIOD_ms \ + } + +#define CANRX_STRING0_ENERGY_COUNTER_MESSAGE \ + { \ + .id = CANRX_STRING0_ENERGY_COUNTER_ID, \ + .dlc = CANRX_CURRENT_SENSOR_MESSAGES_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANRX_STRING0_ENERGY_COUNTER_PERIOD_ms \ + } +/* AXIVION Enable Style Generic-NoUnsafeMacro */ + +/*========== Extern Constant and Variable Declarations ======================*/ + +/*========== Extern Function Prototypes =====================================*/ + +/*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ + +#endif /* FOXBMS__CAN_CFG_RX_MESSAGE_DEFINITIONS_H_ */ diff --git a/src/app/driver/config/can_cfg_rx.c b/src/app/driver/config/can_cfg_rx.c new file mode 100644 index 00000000..61c67a57 --- /dev/null +++ b/src/app/driver/config/can_cfg_rx.c @@ -0,0 +1,103 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_cfg_rx.c + * @author foxBMS Team + * @date 2019-12-04 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup DRIVERS_CONFIGURATION + * @prefix CANRX + * + * @brief Configuration for the CAN module + * + * @details The CAN bus settings and the received messages and their reception + * handling are to be specified here. + * + * + */ + +/*========== Includes =======================================================*/ +#include "can_cfg.h" + +#include "can_cbs_rx.h" +#include "can_cfg_rx-message-definitions.h" +#include "database.h" +#include "ftask.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Static Constant and Variable Definitions =======================*/ + +/*========== Extern Constant and Variable Definitions =======================*/ + +/** registry of CAN RX messages */ +const CAN_RX_MESSAGE_TYPE_s can_rxMessages[] = { + {CAN_NODE_IMD, CANRX_IMD_INFO_MESSAGE, &CANRX_ImdInfo}, + {CAN_NODE_IMD, CANRX_IMD_RESPONSE_MESSAGE, &CANRX_ImdResponse}, + {CAN_NODE_1, CANRX_BMS_STATE_REQUEST_MESSAGE, &CANRX_BmsStateRequest}, + {CAN_NODE_1, CANRX_SOFTWARE_RESET_MESSAGE, &CANRX_SoftwareReset}, + {CAN_NODE_CURRENT_SENSOR, CANRX_STRING0_CURRENT_MESSAGE, &CANRX_CurrentSensor}, + {CAN_NODE_CURRENT_SENSOR, CANRX_STRING0_VOLTAGE1_MESSAGE, &CANRX_CurrentSensor}, + {CAN_NODE_CURRENT_SENSOR, CANRX_STRING0_VOLTAGE2_MESSAGE, &CANRX_CurrentSensor}, + {CAN_NODE_CURRENT_SENSOR, CANRX_STRING0_VOLTAGE3_MESSAGE, &CANRX_CurrentSensor}, + {CAN_NODE_CURRENT_SENSOR, CANRX_STRING0_TEMPERATURE_MESSAGE, &CANRX_CurrentSensor}, + {CAN_NODE_CURRENT_SENSOR, CANRX_STRING0_POWER_MESSAGE, &CANRX_CurrentSensor}, + {CAN_NODE_CURRENT_SENSOR, CANRX_STRING0_CURRENT_COUNTER_MESSAGE, &CANRX_CurrentSensor}, + {CAN_NODE_CURRENT_SENSOR, CANRX_STRING0_ENERGY_COUNTER_MESSAGE, &CANRX_CurrentSensor}, + {CAN_NODE_1, CANRX_DEBUG_MESSAGE, &CANRX_Debug}, + {CAN_NODE_1, CANRX_SOFTWARE_VERSION_MESSAGE, &CANRX_SoftwareVersion}, +}; + +/** length of CAN message arrays */ +const uint8_t can_rxLength = sizeof(can_rxMessages) / sizeof(can_rxMessages[0]); + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ +#ifdef UNITY_UNIT_TEST + +#endif diff --git a/src/app/driver/config/can_cfg_tx-message-definitions.h b/src/app/driver/config/can_cfg_tx-message-definitions.h new file mode 100644 index 00000000..d3cbba6f --- /dev/null +++ b/src/app/driver/config/can_cfg_tx-message-definitions.h @@ -0,0 +1,316 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_cfg_tx-message-definitions.h + * @author foxBMS Team + * @date 2022-07-01 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup DRIVERS + * @prefix CANTX + * + * @brief Header for the driver for the CAN module + * + */ + +#ifndef FOXBMS__CAN_CFG_TX_MESSAGE_DEFINITIONS_H_ +#define FOXBMS__CAN_CFG_TX_MESSAGE_DEFINITIONS_H_ + +/*========== Includes =======================================================*/ +#include "can_cfg.h" + +/*========== Macros and Definitions =========================================*/ +#define CANTX_NOT_PERIODIC (0u) + +/* Message IDs */ + +/** CAN message ID for boot message */ +#define CANTX_BOOT_ID (0x199u) /* check_ids silence: CANTX_BOOT_ID */ +/** Periodicity of boot messages in ms */ +#define CANTX_BOOT_PERIOD_ms (CANTX_NOT_PERIODIC) /* dummy */ +#define CANTX_BOOT_PHASE_ms (0u) /* dummy */ +#define CANTX_BOOT_MESSAGE (-1) /* dummy */ + +/** CAN message ID for die ID message */ +#define CANTX_DIE_ID_ID (0x227u) /* mark as dummy but it is not src/app/driver/config/can_cfg_tx_boot-message.c */ +/** Periodicity of die ID messages in ms */ +#define CANTX_DIE_ID_PERIOD_ms (CANTX_NOT_PERIODIC) /* dummy */ +#define CANTX_DIE_ID_PHASE_ms (0u) /* dummy */ +#define CANTX_DIE_ID_MESSAGE (-1) /* dummy */ + +/** CAN message ID to send state */ +#define CANTX_BMS_STATE_ID (0x220u) +/** Periodicity of CAN state messages in ms */ +#define CANTX_BMS_STATE_PERIOD_ms (100u) +/** Phase of CAN state messages in ms */ +#define CANTX_BMS_STATE_PHASE_ms (0u) + +/** CAN message ID to send detail state */ +#define CANTX_BMS_STATE_DETAILS_ID (0x226u) +/** Periodicity of CAN detail state messages in ms */ +#define CANTX_BMS_STATE_DETAILS_PERIOD_ms (1000u) +/** Phase of CAN detail state messages in ms */ +#define CANTX_BMS_STATE_DETAILS_PHASE_ms (100u) + +/** CAN message ID to send voltages */ +#define CANTX_CELL_VOLTAGES_ID (0x240u) +/** Periodicity of CAN voltage messages in ms */ +#define CANTX_CELL_VOLTAGES_PERIOD_ms (100u) +/** Phase of CAN voltage messages in ms */ +#define CANTX_CELL_VOLTAGES_PHASE_ms (10u) + +/** CAN message ID to send temperatures */ +#define CANTX_CELL_TEMPERATURES_ID (0x250u) +/** Periodicity of CAN temperature messages in ms */ +#define CANTX_CELL_TEMPERATURES_PERIOD_ms (200u) +/** Phase of CAN temperature messages in ms */ +#define CANTX_CELL_TEMPERATURES_PHASE_ms (20u) + +/** CAN message ID to send limit values */ +#define CANTX_LIMIT_VALUES_ID (0x224u) +/** Periodicity of CAN limit messages in ms */ +#define CANTX_LIMIT_VALUES_PERIOD_ms (100u) +/** Phase of CAN limit messages in ms */ +#define CANTX_LIMIT_VALUES_PHASE_ms (30u) + +/** CAN message ID to send minimum and maximum values */ +#define CANTX_MINIMUM_MAXIMUM_VALUES_ID (0x223u) +/** Periodicity of CAN minimum and maximum value messages in ms */ +#define CANTX_MINIMUM_MAXIMUM_VALUES_PERIOD_ms (100u) +/** Phase of CAN minimum and maximum value messages in ms */ +#define CANTX_MINIMUM_MAXIMUM_VALUES_PHASE_ms (40u) + +/** CAN message ID to send pack state estimation values */ +#define CANTX_PACK_STATE_ESTIMATION_ID (0x225u) +/** Periodicity of CAN pack state estimation messages in ms */ +#define CANTX_PACK_STATE_ESTIMATION_PERIOD_ms (1000u) +/** Phase of CAN pack state estimation messages in ms */ +#define CANTX_PACK_STATE_ESTIMATION_PHASE_ms (50u) + +/** CAN message ID to send pack values */ +#define CANTX_PACK_VALUES_ID (0x222u) +/** Periodicity of CAN pack values messages in ms */ +#define CANTX_PACK_VALUES_PERIOD_ms (100u) +/** Phase of CAN pack values messages in ms */ +#define CANTX_PACK_VALUES_PHASE_ms (60u) + +/** TX messages - string related */ + +/** CAN message ID to send string state */ +#define CANTX_STRING_STATE_ID (0x221u) +/** Periodicity of CAN string state messages in ms */ +#define CANTX_STRING_STATE_PERIOD_ms (100u) +/** Phase of CAN string state messages in ms */ +#define CANTX_STRING_STATE_PHASE_ms (70u) + +/** CAN message ID to send string values */ +#define CANTX_STRING_VALUES_P0_ID (0x280u) +/** Periodicity of CAN string state messages in ms */ +#define CANTX_STRING_VALUES_P0_PERIOD_ms (100u) +/** Phase of CAN string state messages in ms */ +#define CANTX_STRING_VALUES_P0_PHASE_ms (80u) + +/** CAN message ID to send string minimum and maximum values */ +#define CANTX_STRING_MIN_MAX_VALUES_ID (0x281u) +/** Periodicity of CAN string state messages in ms */ +#define CANTX_STRING_MIN_MAX_VALUES_PERIOD_ms (100u) +/** Phase of CAN string state messages in ms */ +#define CANTX_STRING_MIN_MAX_VALUES_PHASE_ms (90u) + +/** CAN message ID to send string minimum and maximum values */ +#define CANTX_STRING_STATE_ESTIMATION_ID (0x282u) +/** Periodicity of CAN string state messages in ms */ +#define CANTX_STRING_STATE_ESTIMATION_PERIOD_ms (1000u) +/** Phase of CAN string state messages in ms */ +#define CANTX_STRING_STATE_ESTIMATION_PHASE_ms (0u) + +/** CAN message ID to send string values 2 */ +#define CANTX_STRING_VALUES_P1_ID (0x283u) +/** Periodicity of CAN string state messages in ms */ +#define CANTX_STRING_VALUES_P1_PERIOD_ms (100u) +/** Phase of CAN string state messages in ms */ +#define CANTX_STRING_VALUES_P1_PHASE_ms (10u) + +/* composed Tx messages */ + +/* AXIVION Disable Style Generic-NoUnsafeMacro: These macros MUST only be used + to populate the 'can_txMessages' array. The type of this array expects data + exactly as it is provided here and therefore these macros are good (for this + and only for this purpose!).*/ +#define CANTX_BMS_STATE_MESSAGE \ + { \ + .dlc = CAN_DEFAULT_DLC, \ + .id = CANTX_BMS_STATE_ID, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_BMS_STATE_PERIOD_ms, .phase = CANTX_BMS_STATE_PHASE_ms \ + } + +#define CANTX_BMS_STATE_DETAILS_MESSAGE \ + { \ + .id = CANTX_BMS_STATE_DETAILS_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_BMS_STATE_DETAILS_PERIOD_ms, .phase = CANTX_BMS_STATE_DETAILS_PHASE_ms \ + } + +#define CANTX_CELL_VOLTAGES_MESSAGE \ + { \ + .id = CANTX_CELL_VOLTAGES_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_CELL_VOLTAGES_PERIOD_ms, .phase = CANTX_CELL_VOLTAGES_PHASE_ms \ + } + +#define CANTX_MINIMUM_MAXIMUM_VALUES_MESSAGE \ + { \ + .id = CANTX_MINIMUM_MAXIMUM_VALUES_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_MINIMUM_MAXIMUM_VALUES_PERIOD_ms, .phase = CANTX_MINIMUM_MAXIMUM_VALUES_PHASE_ms \ + } + +#define CANTX_LIMIT_VALUES_MESSAGE \ + { \ + .id = CANTX_LIMIT_VALUES_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_LIMIT_VALUES_PERIOD_ms, .phase = CANTX_LIMIT_VALUES_PHASE_ms \ + } + +#define CANTX_CELL_TEMPERATURES_MESSAGE \ + { \ + .id = CANTX_CELL_TEMPERATURES_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_CELL_TEMPERATURES_PERIOD_ms, .phase = CANTX_CELL_TEMPERATURES_PHASE_ms \ + } + +#define CANTX_PACK_STATE_ESTIMATION_MESSAGE \ + { \ + .id = CANTX_PACK_STATE_ESTIMATION_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_PACK_STATE_ESTIMATION_PERIOD_ms, .phase = CANTX_PACK_STATE_ESTIMATION_PHASE_ms \ + } + +#define CANTX_PACK_VALUES_MESSAGE \ + { \ + .id = CANTX_PACK_VALUES_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_PACK_VALUES_PERIOD_ms, .phase = CANTX_PACK_VALUES_PHASE_ms \ + } + +#define CANTX_STRING_STATE_MESSAGE \ + { \ + .id = CANTX_STRING_STATE_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_STRING_STATE_PERIOD_ms, .phase = CANTX_STRING_STATE_PHASE_ms \ + } + +#define CANTX_STRING_VALUES_P0_MESSAGE \ + { \ + .id = CANTX_STRING_VALUES_P0_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_STRING_VALUES_P0_PERIOD_ms, .phase = CANTX_STRING_VALUES_P0_PHASE_ms \ + } + +#define CANTX_STRING_VALUES_P1_MESSAGE \ + { \ + .id = CANTX_STRING_VALUES_P1_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_STRING_VALUES_P1_PERIOD_ms, .phase = CANTX_STRING_VALUES_P1_PHASE_ms \ + } + +#define CANTX_STRING_MIN_MAX_VALUES_MESSAGE \ + { \ + .id = CANTX_STRING_MIN_MAX_VALUES_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_STRING_MIN_MAX_VALUES_PERIOD_ms, .phase = CANTX_STRING_MIN_MAX_VALUES_PHASE_ms \ + } + +#define CANTX_STRING_STATE_ESTIMATION_MESSAGE \ + { \ + .id = CANTX_STRING_STATE_ESTIMATION_ID, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_BIG_ENDIAN, \ + }, \ + { \ + .period = CANTX_STRING_STATE_ESTIMATION_PERIOD_ms, .phase = CANTX_STRING_STATE_ESTIMATION_PHASE_ms \ + } +/* AXIVION Enable Style Generic-NoUnsafeMacro */ + +/*========== Extern Constant and Variable Declarations ======================*/ + +/*========== Extern Function Prototypes =====================================*/ + +/*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ + +#endif /* FOXBMS__CAN_CFG_TX_MESSAGE_DEFINITIONS_H_ */ diff --git a/src/app/driver/config/can_cfg_tx.c b/src/app/driver/config/can_cfg_tx.c new file mode 100644 index 00000000..67ba8693 --- /dev/null +++ b/src/app/driver/config/can_cfg_tx.c @@ -0,0 +1,111 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_cfg_tx.c + * @author foxBMS Team + * @date 2019-12-04 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup DRIVERS_CONFIGURATION + * @prefix CANTX + * + * @brief Configuration for the CAN module + * + * @details The CAN bus settings and the transmitted messages and their + * reception handling are to be specified here. + * + * + */ + +/*========== Includes =======================================================*/ +#include "can_cfg.h" + +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" +#include "database.h" +#include "ftask.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Static Constant and Variable Definitions =======================*/ + +/** Multiplexer values @{*/ +static uint8_t cantx_voltagesMux = 0u; +static uint8_t cantx_temperaturesMux = 0u; +static uint8_t cantx_stringStateMux = 0u; +static uint8_t cantx_stringValuesP0Mux = 0u; +static uint8_t cantx_stringMinMaxMux = 0u; +static uint8_t cantx_stringStateEstimationMux = 0u; +static uint8_t cantx_stringValuesP1Mux = 0u; +/**@}*/ + +/*========== Extern Constant and Variable Definitions =======================*/ + +/** registry of CAN TX messages */ +const CAN_TX_MESSAGE_TYPE_s can_txMessages[] = { + {CAN_NODE_1, CANTX_BMS_STATE_MESSAGE, &CANTX_BmsState, NULL_PTR}, + {CAN_NODE_1, CANTX_BMS_STATE_DETAILS_MESSAGE, &CANTX_BmsStateDetails, NULL_PTR}, + {CAN_NODE_1, CANTX_CELL_VOLTAGES_MESSAGE, &CANTX_CellVoltages, &cantx_voltagesMux}, + {CAN_NODE_1, CANTX_CELL_TEMPERATURES_MESSAGE, &CANTX_CellTemperatures, &cantx_temperaturesMux}, + {CAN_NODE_1, CANTX_LIMIT_VALUES_MESSAGE, &CANTX_LimitValues, NULL_PTR}, + {CAN_NODE_1, CANTX_MINIMUM_MAXIMUM_VALUES_MESSAGE, &CANTX_MinimumMaximumValues, NULL_PTR}, + {CAN_NODE_1, CANTX_PACK_STATE_ESTIMATION_MESSAGE, &CANTX_PackStateEstimation, NULL_PTR}, + {CAN_NODE_1, CANTX_PACK_VALUES_MESSAGE, &CANTX_PackValues, NULL_PTR}, + {CAN_NODE_1, CANTX_STRING_STATE_MESSAGE, &CANTX_StringState, &cantx_stringStateMux}, + {CAN_NODE_1, CANTX_STRING_MIN_MAX_VALUES_MESSAGE, &CANTX_StringMinimumMaximumValues, &cantx_stringMinMaxMux}, + {CAN_NODE_1, CANTX_STRING_STATE_ESTIMATION_MESSAGE, &CANTX_StringStateEstimation, &cantx_stringStateEstimationMux}, + {CAN_NODE_1, CANTX_STRING_VALUES_P0_MESSAGE, &CANTX_StringValuesP0, &cantx_stringValuesP0Mux}, + {CAN_NODE_1, CANTX_STRING_VALUES_P1_MESSAGE, &CANTX_StringValuesP1, &cantx_stringValuesP1Mux}, +}; + +/** length of CAN message arrays */ +const uint8_t can_txLength = sizeof(can_txMessages) / sizeof(can_txMessages[0]); + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ +#ifdef UNITY_UNIT_TEST +#endif diff --git a/src/app/driver/config/can_cfg_tx_boot-message.c b/src/app/driver/config/can_cfg_tx_boot-message.c new file mode 100644 index 00000000..42d1107c --- /dev/null +++ b/src/app/driver/config/can_cfg_tx_boot-message.c @@ -0,0 +1,175 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_cfg_tx_boot-message.c + * @author foxBMS Team + * @date 2019-12-04 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup DRIVERS + * @prefix CANTX + * + * @brief Driver for the CAN module + * + * @details Implementation of the CAN Interrupts, initialization, buffers, + * receive and transmit interfaces. + */ + +/*========== Includes =======================================================*/ +#include "can_cfg_tx_boot-message.h" + +#include "version_cfg.h" + +#include "HL_het.h" +#include "HL_reg_system.h" + +#include "can.h" +#include "can_cfg_tx-message-definitions.h" +#include "can_helper.h" +#include "database.h" +#include "foxmath.h" +#include "ftask.h" + +/*========== Macros and Definitions =========================================*/ +/** maximum distance from release that can be encoded in the boot message */ +#define CANTX_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE (31u) +#if CANTX_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE > UINT8_MAX +#error "This code assumes that the define is smaller or equal to UINT8_MAX") +#endif + +/** bit position of boot message byte 3 version control flag */ +#define CANTX_BOOT_MESSAGE_BYTE_3_BIT_VERSION_CONTROL (0u) + +/** bit position of boot message byte 3 dirty flag */ +#define CANTX_BOOT_MESSAGE_BYTE_3_BIT_DIRTY_FLAG (1u) + +/** bit position of boot message byte 3 release distance overflow flag */ +#define CANTX_BOOT_MESSAGE_BYTE_3_BIT_DISTANCE_OVERFLOW_FLAG (2u) + +/** bit position of boot message byte 3 release distance counter */ +#define CANTX_BOOT_MESSAGE_BYTE_3_BIT_DISTANCE_COUNTER (3u) + +/*========== Static Constant and Variable Definitions =======================*/ + +/*========== Extern Constant and Variable Definitions =======================*/ + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ + +extern STD_RETURN_TYPE_e CANTX_TransmitBootMessage(void) { + uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))}; + + /* Set major number */ + data[CAN_BYTE_0_POSITION] = ver_foxbmsVersionInformation.major; + /* Set minor number */ + data[CAN_BYTE_1_POSITION] = ver_foxbmsVersionInformation.minor; + /* Set patch number */ + data[CAN_BYTE_2_POSITION] = ver_foxbmsVersionInformation.patch; + + /* intermediate variable for message byte 3 */ + uint8_t versionControlByte = 0u; + + /* Set version control flags */ + if (ver_foxbmsVersionInformation.underVersionControl == true) { + versionControlByte |= (0x01u << CANTX_BOOT_MESSAGE_BYTE_3_BIT_VERSION_CONTROL); + } + if (ver_foxbmsVersionInformation.isDirty == true) { + versionControlByte |= (0x01u << CANTX_BOOT_MESSAGE_BYTE_3_BIT_DIRTY_FLAG); + } + /* Set overflow flag (if release distance is larger than 31) */ + if (ver_foxbmsVersionInformation.distanceFromLastRelease > CANTX_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE) { + /* we need to set the overflow flag */ + versionControlByte |= (0x01u << CANTX_BOOT_MESSAGE_BYTE_3_BIT_DISTANCE_OVERFLOW_FLAG); + } + + /* Set release distance (capped to maximum value) */ + const uint8_t distanceCapped = (uint8_t)MATH_MinimumOfTwoUint16_t( + ver_foxbmsVersionInformation.distanceFromLastRelease, (uint16_t)CANTX_BOOT_MESSAGE_MAXIMUM_RELEASE_DISTANCE); + versionControlByte |= (distanceCapped << CANTX_BOOT_MESSAGE_BYTE_3_BIT_DISTANCE_COUNTER); + + /* assign assembled byte to data byte */ + data[CAN_BYTE_3_POSITION] = versionControlByte; + + /* Read out device register with unique ID */ + const uint32_t deviceRegister = systemREG1->DEVID; + + /* Set unique ID */ + data[CAN_BYTE_4_POSITION] = (uint8_t)((deviceRegister >> 24u) & 0xFFu); + data[CAN_BYTE_5_POSITION] = (uint8_t)((deviceRegister >> 16u) & 0xFFu); + data[CAN_BYTE_6_POSITION] = (uint8_t)((deviceRegister >> 8u) & 0xFFu); + data[CAN_BYTE_7_POSITION] = (uint8_t)(deviceRegister & 0xFFu); + + STD_RETURN_TYPE_e retval = CAN_DataSend(CAN_NODE_1, CANTX_BOOT_ID, &data[0]); + + return retval; +} + +extern STD_RETURN_TYPE_e CANTX_TransmitDieId(void) { + uint8_t data[] = {GEN_REPEAT_U(0u, GEN_STRIP(CAN_MAX_DLC))}; + + /* Read out device register with die ID low and high */ + const uint32_t dieIdLow = systemREG1->DIEIDL; + const uint32_t dieIdHigh = systemREG1->DIEIDH; + + /* set die ID */ + /* AXIVION Disable Style Generic-NoMagicNumbers: The magic numbers are used to divide down the registers into the CAN message */ + data[CAN_BYTE_0_POSITION] = (uint8_t)((dieIdHigh >> 24u) & 0xFFu); + data[CAN_BYTE_1_POSITION] = (uint8_t)((dieIdHigh >> 16u) & 0xFFu); + data[CAN_BYTE_2_POSITION] = (uint8_t)((dieIdHigh >> 8u) & 0xFFu); + data[CAN_BYTE_3_POSITION] = (uint8_t)(dieIdHigh & 0xFFu); + data[CAN_BYTE_4_POSITION] = (uint8_t)((dieIdLow >> 24u) & 0xFFu); + data[CAN_BYTE_5_POSITION] = (uint8_t)((dieIdLow >> 16u) & 0xFFu); + data[CAN_BYTE_6_POSITION] = (uint8_t)((dieIdLow >> 8u) & 0xFFu); + data[CAN_BYTE_7_POSITION] = (uint8_t)(dieIdLow & 0xFFu); + /* AXIVION Enable Style Generic-NoMagicNumbers: */ + + STD_RETURN_TYPE_e retval = CAN_DataSend(CAN_NODE_1, CANTX_DIE_ID_ID, &data[0]); + + return retval; +} + +/*========== Getter for static Variables (Unit Test) ========================*/ + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ diff --git a/src/app/driver/config/can_cfg_tx_boot-message.h b/src/app/driver/config/can_cfg_tx_boot-message.h new file mode 100644 index 00000000..ca915cb0 --- /dev/null +++ b/src/app/driver/config/can_cfg_tx_boot-message.h @@ -0,0 +1,80 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file can_cfg_tx_boot-message.h + * @author foxBMS Team + * @date 2022-07-01 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup SOME_GROUP + * @prefix CANTX + * + * @brief Header file of some software + * + */ + +#ifndef FOXBMS__CAN_CFG_TX_BOOT_MESSAGE_H_ +#define FOXBMS__CAN_CFG_TX_BOOT_MESSAGE_H_ + +/*========== Includes =======================================================*/ +#include "general.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Extern Constant and Variable Declarations ======================*/ + +/*========== Extern Function Prototypes =====================================*/ +/** + * @brief Transmit startup boot message + * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK + */ +extern STD_RETURN_TYPE_e CANTX_TransmitBootMessage(void); + +/** + * @brief Transmit chip id + * @return #STD_OK if transmission successful, otherwise #STD_NOT_OK + */ +extern STD_RETURN_TYPE_e CANTX_TransmitDieId(void); + +/*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ + +#endif /* FOXBMS__CAN_CFG_TX_BOOT_MESSAGE_H_ */ diff --git a/src/app/driver/config/contactor_cfg.c b/src/app/driver/config/contactor_cfg.c index a49ae5ce..ae7f3a00 100644 --- a/src/app/driver/config/contactor_cfg.c +++ b/src/app/driver/config/contactor_cfg.c @@ -43,8 +43,8 @@ * @file contactor_cfg.c * @author foxBMS Team * @date 2020-02-11 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONF * @prefix CONT * @@ -55,15 +55,37 @@ /*========== Includes =======================================================*/ #include "contactor_cfg.h" +#include "sps_cfg.h" + /*========== Macros and Definitions =========================================*/ /*========== Static Constant and Variable Definitions =======================*/ /*========== Extern Constant and Variable Definitions =======================*/ CONT_CONTACTOR_STATE_s cont_contactorStates[BS_NR_OF_CONTACTORS] = { - {CONT_SWITCH_OFF, CONT_SWITCH_OFF, CONT_FEEDBACK_THROUGH_CURRENT, 0u, CONT_STRING0_PLUS}, - {CONT_SWITCH_OFF, CONT_SWITCH_OFF, CONT_FEEDBACK_THROUGH_CURRENT, 1u, CONT_STRING0_MINUS}, - {CONT_SWITCH_OFF, CONT_SWITCH_OFF, CONT_FEEDBACK_THROUGH_CURRENT, 2u, CONT_PRECHARGE}, + /* String contactors configuration */ + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_FEEDBACK_NORMALLY_OPEN, + BS_STRING0, + CONT_PLUS, + SPS_CHANNEL_0, + CONT_CHARGING_DIRECTION}, + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_FEEDBACK_NORMALLY_OPEN, + BS_STRING0, + CONT_MINUS, + SPS_CHANNEL_1, + CONT_DISCHARGING_DIRECTION}, + /* Precharge contactor configuration */ + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_HAS_NO_FEEDBACK, + BS_STRING0, + CONT_PRECHARGE, + SPS_CHANNEL_2, + CONT_BIDIRECTIONAL}, }; /*========== Static Function Prototypes =====================================*/ diff --git a/src/app/driver/config/contactor_cfg.h b/src/app/driver/config/contactor_cfg.h index 9e5b259c..c6fa328d 100644 --- a/src/app/driver/config/contactor_cfg.h +++ b/src/app/driver/config/contactor_cfg.h @@ -43,8 +43,8 @@ * @file contactor_cfg.h * @author foxBMS Team * @date 2020-02-11 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix CONT * @@ -64,27 +64,14 @@ /*========== Macros and Definitions =========================================*/ -/*================== Main precharge configuration ====================*/ - /*========== Extern Constant and Variable Declarations ======================*/ /** Symbolic names for the possible states of the contactors */ typedef enum { - CONT_SWITCH_OFF, /*!< Contactor off --> Contactor is open */ - CONT_SWITCH_ON, /*!< Contactor on --> Contactor is closed */ - CONT_SWITCH_UNDEF, /*!< Contactor undefined --> Contactor state not known */ + CONT_SWITCH_OFF, /*!< Contactor off --> Contactor is open */ + CONT_SWITCH_ON, /*!< Contactor on --> Contactor is closed */ + CONT_SWITCH_UNDEFINED, /*!< Contactor undefined --> Contactor state not known */ } CONT_ELECTRICAL_STATE_TYPE_e; -/** Symbolic names for the contactors */ -typedef enum { - CONT_STRING0_PLUS, /*!< Contactor in string0 plus path */ - CONT_STRING0_MINUS, /*!< Contactor in string0 minus path */ - CONT_STRING1_PLUS, /*!< Contactor in string1 plus path */ - CONT_STRING1_MINUS, /*!< Contactor in string1 minus path */ - CONT_STRING2_PLUS, /*!< Contactor in string2 plus path */ - CONT_STRING2_MINUS, /*!< Contactor in string2 minus path */ - CONT_PRECHARGE, /*!< Precharge contactor */ -} CONT_NAMES_e; - /** Symbolic names defining the electric behavior of the contactor */ typedef enum { CONT_FEEDBACK_NORMALLY_OPEN, /*!< Feedback line of a contactor is normally open */ @@ -93,21 +80,45 @@ typedef enum { CONT_HAS_NO_FEEDBACK, /*!< Feedback line of the contactor is not used */ } CONT_FEEDBACK_TYPE_e; +/** Contactor type */ +typedef enum { + CONT_PLUS, /*!< Contactor is placed in HV plus path */ + CONT_MINUS, /*!< Contactor is placed in HV minus path */ + CONT_PRECHARGE, /*!< Contactor is used as precharge contactor, installed as a plus contactor */ + CONT_UNDEFINED, /*!< Undefined contactor */ +} CONT_TYPE_e; + +/** + * Some contactors are designed and optimized to open current that is flowing + * in one direction to provide maximum current breaking capability. This + * direction is then dependent on how the contactors are installed withing the + * battery system. If bidirectional contactors are used, the main power + * terminals can be connected in either direction and the current breaking + * capability is the same for both directions. + */ +typedef enum { + CONT_CHARGING_DIRECTION, /*!< Contactor is preferred opened in charge current direction */ + CONT_DISCHARGING_DIRECTION, /*!< Contactor is preferred opened in discharge current direction */ + CONT_BIDIRECTIONAL, /*!< Contactor has no preferred way of being opened depending on the current flow */ +} CONT_CURRENT_BREAKING_DIRECTION_e; + /** Status struct for a registry of all contactors */ typedef struct { CONT_ELECTRICAL_STATE_TYPE_e currentSet; /*!< current setpoint for the contactor */ CONT_ELECTRICAL_STATE_TYPE_e feedback; /*!< feedback from the contactor */ const CONT_FEEDBACK_TYPE_e feedbackPinType; /*!< type of feedback that the contactor uses */ + const BS_STRING_ID_e stringIndex; /*!< index in which string the contactor is placed */ + const CONT_TYPE_e type; /*!< type of contactor */ const SPS_CHANNEL_INDEX spsChannel; /*!< channel index of the SPS to which this contactor is connected */ - const CONT_NAMES_e name; /*!< name of the contactor */ + const CONT_CURRENT_BREAKING_DIRECTION_e breakingDirection; /*!< preferred contactor opening direction */ } CONT_CONTACTOR_STATE_s; -/** central state registry of all contactors of the system */ -extern CONT_CONTACTOR_STATE_s cont_contactorStates[BS_NR_OF_CONTACTORS]; - /** index number of the contactor array; not to be confused with #SPS_CHANNEL_INDEX */ typedef uint8_t CONT_CONTACTOR_INDEX; +/** central state registry of all contactors of the system */ +extern CONT_CONTACTOR_STATE_s cont_contactorStates[BS_NR_OF_CONTACTORS]; + /*========== Extern Function Prototypes =====================================*/ /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ diff --git a/src/app/driver/config/dma_cfg.c b/src/app/driver/config/dma_cfg.c index ee861a6e..42325795 100644 --- a/src/app/driver/config/dma_cfg.c +++ b/src/app/driver/config/dma_cfg.c @@ -43,8 +43,8 @@ * @file dma_cfg.c * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix DMA * diff --git a/src/app/driver/config/dma_cfg.h b/src/app/driver/config/dma_cfg.h index fb350efc..37ae35cb 100644 --- a/src/app/driver/config/dma_cfg.h +++ b/src/app/driver/config/dma_cfg.h @@ -43,8 +43,8 @@ * @file dma_cfg.h * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix DMA * diff --git a/src/app/driver/config/fram_cfg.c b/src/app/driver/config/fram_cfg.c index 06d6558f..98a95669 100644 --- a/src/app/driver/config/fram_cfg.c +++ b/src/app/driver/config/fram_cfg.c @@ -43,8 +43,8 @@ * @file fram_cfg.c * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix FRAM * diff --git a/src/app/driver/config/fram_cfg.h b/src/app/driver/config/fram_cfg.h index dbedb71d..b0476b22 100644 --- a/src/app/driver/config/fram_cfg.h +++ b/src/app/driver/config/fram_cfg.h @@ -43,8 +43,8 @@ * @file fram_cfg.h * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix FRAM * diff --git a/src/app/driver/config/interlock_cfg.c b/src/app/driver/config/interlock_cfg.c index 3ccbe1ed..d6a8a250 100644 --- a/src/app/driver/config/interlock_cfg.c +++ b/src/app/driver/config/interlock_cfg.c @@ -43,8 +43,8 @@ * @file interlock_cfg.c * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix CONT * diff --git a/src/app/driver/config/interlock_cfg.h b/src/app/driver/config/interlock_cfg.h index 71d3f9e8..b5993823 100644 --- a/src/app/driver/config/interlock_cfg.h +++ b/src/app/driver/config/interlock_cfg.h @@ -43,8 +43,8 @@ * @file interlock_cfg.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix ILCK * diff --git a/src/app/driver/config/nxpfs85xx_cfg.c b/src/app/driver/config/nxpfs85xx_cfg.c index 07ff49f9..3dbbc0f8 100644 --- a/src/app/driver/config/nxpfs85xx_cfg.c +++ b/src/app/driver/config/nxpfs85xx_cfg.c @@ -43,8 +43,8 @@ * @file nxpfs85xx_cfg.c * @author foxBMS Team * @date 2020-03-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix SBC * diff --git a/src/app/driver/config/nxpfs85xx_cfg.h b/src/app/driver/config/nxpfs85xx_cfg.h index 1dec0080..de9272e7 100644 --- a/src/app/driver/config/nxpfs85xx_cfg.h +++ b/src/app/driver/config/nxpfs85xx_cfg.h @@ -43,8 +43,8 @@ * @file nxpfs85xx_cfg.h * @author foxBMS Team * @date 2020-03-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix SBC * diff --git a/src/app/driver/config/pex_cfg.c b/src/app/driver/config/pex_cfg.c index 16b9d431..a041ecc5 100644 --- a/src/app/driver/config/pex_cfg.c +++ b/src/app/driver/config/pex_cfg.c @@ -43,8 +43,8 @@ * @file pex_cfg.c * @author foxBMS Team * @date 2021-08-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix PEX * diff --git a/src/app/driver/config/pex_cfg.h b/src/app/driver/config/pex_cfg.h index a26dc3e6..4a000eed 100644 --- a/src/app/driver/config/pex_cfg.h +++ b/src/app/driver/config/pex_cfg.h @@ -43,8 +43,8 @@ * @file pex_cfg.h * @author foxBMS Team * @date 2021-08-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix PEX * diff --git a/src/app/driver/config/spi_cfg.c b/src/app/driver/config/spi_cfg.c index 53ee5c29..f075fb6d 100644 --- a/src/app/driver/config/spi_cfg.c +++ b/src/app/driver/config/spi_cfg.c @@ -43,8 +43,8 @@ * @file spi_cfg.c * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix SPI * diff --git a/src/app/driver/config/spi_cfg.h b/src/app/driver/config/spi_cfg.h index 3d063a57..a97ae029 100644 --- a/src/app/driver/config/spi_cfg.h +++ b/src/app/driver/config/spi_cfg.h @@ -43,8 +43,8 @@ * @file spi_cfg.h * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix SPI * diff --git a/src/app/driver/config/sps_cfg.c b/src/app/driver/config/sps_cfg.c index 91065939..831063e9 100644 --- a/src/app/driver/config/sps_cfg.c +++ b/src/app/driver/config/sps_cfg.c @@ -43,8 +43,8 @@ * @file sps_cfg.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONF * @prefix SPS * diff --git a/src/app/driver/config/sps_cfg.h b/src/app/driver/config/sps_cfg.h index ca3f22cc..55c37bb5 100644 --- a/src/app/driver/config/sps_cfg.h +++ b/src/app/driver/config/sps_cfg.h @@ -43,8 +43,8 @@ * @file sps_cfg.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONF * @prefix SPS * @@ -82,6 +82,17 @@ /** Number of SPS IC that are populated on the hardware (in daisy-chain) */ #define SPS_NR_OF_IC (2u) +/** Defines for the individual SPS channels @{ */ +#define SPS_CHANNEL_0 ((SPS_CHANNEL_INDEX)0) +#define SPS_CHANNEL_1 ((SPS_CHANNEL_INDEX)1) +#define SPS_CHANNEL_2 ((SPS_CHANNEL_INDEX)2) +#define SPS_CHANNEL_3 ((SPS_CHANNEL_INDEX)3) +#define SPS_CHANNEL_4 ((SPS_CHANNEL_INDEX)4) +#define SPS_CHANNEL_5 ((SPS_CHANNEL_INDEX)5) +#define SPS_CHANNEL_6 ((SPS_CHANNEL_INDEX)6) +#define SPS_CHANNEL_7 ((SPS_CHANNEL_INDEX)7) +/**@}*/ + /** One channel for each contactor is required in this application */ #define SPS_NR_OF_REQUIRED_CONTACTOR_CHANNELS (BS_NR_OF_CONTACTORS) @@ -110,12 +121,12 @@ #define SPS_C_CONTROL_REGISTER_ADDRESS (0x16u) /**@}*/ /** Addresses of used diagnostic registers @{ */ -#define SPS_OD_IOUT1_DIAG_REGISTER_ADDRESS (0x08u) -#define SPS_OD_IOUT2_DIAG_REGISTER_ADDRESS (0x09u) -#define SPS_OD_IOUT3_DIAG_REGISTER_ADDRESS (0x0Au) -#define SPS_OD_IOUT4_DIAG_REGISTER_ADDRESS (0x0Bu) -#define SPS_EN_IRQ_PIN_DIAG_REGISTER_ADDRESS (0x11u) -#define SPS_EN_WARN_PIN_DIAG_REGISTER_ADDRESS (0x13u) +#define SPS_ISR_IRQ_DIAG_REGISTER_ADDRESS (0x06u) +#define SPS_ISR_WARN_DIAG_REGISTER_ADDRESS (0x07u) +#define SPS_OD_IOUT1_DIAG_REGISTER_ADDRESS (0x08u) +#define SPS_OD_IOUT2_DIAG_REGISTER_ADDRESS (0x09u) +#define SPS_OD_IOUT3_DIAG_REGISTER_ADDRESS (0x0Au) +#define SPS_OD_IOUT4_DIAG_REGISTER_ADDRESS (0x0Bu) /**@}*/ /** diff --git a/src/app/driver/config/tsi_plausibility_cfg.h b/src/app/driver/config/tsi_plausibility_cfg.h index 8015ed70..b9c8220b 100644 --- a/src/app/driver/config/tsi_plausibility_cfg.h +++ b/src/app/driver/config/tsi_plausibility_cfg.h @@ -43,8 +43,8 @@ * @file tsi_plausibility_cfg.h * @author foxBMS Team * @date 2019-01-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup MODULES * @prefix TSI * diff --git a/src/app/driver/contactor/contactor.c b/src/app/driver/contactor/contactor.c index 88edfe7b..e4e76c8e 100644 --- a/src/app/driver/contactor/contactor.c +++ b/src/app/driver/contactor/contactor.c @@ -43,8 +43,8 @@ * @file contactor.c * @author foxBMS Team * @date 2020-02-11 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CONT * @@ -55,6 +55,7 @@ /*========== Includes =======================================================*/ #include "contactor.h" +#include "diag.h" #include "mcu.h" #include "sps.h" @@ -66,237 +67,181 @@ /*========== Static Function Prototypes =====================================*/ /** - * @brief Resolves the contactor index from a contactor name - * @details Searches in the contactor index by iteration from front to back for - * the contactor name and returns the first hit. - * @param[in] name Name of the contactor - * @returns index number of the entry in the contactor array + * @brief Reads the feedback of all contactors + * @details Gathers the feedback of all contactors from the configured feedback + * source (#CONT_FEEDBACK_TYPE_e). If #CONT_HAS_NO_FEEDBACK is + * configured,it is assumed that the contactor has reached the + * requested state. */ -static CONT_CONTACTOR_INDEX CONT_ResolveContactorName(const CONT_NAMES_e name); - -/** - * @brief Gets the contactor name from a contactor index - * @param[in] index index number of the contactor - * @returns Returns the name of the contactor - */ -static CONT_NAMES_e CONT_GetContactorName(const CONT_CONTACTOR_INDEX index); - -/** - * @brief Returns the sps channel index from a contactor index - * @details Currently this implementation maps simply in ascending order - */ -static SPS_CHANNEL_INDEX CONT_GetSpsChannelIndexFromContactor(const CONT_CONTACTOR_INDEX contactor); - -/** - * @brief Sets SPS channels according to contactors - * @details Currently this implementation assumes simple ascending order. - * @param[in] contactor index of the contactor that should be set - */ -static void CONT_SetSpsChannelFromContactor(const CONT_CONTACTOR_INDEX contactor); +static void CONT_GetFeedbackOfAllContactors(void); /** conducts an initialization test of the contactor registry and asserts at failure */ static void CONT_InitializationCheckOfContactorRegistry(void); /*========== Static Function Implementations ================================*/ -static CONT_CONTACTOR_INDEX CONT_ResolveContactorName(const CONT_NAMES_e name) { - CONT_CONTACTOR_INDEX contactor = 0u; - bool hit = false; - do { - if (name == cont_contactorStates[contactor].name) { - /* contactor found, therefore abort */ - hit = true; - } else { - /* continue and increase contactor counter */ - contactor++; - } - } while ((contactor < BS_NR_OF_CONTACTORS) && (true != hit)); - - /* an unknown contactor may not exist */ - FAS_ASSERT(hit == true); - - return contactor; -} - -static CONT_NAMES_e CONT_GetContactorName(const CONT_CONTACTOR_INDEX index) { - FAS_ASSERT(index < BS_NR_OF_CONTACTORS); - return cont_contactorStates[index].name; -} - -static SPS_CHANNEL_INDEX CONT_GetSpsChannelIndexFromContactor(const CONT_CONTACTOR_INDEX contactor) { - FAS_ASSERT(contactor < BS_NR_OF_CONTACTORS); - return cont_contactorStates[contactor].spsChannel; -} - -static void CONT_SetSpsChannelFromContactor(const CONT_CONTACTOR_INDEX contactor) { - FAS_ASSERT(contactor < BS_NR_OF_CONTACTORS); - switch (cont_contactorStates[contactor].currentSet) { - case CONT_SWITCH_UNDEF: - case CONT_SWITCH_OFF: - SPS_RequestContactorState(CONT_GetSpsChannelIndexFromContactor(contactor), SPS_CHANNEL_OFF); - break; - case CONT_SWITCH_ON: - SPS_RequestContactorState(CONT_GetSpsChannelIndexFromContactor(contactor), SPS_CHANNEL_ON); - break; - default: - FAS_ASSERT(FAS_TRAP); - break; - } -} - -static void CONT_InitializationCheckOfContactorRegistry(void) { - /* iterate over each contactor and compare found name with resolved name (if a name is used double this would - always return the first entry and we would have the second entry from iterating here) */ - for (CONT_CONTACTOR_INDEX contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { - const CONT_CONTACTOR_INDEX resolvedContactor = CONT_ResolveContactorName(cont_contactorStates[contactor].name); - FAS_ASSERT(contactor == resolvedContactor); - const CONT_NAMES_e contactorName = CONT_GetContactorName(contactor); - FAS_ASSERT(cont_contactorStates[contactor].name == contactorName); - - /* convention at the moment: sps channel index has to be the same as contactor index; this may change in - future implementations */ - FAS_ASSERT(contactor == cont_contactorStates[contactor].spsChannel); - - /* every contactor channel has to be affiliated with contactor */ - const SPS_CHANNEL_AFFILIATION_e channelAffiliation = - SPS_GetChannelAffiliation(cont_contactorStates[contactor].spsChannel); - FAS_ASSERT(SPS_AFF_CONTACTOR == channelAffiliation); - } -} - -/*========== Extern Function Implementations ================================*/ -extern CONT_ELECTRICAL_STATE_TYPE_e CONT_GetContactorSetValue(const CONT_NAMES_e name) { - CONT_CONTACTOR_INDEX contactorNumber = CONT_ResolveContactorName(name); - CONT_ELECTRICAL_STATE_TYPE_e contactorSetInformation = cont_contactorStates[contactorNumber].currentSet; - return contactorSetInformation; -} - -extern void CONT_GetContactorFeedback(void) { +static void CONT_GetFeedbackOfAllContactors(void) { + /* Iterate over all contactors */ for (CONT_CONTACTOR_INDEX contactor = 0; contactor < BS_NR_OF_CONTACTORS; contactor++) { - if (CONT_HAS_NO_FEEDBACK == cont_contactorStates[contactor].feedbackPinType) { + /* Use different feedback sources depending on the individual contactor configuration */ + if (cont_contactorStates[contactor].feedbackPinType == CONT_HAS_NO_FEEDBACK) { /* no feedback: assume set value is true */ cont_contactorStates[contactor].feedback = cont_contactorStates[contactor].currentSet; - } else if (CONT_FEEDBACK_THROUGH_CURRENT == cont_contactorStates[contactor].feedbackPinType) { + } else if (cont_contactorStates[contactor].feedbackPinType == CONT_FEEDBACK_THROUGH_CURRENT) { /* feedback from current: ask SPS driver for feedback */ cont_contactorStates[contactor].feedback = - SPS_GetChannelCurrentFeedback(CONT_GetSpsChannelIndexFromContactor(contactor)); + SPS_GetChannelCurrentFeedback(cont_contactorStates[contactor].spsChannel); } else if (CONT_FEEDBACK_NORMALLY_OPEN == cont_contactorStates[contactor].feedbackPinType) { cont_contactorStates[contactor].feedback = - SPS_GetChannelPexFeedback(CONT_GetSpsChannelIndexFromContactor(contactor), true); + SPS_GetChannelPexFeedback(cont_contactorStates[contactor].spsChannel, true); } else { /* CONT_FEEDBACK_NORMALLY_CLOSED */ cont_contactorStates[contactor].feedback = - SPS_GetChannelPexFeedback(CONT_GetSpsChannelIndexFromContactor(contactor), false); + SPS_GetChannelPexFeedback(cont_contactorStates[contactor].spsChannel, false); } } } -extern STD_RETURN_TYPE_e CONT_SetContactorState( - const CONT_NAMES_e name, - CONT_ELECTRICAL_STATE_TYPE_e requestedContactorState) { - CONT_CONTACTOR_INDEX contactor = CONT_ResolveContactorName(name); - FAS_ASSERT(contactor < BS_NR_OF_CONTACTORS); - FAS_ASSERT( - (requestedContactorState == CONT_SWITCH_OFF) || (requestedContactorState == CONT_SWITCH_ON) || - (requestedContactorState == CONT_SWITCH_UNDEF)); +static void CONT_InitializationCheckOfContactorRegistry(void) { + /* Iterate over each contactor and compare found name with resolved name (if a name is used double this would + always return the first entry and we would have the second entry from iterating here) */ + for (CONT_CONTACTOR_INDEX contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { + /* TODO: add check that only one contactor of each type is configured for each string */ - STD_RETURN_TYPE_e retVal = STD_OK; + /* Check that a configured SPS channel number is not higher than the number of available SPS channels */ + FAS_ASSERT(cont_contactorStates[contactor].spsChannel < SPS_NR_OF_AVAILABLE_SPS_CHANNELS); - if (requestedContactorState == CONT_SWITCH_ON) { - cont_contactorStates[contactor].currentSet = CONT_SWITCH_ON; - } else if (requestedContactorState == CONT_SWITCH_OFF) { - cont_contactorStates[contactor].currentSet = CONT_SWITCH_OFF; - } else { - retVal = STD_NOT_OK; + /* every contactor channel has to be affiliated with contactor */ + const SPS_CHANNEL_AFFILIATION_e channelAffiliation = + SPS_GetChannelAffiliation(cont_contactorStates[contactor].spsChannel); + FAS_ASSERT(SPS_AFF_CONTACTOR == channelAffiliation); } - - CONT_SetSpsChannelFromContactor(contactor); - - return retVal; } -/** - * @brief checks the feedback of the contactors - * - * @details makes a DIAG entry for each contactor when the feedback does not match the set value - */ +/*========== Extern Function Implementations ================================*/ extern void CONT_CheckFeedback(void) { - CONT_GetContactorFeedback(); - /* TODO implement when contactor feedback is available */ + /* Get the feedback from all contactors from the configured feedback sources */ + CONT_GetFeedbackOfAllContactors(); + /* Check the contactor feedback */ + for (CONT_CONTACTOR_INDEX contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { + /* TODO: add check that only one contactor of each type is configured for each string */ + DIAG_EVENT_e feedbackStatus = DIAG_EVENT_NOT_OK; + if (cont_contactorStates[contactor].currentSet == cont_contactorStates[contactor].feedback) { + /* Set feedback status to okay, if expected and actual contactor state match */ + feedbackStatus = DIAG_EVENT_OK; + } + switch (cont_contactorStates[contactor].type) { + case CONT_PLUS: + DIAG_Handler( + DIAG_ID_STRING_PLUS_CONTACTOR_FEEDBACK, + feedbackStatus, + DIAG_STRING, + (uint8_t)cont_contactorStates[contactor].stringIndex); + break; + case CONT_MINUS: + DIAG_Handler( + DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, + feedbackStatus, + DIAG_STRING, + (uint8_t)cont_contactorStates[contactor].stringIndex); + break; + case CONT_PRECHARGE: + DIAG_Handler( + DIAG_ID_PRECHARGE_CONTACTOR_FEEDBACK, + feedbackStatus, + DIAG_STRING, + (uint8_t)cont_contactorStates[contactor].stringIndex); + break; + default: + /* Type: CONT_UNDEFINED -> trap */ + FAS_ASSERT(FAS_TRAP); + } + } } -extern STD_RETURN_TYPE_e CONT_CloseString(uint8_t stringNumber) { +extern STD_RETURN_TYPE_e CONT_OpenContactor(uint8_t stringNumber, CONT_TYPE_e contactor) { FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); - /* String contactors in the list start at index 0 - * so string number corresponds to contactor index - */ - return CONT_SetContactorState(CONT_GetContactorName(stringNumber), CONT_SWITCH_ON); + FAS_ASSERT(contactor != CONT_UNDEFINED); + STD_RETURN_TYPE_e retval = STD_NOT_OK; + /* Iterate over contactor array, find the correct one and request state change via SPS module */ + for (uint8_t contactorIndex = 0u; contactorIndex < BS_NR_OF_CONTACTORS; contactorIndex++) { + if (((BS_STRING_ID_e)stringNumber == cont_contactorStates[contactorIndex].stringIndex) && + (contactor == cont_contactorStates[contactorIndex].type)) { + /* Set set state in cont_contactorStates array */ + cont_contactorStates[contactorIndex].currentSet = CONT_SWITCH_OFF; + /* Request contactor state via SPS module */ + SPS_RequestContactorState(cont_contactorStates[contactorIndex].spsChannel, SPS_CHANNEL_OFF); + retval = STD_OK; + break; + } + } + return retval; } -extern STD_RETURN_TYPE_e CONT_OpenString(uint8_t stringNumber) { +extern STD_RETURN_TYPE_e CONT_CloseContactor(uint8_t stringNumber, CONT_TYPE_e contactor) { FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); - /* String contactors in the list start at index 0 - * so string number corresponds to contactor index - */ - /* TODO: implement current check and similar when opening */ - return CONT_SetContactorState(CONT_GetContactorName(stringNumber), CONT_SWITCH_OFF); + FAS_ASSERT(contactor != CONT_UNDEFINED); + STD_RETURN_TYPE_e retval = STD_NOT_OK; + /* Iterate over contactor array, find the correct one and request state change via SPS module */ + for (uint8_t contactorIndex = 0u; contactorIndex < BS_NR_OF_CONTACTORS; contactorIndex++) { + if (((BS_STRING_ID_e)stringNumber == cont_contactorStates[contactorIndex].stringIndex) && + (contactor == cont_contactorStates[contactorIndex].type)) { + /* Set set state in cont_contactorStates array */ + cont_contactorStates[contactorIndex].currentSet = CONT_SWITCH_ON; + /* Request contactor state via SPS module */ + SPS_RequestContactorState(cont_contactorStates[contactorIndex].spsChannel, SPS_CHANNEL_ON); + retval = STD_OK; + break; + } + } + return retval; } extern STD_RETURN_TYPE_e CONT_ClosePrecharge(uint8_t stringNumber) { FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); - STD_RETURN_TYPE_e retVal = STD_NOT_OK; - uint8_t prechargeContactorNumber = 0u; - FAS_STATIC_ASSERT((BS_NR_OF_STRINGS <= (uint8_t)UINT8_MAX), "This code assumes BS_NR_OF_STRINGS fits into uint8_t"); - - /* Precharge contactors in the list stay after string contactors - * so it has index (number of contactors)-1 - */ + STD_RETURN_TYPE_e retVal = STD_NOT_OK; + /* Check if passed string has configured a precharge contactor */ if (bs_stringsWithPrecharge[stringNumber] == BS_STRING_WITH_PRECHARGE) { - /* Find contactor number corresponding to precharge of the requested string */ - for (uint8_t stringPrechargeNumber = 0u; stringPrechargeNumber < BS_NR_OF_STRINGS; stringPrechargeNumber++) { - if (bs_stringsWithPrecharge[stringPrechargeNumber] == BS_STRING_WITH_PRECHARGE) { - if (stringPrechargeNumber == stringNumber) { - break; - } - prechargeContactorNumber++; - } - } - if ((BS_NR_OF_STRINGS + prechargeContactorNumber) < BS_NR_OF_CONTACTORS) { - retVal = CONT_SetContactorState( - CONT_GetContactorName(BS_NR_OF_STRINGS + prechargeContactorNumber), CONT_SWITCH_ON); - } + retVal = CONT_CloseContactor(stringNumber, CONT_PRECHARGE); } return retVal; } extern STD_RETURN_TYPE_e CONT_OpenPrecharge(uint8_t stringNumber) { FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); - STD_RETURN_TYPE_e retVal = STD_NOT_OK; - uint8_t prechargeContactorNumber = 0u; - - /* Precharge contactors in the list stay after string contactors - * so it has index (number of contactors)-1 - */ + STD_RETURN_TYPE_e retVal = STD_NOT_OK; + /* Check if passed string has configured a precharge contactor */ if (bs_stringsWithPrecharge[stringNumber] == BS_STRING_WITH_PRECHARGE) { - /* Find contactor number corresponding to precharge of the requested string */ - for (uint8_t stringPrechargeNumber = 0u; stringPrechargeNumber < BS_NR_OF_STRINGS; stringPrechargeNumber++) { - if (bs_stringsWithPrecharge[stringPrechargeNumber] == BS_STRING_WITH_PRECHARGE) { - if (stringPrechargeNumber == stringNumber) { - break; - } - prechargeContactorNumber++; - } - } - if ((BS_NR_OF_STRINGS + prechargeContactorNumber) < BS_NR_OF_CONTACTORS) { - retVal = CONT_SetContactorState( - CONT_GetContactorName(BS_NR_OF_STRINGS + prechargeContactorNumber), CONT_SWITCH_OFF); - } + retVal = CONT_OpenContactor(stringNumber, CONT_PRECHARGE); } return retVal; } -extern CONT_ELECTRICAL_STATE_TYPE_e CONT_GetState(uint8_t contactorNumber) { - FAS_ASSERT(contactorNumber < BS_NR_OF_CONTACTORS); - return (cont_contactorStates[contactorNumber].feedback); +extern void CONT_OpenAllPrechargeContactors(void) { + /* Iterate over all contactors and open all precharge contactors */ + for (uint8_t contactorIndex = 0u; contactorIndex < BS_NR_OF_CONTACTORS; contactorIndex++) { + /* Set off a request to open all precharge contactors regardless of + * their current state as we want to reach a safe state */ + if (cont_contactorStates[contactorIndex].type == CONT_PRECHARGE) { + /* Request opening via SPS module */ + SPS_RequestContactorState(cont_contactorStates[contactorIndex].spsChannel, SPS_CHANNEL_OFF); + cont_contactorStates[contactorIndex].currentSet = CONT_SWITCH_OFF; + } + } +} + +extern CONT_ELECTRICAL_STATE_TYPE_e CONT_GetContactorState(uint8_t stringNumber, CONT_TYPE_e contactorType) { + FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); + FAS_ASSERT(contactorType != CONT_UNDEFINED); + CONT_ELECTRICAL_STATE_TYPE_e feedback = CONT_SWITCH_UNDEFINED; + /* Iterate over all contactors and return the requested feedback */ + for (uint8_t contactorIndex = 0u; contactorIndex < BS_NR_OF_CONTACTORS; contactorIndex++) { + if ((cont_contactorStates[contactorIndex].stringIndex == (BS_STRING_ID_e)stringNumber) && + (contactorType == cont_contactorStates[contactorIndex].type)) { + feedback = cont_contactorStates[contactorIndex].feedback; + break; + } + } + return feedback; } extern void CONT_Initialize(void) { @@ -308,7 +253,4 @@ extern void CONT_Initialize(void) { extern void TEST_CONT_InitializationCheckOfContactorRegistry() { CONT_InitializationCheckOfContactorRegistry(); } -extern CONT_CONTACTOR_INDEX TEST_CONT_ResolveContactorName(const CONT_NAMES_e name) { - return CONT_ResolveContactorName(name); -} #endif /* UNITY_UNIT_TEST */ diff --git a/src/app/driver/contactor/contactor.h b/src/app/driver/contactor/contactor.h index 14e59cec..8063d842 100644 --- a/src/app/driver/contactor/contactor.h +++ b/src/app/driver/contactor/contactor.h @@ -43,8 +43,8 @@ * @file contactor.h * @author foxBMS Team * @date 2020-02-11 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CONT * @@ -63,82 +63,37 @@ /*========== Extern Constant and Variable Declarations ======================*/ /*========== Extern Function Prototypes =====================================*/ - -/** - * @brief Gets the latest value the contactors were set to. - * @param[in] name name of the contactor - * @return returns CONT_SWITCH_OFF or CONT_SWITCH_ON - */ -extern CONT_ELECTRICAL_STATE_TYPE_e CONT_GetContactorSetValue(const CONT_NAMES_e name); - -/** - * @brief Reads the feedback pin of every contactor and returns its current - * value (#CONT_SWITCH_OFF/#CONT_SWITCH_ON). - * @details If the contactor has a feedback pin the measured feedback is - * returned. If the contactor has no feedback pin, it is assumed that - * after a certain time the contactor has reached the requested state. - */ -void CONT_GetContactorFeedback(void); - /** - * @brief Sets the contactor state to its requested state, if the contactor - * is at that time not in the requested state. - * @details If the new state was already requested, but not reached (meaning - * the measured feedback does not return the requested state), there - * are two states: it can be still ok (#STD_OK), because the contactor - * has some time left to get physically in the requested state (passed - * time since the request is lower than the limit) or it can be not ok - * (#STD_NOT_OK), because there is timing violation, i.e. the - * contactor has surpassed the maximum time for getting in the - * requested state. It returns #STD_OK if the requested state was - * successfully set or if the contactor was at the requested state - * before. - * @param name - * @param requestedContactorState - * @return retVal (type: STD_RETURN_TYPE_e) - */ -extern STD_RETURN_TYPE_e CONT_SetContactorState( - const CONT_NAMES_e name, - CONT_ELECTRICAL_STATE_TYPE_e requestedContactorState); - -/** @brief Substates of the CONT state machine */ -typedef enum { - CONT_ENTRY, - CONT_SET_EDGE_LOW_INIT, - CONT_SET_EDGE_HIGH, - CONT_SET_EDGE_LOW, - CONT_CHECK_REQUESTS, -} CONT_STATEMACH_SUB_e; - -/** - * @brief Gets the current state. + * @brief Returns the current contactor state. * @details This function is used in the functioning of the CONT state machine. - * @param contactorNumber contactor to be addressed + * @param stringNumber string in which the contactor is placed + * @param contactorType contactor type for which the feedback is requested * @return current state, taken from #CONT_ELECTRICAL_STATE_TYPE_e */ -extern CONT_ELECTRICAL_STATE_TYPE_e CONT_GetState(uint8_t contactorNumber); +extern CONT_ELECTRICAL_STATE_TYPE_e CONT_GetContactorState(uint8_t stringNumber, CONT_TYPE_e contactorType); /** - * @brief Closes the contactor of a string. - * @details This function makes a close state request to the contactor of a - * specific string. + * @brief Opens the contactor + * @details This function makes an open state request to the specific contactor * @param stringNumber String addressed + * @param contactor contactor adressed */ -extern STD_RETURN_TYPE_e CONT_CloseString(uint8_t stringNumber); +extern STD_RETURN_TYPE_e CONT_OpenContactor(uint8_t stringNumber, CONT_TYPE_e contactor); /** - * @brief Opens the contactor of a string. - * @details This function makes an open state request to the contactor of a - * specific string. + * @brief Closes the contactor + * @details This function makes an close state request to the specific contactor * @param stringNumber String addressed + * @param contactor contactor adressed */ -extern STD_RETURN_TYPE_e CONT_OpenString(uint8_t stringNumber); +extern STD_RETURN_TYPE_e CONT_CloseContactor(uint8_t stringNumber, CONT_TYPE_e contactor); /** * @brief Closes precharge. * @details This function makes a close state request to the precharge * contactor. * @param stringNumber String addressed + * @return #STD_OK if requested contactor exists and close requested, otherwise #STD_NOT_OK */ extern STD_RETURN_TYPE_e CONT_ClosePrecharge(uint8_t stringNumber); @@ -151,7 +106,15 @@ extern STD_RETURN_TYPE_e CONT_ClosePrecharge(uint8_t stringNumber); extern STD_RETURN_TYPE_e CONT_OpenPrecharge(uint8_t stringNumber); /** - * @brief checks the feedback of the contactors + * @brief Open all currently closed precharge contactors + * @details This function iterates over all contactors and opens all currently + * closed precharge contactors + * @return none (void) + */ +extern void CONT_OpenAllPrechargeContactors(void); + +/** + * @brief checks the feedback of all contactors * @details makes a DIAG entry for each contactor when the feedback does not * match the set value */ @@ -165,7 +128,6 @@ extern void CONT_Initialize(void); /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ #ifdef UNITY_UNIT_TEST extern void TEST_CONT_InitializationCheckOfContactorRegistry(void); -extern CONT_CONTACTOR_INDEX TEST_CONT_ResolveContactorName(const CONT_NAMES_e name); #endif /* UNITY_UNIT_TEST */ #endif /* FOXBMS__CONTACTOR_H_ */ diff --git a/src/app/driver/crc/crc.c b/src/app/driver/crc/crc.c index 5c64ea11..0c1d5ed2 100644 --- a/src/app/driver/crc/crc.c +++ b/src/app/driver/crc/crc.c @@ -43,8 +43,8 @@ * @file crc.c * @author foxBMS Team * @date 2022-02-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CRC * diff --git a/src/app/driver/crc/crc.h b/src/app/driver/crc/crc.h index cf586a46..9d0faf42 100644 --- a/src/app/driver/crc/crc.h +++ b/src/app/driver/crc/crc.h @@ -43,8 +43,8 @@ * @file crc.h * @author foxBMS Team * @date 2022-02-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix CRC * diff --git a/src/app/driver/dma/dma.c b/src/app/driver/dma/dma.c index ac0e4fcc..c000f7d7 100644 --- a/src/app/driver/dma/dma.c +++ b/src/app/driver/dma/dma.c @@ -43,8 +43,8 @@ * @file dma.c * @author foxBMS Team * @date 2019-12-12 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix DMA * diff --git a/src/app/driver/dma/dma.h b/src/app/driver/dma/dma.h index f7390e32..349f18cd 100644 --- a/src/app/driver/dma/dma.h +++ b/src/app/driver/dma/dma.h @@ -43,8 +43,8 @@ * @file dma.h * @author foxBMS Team * @date 2019-12-12 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix DMA * diff --git a/src/app/driver/foxmath/foxmath.c b/src/app/driver/foxmath/foxmath.c index aad83043..a3a96ea1 100644 --- a/src/app/driver/foxmath/foxmath.c +++ b/src/app/driver/foxmath/foxmath.c @@ -43,8 +43,8 @@ * @file foxmath.c * @author foxBMS Team * @date 2018-01-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MATH * diff --git a/src/app/driver/foxmath/foxmath.h b/src/app/driver/foxmath/foxmath.h index 26665425..64ea2d44 100644 --- a/src/app/driver/foxmath/foxmath.h +++ b/src/app/driver/foxmath/foxmath.h @@ -43,8 +43,8 @@ * @file foxmath.h * @author foxBMS Team * @date 2018-01-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MATH * diff --git a/src/app/driver/fram/fram.c b/src/app/driver/fram/fram.c index 08be0488..82334afd 100644 --- a/src/app/driver/fram/fram.c +++ b/src/app/driver/fram/fram.c @@ -43,8 +43,8 @@ * @file fram.c * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix FRAM * diff --git a/src/app/driver/fram/fram.h b/src/app/driver/fram/fram.h index 09beb2cd..e3d2f157 100644 --- a/src/app/driver/fram/fram.h +++ b/src/app/driver/fram/fram.h @@ -43,8 +43,8 @@ * @file fram.h * @author foxBMS Team * @date 2020-03-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix FRAM * diff --git a/src/app/driver/htsensor/htsensor.c b/src/app/driver/htsensor/htsensor.c index 4a9a0e24..b5abe9d3 100644 --- a/src/app/driver/htsensor/htsensor.c +++ b/src/app/driver/htsensor/htsensor.c @@ -43,8 +43,8 @@ * @file htsensor.c * @author foxBMS Team * @date 2021-08-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix HTSEN * diff --git a/src/app/driver/htsensor/htsensor.h b/src/app/driver/htsensor/htsensor.h index 58123964..0cb1a662 100644 --- a/src/app/driver/htsensor/htsensor.h +++ b/src/app/driver/htsensor/htsensor.h @@ -43,8 +43,8 @@ * @file htsensor.h * @author foxBMS Team * @date 2021-08-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix HTSEN * diff --git a/src/app/driver/i2c/i2c.c b/src/app/driver/i2c/i2c.c index 9ac541eb..d718d8e7 100644 --- a/src/app/driver/i2c/i2c.c +++ b/src/app/driver/i2c/i2c.c @@ -43,8 +43,8 @@ * @file i2c.c * @author foxBMS Team * @date 2021-07-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix I2C * diff --git a/src/app/driver/i2c/i2c.h b/src/app/driver/i2c/i2c.h index 98ba6534..5c869b89 100644 --- a/src/app/driver/i2c/i2c.h +++ b/src/app/driver/i2c/i2c.h @@ -43,8 +43,8 @@ * @file i2c.h * @author foxBMS Team * @date 2021-07-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix I2C * diff --git a/src/app/driver/imd/bender/ir155/bender_ir155.c b/src/app/driver/imd/bender/ir155/bender_ir155.c index abebfc14..c588cf0a 100644 --- a/src/app/driver/imd/bender/ir155/bender_ir155.c +++ b/src/app/driver/imd/bender/ir155/bender_ir155.c @@ -43,8 +43,8 @@ * @file bender_ir155.c * @author foxBMS Team * @date 2014-02-11 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix IR155 * diff --git a/src/app/driver/imd/bender/ir155/bender_ir155.h b/src/app/driver/imd/bender/ir155/bender_ir155.h index ca4ba07b..92b41087 100644 --- a/src/app/driver/imd/bender/ir155/bender_ir155.h +++ b/src/app/driver/imd/bender/ir155/bender_ir155.h @@ -43,8 +43,8 @@ * @file bender_ir155.h * @author foxBMS Team * @date 2021-09-06 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix IR155 * diff --git a/src/app/driver/imd/bender/ir155/bender_ir155_helper.c b/src/app/driver/imd/bender/ir155/bender_ir155_helper.c index f5578c59..f9f331e6 100644 --- a/src/app/driver/imd/bender/ir155/bender_ir155_helper.c +++ b/src/app/driver/imd/bender/ir155/bender_ir155_helper.c @@ -43,8 +43,8 @@ * @file bender_ir155_helper.c * @author foxBMS Team * @date 2021-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix IR155 * diff --git a/src/app/driver/imd/bender/ir155/bender_ir155_helper.h b/src/app/driver/imd/bender/ir155/bender_ir155_helper.h index 717d58d5..354385cb 100644 --- a/src/app/driver/imd/bender/ir155/bender_ir155_helper.h +++ b/src/app/driver/imd/bender/ir155/bender_ir155_helper.h @@ -43,8 +43,8 @@ * @file bender_ir155_helper.h * @author foxBMS Team * @date 2021-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix IR155 * diff --git a/src/app/driver/imd/bender/ir155/config/bender_ir155_cfg.h b/src/app/driver/imd/bender/ir155/config/bender_ir155_cfg.h index 773c9e7c..8afb4f0f 100644 --- a/src/app/driver/imd/bender/ir155/config/bender_ir155_cfg.h +++ b/src/app/driver/imd/bender/ir155/config/bender_ir155_cfg.h @@ -43,8 +43,8 @@ * @file bender_ir155_cfg.h * @author foxBMS Team * @date 2021-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix IR155 * diff --git a/src/app/driver/imd/bender/ir155/wscript b/src/app/driver/imd/bender/ir155/wscript index ffdd81f6..78733d84 100644 --- a/src/app/driver/imd/bender/ir155/wscript +++ b/src/app/driver/imd/bender/ir155/wscript @@ -77,6 +77,6 @@ def build(bld): source=source, use="imd-device", includes=includes, - target=f"{bld.env.APPNAME}-imd", + target=f"{bld.env.APPNAME.lower()}-imd", cflags=cflags, ) diff --git a/src/app/driver/imd/bender/iso165c/bender_iso165c.c b/src/app/driver/imd/bender/iso165c/bender_iso165c.c index b642e5b7..7557fe2a 100644 --- a/src/app/driver/imd/bender/iso165c/bender_iso165c.c +++ b/src/app/driver/imd/bender/iso165c/bender_iso165c.c @@ -43,8 +43,8 @@ * @file bender_iso165c.c * @author foxBMS Team * @date 2019-04-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix I165C * @@ -60,6 +60,7 @@ #include "database_cfg.h" #include "can.h" +#include "can_cfg_rx-message-definitions.h" #include "can_helper.h" #include "database.h" #include "ftask.h" @@ -213,8 +214,8 @@ static I165C_DISABLE_STATE_s i165c_disableState = { .receptionTriesMessage = 0u, }; -static CAN_BUFFERELEMENT_s i165c_canTxMessage = {0u}; -static CAN_BUFFERELEMENT_s i165c_canRxMessage = {0u}; +static CAN_BUFFER_ELEMENT_s i165c_canTxMessage = {0u}; +static CAN_BUFFER_ELEMENT_s i165c_canRxMessage = {0u}; /*========== Extern Constant and Variable Definitions =======================*/ @@ -290,7 +291,7 @@ static IMD_FSM_STATES_e I165C_Running(DATA_BLOCK_INSULATION_MONITORING_s *pTable * @details Used before starting a new transmission. * @param[in,out] pCanMessage pointer to CAN data to be reset */ -static void I165C_ResetCanData(CAN_BUFFERELEMENT_s *pCanMessage); +static void I165C_ResetCanData(CAN_BUFFER_ELEMENT_s *pCanMessage); /** * @brief Write data in data word for CAN transmission. @@ -299,7 +300,7 @@ static void I165C_ResetCanData(CAN_BUFFERELEMENT_s *pCanMessage); * @param data data to be written in data word * @param[in] pCanMessage CAN structure to be used for transmission */ -static void I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFERELEMENT_s *pCanMessage); +static void I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFER_ELEMENT_s *pCanMessage); /** * @brief Get data in data word from CAN transmission. @@ -308,7 +309,7 @@ static void I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFERELEME * @param[out] pData pointer where to put read data from data word * @param canMessage CAN structure used for transmission */ -static void I165C_ReadDataWord(uint8_t dataWord, uint16_t *pData, CAN_BUFFERELEMENT_s canMessage); +static void I165C_ReadDataWord(uint8_t dataWord, uint16_t *pData, CAN_BUFFER_ELEMENT_s canMessage); /** * @brief Get data in data word from CAN transmission, for the specific @@ -318,7 +319,7 @@ static void I165C_ReadDataWord(uint8_t dataWord, uint16_t *pData, CAN_BUFFERELEM * @param[out] pData pointer where to put read data from data word * @param canMessage CAN structure used for transmission */ -static void I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *pData, CAN_BUFFERELEMENT_s canMessage); +static void I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *pData, CAN_BUFFER_ELEMENT_s canMessage); /** * @brief Get data in data byte from CAN transmission. @@ -327,7 +328,7 @@ static void I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *pData, CAN_BUF * @param[out] pData pointer where to put read data from data byte * @param canMessage CAN structure used for transmission */ -static void I165C_ReadDataByte(uint8_t dataByte, uint8_t *pData, CAN_BUFFERELEMENT_s canMessage); +static void I165C_ReadDataByte(uint8_t dataByte, uint8_t *pData, CAN_BUFFER_ELEMENT_s canMessage); /** * @brief Compose CAN message for CAN transmission. @@ -337,7 +338,7 @@ static void I165C_ReadDataByte(uint8_t dataByte, uint8_t *pData, CAN_BUFFERELEME * further) * @param[out] pCanMessage pointer to CAN structure to be used for transmission */ -static void I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFERELEMENT_s *pCanMessage); +static void I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFER_ELEMENT_s *pCanMessage); /** * @brief Check if iso165c acknowledged reception of sent message @@ -348,7 +349,7 @@ static void I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFERELEMENT_s *pCa * @param[in] pCanMessage pointer to CAN data sent by the iso165c * @return true if transmission acknowledged, false otherwise */ -static bool I165C_CheckResponse(uint8_t command, CAN_BUFFERELEMENT_s *pCanMessage); +static bool I165C_CheckResponse(uint8_t command, CAN_BUFFER_ELEMENT_s *pCanMessage); /** * @brief Get IMD Info from iso165c @@ -356,7 +357,7 @@ static bool I165C_CheckResponse(uint8_t command, CAN_BUFFERELEMENT_s *pCanMessag * @param[in] pCanMessage pointer to CAN data sent by the iso165c * @return true if IMD_Info message was received, false otherwise */ -static bool I165C_GetImdInfo(CAN_BUFFERELEMENT_s *pCanMessage); +static bool I165C_GetImdInfo(CAN_BUFFER_ELEMENT_s *pCanMessage); /** * @brief Check if iso165c was initialized and is running @@ -367,7 +368,7 @@ static bool I165C_GetImdInfo(CAN_BUFFERELEMENT_s *pCanMessage); * @param[in] canMessage IMD_Info to be checked, sent by the iso165c * @return true if IMD_Info was received, false otherwise */ -static bool I165C_IsSelfTestFinished(CAN_BUFFERELEMENT_s canMessage); +static bool I165C_IsSelfTestFinished(CAN_BUFFER_ELEMENT_s canMessage); /** * @brief Check if iso165c has already been performed previously @@ -376,7 +377,7 @@ static bool I165C_IsSelfTestFinished(CAN_BUFFERELEMENT_s canMessage); * @param[in] canMessage IMD_Info to be checked, sent by the iso165c * @return true if self-test has already been executed, false otherwise */ -static bool I165C_HasSelfTestBeenExecuted(CAN_BUFFERELEMENT_s canMessage); +static bool I165C_HasSelfTestBeenExecuted(CAN_BUFFER_ELEMENT_s canMessage); /** * @brief Set state of HV relay @@ -398,7 +399,7 @@ static void I165C_RequestRelayState(uint8_t relay); * @param[in] relayState relay opened or closed * @return true if state matches, otherwise false */ -static bool I165C_CheckRelayState(CAN_BUFFERELEMENT_s canMessage, uint8_t relay, uint8_t relayState); +static bool I165C_CheckRelayState(CAN_BUFFER_ELEMENT_s canMessage, uint8_t relay, uint8_t relayState); /** * @brief Set measurement mode @@ -412,7 +413,7 @@ static void I165C_SetMeasurementMode(uint8_t mode); * @param[in] mode IMD measurement mode (activated or deactivated) * @return true, if measurement mode matches, otherwise false */ -static bool I165C_CheckMeasurementMode(CAN_BUFFERELEMENT_s canMessage, uint8_t mode); +static bool I165C_CheckMeasurementMode(CAN_BUFFER_ELEMENT_s canMessage, uint8_t mode); /** * @brief Set average factor of the insulation resistance averaging algorithm @@ -427,7 +428,7 @@ static void I165C_SetAveragingFactor(uint8_t averagingFactor); * @param[in] pCanMessage pointer to CAN data sent by the iso165c * @return true if Acknowledge has been received, otherwise false */ -static bool I165C_CheckAcknowledgeArrived(uint8_t command, uint8_t *pTries, CAN_BUFFERELEMENT_s *pCanMessage); +static bool I165C_CheckAcknowledgeArrived(uint8_t command, uint8_t *pTries, CAN_BUFFER_ELEMENT_s *pCanMessage); /*========== Static Function Implementations ================================*/ static void I165C_SetInitializationState( @@ -498,14 +499,14 @@ static void I165C_SetDisableState( } } -static void I165C_ResetCanData(CAN_BUFFERELEMENT_s *pCanMessage) { +static void I165C_ResetCanData(CAN_BUFFER_ELEMENT_s *pCanMessage) { FAS_ASSERT(pCanMessage != NULL_PTR); - for (uint8_t i = 0u; i < CAN_DLC; i++) { + for (uint8_t i = 0u; i < CAN_DEFAULT_DLC; i++) { pCanMessage->data[i] = 0u; } } -static void I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFERELEMENT_s *pCanMessage) { +static void I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFER_ELEMENT_s *pCanMessage) { FAS_ASSERT(pCanMessage != NULL_PTR); /* See data sheet section 6.1 page 15 */ if (dataWord == I165C_DW1) { @@ -518,7 +519,7 @@ static void I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFERELEME } } -static void I165C_ReadDataWord(uint8_t dataWord, uint16_t *pData, CAN_BUFFERELEMENT_s canMessage) { +static void I165C_ReadDataWord(uint8_t dataWord, uint16_t *pData, CAN_BUFFER_ELEMENT_s canMessage) { FAS_ASSERT(pData != NULL_PTR); /* See data sheet section 6.1 page 15 */ if (dataWord == I165C_DW1) { @@ -535,7 +536,7 @@ static void I165C_ReadDataWord(uint8_t dataWord, uint16_t *pData, CAN_BUFFERELEM } } -static void I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *pData, CAN_BUFFERELEMENT_s canMessage) { +static void I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *pData, CAN_BUFFER_ELEMENT_s canMessage) { FAS_ASSERT(pData != NULL_PTR); /* See data sheet section 6.1 page 15 */ if (dataWord == I165C_DW1) { @@ -552,7 +553,7 @@ static void I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *pData, CAN_BUF } } -static void I165C_ReadDataByte(uint8_t dataByte, uint8_t *pData, CAN_BUFFERELEMENT_s canMessage) { +static void I165C_ReadDataByte(uint8_t dataByte, uint8_t *pData, CAN_BUFFER_ELEMENT_s canMessage) { FAS_ASSERT(pData != NULL_PTR); /* See data sheet section 6.1 page 15 */ switch (dataByte) { @@ -574,7 +575,7 @@ static void I165C_ReadDataByte(uint8_t dataByte, uint8_t *pData, CAN_BUFFERELEME } } -static void I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFERELEMENT_s *pCanMessage) { +static void I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFER_ELEMENT_s *pCanMessage) { FAS_ASSERT(pCanMessage != NULL_PTR); /* CAN message is a request, set ID accordingly */ pCanMessage->id = id; @@ -582,7 +583,7 @@ static void I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFERELEMENT_s *pCa pCanMessage->data[CAN_BYTE_0_POSITION] = command; } -static bool I165C_CheckResponse(uint8_t command, CAN_BUFFERELEMENT_s *pCanMessage) { +static bool I165C_CheckResponse(uint8_t command, CAN_BUFFER_ELEMENT_s *pCanMessage) { FAS_ASSERT(pCanMessage != NULL_PTR); bool messageReceived = false; uint8_t numberItems = 0u; @@ -594,7 +595,7 @@ static bool I165C_CheckResponse(uint8_t command, CAN_BUFFERELEMENT_s *pCanMessag if (numberItems > 0u) { if (OS_ReceiveFromQueue(ftsk_imdCanDataQueue, (void *)pCanMessage, 0u) == OS_SUCCESS) { /* data queue was no empty */ - if ((command == pCanMessage->data[CAN_BYTE_0_POSITION]) && (pCanMessage->id == CAN_ID_IMD_RESPONSE)) { + if ((command == pCanMessage->data[CAN_BYTE_0_POSITION]) && (pCanMessage->id == CANRX_IMD_RESPONSE_ID)) { messageReceived = true; break; } @@ -606,7 +607,7 @@ static bool I165C_CheckResponse(uint8_t command, CAN_BUFFERELEMENT_s *pCanMessag return messageReceived; } -static bool I165C_GetImdInfo(CAN_BUFFERELEMENT_s *pCanMessage) { +static bool I165C_GetImdInfo(CAN_BUFFER_ELEMENT_s *pCanMessage) { FAS_ASSERT(pCanMessage != NULL_PTR); bool imdInfoReceived = false; uint8_t numberItems = 0u; @@ -630,7 +631,7 @@ static bool I165C_GetImdInfo(CAN_BUFFERELEMENT_s *pCanMessage) { return imdInfoReceived; } -static bool I165C_IsSelfTestFinished(CAN_BUFFERELEMENT_s canMessage) { +static bool I165C_IsSelfTestFinished(CAN_BUFFER_ELEMENT_s canMessage) { bool initialized = true; uint16_t data = 0u; @@ -669,7 +670,7 @@ static bool I165C_IsSelfTestFinished(CAN_BUFFERELEMENT_s canMessage) { return initialized; } -static bool I165C_HasSelfTestBeenExecuted(CAN_BUFFERELEMENT_s canMessage) { +static bool I165C_HasSelfTestBeenExecuted(CAN_BUFFER_ELEMENT_s canMessage) { bool anySelfTestExecuted = false; uint16_t data = 0u; @@ -715,7 +716,7 @@ static void I165C_RequestRelayState(uint8_t relay) { CAN_DataSend(I165C_CAN_NODE, i165c_canTxMessage.id, i165c_canTxMessage.data); } -static bool I165C_CheckRelayState(CAN_BUFFERELEMENT_s canMessage, uint8_t relay, uint8_t relayState) { +static bool I165C_CheckRelayState(CAN_BUFFER_ELEMENT_s canMessage, uint8_t relay, uint8_t relayState) { FAS_ASSERT((relay == I165C_D_VIFC_HV_RELAIS_NEGATIVE) || (relay == I165C_D_VIFC_HV_RELAIS_POSITIVE)); FAS_ASSERT((relayState == I165C_RELAY_STATE_OPEN) || (relayState == I165C_RELAY_STATE_CLOSED)); bool checkSuccess = true; @@ -748,7 +749,7 @@ static void I165C_SetMeasurementMode(uint8_t mode) { CAN_DataSend(I165C_CAN_NODE, i165c_canTxMessage.id, i165c_canTxMessage.data); } -static bool I165C_CheckMeasurementMode(CAN_BUFFERELEMENT_s canMessage, uint8_t mode) { +static bool I165C_CheckMeasurementMode(CAN_BUFFER_ELEMENT_s canMessage, uint8_t mode) { FAS_ASSERT((mode == I165C_ENABLE_MEASUREMENT) || (mode == I165C_DISABLE_MEASUREMENT)); bool measurementModeMatches = false; uint16_t dVIFCStatus = 0u; @@ -780,7 +781,7 @@ static void I165C_SetAveragingFactor(uint8_t averagingFactor) { CAN_DataSend(I165C_CAN_NODE, i165c_canTxMessage.id, i165c_canTxMessage.data); } -static bool I165C_CheckAcknowledgeArrived(uint8_t command, uint8_t *pTries, CAN_BUFFERELEMENT_s *pCanMessage) { +static bool I165C_CheckAcknowledgeArrived(uint8_t command, uint8_t *pTries, CAN_BUFFER_ELEMENT_s *pCanMessage) { FAS_ASSERT(pTries != NULL_PTR); FAS_ASSERT(pCanMessage != NULL_PTR); /* AXIVION Routine Generic-MissingParameterAssert: command: parameter accepts whole range */ @@ -1486,34 +1487,34 @@ extern IMD_FSM_STATES_e IMD_ProcessShutdownState(void) { /*========== Externalized Static Function Implementations (Unit Test) =======*/ #ifdef UNITY_UNIT_TEST -extern void TEST_I165C_ResetCanData(CAN_BUFFERELEMENT_s *canMessage) { +extern void TEST_I165C_ResetCanData(CAN_BUFFER_ELEMENT_s *canMessage) { I165C_ResetCanData(canMessage); } -extern void TEST_I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFERELEMENT_s *canMessage) { +extern void TEST_I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFER_ELEMENT_s *canMessage) { I165C_WriteDataWord(dataWord, data, canMessage); } -extern void TEST_I165C_ReadDataWord(uint8_t dataWord, uint16_t *data, CAN_BUFFERELEMENT_s canMessage) { +extern void TEST_I165C_ReadDataWord(uint8_t dataWord, uint16_t *data, CAN_BUFFER_ELEMENT_s canMessage) { I165C_ReadDataWord(dataWord, data, canMessage); } -extern void TEST_I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *data, CAN_BUFFERELEMENT_s canMessage) { +extern void TEST_I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *data, CAN_BUFFER_ELEMENT_s canMessage) { I165C_ReadDataWordImdInfo(dataWord, data, canMessage); } -extern void TEST_I165C_ReadDataByte(uint8_t dataByte, uint8_t *data, CAN_BUFFERELEMENT_s canMessage) { +extern void TEST_I165C_ReadDataByte(uint8_t dataByte, uint8_t *data, CAN_BUFFER_ELEMENT_s canMessage) { I165C_ReadDataByte(dataByte, data, canMessage); } -extern void TEST_I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFERELEMENT_s *canMessage) { +extern void TEST_I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFER_ELEMENT_s *canMessage) { I165C_WriteCmd(id, command, canMessage); } -extern bool TEST_I165C_CheckResponse(uint8_t command, CAN_BUFFERELEMENT_s *canMessage) { +extern bool TEST_I165C_CheckResponse(uint8_t command, CAN_BUFFER_ELEMENT_s *canMessage) { return I165C_CheckResponse(command, canMessage); } -extern bool TEST_I165C_GetImdInfo(CAN_BUFFERELEMENT_s *canMessage) { +extern bool TEST_I165C_GetImdInfo(CAN_BUFFER_ELEMENT_s *canMessage) { return I165C_GetImdInfo(canMessage); } -extern bool TEST_I165C_IsSelfTestFinished(CAN_BUFFERELEMENT_s canMessage) { +extern bool TEST_I165C_IsSelfTestFinished(CAN_BUFFER_ELEMENT_s canMessage) { return I165C_IsSelfTestFinished(canMessage); } -extern bool TEST_I165C_CheckAcknowledgeArrived(uint8_t command, uint8_t *tries, CAN_BUFFERELEMENT_s *canMessage) { +extern bool TEST_I165C_CheckAcknowledgeArrived(uint8_t command, uint8_t *tries, CAN_BUFFER_ELEMENT_s *canMessage) { return I165C_CheckAcknowledgeArrived(command, tries, canMessage); } diff --git a/src/app/driver/imd/bender/iso165c/bender_iso165c.h b/src/app/driver/imd/bender/iso165c/bender_iso165c.h index aada1ae1..4b972805 100644 --- a/src/app/driver/imd/bender/iso165c/bender_iso165c.h +++ b/src/app/driver/imd/bender/iso165c/bender_iso165c.h @@ -43,8 +43,8 @@ * @file bender_iso165c.h * @author foxBMS Team * @date 2019-04-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix I165C * @@ -73,16 +73,16 @@ /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ #ifdef UNITY_UNIT_TEST -extern void TEST_I165C_ResetCanData(CAN_BUFFERELEMENT_s *canMessage); -extern void TEST_I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFERELEMENT_s *canMessage); -extern void TEST_I165C_ReadDataWord(uint8_t dataWord, uint16_t *data, CAN_BUFFERELEMENT_s canMessage); -extern void TEST_I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *data, CAN_BUFFERELEMENT_s canMessage); -extern void TEST_I165C_ReadDataByte(uint8_t dataByte, uint8_t *data, CAN_BUFFERELEMENT_s canMessage); -extern void TEST_I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFERELEMENT_s *canMessage); -extern bool TEST_I165C_CheckResponse(uint8_t command, CAN_BUFFERELEMENT_s *canMessage); -extern bool TEST_I165C_GetImdInfo(CAN_BUFFERELEMENT_s *canMessage); -extern bool TEST_I165C_IsSelfTestFinished(CAN_BUFFERELEMENT_s canMessage); -extern bool TEST_I165C_CheckAcknowledgeArrived(uint8_t command, uint8_t *tries, CAN_BUFFERELEMENT_s *canMessage); +extern void TEST_I165C_ResetCanData(CAN_BUFFER_ELEMENT_s *canMessage); +extern void TEST_I165C_WriteDataWord(uint8_t dataWord, uint16_t data, CAN_BUFFER_ELEMENT_s *canMessage); +extern void TEST_I165C_ReadDataWord(uint8_t dataWord, uint16_t *data, CAN_BUFFER_ELEMENT_s canMessage); +extern void TEST_I165C_ReadDataWordImdInfo(uint8_t dataWord, uint16_t *data, CAN_BUFFER_ELEMENT_s canMessage); +extern void TEST_I165C_ReadDataByte(uint8_t dataByte, uint8_t *data, CAN_BUFFER_ELEMENT_s canMessage); +extern void TEST_I165C_WriteCmd(uint8_t id, uint8_t command, CAN_BUFFER_ELEMENT_s *canMessage); +extern bool TEST_I165C_CheckResponse(uint8_t command, CAN_BUFFER_ELEMENT_s *canMessage); +extern bool TEST_I165C_GetImdInfo(CAN_BUFFER_ELEMENT_s *canMessage); +extern bool TEST_I165C_IsSelfTestFinished(CAN_BUFFER_ELEMENT_s canMessage); +extern bool TEST_I165C_CheckAcknowledgeArrived(uint8_t command, uint8_t *tries, CAN_BUFFER_ELEMENT_s *canMessage); #endif #endif /* FOXBMS__BENDER_ISO165C_H_ */ diff --git a/src/app/driver/imd/bender/iso165c/config/bender_iso165c_cfg.c b/src/app/driver/imd/bender/iso165c/config/bender_iso165c_cfg.c index 54e1bdb4..abaae62c 100644 --- a/src/app/driver/imd/bender/iso165c/config/bender_iso165c_cfg.c +++ b/src/app/driver/imd/bender/iso165c/config/bender_iso165c_cfg.c @@ -43,8 +43,8 @@ * @file bender_iso165c_cfg.c * @author foxBMS Team * @date 2021-03-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix I165C * diff --git a/src/app/driver/imd/bender/iso165c/config/bender_iso165c_cfg.h b/src/app/driver/imd/bender/iso165c/config/bender_iso165c_cfg.h index 389aae8a..c47bd712 100644 --- a/src/app/driver/imd/bender/iso165c/config/bender_iso165c_cfg.h +++ b/src/app/driver/imd/bender/iso165c/config/bender_iso165c_cfg.h @@ -43,8 +43,8 @@ * @file bender_iso165c_cfg.h * @author foxBMS Team * @date 2021-03-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix I165C * @@ -71,7 +71,7 @@ /*========== Macros and Definitions =========================================*/ /** CAN Node the IMD device is connected to */ -#define I165C_CAN_NODE (CAN1_NODE) +#define I165C_CAN_NODE (CAN_NODE_1) /** Switch if bender iso165C or iso165C-1 is used * true: iso165C @@ -141,11 +141,11 @@ /** type of messages to communicate with I165C */ /** cyclic message, transmitted every second */ -#define I165C_MESSAGETYPE_IMD_INFO (CAN_ID_IMD_INFO) +#define I165C_MESSAGETYPE_IMD_INFO (CANRX_IMD_INFO_ID) /** message for requests (self test, reset, set values...) */ -#define I165C_MESSAGETYPE_IMD_REQUEST (CAN_ID_IMD_REQUEST) +#define I165C_MESSAGETYPE_IMD_REQUEST (CANRX_IMD_REQUEST_ID) /** answer message, always send by I165C when it received a request*/ -#define I165C_MESSAGETYPE_IMD_RESPONSE (CAN_ID_IMD_RESPONSE) +#define I165C_MESSAGETYPE_IMD_RESPONSE (CANRX_IMD_RESPONSE_ID) /** control commands (CTL) */ diff --git a/src/app/driver/imd/bender/iso165c/wscript b/src/app/driver/imd/bender/iso165c/wscript index 62f1136a..04e22da6 100644 --- a/src/app/driver/imd/bender/iso165c/wscript +++ b/src/app/driver/imd/bender/iso165c/wscript @@ -74,6 +74,6 @@ def build(bld): source=source, use="imd-device", includes=includes, - target=f"{bld.env.APPNAME}-imd", + target=f"{bld.env.APPNAME.lower()}-imd", cflags=cflags, ) diff --git a/src/app/driver/imd/imd.c b/src/app/driver/imd/imd.c index 673f4bc9..06dadd72 100644 --- a/src/app/driver/imd/imd.c +++ b/src/app/driver/imd/imd.c @@ -43,8 +43,8 @@ * @file imd.c * @author foxBMS Team * @date 2021-11-04 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix IMD * diff --git a/src/app/driver/imd/imd.h b/src/app/driver/imd/imd.h index 8b19627c..9c9c974c 100644 --- a/src/app/driver/imd/imd.h +++ b/src/app/driver/imd/imd.h @@ -43,8 +43,8 @@ * @file imd.h * @author foxBMS Team * @date 2020-11-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix IMD * diff --git a/src/app/driver/imd/none/no-imd.c b/src/app/driver/imd/none/no-imd.c index 53c69cad..dc01579f 100644 --- a/src/app/driver/imd/none/no-imd.c +++ b/src/app/driver/imd/none/no-imd.c @@ -43,8 +43,8 @@ * @file no-imd.c * @author foxBMS Team * @date 2020-11-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix NOIMD * diff --git a/src/app/driver/imd/none/no-imd.h b/src/app/driver/imd/none/no-imd.h index 67a2a155..af109923 100644 --- a/src/app/driver/imd/none/no-imd.h +++ b/src/app/driver/imd/none/no-imd.h @@ -43,8 +43,8 @@ * @file no-imd.h * @author foxBMS Team * @date 2020-11-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix NONE * diff --git a/src/app/driver/imd/none/wscript b/src/app/driver/imd/none/wscript index e4eb898d..55a54dba 100644 --- a/src/app/driver/imd/none/wscript +++ b/src/app/driver/imd/none/wscript @@ -68,6 +68,6 @@ def build(bld): source="no-imd.c", use="imd-device", includes=includes, - target=f"{bld.env.APPNAME}-imd", + target=f"{bld.env.APPNAME.lower()}-imd", cflags=cflags, ) diff --git a/src/app/driver/interlock/interlock.c b/src/app/driver/interlock/interlock.c index ca435c10..2aa5253d 100644 --- a/src/app/driver/interlock/interlock.c +++ b/src/app/driver/interlock/interlock.c @@ -43,8 +43,8 @@ * @file interlock.c * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix ILCK * diff --git a/src/app/driver/interlock/interlock.h b/src/app/driver/interlock/interlock.h index 17974250..0644e87f 100644 --- a/src/app/driver/interlock/interlock.h +++ b/src/app/driver/interlock/interlock.h @@ -43,8 +43,8 @@ * @file interlock.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix ILCK * diff --git a/src/app/driver/io/io.c b/src/app/driver/io/io.c index 58c57bb1..7582242f 100644 --- a/src/app/driver/io/io.c +++ b/src/app/driver/io/io.c @@ -43,8 +43,8 @@ * @file io.c * @author foxBMS Team * @date 2020-06-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix IO * diff --git a/src/app/driver/io/io.h b/src/app/driver/io/io.h index ce39cb61..6ecc9a14 100644 --- a/src/app/driver/io/io.h +++ b/src/app/driver/io/io.h @@ -43,8 +43,8 @@ * @file io.h * @author foxBMS Team * @date 2020-03-19 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix IO * diff --git a/src/app/driver/led/led.c b/src/app/driver/led/led.c index f02657bf..812f7e37 100644 --- a/src/app/driver/led/led.c +++ b/src/app/driver/led/led.c @@ -43,8 +43,8 @@ * @file led.c * @author foxBMS Team * @date 2021-09-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix LED * diff --git a/src/app/driver/led/led.h b/src/app/driver/led/led.h index 2302ec0b..2ea6cfd2 100644 --- a/src/app/driver/led/led.h +++ b/src/app/driver/led/led.h @@ -43,8 +43,8 @@ * @file led.h * @author foxBMS Team * @date 2021-09-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix LED * diff --git a/src/app/driver/mcu/mcu.c b/src/app/driver/mcu/mcu.c index c1ddb4a7..220c2d54 100644 --- a/src/app/driver/mcu/mcu.c +++ b/src/app/driver/mcu/mcu.c @@ -43,8 +43,8 @@ * @file mcu.c * @author foxBMS Team * @date 2019-02-19 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MCU * diff --git a/src/app/driver/mcu/mcu.h b/src/app/driver/mcu/mcu.h index 9bc34adf..406cd7ee 100644 --- a/src/app/driver/mcu/mcu.h +++ b/src/app/driver/mcu/mcu.h @@ -43,8 +43,8 @@ * @file mcu.h * @author foxBMS Team * @date 2019-02-19 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MCU * diff --git a/src/app/driver/meas/meas.c b/src/app/driver/meas/meas.c index 48a241b3..66747649 100644 --- a/src/app/driver/meas/meas.c +++ b/src/app/driver/meas/meas.c @@ -43,8 +43,8 @@ * @file meas.c * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MEAS * diff --git a/src/app/driver/meas/meas.h b/src/app/driver/meas/meas.h index 13bdf962..9a06265e 100644 --- a/src/app/driver/meas/meas.h +++ b/src/app/driver/meas/meas.h @@ -43,8 +43,8 @@ * @file meas.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix MEAS * diff --git a/src/app/driver/pex/pex.c b/src/app/driver/pex/pex.c index 1206063a..88dfd736 100644 --- a/src/app/driver/pex/pex.c +++ b/src/app/driver/pex/pex.c @@ -43,8 +43,8 @@ * @file pex.c * @author foxBMS Team * @date 2021-08-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix PEX * diff --git a/src/app/driver/pex/pex.h b/src/app/driver/pex/pex.h index 98b18b6f..1fd1672c 100644 --- a/src/app/driver/pex/pex.h +++ b/src/app/driver/pex/pex.h @@ -43,8 +43,8 @@ * @file pex.h * @author foxBMS Team * @date 2021-08-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix PEX * diff --git a/src/app/driver/pwm/pwm.c b/src/app/driver/pwm/pwm.c index 472eff60..bf52d66c 100644 --- a/src/app/driver/pwm/pwm.c +++ b/src/app/driver/pwm/pwm.c @@ -43,8 +43,8 @@ * @file pwm.c * @author foxBMS Team * @date 2021-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix PWM * diff --git a/src/app/driver/pwm/pwm.h b/src/app/driver/pwm/pwm.h index 9c393ab6..c30c674b 100644 --- a/src/app/driver/pwm/pwm.h +++ b/src/app/driver/pwm/pwm.h @@ -43,8 +43,8 @@ * @file pwm.h * @author foxBMS Team * @date 2021-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix PWM * diff --git a/src/app/driver/rtc/rtc.c b/src/app/driver/rtc/rtc.c index 30807be9..4ec13cf5 100644 --- a/src/app/driver/rtc/rtc.c +++ b/src/app/driver/rtc/rtc.c @@ -43,8 +43,8 @@ * @file rtc.c * @author foxBMS Team * @date 2021-02-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix RTC * diff --git a/src/app/driver/rtc/rtc.h b/src/app/driver/rtc/rtc.h index 6251ff57..ca94ed9f 100644 --- a/src/app/driver/rtc/rtc.h +++ b/src/app/driver/rtc/rtc.h @@ -43,8 +43,8 @@ * @file rtc.h * @author foxBMS Team * @date 2021-02-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix RTC * diff --git a/src/app/driver/sbc/nxpfs85xx.c b/src/app/driver/sbc/nxpfs85xx.c index 6e0d2576..a64d682b 100644 --- a/src/app/driver/sbc/nxpfs85xx.c +++ b/src/app/driver/sbc/nxpfs85xx.c @@ -43,8 +43,8 @@ * @file nxpfs85xx.c * @author foxBMS Team * @date 2020-03-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix SBC * diff --git a/src/app/driver/sbc/nxpfs85xx.h b/src/app/driver/sbc/nxpfs85xx.h index 07fb50ce..dfa6d385 100644 --- a/src/app/driver/sbc/nxpfs85xx.h +++ b/src/app/driver/sbc/nxpfs85xx.h @@ -43,8 +43,8 @@ * @file nxpfs85xx.h * @author foxBMS Team * @date 2020-03-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix FS85 * diff --git a/src/app/driver/sbc/sbc.c b/src/app/driver/sbc/sbc.c index 7c03c592..3df7bde7 100644 --- a/src/app/driver/sbc/sbc.c +++ b/src/app/driver/sbc/sbc.c @@ -43,8 +43,8 @@ * @file sbc.c * @author foxBMS Team * @date 2020-07-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix SBC * diff --git a/src/app/driver/sbc/sbc.h b/src/app/driver/sbc/sbc.h index a569cbc2..133896bb 100644 --- a/src/app/driver/sbc/sbc.h +++ b/src/app/driver/sbc/sbc.h @@ -43,8 +43,8 @@ * @file sbc.h * @author foxBMS Team * @date 2020-07-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix SBC * diff --git a/src/app/driver/spi/spi.c b/src/app/driver/spi/spi.c index e0ba0e6d..698f438a 100644 --- a/src/app/driver/spi/spi.c +++ b/src/app/driver/spi/spi.c @@ -43,8 +43,8 @@ * @file spi.c * @author foxBMS Team * @date 2019-12-12 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix SPI * diff --git a/src/app/driver/spi/spi.h b/src/app/driver/spi/spi.h index bda77c05..50389af1 100644 --- a/src/app/driver/spi/spi.h +++ b/src/app/driver/spi/spi.h @@ -43,8 +43,8 @@ * @file spi.h * @author foxBMS Team * @date 2019-12-12 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix SPI * diff --git a/src/app/driver/spi/spi_cfg-helper.h b/src/app/driver/spi/spi_cfg-helper.h index 3ef1447c..6418f79a 100644 --- a/src/app/driver/spi/spi_cfg-helper.h +++ b/src/app/driver/spi/spi_cfg-helper.h @@ -43,8 +43,8 @@ * @file spi_cfg-helper.h * @author foxBMS Team * @date 2021-12-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS_CONFIGURATION * @prefix SPI * diff --git a/src/app/driver/sps/sps.c b/src/app/driver/sps/sps.c index bc2d294a..0ae866c8 100644 --- a/src/app/driver/sps/sps.c +++ b/src/app/driver/sps/sps.c @@ -43,8 +43,8 @@ * @file sps.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix SPS * @@ -365,7 +365,7 @@ static void SPS_SetCommandTxBuffer(const SPS_ACTION_e action) { case SPS_ACTION_READ_EN_IRQ_PIN: SPS_GlobalRegisterRead( - SPS_EN_IRQ_PIN_DIAG_REGISTER_ADDRESS, SPS_READ_DIAGNOSTIC_REGISTER, sps_spiTxRegisterBuffer); + SPS_ISR_IRQ_DIAG_REGISTER_ADDRESS, SPS_READ_DIAGNOSTIC_REGISTER, sps_spiTxRegisterBuffer); break; default: @@ -595,12 +595,18 @@ extern void SPS_Initialize(void) { } extern void SPS_RequestContactorState(SPS_CHANNEL_INDEX channelIndex, SPS_CHANNEL_FUNCTION_e channelFunction) { + FAS_ASSERT(channelIndex < SPS_NR_OF_AVAILABLE_SPS_CHANNELS); + /* AXIVION Routine Generic-MissingParameterAssert: channelFunction: parameter accepts all defined enums */ + /* Allow only contactor related SPS outputs to be operated with this function */ const SPS_CHANNEL_AFFILIATION_e channelAffiliation = SPS_GetChannelAffiliation(channelIndex); FAS_ASSERT(SPS_AFF_CONTACTOR == channelAffiliation); SPS_RequestChannelState(channelIndex, channelFunction); } extern void SPS_RequestGeneralIoState(SPS_CHANNEL_INDEX channelIndex, SPS_CHANNEL_FUNCTION_e channelFunction) { + FAS_ASSERT(channelIndex < SPS_NR_OF_AVAILABLE_SPS_CHANNELS); + /* AXIVION Routine Generic-MissingParameterAssert: channelFunction: parameter accepts all defined enums */ + /* Allow only general IO related SPS outputs to be operated with this function */ const SPS_CHANNEL_AFFILIATION_e channelAffiliation = SPS_GetChannelAffiliation(channelIndex); FAS_ASSERT(SPS_AFF_GENERAL_IO == channelAffiliation); SPS_RequestChannelState(channelIndex, channelFunction); diff --git a/src/app/driver/sps/sps.h b/src/app/driver/sps/sps.h index cae83cb8..cf94dad7 100644 --- a/src/app/driver/sps/sps.h +++ b/src/app/driver/sps/sps.h @@ -43,8 +43,8 @@ * @file sps.h * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix SPS * diff --git a/src/app/driver/sps/sps_types.h b/src/app/driver/sps/sps_types.h index cf0e64e3..980cfb10 100644 --- a/src/app/driver/sps/sps_types.h +++ b/src/app/driver/sps/sps_types.h @@ -43,8 +43,8 @@ * @file sps_types.h * @author foxBMS Team * @date 2020-12-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVERS * @prefix SPS * diff --git a/src/app/driver/ts/api/tsi.h b/src/app/driver/ts/api/tsi.h index 27d66987..34e2ef61 100644 --- a/src/app/driver/ts/api/tsi.h +++ b/src/app/driver/ts/api/tsi.h @@ -43,8 +43,8 @@ * @file tsi.h * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix TSI * diff --git a/src/app/driver/ts/api/tsi_limits.c b/src/app/driver/ts/api/tsi_limits.c index bdc05608..93e35d8a 100644 --- a/src/app/driver/ts/api/tsi_limits.c +++ b/src/app/driver/ts/api/tsi_limits.c @@ -43,8 +43,8 @@ * @file tsi_limits.c * @author foxBMS Team * @date 2021-01-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DRIVER * @prefix TSI * diff --git a/src/app/driver/ts/beta.c b/src/app/driver/ts/beta.c index d611203c..26b67a09 100644 --- a/src/app/driver/ts/beta.c +++ b/src/app/driver/ts/beta.c @@ -43,8 +43,8 @@ * @file beta.c * @author foxBMS Team * @date 2020-01-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix BETA * diff --git a/src/app/driver/ts/beta.h b/src/app/driver/ts/beta.h index bb4be915..1fc8e2ac 100644 --- a/src/app/driver/ts/beta.h +++ b/src/app/driver/ts/beta.h @@ -43,8 +43,8 @@ * @file beta.h * @author foxBMS Team * @date 2020-01-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix BETA * diff --git a/src/app/driver/ts/epcos/b57251v5103j060/epcos_b57251v5103j060.c b/src/app/driver/ts/epcos/b57251v5103j060/epcos_b57251v5103j060.c index 1e6776c4..eb17c796 100644 --- a/src/app/driver/ts/epcos/b57251v5103j060/epcos_b57251v5103j060.c +++ b/src/app/driver/ts/epcos/b57251v5103j060/epcos_b57251v5103j060.c @@ -43,8 +43,8 @@ * @file epcos_b57251v5103j060.c * @author foxBMS Team * @date 2018-10-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/epcos/b57251v5103j060/epcos_b57251v5103j060.h b/src/app/driver/ts/epcos/b57251v5103j060/epcos_b57251v5103j060.h index 323d80db..f1cef0ee 100644 --- a/src/app/driver/ts/epcos/b57251v5103j060/epcos_b57251v5103j060.h +++ b/src/app/driver/ts/epcos/b57251v5103j060/epcos_b57251v5103j060.h @@ -43,8 +43,8 @@ * @file epcos_b57251v5103j060.h * @author foxBMS Team * @date 2018-10-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/epcos/b57251v5103j060/lookup-table/epcos_b57251v5103j060_lookup-table.c b/src/app/driver/ts/epcos/b57251v5103j060/lookup-table/epcos_b57251v5103j060_lookup-table.c index 6d3d2602..3d53a900 100644 --- a/src/app/driver/ts/epcos/b57251v5103j060/lookup-table/epcos_b57251v5103j060_lookup-table.c +++ b/src/app/driver/ts/epcos/b57251v5103j060/lookup-table/epcos_b57251v5103j060_lookup-table.c @@ -43,8 +43,8 @@ * @file epcos_b57251v5103j060_lookup-table.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/epcos/b57251v5103j060/polynomial/epcos_b57251v5103j060_polynomial.c b/src/app/driver/ts/epcos/b57251v5103j060/polynomial/epcos_b57251v5103j060_polynomial.c index a44e826e..45f5a593 100644 --- a/src/app/driver/ts/epcos/b57251v5103j060/polynomial/epcos_b57251v5103j060_polynomial.c +++ b/src/app/driver/ts/epcos/b57251v5103j060/polynomial/epcos_b57251v5103j060_polynomial.c @@ -43,8 +43,8 @@ * @file epcos_b57251v5103j060_polynomial.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/epcos/b57861s0103f045/epcos_b57861s0103f045.c b/src/app/driver/ts/epcos/b57861s0103f045/epcos_b57861s0103f045.c index 38938317..c6478f19 100644 --- a/src/app/driver/ts/epcos/b57861s0103f045/epcos_b57861s0103f045.c +++ b/src/app/driver/ts/epcos/b57861s0103f045/epcos_b57861s0103f045.c @@ -43,8 +43,8 @@ * @file epcos_b57861s0103f045.c * @author foxBMS Team * @date 2018-10-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/epcos/b57861s0103f045/epcos_b57861s0103f045.h b/src/app/driver/ts/epcos/b57861s0103f045/epcos_b57861s0103f045.h index 0a94cfc1..542c8f33 100644 --- a/src/app/driver/ts/epcos/b57861s0103f045/epcos_b57861s0103f045.h +++ b/src/app/driver/ts/epcos/b57861s0103f045/epcos_b57861s0103f045.h @@ -43,8 +43,8 @@ * @file epcos_b57861s0103f045.h * @author foxBMS Team * @date 2018-10-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/epcos/b57861s0103f045/lookup-table/epcos_b57861s0103f045_lookup-table.c b/src/app/driver/ts/epcos/b57861s0103f045/lookup-table/epcos_b57861s0103f045_lookup-table.c index cf3e75fc..c118fd3f 100644 --- a/src/app/driver/ts/epcos/b57861s0103f045/lookup-table/epcos_b57861s0103f045_lookup-table.c +++ b/src/app/driver/ts/epcos/b57861s0103f045/lookup-table/epcos_b57861s0103f045_lookup-table.c @@ -43,8 +43,8 @@ * @file epcos_b57861s0103f045_lookup-table.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/epcos/b57861s0103f045/polynomial/epcos_b57861s0103f045_polynomial.c b/src/app/driver/ts/epcos/b57861s0103f045/polynomial/epcos_b57861s0103f045_polynomial.c index d76de455..45c3dde9 100644 --- a/src/app/driver/ts/epcos/b57861s0103f045/polynomial/epcos_b57861s0103f045_polynomial.c +++ b/src/app/driver/ts/epcos/b57861s0103f045/polynomial/epcos_b57861s0103f045_polynomial.c @@ -43,8 +43,8 @@ * @file epcos_b57861s0103f045_polynomial.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/fake/none/fake_none.c b/src/app/driver/ts/fake/none/fake_none.c index c3422f6b..c91739c9 100644 --- a/src/app/driver/ts/fake/none/fake_none.c +++ b/src/app/driver/ts/fake/none/fake_none.c @@ -43,8 +43,8 @@ * @file fake_none.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/fake/none/fake_none.h b/src/app/driver/ts/fake/none/fake_none.h index c7804731..8962ebdf 100644 --- a/src/app/driver/ts/fake/none/fake_none.h +++ b/src/app/driver/ts/fake/none/fake_none.h @@ -43,8 +43,8 @@ * @file fake_none.h * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/fake/none/lookup-table/fake_none_lookup-table.c b/src/app/driver/ts/fake/none/lookup-table/fake_none_lookup-table.c index cc5f5e1d..dcecfb33 100644 --- a/src/app/driver/ts/fake/none/lookup-table/fake_none_lookup-table.c +++ b/src/app/driver/ts/fake/none/lookup-table/fake_none_lookup-table.c @@ -43,8 +43,8 @@ * @file fake_none_lookup-table.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/fake/none/polynomial/fake_none_polynomial.c b/src/app/driver/ts/fake/none/polynomial/fake_none_polynomial.c index 20f785fe..478927fc 100644 --- a/src/app/driver/ts/fake/none/polynomial/fake_none_polynomial.c +++ b/src/app/driver/ts/fake/none/polynomial/fake_none_polynomial.c @@ -43,8 +43,8 @@ * @file fake_none_polynomial.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/murata/ncu15xh103f6sxx/lookup-table/murata_ncu15xh103f6sxx_lookup-table.c b/src/app/driver/ts/murata/ncu15xh103f6sxx/lookup-table/murata_ncu15xh103f6sxx_lookup-table.c new file mode 100644 index 00000000..17ecac68 --- /dev/null +++ b/src/app/driver/ts/murata/ncu15xh103f6sxx/lookup-table/murata_ncu15xh103f6sxx_lookup-table.c @@ -0,0 +1,75 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file murata_ncu15xh103f6sxx_lookup-table.c + * @author foxBMS Team + * @date 2022-10-12 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup TEMPERATURE_SENSORS + * @prefix TS + * + * @brief Resistive divider used for measuring temperature + * + */ + +/*========== Includes =======================================================*/ +#include "murata_ncu15xh103f6sxx.h" +#include "tsi.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Static Constant and Variable Definitions =======================*/ + +/*========== Extern Constant and Variable Definitions =======================*/ + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ + +extern int16_t TSI_GetTemperature(uint16_t adcVoltage_mV) { + return TS_Mur00GetTemperatureFromLut(adcVoltage_mV); +} + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ diff --git a/src/app/driver/ts/murata/ncu15xh103f6sxx/murata_ncu15xh103f6sxx.c b/src/app/driver/ts/murata/ncu15xh103f6sxx/murata_ncu15xh103f6sxx.c new file mode 100644 index 00000000..1f8f218b --- /dev/null +++ b/src/app/driver/ts/murata/ncu15xh103f6sxx/murata_ncu15xh103f6sxx.c @@ -0,0 +1,167 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file murata_ncu15xh103f6sxx.c + * @author foxBMS Team + * @date 2022-10-12 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup TEMPERATURE_SENSORS + * @prefix TS + * + * @brief Resistive divider used for measuring temperature + * + */ + +/*========== Includes =======================================================*/ +#include "murata_ncu15xh103f6sxx.h" + +#include "foxmath.h" +#include "temperature_sensor_defs.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Static Constant and Variable Definitions =======================*/ + +/** LUT filled from higher resistance to lower resistance - datasheet: RO3E - Aug. 3, 2018 */ +static const TS_TEMPERATURE_SENSOR_LUT_s ts_ncu15xh103f6sxxLut[] = { + {-400, 195652.0f}, {-350, 148171.0f}, {-300, 113347.0f}, {-250, 87559.0f}, {-200, 68237.0f}, {-150, 53650.0f}, + {-100, 42506.0f}, {-50, 33892.0f}, {0, 27219.0f}, {50, 22021.0f}, {100, 17926.0f}, {150, 14674.0f}, + {200, 12081.0f}, {250, 10000.0f}, {300, 8315.0f}, {350, 6948.0f}, {400, 5834.0f}, {450, 4917.0f}, + {500, 4161.0f}, {550, 3535.0f}, {600, 3014.0f}, {650, 2586.0f}, {700, 2228.0f}, {750, 1925.0f}, + {800, 1669.0f}, {850, 1452.0f}, {900, 1268.0f}, {950, 1110.0f}, {1000, 974.0f}, {1050, 858.0f}, + {1100, 758.0f}, {1150, 672.0f}, {1200, 596.0f}, {1250, 531.0f}, {1300, 474.0f}, {1350, 424.0f}, + {1400, 381.0f}, {1450, 342.0f}, {1500, 309.0f}, +}; + +/** size of the #ts_ntcle317e4103sbaLut LUT */ +static const uint16_t ts_ncu15xh103f6sxxLutSize = sizeof(ts_ncu15xh103f6sxxLut) / sizeof(TS_TEMPERATURE_SENSOR_LUT_s); + +/*========== Extern Constant and Variable Definitions =======================*/ +/** + * Defines for calculating the ADC voltage on the ends of the operating range. + * The ADC voltage is calculated with the following formula: + * + * V_adc = ( ( V_supply * R_ntc ) / ( R + R_ntc ) ) + * + * Depending on the position of the NTC in the voltage resistor (R_1/R_2), + * different R_ntc values are used for the calculation. + * @{ + */ +#if TS_MURATA_NCU15XH103F6SXX_POSITION_IN_RESISTOR_DIVIDER_IS_R_1 == true +#define TS_MURATA_NCU15XH103F6SXX_ADC_VOLTAGE_V_MAX_V \ + ((float)((TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V * ts_ncu15xh103f6sxxLut[ts_ncu15xh103f6sxxLutSize-1u].resistance_Ohm) / (ts_ncu15xh103f6sxxLut[ts_ncu15xh103f6sxxLutSize-1u].resistance_Ohm+TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm))) +#define TS_MURATA_NCU15XH103F6SXX_ADC_VOLTAGE_V_MIN_V \ + ((float)((TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V * ts_ncu15xh103f6sxxLut[0u].resistance_Ohm) / (ts_ncu15xh103f6sxxLut[0u].resistance_Ohm+TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm))) +#else /* TS_MURATA_NCU15XH103F6SXX_POSITION_IN_RESISTOR_DIVIDER_IS_R_1 is false */ +#define TS_MURATA_NCU15XH103F6SXX_ADC_VOLTAGE_V_MIN_V \ + ((float)((TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V * ts_ncu15xh103f6sxxLut[ts_ncu15xh103f6sxxLutSize-1u].resistance_Ohm) / (ts_ncu15xh103f6sxxLut[ts_ncu15xh103f6sxxLutSize-1u].resistance_Ohm+TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm))) +#define TS_MURATA_NCU15XH103F6SXX_ADC_VOLTAGE_V_MAX_V \ + ((float)((TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V * ts_ncu15xh103f6sxxLut[0u].resistance_Ohm) / (ts_ncu15xh103f6sxxLut[0u].resistance_Ohm+TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm))) +#endif +/**@}*/ + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ + +extern int16_t TS_Mur00GetTemperatureFromLut(uint16_t adcVoltage_mV) { + int16_t temperature_ddegC = INT16_MIN; + float adcVoltage_V = (float)adcVoltage_mV / TS_SCALING_FACTOR_1V_IN_MV_FLOAT; /* Convert mV to V */ + + /* Check for valid ADC measurements to prevent undefined behavior */ + if (adcVoltage_V > TS_MURATA_NCU15XH103F6SXX_ADC_VOLTAGE_V_MAX_V) { + /* Invalid measured ADC voltage -> sensor out of operating range or disconnected/shorted */ + temperature_ddegC = INT16_MIN; + } else if (adcVoltage_V < TS_MURATA_NCU15XH103F6SXX_ADC_VOLTAGE_V_MIN_V) { + /* Invalid measured ADC voltage -> sensor out of operating range or shorted/disconnected */ + temperature_ddegC = INT16_MAX; + } else { + /* Calculate NTC resistance based on measured ADC voltage */ +#if TS_MURATA_NCU15XH103F6SXX_POSITION_IN_RESISTOR_DIVIDER_IS_R_1 == true + /* R_1 = R_2 * ( ( V_supply / V_adc ) - 1 ) */ + const float resistance_Ohm = TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm * + ((TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V / adcVoltage_V) - 1); +#else /* TS_MURATA_NCU15XH103F6SXX_POSITION_IN_RESISTOR_DIVIDER_IS_R_1 is false */ + /* formula: R_2 = R_1 * ( V_2 / ( V_supply - V_adc ) ) */ + const float resistance_Ohm = + TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm * + (adcVoltage_V / (TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V - adcVoltage_V)); +#endif /* TS_MURATA_NCU15XH103F6SXX_POSITION_IN_RESISTOR_DIVIDER_IS_R_1 */ + + /* Variables for interpolating LUT value */ + uint16_t between_high = 0; + uint16_t between_low = 0; + for (uint16_t i = 0u; i < ts_ncu15xh103f6sxxLutSize; i++) { + if (resistance_Ohm < ts_ncu15xh103f6sxxLut[i].resistance_Ohm) { + between_low = i + 1u; + between_high = i; + } + } + + /* Interpolate between LUT values, but do not extrapolate LUT! */ + if (!(((between_high == 0u) && (between_low == 0u)) || /* measured resistance > maximum LUT resistance */ + (between_low >= ts_ncu15xh103f6sxxLutSize))) { /* measured resistance < minimum LUT resistance */ + temperature_ddegC = (int16_t)MATH_LinearInterpolation( + ts_ncu15xh103f6sxxLut[between_low].resistance_Ohm, + (float)ts_ncu15xh103f6sxxLut[between_low].temperature_ddegC, + ts_ncu15xh103f6sxxLut[between_high].resistance_Ohm, + (float)ts_ncu15xh103f6sxxLut[between_high].temperature_ddegC, + resistance_Ohm); + } + } + + /* Return temperature based on measured NTC resistance */ + return temperature_ddegC; +} + +extern int16_t TS_Mur00GetTemperatureFromPolynomial(uint16_t adcVoltage_mV) { + (void)adcVoltage_mV; + FAS_ASSERT(FAS_TRAP); + int16_t temperature_ddegC = 0; + /* TODO this is not implemented */ + return temperature_ddegC; +} + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ diff --git a/src/app/driver/ts/murata/ncu15xh103f6sxx/murata_ncu15xh103f6sxx.h b/src/app/driver/ts/murata/ncu15xh103f6sxx/murata_ncu15xh103f6sxx.h new file mode 100644 index 00000000..98b69d1d --- /dev/null +++ b/src/app/driver/ts/murata/ncu15xh103f6sxx/murata_ncu15xh103f6sxx.h @@ -0,0 +1,121 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file murata_ncu15xh103f6sxx.h + * @author foxBMS Team + * @date 2022-10-12 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup TEMPERATURE_SENSORS + * @prefix TS + * + * @brief Resistive divider used for measuring temperature + * + * V_supply + * --.-- + * | + * +-.-+ + * | | + * | | R_1 + * | | + * +-.-+ + * | + * .--- V_adc + * | + * +-.-+ + * | | + * | | R_2 + * | | + * +-.-+ + * | + * --.-- + * GND + */ + +#ifndef FOXBMS__MURATA_NCU15XH103F6SXX_H_ +#define FOXBMS__MURATA_NCU15XH103F6SXX_H_ + +/*========== Includes =======================================================*/ +#include "general.h" + +/*========== Macros and Definitions =========================================*/ +/** + * Position of the NTC in the voltage resistor + * true: NTC is positioned above the voltage tap for the ADC voltage. + * This equals resistor R_1 in the above circuit diagram + * + * false: NTC is positioned below the voltage tap for the ADC voltage. + * This equals resistor R_2 in the above circuit diagram + */ +#define TS_MURATA_NCU15XH103F6SXX_POSITION_IN_RESISTOR_DIVIDER_IS_R_1 (false) + +/** Resistor divider supply voltage in volt */ +#define TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_SUPPLY_VOLTAGE_V (3.3f) + +/** + * Resistance value of the other resistor (not the NTC) in the resistor + * divider in Ohm. + */ +#define TS_MURATA_NCU15XH103F6SXX_RESISTOR_DIVIDER_RESISTANCE_R_1_R_2_Ohm (10000.0f) + +/*========== Extern Constant and Variable Declarations ======================*/ +/** + * @brief returns temperature based on measured ADC voltage. + * @param adcVoltage_mV voltage in mV + * @return corresponding temperature in deci °C or INT16_MAX/INT16_MIN if + * NTC is shorted or got disconnected. The caller of this functions + * needs to check for these return values to prevent invalid data. + */ +extern int16_t TS_Mur00GetTemperatureFromLut(uint16_t adcVoltage_mV); + +/** + * @brief returns temperature based on measured ADC voltage + * @param adcVoltage_mV voltage in mV + * @return corresponding temperature in deci °C + */ +extern int16_t TS_Mur00GetTemperatureFromPolynomial(uint16_t adcVoltage_mV); + +/*========== Extern Function Prototypes =====================================*/ + +/*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ + +#endif /* FOXBMS__MURATA_NCU15XH103F6SXX_H_ */ diff --git a/src/app/driver/ts/murata/ncu15xh103f6sxx/polynomial/murata_ncu15xh103f6sxx_polynomial.c b/src/app/driver/ts/murata/ncu15xh103f6sxx/polynomial/murata_ncu15xh103f6sxx_polynomial.c new file mode 100644 index 00000000..7d562b30 --- /dev/null +++ b/src/app/driver/ts/murata/ncu15xh103f6sxx/polynomial/murata_ncu15xh103f6sxx_polynomial.c @@ -0,0 +1,75 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file murata_ncu15xh103f6sxx_polynomial.c + * @author foxBMS Team + * @date 2022-12-10 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup TEMPERATURE_SENSORS + * @prefix TS + * + * @brief Resistive divider used for measuring temperature + * + */ + +/*========== Includes =======================================================*/ +#include "murata_ncu15xh103f6sxx.h" +#include "tsi.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Static Constant and Variable Definitions =======================*/ + +/*========== Extern Constant and Variable Definitions =======================*/ + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ + +extern int16_t TSI_GetTemperature(uint16_t adcVoltage_mV) { + return TS_Mur00GetTemperatureFromPolynomial(adcVoltage_mV); +} + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ diff --git a/src/app/driver/ts/temperature_sensor_defs.h b/src/app/driver/ts/temperature_sensor_defs.h index 96faf65b..bb1a23c2 100644 --- a/src/app/driver/ts/temperature_sensor_defs.h +++ b/src/app/driver/ts/temperature_sensor_defs.h @@ -43,8 +43,8 @@ * @file temperature_sensor_defs.h * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/vishay/ntcalug01a103g/lookup-table/vishay_ntcalug01a103g_lookup-table.c b/src/app/driver/ts/vishay/ntcalug01a103g/lookup-table/vishay_ntcalug01a103g_lookup-table.c index eb33063e..28793eb4 100644 --- a/src/app/driver/ts/vishay/ntcalug01a103g/lookup-table/vishay_ntcalug01a103g_lookup-table.c +++ b/src/app/driver/ts/vishay/ntcalug01a103g/lookup-table/vishay_ntcalug01a103g_lookup-table.c @@ -43,8 +43,8 @@ * @file vishay_ntcalug01a103g_lookup-table.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/vishay/ntcalug01a103g/polynomial/vishay_ntcalug01a103g_polynomial.c b/src/app/driver/ts/vishay/ntcalug01a103g/polynomial/vishay_ntcalug01a103g_polynomial.c index 5611f18b..8c103aab 100644 --- a/src/app/driver/ts/vishay/ntcalug01a103g/polynomial/vishay_ntcalug01a103g_polynomial.c +++ b/src/app/driver/ts/vishay/ntcalug01a103g/polynomial/vishay_ntcalug01a103g_polynomial.c @@ -43,8 +43,8 @@ * @file vishay_ntcalug01a103g_polynomial.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/vishay/ntcalug01a103g/vishay_ntcalug01a103g.c b/src/app/driver/ts/vishay/ntcalug01a103g/vishay_ntcalug01a103g.c index af6014b9..344173ef 100644 --- a/src/app/driver/ts/vishay/ntcalug01a103g/vishay_ntcalug01a103g.c +++ b/src/app/driver/ts/vishay/ntcalug01a103g/vishay_ntcalug01a103g.c @@ -43,8 +43,8 @@ * @file vishay_ntcalug01a103g.c * @author foxBMS Team * @date 2018-10-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/vishay/ntcalug01a103g/vishay_ntcalug01a103g.h b/src/app/driver/ts/vishay/ntcalug01a103g/vishay_ntcalug01a103g.h index 87dd92aa..fcfa9c62 100644 --- a/src/app/driver/ts/vishay/ntcalug01a103g/vishay_ntcalug01a103g.h +++ b/src/app/driver/ts/vishay/ntcalug01a103g/vishay_ntcalug01a103g.h @@ -43,8 +43,8 @@ * @file vishay_ntcalug01a103g.h * @author foxBMS Team * @date 2018-10-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/vishay/ntcle317e4103sba/lookup-table/vishay_ntcle317e4103sba_lookup-table.c b/src/app/driver/ts/vishay/ntcle317e4103sba/lookup-table/vishay_ntcle317e4103sba_lookup-table.c index 076e4339..d9d65cf0 100644 --- a/src/app/driver/ts/vishay/ntcle317e4103sba/lookup-table/vishay_ntcle317e4103sba_lookup-table.c +++ b/src/app/driver/ts/vishay/ntcle317e4103sba/lookup-table/vishay_ntcle317e4103sba_lookup-table.c @@ -43,8 +43,8 @@ * @file vishay_ntcle317e4103sba_lookup-table.c * @author foxBMS Team * @date 2021-11-03 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/vishay/ntcle317e4103sba/vishay_ntcle317e4103sba.c b/src/app/driver/ts/vishay/ntcle317e4103sba/vishay_ntcle317e4103sba.c index d5344c33..b3cd9281 100644 --- a/src/app/driver/ts/vishay/ntcle317e4103sba/vishay_ntcle317e4103sba.c +++ b/src/app/driver/ts/vishay/ntcle317e4103sba/vishay_ntcle317e4103sba.c @@ -43,8 +43,8 @@ * @file vishay_ntcle317e4103sba.c * @author foxBMS Team * @date 2021-11-03 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/ts/vishay/ntcle317e4103sba/vishay_ntcle317e4103sba.h b/src/app/driver/ts/vishay/ntcle317e4103sba/vishay_ntcle317e4103sba.h index 6baaab56..a55dfe76 100644 --- a/src/app/driver/ts/vishay/ntcle317e4103sba/vishay_ntcle317e4103sba.h +++ b/src/app/driver/ts/vishay/ntcle317e4103sba/vishay_ntcle317e4103sba.h @@ -43,8 +43,8 @@ * @file vishay_ntcle317e4103sba.h * @author foxBMS Team * @date 2021-10-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TEMPERATURE_SENSORS * @prefix TS * diff --git a/src/app/driver/wscript b/src/app/driver/wscript index 8e507ddf..a6e5320e 100644 --- a/src/app/driver/wscript +++ b/src/app/driver/wscript @@ -55,20 +55,24 @@ def build(bld): os.path.join("adc", "adc.c"), os.path.join("can", "can.c"), os.path.join("can", "cbs", "can_helper.c"), - os.path.join("can", "cbs", "can_cbs_rx_command.c"), - os.path.join("can", "cbs", "can_cbs_rx_current_sensor.c"), - os.path.join("can", "cbs", "can_cbs_rx_imd.c"), - os.path.join("can", "cbs", "can_cbs_rx_misc.c"), - os.path.join("can", "cbs", "can_cbs_tx_limits.c"), - os.path.join("can", "cbs", "can_cbs_tx_state.c"), - os.path.join("can", "cbs", "can_cbs_tx_state_estimation.c"), - os.path.join("can", "cbs", "can_cbs_tx_system_values.c"), - os.path.join("can", "cbs", "can_cbs_tx_voltage.c"), - os.path.join("can", "cbs", "can_cbs_tx_temperature.c"), - os.path.join("can", "cbs", "can_cbs_tx_minmax.c"), + os.path.join("can", "cbs", "rx", "can_cbs_rx_current-sensor.c"), + os.path.join("can", "cbs", "rx", "can_cbs_rx_imd.c"), + os.path.join("can", "cbs", "rx", "can_cbs_rx_misc.c"), + os.path.join("can", "cbs", "rx", "can_cbs_rx_state-request.c"), + os.path.join("can", "cbs", "tx", "can_cbs_tx_cell-temperatures.c"), + os.path.join("can", "cbs", "tx", "can_cbs_tx_cell-voltages.c"), + os.path.join("can", "cbs", "tx", "can_cbs_tx_limit-values.c"), + os.path.join("can", "cbs", "tx", "can_cbs_tx_minimum-maximum-values.c"), + os.path.join("can", "cbs", "tx", "can_cbs_tx_pack-state-estimation.c"), + os.path.join("can", "cbs", "tx", "can_cbs_tx_state.c"), + os.path.join("can", "cbs", "tx", "can_cbs_tx_string-state-estimation.c"), + os.path.join("can", "cbs", "tx", "can_cbs_tx_system-values.c"), os.path.join("checksum", "checksum.c"), os.path.join("crc", "crc.c"), os.path.join("config", "contactor_cfg.c"), + os.path.join("config", "can_cfg_tx.c"), + os.path.join("config", "can_cfg_tx_boot-message.c"), + os.path.join("config", "can_cfg_rx.c"), os.path.join("config", "can_cfg.c"), os.path.join("config", "dma_cfg.c"), os.path.join("config", "fram_cfg.c"), @@ -102,6 +106,7 @@ def build(bld): os.path.join("ts", "epcos", "b57251v5103j060", "epcos_b57251v5103j060.c"), os.path.join("ts", "epcos", "b57861s0103f045", "epcos_b57861s0103f045.c"), os.path.join("ts", "fake", "none", "fake_none.c"), + os.path.join("ts", "murata", "ncu15xh103f6sxx", "murata_ncu15xh103f6sxx.c"), os.path.join("ts", "vishay", "ntcalug01a103g", "vishay_ntcalug01a103g.c"), os.path.join("ts", "vishay", "ntcle317e4103sba", "vishay_ntcle317e4103sba.c"), os.path.join("ts", "beta.c"), @@ -131,6 +136,8 @@ def build(bld): "sps", "ts", os.path.join("can", "cbs"), + os.path.join("can", "cbs", "rx"), + os.path.join("can", "cbs", "tx"), os.path.join("imd"), os.path.join("imd", "bender", "iso165c"), os.path.join("imd", "bender", "iso165c", "config"), @@ -138,6 +145,7 @@ def build(bld): os.path.join("ts", "epcos", "b57251v5103j060"), os.path.join("ts", "epcos", "b57861s0103f045"), os.path.join("ts", "fake", "none"), + os.path.join("ts", "murata", "ncu15xh103f6sxx"), os.path.join("ts", "vishay", "ntcalug01a103g"), os.path.join("ts", "vishay", "ntcle317e4103sba"), os.path.join("..", "application", "bal"), @@ -159,7 +167,7 @@ def build(bld): includes.extend(bld.env.INCLUDES_RTOS + bld.env.INCLUDES_AFE + bld.env.INCLUDES_IMD) cflags = bld.env.CFLAGS_FOXBMS target = f"{bld.env.APPNAME.lower()}-driver" - use = [f"{bld.env.APPNAME.lower()}-afe-driver", f"{bld.env.APPNAME}-imd"] + use = [f"{bld.env.APPNAME.lower()}-afe-driver", f"{bld.env.APPNAME.lower()}-imd"] bld.stlib( source=source, includes=includes, diff --git a/src/app/engine/config/database_cfg.c b/src/app/engine/config/database_cfg.c index 49d6a0ce..45f8793d 100644 --- a/src/app/engine/config/database_cfg.c +++ b/src/app/engine/config/database_cfg.c @@ -43,8 +43,8 @@ * @file database_cfg.c * @author foxBMS Team * @date 2015-08-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix DATA * diff --git a/src/app/engine/config/database_cfg.h b/src/app/engine/config/database_cfg.h index 93c48b22..259fb940 100644 --- a/src/app/engine/config/database_cfg.h +++ b/src/app/engine/config/database_cfg.h @@ -43,8 +43,8 @@ * @file database_cfg.h * @author foxBMS Team * @date 2015-08-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix DATA * @@ -328,7 +328,8 @@ typedef struct { * respective database entry representation in enum DATA_BLOCK_ID_e. */ DATA_BLOCK_HEADER_s header; /*!< Data block header */ uint8_t currentSensor[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error, not responding */ - uint8_t stringContactor[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error, not responding */ + uint8_t stringMinusContactor[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error, not responding */ + uint8_t stringPlusContactor[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error, not responding */ uint8_t prechargeContactor[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error, not responding */ uint8_t interlock; /*!< 0 -> no error, 1 -> error */ uint8_t crcError[BS_NR_OF_STRINGS]; /*!< 0 -> no error, 1 -> error */ @@ -379,6 +380,7 @@ typedef struct { bool timingViolation10ms; /*!< timing violation in 10ms task */ bool timingViolation100ms; /*!< timing violation in 100ms task */ bool timingViolation100msAlgo; /*!< timing violation in 100ms algorithm task */ + bool alertFlag; /*!< true: ALERT situation detected, false: everything okay */ } DATA_BLOCK_ERRORSTATE_s; /** data block struct of contactor feedback */ @@ -419,18 +421,6 @@ typedef struct { [BS_NR_OF_STRINGS]; /*!< recommended continuous operating discharge current */ float recommendedPeakChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< recommended peak operating charge current */ float recommendedPeakDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< recommended peak operating discharge current */ - float continuousMolChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current maximum operating level */ - float continuousMolDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current maximum operating level */ - float peakMolChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current maximum operating level */ - float peakMolDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current maximum operating level */ - float continuousRslChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current recommended safety level */ - float continuousRslDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current recommended safety level */ - float peakRslChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current recommended safety level */ - float peakRslDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current recommended safety level */ - float continuousMslChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current maximum safety level */ - float continuousMslDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current maximum safety level */ - float peakMslChargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< charge current maximum safety level */ - float peakMslDischargeCurrent_mA[BS_NR_OF_STRINGS]; /*!< discharge current maximum safety level */ } DATA_BLOCK_SOF_s; /** data block struct of system state */ diff --git a/src/app/engine/config/diag_cfg.c b/src/app/engine/config/diag_cfg.c index 09916df7..0a9017ee 100644 --- a/src/app/engine/config/diag_cfg.c +++ b/src/app/engine/config/diag_cfg.c @@ -43,8 +43,8 @@ * @file diag_cfg.c * @author foxBMS Team * @date 2019-11-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix DIAG * @@ -91,7 +91,7 @@ /*========== Macros and Definitions =========================================*/ /** value of #DIAG_ID_MAX (as a define for the pre-processor) */ -#define DIAG_ID_MAX_FOR_INIT (75u) +#define DIAG_ID_MAX_FOR_INIT (77u) FAS_STATIC_ASSERT(DIAG_ID_MAX_FOR_INIT == (uint16_t)DIAG_ID_MAX, "Both values need to be identical."); @@ -187,7 +187,8 @@ DIAG_ID_CFG_s diag_diagnosisIdConfiguration[] = { {DIAG_ID_SBC_FIN_STATE, DIAG_ERROR_SENSITIVITY_FIRST_EVENT, DIAG_FATAL_ERROR, DIAG_DELAY_SBC_ms, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_Sbc}, {DIAG_ID_SBC_RSTB_STATE, DIAG_ERROR_SENSITIVITY_FIRST_EVENT, DIAG_FATAL_ERROR, DIAG_DELAY_SBC_ms, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_Sbc}, {DIAG_ID_PLAUSIBILITY_PACK_VOLTAGE, DIAG_ERROR_SENSITIVITY_TENTH_EVENT, DIAG_FATAL_ERROR, DIAG_DELAY_PL_PACK_VOLTAGE_ms, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_ErrorPlausibility}, - {DIAG_ID_STRING_CONTACTOR_FEEDBACK, DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY, DIAG_FATAL_ERROR, DIAG_DELAY_CONTACTOR_FEEDBACK_ms, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_StringContactorFeedback}, + {DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY, DIAG_FATAL_ERROR, DIAG_DELAY_CONTACTOR_FEEDBACK_ms, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_StringContactorFeedback}, + {DIAG_ID_STRING_PLUS_CONTACTOR_FEEDBACK, DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY, DIAG_FATAL_ERROR, DIAG_DELAY_CONTACTOR_FEEDBACK_ms, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_StringContactorFeedback}, {DIAG_ID_PRECHARGE_CONTACTOR_FEEDBACK, DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY, DIAG_FATAL_ERROR, DIAG_DELAY_CONTACTOR_FEEDBACK_ms, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_PrechargeContactorFeedback}, {DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE, DIAG_ERROR_SENSITIVITY_FIRST_EVENT, DIAG_WARNING, DIAG_DELAY_DISCARDED, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_PlausibilityCheck}, {DIAG_ID_PLAUSIBILITY_CELL_VOLTAGE_SPREAD, DIAG_ERROR_SENSITIVITY_FIRST_EVENT, DIAG_WARNING, DIAG_DELAY_DISCARDED, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_PlausibilityCheck}, @@ -218,6 +219,8 @@ DIAG_ID_CFG_s diag_diagnosisIdConfiguration[] = { {DIAG_ID_I2C_PEX_ERROR, DIAG_ERROR_SENSITIVITY_HIGH, DIAG_INFO, DIAG_NO_DELAY, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_I2cPex}, {DIAG_ID_FRAM_READ_CRC_ERROR, DIAG_ERROR_SENSITIVITY_HIGH, DIAG_INFO, DIAG_NO_DELAY, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_FramError}, + + {DIAG_ID_ALERT_MODE, DIAG_ERROR_SENSITIVITY_HIGH, DIAG_FATAL_ERROR, DIAG_NO_DELAY, DIAG_RECORDING_ENABLED, DIAG_EVALUATION_ENABLED, DIAG_AlertFlag}, /* clang-format on */ }; diff --git a/src/app/engine/config/diag_cfg.h b/src/app/engine/config/diag_cfg.h index e947d6bd..8b25cd64 100644 --- a/src/app/engine/config/diag_cfg.h +++ b/src/app/engine/config/diag_cfg.h @@ -43,8 +43,8 @@ * @file diag_cfg.h * @author foxBMS Team * @date 2019-11-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix DIAG * @@ -101,10 +101,27 @@ #define DIAG_ERROR_CAN_TIMING_CC_SENSITIVITY (100) /*!< logging level of CAN timing errors on the current sensor */ #define DIAG_ERROR_CAN_SENSOR_SENSITIVITY (100) /*!< logging level of CAN errors on the current sensor */ -/** logging level of errors connected with the contactor feedback */ +/** + * Logging after 20th event for errors connected related to the contactor + * feedback. This value is chosen to be so large because of the time delay + * between the request for a state and the actual physical response. It is + * caused by the SPI transaction to the SPS module, the rise time of the + * control signal and the actual opening/closing of the contactor. Only then + * can the feedback be read correctly, which also take some additional delay + * depending on the feedback source. */ #define DIAG_ERROR_CONTACTOR_FEEDBACK_SENSITIVITY (20) -/** define if delay in #DIAG_ID_CFG_s is discarded because of severity level */ +/** ---------------- DEFINES FOR ERROR STATE TRANSITION DELAY---------------- + * These defines configure the delay before the transition to the error state + * occurs if a fault is detected. During this time the BMS can alert a + * superordinate control unit that the contactors will be opened soon. The + * superior control unit can take action and e.g., reduce the current until + * the transition to error state takes place. + * + * The delay is not taken into account if severity level #DIAG_FATAL_ERROR of + * type #DIAG_SEVERITY_LEVEL_e is configured in config array #diag_diagnosisIdConfiguration. + * For any other severity, #DIAG_DELAY_DISCARDED can be used as a dummy value. + */ #define DIAG_DELAY_DISCARDED (UINT32_MAX) /** no delay after error is detected, open contactors instantaneous */ #define DIAG_NO_DELAY (0u) @@ -210,7 +227,8 @@ typedef enum { DIAG_ID_AFE_OPEN_WIRE, /*!< an open (broken) sense wire has been detected on the battery cell measurement */ DIAG_ID_PLAUSIBILITY_PACK_VOLTAGE, /*!< the plausibility module has decided that the pack voltage is implausible */ DIAG_ID_INTERLOCK_FEEDBACK, /*!< the interlock feedback indicates it to be open (but it is expected to be closed) */ - DIAG_ID_STRING_CONTACTOR_FEEDBACK, /*!< the feedback on a string contactor does not match the expected value */ + DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, /*!< the feedback on a string minus contactor does not match the expected value */ + DIAG_ID_STRING_PLUS_CONTACTOR_FEEDBACK, /*!< the feedback on a string plus contactor does not match the expected value */ DIAG_ID_PRECHARGE_CONTACTOR_FEEDBACK, /*!< the feedback on a precharge contactor does not match the expected value */ DIAG_ID_SBC_FIN_STATE, /*!< the state of the FIN signal in the SBC is not ok */ DIAG_ID_SBC_RSTB_STATE, /*!< an activation of the RSTB pin of the SBC has been detected */ @@ -230,7 +248,8 @@ typedef enum { DIAG_ID_INSULATION_GROUND_ERROR, /*!< insulation monitoring has detected a ground error */ DIAG_ID_I2C_PEX_ERROR, /*!< general error with the port expanders */ DIAG_ID_FRAM_READ_CRC_ERROR, /*!< CRC does not match when reading from the FRAM */ - DIAG_ID_MAX, /*!< MAX indicator - do not change */ + DIAG_ID_ALERT_MODE, /*!< Critical error while opening the contactors. Fuse has not triggered */ + DIAG_ID_MAX, /*!< MAX indicator - do not change */ } DIAG_ID_e; /** diagnosis check result (event) */ diff --git a/src/app/engine/config/sys_cfg.c b/src/app/engine/config/sys_cfg.c index da19ec74..fa42698b 100644 --- a/src/app/engine/config/sys_cfg.c +++ b/src/app/engine/config/sys_cfg.c @@ -43,8 +43,8 @@ * @file sys_cfg.c * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix SYS * @@ -54,7 +54,7 @@ /*========== Includes =======================================================*/ #include "sys_cfg.h" -#include "can.h" +#include "can_cfg_tx_boot-message.h" /*========== Macros and Definitions =========================================*/ @@ -70,8 +70,8 @@ void SYS_SendBootMessage(void) { /* the system can do not much with the result of the function at this stage therefore discard it */ - (void)CAN_TransmitBootMessage(); - (void)CAN_TransmitDieId(); + (void)CANTX_TransmitBootMessage(); + (void)CANTX_TransmitDieId(); } /*========== Externalized Static Function Implementations (Unit Test) =======*/ diff --git a/src/app/engine/config/sys_cfg.h b/src/app/engine/config/sys_cfg.h index afdb9deb..c4d4ec97 100644 --- a/src/app/engine/config/sys_cfg.h +++ b/src/app/engine/config/sys_cfg.h @@ -43,8 +43,8 @@ * @file sys_cfg.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix SYS * diff --git a/src/app/engine/config/sys_mon_cfg.c b/src/app/engine/config/sys_mon_cfg.c index 728da0f4..4133f72a 100644 --- a/src/app/engine/config/sys_mon_cfg.c +++ b/src/app/engine/config/sys_mon_cfg.c @@ -43,8 +43,8 @@ * @file sys_mon_cfg.c * @author foxBMS Team * @date 2019-11-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix SYSM * diff --git a/src/app/engine/config/sys_mon_cfg.h b/src/app/engine/config/sys_mon_cfg.h index e0933495..2d0f86b8 100644 --- a/src/app/engine/config/sys_mon_cfg.h +++ b/src/app/engine/config/sys_mon_cfg.h @@ -43,8 +43,8 @@ * @file sys_mon_cfg.h * @author foxBMS Team * @date 2019-11-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE_CONFIGURATION * @prefix SYSM * diff --git a/src/app/engine/database/database.c b/src/app/engine/database/database.c index 6bd94757..cb0a809a 100644 --- a/src/app/engine/database/database.c +++ b/src/app/engine/database/database.c @@ -43,8 +43,8 @@ * @file database.c * @author foxBMS Team * @date 2015-08-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DATA * diff --git a/src/app/engine/database/database.h b/src/app/engine/database/database.h index 72eb626f..0bacc431 100644 --- a/src/app/engine/database/database.h +++ b/src/app/engine/database/database.h @@ -43,8 +43,8 @@ * @file database.h * @author foxBMS Team * @date 2015-08-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DATA * diff --git a/src/app/engine/database/database_helper.c b/src/app/engine/database/database_helper.c index 2bf699fa..63ff18b0 100644 --- a/src/app/engine/database/database_helper.c +++ b/src/app/engine/database/database_helper.c @@ -43,8 +43,8 @@ * @file database_helper.c * @author foxBMS Team * @date 2021-05-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DATA * diff --git a/src/app/engine/database/database_helper.h b/src/app/engine/database/database_helper.h index 71b95c4a..deee76a8 100644 --- a/src/app/engine/database/database_helper.h +++ b/src/app/engine/database/database_helper.h @@ -43,8 +43,8 @@ * @file database_helper.h * @author foxBMS Team * @date 2021-05-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DATA * diff --git a/src/app/engine/diag/cbs/diag_cbs.h b/src/app/engine/diag/cbs/diag_cbs.h index 6284b280..141389d8 100644 --- a/src/app/engine/diag/cbs/diag_cbs.h +++ b/src/app/engine/diag/cbs/diag_cbs.h @@ -43,8 +43,8 @@ * @file diag_cbs.h * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * @@ -443,6 +443,19 @@ extern void DIAG_FramError( const DIAG_DATABASE_SHIM_s *const kpkDiagShim, uint32_t data); +/** + * @brief diagnosis callback function for ALERT flag + * @param[in] diagId ID of diag entry + * @param[in] event OK, NOK or RESET + * @param[in] kpkDiagShim shim to the database entries + * @param[in] data not relevant + */ +extern void DIAG_AlertFlag( + DIAG_ID_e diagId, + DIAG_EVENT_e event, + const DIAG_DATABASE_SHIM_s *const kpkDiagShim, + uint32_t data); + /*========== Externalized Static Functions Prototypes (Unit Test) ===========*/ #endif /* FOXBMS__DIAG_CBS_H_ */ diff --git a/src/app/engine/diag/cbs/diag_cbs_afe.c b/src/app/engine/diag/cbs/diag_cbs_afe.c index 39685928..650bb860 100644 --- a/src/app/engine/diag/cbs/diag_cbs_afe.c +++ b/src/app/engine/diag/cbs/diag_cbs_afe.c @@ -43,8 +43,8 @@ * @file diag_cbs_afe.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_bms.c b/src/app/engine/diag/cbs/diag_cbs_bms.c new file mode 100644 index 00000000..b9a59e61 --- /dev/null +++ b/src/app/engine/diag/cbs/diag_cbs_bms.c @@ -0,0 +1,88 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file diag_cbs_bms.c + * @author foxBMS Team + * @date 2022-07-26 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup APPLICATION + * @prefix DIAG + * + * @brief Diagnosis driver implementation + * @details TODO + */ + +/*========== Includes =======================================================*/ +#include "diag_cbs.h" + +/*========== Macros and Definitions =========================================*/ + +/*========== Static Constant and Variable Definitions =======================*/ + +/*========== Extern Constant and Variable Definitions =======================*/ + +/*========== Static Function Prototypes =====================================*/ + +/*========== Static Function Implementations ================================*/ + +/*========== Extern Function Implementations ================================*/ +extern void DIAG_AlertFlag( + DIAG_ID_e diagId, + DIAG_EVENT_e event, + const DIAG_DATABASE_SHIM_s *const kpkDiagShim, + uint32_t data) { + FAS_ASSERT(diagId == DIAG_ID_ALERT_MODE); + FAS_ASSERT((event == DIAG_EVENT_OK) || (event == DIAG_EVENT_NOT_OK) || (event == DIAG_EVENT_RESET)); + FAS_ASSERT(kpkDiagShim != NULL_PTR); + /* AXIVION Routine Generic-MissingParameterAssert: data: parameter not used -> accept everything */ + (void)data; /* data is unused */ + + if (event == DIAG_EVENT_RESET) { + kpkDiagShim->pTableError->alertFlag = false; + } + if (event == DIAG_EVENT_NOT_OK) { + kpkDiagShim->pTableError->alertFlag = true; + } +} + +/*========== Externalized Static Function Implementations (Unit Test) =======*/ diff --git a/src/app/engine/diag/cbs/diag_cbs_can.c b/src/app/engine/diag/cbs/diag_cbs_can.c index 4779087a..69ecbacd 100644 --- a/src/app/engine/diag/cbs/diag_cbs_can.c +++ b/src/app/engine/diag/cbs/diag_cbs_can.c @@ -43,8 +43,8 @@ * @file diag_cbs_can.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_contactor.c b/src/app/engine/diag/cbs/diag_cbs_contactor.c index 4944cfa1..8965af4b 100644 --- a/src/app/engine/diag/cbs/diag_cbs_contactor.c +++ b/src/app/engine/diag/cbs/diag_cbs_contactor.c @@ -43,13 +43,14 @@ * @file diag_cbs_contactor.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * * @brief Diagnosis driver implementation - * @details TODO + * @details This file implements the diagnosis callback functions for all + * contactor related events. */ /*========== Includes =======================================================*/ @@ -76,13 +77,23 @@ extern void DIAG_StringContactorFeedback( FAS_ASSERT(kpkDiagShim != NULL_PTR); FAS_ASSERT(stringNumber < BS_NR_OF_STRINGS); - if (diagId == DIAG_ID_STRING_CONTACTOR_FEEDBACK) { + if (diagId == DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK) { if (event == DIAG_EVENT_RESET) { - kpkDiagShim->pTableError->stringContactor[stringNumber] = 0u; + kpkDiagShim->pTableError->stringMinusContactor[stringNumber] = 0u; } if (event == DIAG_EVENT_NOT_OK) { - kpkDiagShim->pTableError->stringContactor[stringNumber] = 1u; + kpkDiagShim->pTableError->stringMinusContactor[stringNumber] = 1u; } + } else if (diagId == DIAG_ID_STRING_PLUS_CONTACTOR_FEEDBACK) { + if (event == DIAG_EVENT_RESET) { + kpkDiagShim->pTableError->stringPlusContactor[stringNumber] = 0u; + } + if (event == DIAG_EVENT_NOT_OK) { + kpkDiagShim->pTableError->stringPlusContactor[stringNumber] = 1u; + } + } else { + /* This function should not be called with other diagnosis IDs */ + FAS_ASSERT(FAS_TRAP); } } @@ -103,6 +114,9 @@ extern void DIAG_PrechargeContactorFeedback( if (event == DIAG_EVENT_NOT_OK) { kpkDiagShim->pTableError->prechargeContactor[stringNumber] = 1u; } + } else { + /* This function should not be called with other diagnosis IDs */ + FAS_ASSERT(FAS_TRAP); } } diff --git a/src/app/engine/diag/cbs/diag_cbs_current-sensor.c b/src/app/engine/diag/cbs/diag_cbs_current-sensor.c index 9de622fb..03b44e6a 100644 --- a/src/app/engine/diag/cbs/diag_cbs_current-sensor.c +++ b/src/app/engine/diag/cbs/diag_cbs_current-sensor.c @@ -43,8 +43,8 @@ * @file diag_cbs_current-sensor.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_current.c b/src/app/engine/diag/cbs/diag_cbs_current.c index 0900c9fe..3ab569fd 100644 --- a/src/app/engine/diag/cbs/diag_cbs_current.c +++ b/src/app/engine/diag/cbs/diag_cbs_current.c @@ -43,8 +43,8 @@ * @file diag_cbs_current.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_deep-discharge.c b/src/app/engine/diag/cbs/diag_cbs_deep-discharge.c index e5693c7e..fa590960 100644 --- a/src/app/engine/diag/cbs/diag_cbs_deep-discharge.c +++ b/src/app/engine/diag/cbs/diag_cbs_deep-discharge.c @@ -43,8 +43,8 @@ * @file diag_cbs_deep-discharge.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_dummy.c b/src/app/engine/diag/cbs/diag_cbs_dummy.c index 96cc3d26..2662a52e 100644 --- a/src/app/engine/diag/cbs/diag_cbs_dummy.c +++ b/src/app/engine/diag/cbs/diag_cbs_dummy.c @@ -43,8 +43,8 @@ * @file diag_cbs_dummy.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_fram.c b/src/app/engine/diag/cbs/diag_cbs_fram.c index 74dc3eda..7281e6be 100644 --- a/src/app/engine/diag/cbs/diag_cbs_fram.c +++ b/src/app/engine/diag/cbs/diag_cbs_fram.c @@ -43,8 +43,8 @@ * @file diag_cbs_fram.c * @author foxBMS Team * @date 2022-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_i2c.c b/src/app/engine/diag/cbs/diag_cbs_i2c.c index de22239f..10a700ec 100644 --- a/src/app/engine/diag/cbs/diag_cbs_i2c.c +++ b/src/app/engine/diag/cbs/diag_cbs_i2c.c @@ -43,8 +43,8 @@ * @file diag_cbs_i2c.c * @author foxBMS Team * @date 2021-09-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_insulation.c b/src/app/engine/diag/cbs/diag_cbs_insulation.c index c7af3cb4..2554c7c2 100644 --- a/src/app/engine/diag/cbs/diag_cbs_insulation.c +++ b/src/app/engine/diag/cbs/diag_cbs_insulation.c @@ -43,8 +43,8 @@ * @file diag_cbs_insulation.c * @author foxBMS Team * @date 2021-02-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_interlock.c b/src/app/engine/diag/cbs/diag_cbs_interlock.c index 431dfc7b..9f094a27 100644 --- a/src/app/engine/diag/cbs/diag_cbs_interlock.c +++ b/src/app/engine/diag/cbs/diag_cbs_interlock.c @@ -43,8 +43,8 @@ * @file diag_cbs_interlock.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_plausibility.c b/src/app/engine/diag/cbs/diag_cbs_plausibility.c index da05ef8f..5955c233 100644 --- a/src/app/engine/diag/cbs/diag_cbs_plausibility.c +++ b/src/app/engine/diag/cbs/diag_cbs_plausibility.c @@ -43,8 +43,8 @@ * @file diag_cbs_plausibility.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_power-measurement.c b/src/app/engine/diag/cbs/diag_cbs_power-measurement.c index 225209ab..998555f9 100644 --- a/src/app/engine/diag/cbs/diag_cbs_power-measurement.c +++ b/src/app/engine/diag/cbs/diag_cbs_power-measurement.c @@ -43,8 +43,8 @@ * @file diag_cbs_power-measurement.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_sbc.c b/src/app/engine/diag/cbs/diag_cbs_sbc.c index 32989b2f..c65f43d2 100644 --- a/src/app/engine/diag/cbs/diag_cbs_sbc.c +++ b/src/app/engine/diag/cbs/diag_cbs_sbc.c @@ -43,8 +43,8 @@ * @file diag_cbs_sbc.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_sys-mon.c b/src/app/engine/diag/cbs/diag_cbs_sys-mon.c index 7e580961..23e014ce 100644 --- a/src/app/engine/diag/cbs/diag_cbs_sys-mon.c +++ b/src/app/engine/diag/cbs/diag_cbs_sys-mon.c @@ -43,8 +43,8 @@ * @file diag_cbs_sys-mon.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_temperature.c b/src/app/engine/diag/cbs/diag_cbs_temperature.c index f70dba3e..afe9b1ca 100644 --- a/src/app/engine/diag/cbs/diag_cbs_temperature.c +++ b/src/app/engine/diag/cbs/diag_cbs_temperature.c @@ -43,8 +43,8 @@ * @file diag_cbs_temperature.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/cbs/diag_cbs_voltage.c b/src/app/engine/diag/cbs/diag_cbs_voltage.c index 7aa8000d..c116dff9 100644 --- a/src/app/engine/diag/cbs/diag_cbs_voltage.c +++ b/src/app/engine/diag/cbs/diag_cbs_voltage.c @@ -43,8 +43,8 @@ * @file diag_cbs_voltage.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/diag/diag.c b/src/app/engine/diag/diag.c index 6b58a8b8..ed17b719 100644 --- a/src/app/engine/diag/diag.c +++ b/src/app/engine/diag/diag.c @@ -43,8 +43,8 @@ * @file diag.c * @author foxBMS Team * @date 2019-11-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * @@ -170,6 +170,18 @@ STD_RETURN_TYPE_e DIAG_Initialize(DIAG_DEV_s *diag_dev_pointer) { } } + /** Iterate over #diag_diagnosisIdConfiguration and check that a meaningful + * state transition time is configured if a severity of #DIAG_FATAL_ERROR + * is configured. */ + for (uint16_t diagnosisEntry = 0u; diagnosisEntry < diag_dev_pointer->nrOfConfiguredDiagnosisEntries; + diagnosisEntry++) { + bool fatalErrorDetected = (bool)(diag_diagnosisIdConfiguration[diagnosisEntry].severity == DIAG_FATAL_ERROR); + bool discardDelay = (bool)(diag_diagnosisIdConfiguration[diagnosisEntry].delay_ms == DIAG_DELAY_DISCARDED); + if (fatalErrorDetected && discardDelay) { + /* Configuration error. Fatal error configured but delay is discared.*/ + FAS_ASSERT(FAS_TRAP); + } + } diag.state = DIAG_STATE_INITIALIZED; return retval; } diff --git a/src/app/engine/diag/diag.h b/src/app/engine/diag/diag.h index 1feb048a..edfd35b0 100644 --- a/src/app/engine/diag/diag.h +++ b/src/app/engine/diag/diag.h @@ -43,8 +43,8 @@ * @file diag.h * @author foxBMS Team * @date 2019-11-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix DIAG * diff --git a/src/app/engine/hwinfo/masterinfo.c b/src/app/engine/hwinfo/masterinfo.c index 6107a154..600f8fe7 100644 --- a/src/app/engine/hwinfo/masterinfo.c +++ b/src/app/engine/hwinfo/masterinfo.c @@ -43,8 +43,8 @@ * @file masterinfo.c * @author foxBMS Team * @date 2020-07-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL * @prefix MINFO * diff --git a/src/app/engine/hwinfo/masterinfo.h b/src/app/engine/hwinfo/masterinfo.h index 37007ef4..5b0d903a 100644 --- a/src/app/engine/hwinfo/masterinfo.h +++ b/src/app/engine/hwinfo/masterinfo.h @@ -43,8 +43,8 @@ * @file masterinfo.h * @author foxBMS Team * @date 2020-07-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL * @prefix MINFO * diff --git a/src/app/engine/sys/sys.c b/src/app/engine/sys/sys.c index 5d2d2657..21917a61 100644 --- a/src/app/engine/sys/sys.c +++ b/src/app/engine/sys/sys.c @@ -43,8 +43,8 @@ * @file sys.c * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix SYS * diff --git a/src/app/engine/sys/sys.h b/src/app/engine/sys/sys.h index 85f97f18..5761f483 100644 --- a/src/app/engine/sys/sys.h +++ b/src/app/engine/sys/sys.h @@ -43,8 +43,8 @@ * @file sys.h * @author foxBMS Team * @date 2020-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix SYS * diff --git a/src/app/engine/sys_mon/sys_mon.c b/src/app/engine/sys_mon/sys_mon.c index 68a7efd2..c2a54e8e 100644 --- a/src/app/engine/sys_mon/sys_mon.c +++ b/src/app/engine/sys_mon/sys_mon.c @@ -43,8 +43,8 @@ * @file sys_mon.c * @author foxBMS Team * @date 2019-11-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix SYSM * diff --git a/src/app/engine/sys_mon/sys_mon.h b/src/app/engine/sys_mon/sys_mon.h index ac159e78..aac7a0d8 100644 --- a/src/app/engine/sys_mon/sys_mon.h +++ b/src/app/engine/sys_mon/sys_mon.h @@ -43,8 +43,8 @@ * @file sys_mon.h * @author foxBMS Team * @date 2019-11-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ENGINE * @prefix SYSM * diff --git a/src/app/engine/wscript b/src/app/engine/wscript index 68c3a217..bccfb2f4 100644 --- a/src/app/engine/wscript +++ b/src/app/engine/wscript @@ -55,6 +55,7 @@ def build(bld): os.path.join("config", "sys_mon_cfg.c"), os.path.join("database", "database.c"), os.path.join("database", "database_helper.c"), + os.path.join("diag", "cbs", "diag_cbs_bms.c"), os.path.join("diag", "cbs", "diag_cbs_can.c"), os.path.join("diag", "cbs", "diag_cbs_contactor.c"), os.path.join("diag", "cbs", "diag_cbs_current.c"), diff --git a/src/app/main/fassert.c b/src/app/main/fassert.c index 6decf71f..bf244f74 100644 --- a/src/app/main/fassert.c +++ b/src/app/main/fassert.c @@ -43,8 +43,8 @@ * @file fassert.c * @author foxBMS Team * @date 2020-05-26 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ASSERT * @prefix FAS * diff --git a/src/app/main/fstartup.c b/src/app/main/fstartup.c index c67975d9..dea89800 100644 --- a/src/app/main/fstartup.c +++ b/src/app/main/fstartup.c @@ -43,8 +43,8 @@ * @file fstartup.c * @author foxBMS Team * @date 2020-07-09 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL * @prefix STU * diff --git a/src/app/main/include/config/version_cfg.h b/src/app/main/include/config/version_cfg.h index 103d096c..42b9cb7a 100644 --- a/src/app/main/include/config/version_cfg.h +++ b/src/app/main/include/config/version_cfg.h @@ -43,8 +43,8 @@ * @file version_cfg.h * @author foxBMS Team * @date 2021-07-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL * @prefix VER * diff --git a/src/app/main/include/fassert.h b/src/app/main/include/fassert.h index 8d00c440..c4de22d1 100644 --- a/src/app/main/include/fassert.h +++ b/src/app/main/include/fassert.h @@ -43,8 +43,8 @@ * @file fassert.h * @author foxBMS Team * @date 2020-03-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup ASSERT * @prefix FAS * diff --git a/src/app/main/include/fstartup.h b/src/app/main/include/fstartup.h index 3e364e20..8127af1b 100644 --- a/src/app/main/include/fstartup.h +++ b/src/app/main/include/fstartup.h @@ -43,8 +43,8 @@ * @file fstartup.h * @author foxBMS Team * @date 2022-05-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL * @prefix STU * diff --git a/src/app/main/include/fstd_types.h b/src/app/main/include/fstd_types.h index 62f4d5b3..e049f3a7 100644 --- a/src/app/main/include/fstd_types.h +++ b/src/app/main/include/fstd_types.h @@ -43,8 +43,8 @@ * @file fstd_types.h * @author foxBMS Team * @date 2015-12-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL_CONF * @prefix STD * diff --git a/src/app/main/include/fsystem.h b/src/app/main/include/fsystem.h index dc5d804d..d320729c 100644 --- a/src/app/main/include/fsystem.h +++ b/src/app/main/include/fsystem.h @@ -43,8 +43,8 @@ * @file fsystem.h * @author foxBMS Team * @date 2020-07-21 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup SYSTEM * @prefix FSYS * diff --git a/src/app/main/include/general.h b/src/app/main/include/general.h index 8744dfe4..b97c0634 100644 --- a/src/app/main/include/general.h +++ b/src/app/main/include/general.h @@ -43,8 +43,8 @@ * @file general.h * @author foxBMS Team * @date 2019-09-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL_CONF * @prefix GEN * diff --git a/src/app/main/include/main.h b/src/app/main/include/main.h index 8f622d66..978df2a5 100644 --- a/src/app/main/include/main.h +++ b/src/app/main/include/main.h @@ -43,8 +43,8 @@ * @file main.h * @author foxBMS Team * @date 2018-10-23 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL * @prefix TODO * diff --git a/src/app/main/main.c b/src/app/main/main.c index f4591eba..02b1d427 100644 --- a/src/app/main/main.c +++ b/src/app/main/main.c @@ -43,8 +43,8 @@ * @file main.c * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL * @prefix TODO * diff --git a/src/app/task/config/ftask_cfg.c b/src/app/task/config/ftask_cfg.c index 60dbe6f0..87b529c5 100644 --- a/src/app/task/config/ftask_cfg.c +++ b/src/app/task/config/ftask_cfg.c @@ -43,8 +43,8 @@ * @file ftask_cfg.c * @author foxBMS Team * @date 2019-08-26 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TASK_CONFIGURATION * @prefix FTSK * @@ -232,7 +232,6 @@ extern void FTSK_RunUserCodeCyclic10ms(void) { /* user code */ SYSM_UpdateFramData(); SYS_Trigger(&sys_state); - BMS_Trigger(); ILCK_Trigger(); ADC_Control(); SPS_Ctrl(); @@ -247,6 +246,11 @@ extern void FTSK_RunUserCodeCyclic10ms(void) { MRC_ValidatePackMeasurement(); ftsk_cyclic10msCounter = 0; } + /* Call BMS_Trigger function at the end of the 10ms task to allow previously + * called modules in this task to update respectively evaluate their new. + * This minimizes the delay between data evaluation and the reaction from + * the BMS module */ + BMS_Trigger(); ftsk_cyclic10msCounter++; } diff --git a/src/app/task/config/ftask_cfg.h b/src/app/task/config/ftask_cfg.h index 05523fb6..eef21295 100644 --- a/src/app/task/config/ftask_cfg.h +++ b/src/app/task/config/ftask_cfg.h @@ -43,8 +43,8 @@ * @file ftask_cfg.h * @author foxBMS Team * @date 2019-08-26 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TASK_CONFIGURATION * @prefix FTSK * diff --git a/src/app/task/ftask/freertos/ftask_freertos.c b/src/app/task/ftask/freertos/ftask_freertos.c index 26d7ec7b..20588132 100644 --- a/src/app/task/ftask/freertos/ftask_freertos.c +++ b/src/app/task/ftask/freertos/ftask_freertos.c @@ -43,8 +43,8 @@ * @file ftask_freertos.c * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TASK * @prefix FTSK * diff --git a/src/app/task/ftask/ftask.c b/src/app/task/ftask/ftask.c index 8915ddfa..6b0acf68 100644 --- a/src/app/task/ftask/ftask.c +++ b/src/app/task/ftask/ftask.c @@ -43,8 +43,8 @@ * @file ftask.c * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TASK * @prefix FTSK * diff --git a/src/app/task/ftask/ftask.h b/src/app/task/ftask/ftask.h index 6717ab70..b0036cc0 100644 --- a/src/app/task/ftask/ftask.h +++ b/src/app/task/ftask/ftask.h @@ -43,8 +43,8 @@ * @file ftask.h * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TASK * @prefix FTSK * @@ -71,12 +71,12 @@ /** Length of queue that is used in the insulation measurement device (IMD) */ #define FTSK_IMD_QUEUE_LENGTH (5u) /** Size of queue item that is used in the IMD driver */ -#define FTSK_IMD_QUEUE_ITEM_SIZE_IN_BYTES (sizeof(CAN_BUFFERELEMENT_s)) +#define FTSK_IMD_QUEUE_ITEM_SIZE_IN_BYTES (sizeof(CAN_BUFFER_ELEMENT_s)) /** Length of queue that is used in the can module for receiving messages */ #define FTSK_CAN_RX_QUEUE_LENGTH (50u) /** Size of queue item that is used in the can driver */ -#define FTSK_CAN_RX_QUEUE_ITEM_SIZE_IN_BYTES (sizeof(CAN_BUFFERELEMENT_s)) +#define FTSK_CAN_RX_QUEUE_ITEM_SIZE_IN_BYTES (sizeof(CAN_BUFFER_ELEMENT_s)) /*========== Extern Constant and Variable Declarations ======================*/ /** handle of the database queue */ diff --git a/src/app/task/os/freertos/os_freertos.c b/src/app/task/os/freertos/os_freertos.c index 1745c1f0..45ae5d8c 100644 --- a/src/app/task/os/freertos/os_freertos.c +++ b/src/app/task/os/freertos/os_freertos.c @@ -43,8 +43,8 @@ * @file os_freertos.c * @author foxBMS Team * @date 2021-11-18 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup OS * @prefix OS * diff --git a/src/app/task/os/freertos/os_freertos_config-validation.h b/src/app/task/os/freertos/os_freertos_config-validation.h index aa0e3196..33380c01 100644 --- a/src/app/task/os/freertos/os_freertos_config-validation.h +++ b/src/app/task/os/freertos/os_freertos_config-validation.h @@ -43,8 +43,8 @@ * @file os_freertos_config-validation.h * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup OS * @prefix OS * diff --git a/src/app/task/os/os.c b/src/app/task/os/os.c index 13b1f08e..76701b09 100644 --- a/src/app/task/os/os.c +++ b/src/app/task/os/os.c @@ -43,8 +43,8 @@ * @file os.c * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup OS * @prefix OS * diff --git a/src/app/task/os/os.h b/src/app/task/os/os.h index 16f87b5d..3454436f 100644 --- a/src/app/task/os/os.h +++ b/src/app/task/os/os.h @@ -43,8 +43,8 @@ * @file os.h * @author foxBMS Team * @date 2019-08-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup OS * @prefix OS * diff --git a/src/doxygen_src.h b/src/doxygen_src.h index a325d00a..af46b569 100644 --- a/src/doxygen_src.h +++ b/src/doxygen_src.h @@ -43,8 +43,8 @@ * @file doxygen_src.h * @author foxBMS Team * @date 2019-06-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup DOXYGEN * @prefix DX * diff --git a/src/opt/cells/config/lg_inr18650mj1.c b/src/opt/cells/config/lg_inr18650mj1.c index dc25eae6..75c1288b 100644 --- a/src/opt/cells/config/lg_inr18650mj1.c +++ b/src/opt/cells/config/lg_inr18650mj1.c @@ -43,8 +43,8 @@ * @file lg_inr18650mj1.c * @author foxBMS Team * @date 2017-11-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup BATTERY_CELL_CONF * @prefix BC * diff --git a/src/opt/cells/config/lg_inr18650mj1.h b/src/opt/cells/config/lg_inr18650mj1.h index d1bc6d58..b7ea1306 100644 --- a/src/opt/cells/config/lg_inr18650mj1.h +++ b/src/opt/cells/config/lg_inr18650mj1.h @@ -43,8 +43,8 @@ * @file lg_inr18650mj1.h * @author foxBMS Team * @date 2017-11-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup BATTERY_CELL_CONF * @prefix BC * diff --git a/src/opt/cells/config/pana_ncr18650bd.h b/src/opt/cells/config/pana_ncr18650bd.h index 911d9019..469c83f3 100644 --- a/src/opt/cells/config/pana_ncr18650bd.h +++ b/src/opt/cells/config/pana_ncr18650bd.h @@ -43,8 +43,8 @@ * @file pana_ncr18650bd.h * @author foxBMS Team * @date 2018-10-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup BATTERY_CELL_CONF * @prefix BC * diff --git a/tests/axivion/README.md b/tests/axivion/README.md index 5d4e3635..78312b90 100644 --- a/tests/axivion/README.md +++ b/tests/axivion/README.md @@ -1,5 +1,8 @@ # Axivion Bauhaus Suite Configuration for foxBMS 2 +> **NOTE:** For running local Axivion builds see + [scripts/README.md](scripts/README.md) + ## Directory Description - This directory contains the Axivion setup for the TI ARM CGT compiler for TI @@ -46,6 +49,7 @@ └───scripts ci_check_freshness_of_architecture_svg.py dep_analysis.py + get_local_host.py gravis_export_architecture_svg.py start_analysis.bat start_local_analysis.bat diff --git a/tests/axivion/addon-test/run_axivion_addon_tests.bat b/tests/axivion/addon-test/run_axivion_addon_tests.bat index 1ba762b5..fb65d615 100644 --- a/tests/axivion/addon-test/run_axivion_addon_tests.bat +++ b/tests/axivion/addon-test/run_axivion_addon_tests.bat @@ -38,7 +38,7 @@ @setlocal enableextensions enabledelayedexpansion @pushd %~dp0 -@CALL :NORMALIZEPATH "%~dp0\..\ +@CALL :NORMALIZE_PATH "%~dp0\..\" @SET BAUHAUS_CONFIG=%NORMALIZED_PATH% @ECHO Setting 'BAUHAUS_CONFIG' to '%BAUHAUS_CONFIG%' @@ -46,9 +46,15 @@ @echo %%s | findstr /i "bauhaus">nul && (@SET BAUHAUS_DIR=%%s) ) -@REM preferr the perform_tests.exe that is found on PATH +@REM ensure output directory +@SET AXIVION_BUILD_DIR=%~dp0..\..\..\build\axivion +@IF NOT EXIST %AXIVION_BUILD_DIR% ( + @mkdir %AXIVION_BUILD_DIR% +) + +@REM prefer the perform_tests.exe that is found on PATH @SET TEST_EXE=perform_tests.exe -@ECHO Seraching program '%TEST_EXE%' +@ECHO Searching program '%TEST_EXE%' @WHERE %TEST_EXE% 1>NUL 2>NUL @IF %ERRORLEVEL% neq 0 ( @ECHO '%TEST_EXE%' is not in %%PATH%% @@ -73,6 +79,6 @@ @popd @EXIT /B %ERRORLEVEL% -:NORMALIZEPATH +:NORMALIZE_PATH @SET NORMALIZED_PATH=%~dpfn1 @EXIT /B diff --git a/tests/axivion/architecture_config.json b/tests/axivion/architecture_config.json index 8a4dbf24..7cfa3793 100644 --- a/tests/axivion/architecture_config.json +++ b/tests/axivion/architecture_config.json @@ -24,11 +24,11 @@ } }, "_Format": "1.0", - "_Version": "7.4.0", + "_Version": "7.4.6", "_VersionNum": [ 7, 4, - 0, - 9870 + 6, + 10210 ] } diff --git a/tests/axivion/ci_config.json b/tests/axivion/ci_config.json index 9103614e..a0da16c1 100644 --- a/tests/axivion/ci_config.json +++ b/tests/axivion/ci_config.json @@ -65,11 +65,11 @@ } }, "_Format": "1.0", - "_Version": "7.4.0", + "_Version": "7.4.6", "_VersionNum": [ 7, 4, - 0, - 9870 + 6, + 10210 ] } diff --git a/tests/axivion/compiler-errata/.clang-format b/tests/axivion/compiler-errata/.clang-format new file mode 100644 index 00000000..9d159247 --- /dev/null +++ b/tests/axivion/compiler-errata/.clang-format @@ -0,0 +1,2 @@ +DisableFormat: true +SortIncludes: false diff --git a/tests/axivion/compiler-errata/README.md b/tests/axivion/compiler-errata/README.md new file mode 100644 index 00000000..50644a5b --- /dev/null +++ b/tests/axivion/compiler-errata/README.md @@ -0,0 +1,28 @@ +# Axivion Compiler Errata Tests + +This directory and its subdirectories contain Compiler Errata tests for +different compilers. + +> **NOTE:** ``perform_tests.exe`` must be on PATH in the correct version. + +- The test files of the compiler errata tests are in the directory + ``./compiler-errata/``. + **The test files are not part of the public foxBMS 2 release.** + - ``ti-cgt-arm_20.2.6.lts``: + - [ARM Code Generation Tools v20.2.6.LTS](https://software-dl.ti.com/codegen/esd/cgt_public_sw/TMS470/20.2.6.LTS/README.html) + - test script: ``run_axivion_compiler_errata_ti-cgt-arm_20.2.6.lts_tests.bat`` + - Bauhaus version: X.Y.Z +- To ensure that the test suite is not changed inadvertently, the SHA-256 of + the directory is checked in CI: + ```console + C:\Users\vulpes\Documents\foxbms-2>tools\utils\cmd\run-python-script.bat tools\utils\verify_checksums.py tests\axivion\qualification-test\qualification-kit -vv + ``` +- If the compiler errata tests are changed/updated the following needs to be done: + - The changes need to be applied in ``./compiler-errata/`` + - The known SHA-256 of the test files needs to be updated in the CI step. + - the commit message **MUST** contain ``Axivion``. + This ensures that the compiler errata tests are run. +- When the Axivion Bauhaus Suite is updated, the compiler-errata tests need + also to be updated. + The pinned Bauhaus version is found in + ``/conf/env/paths_win32.txt``. diff --git a/tests/axivion/compiler-errata/run_axivion_compiler_errata_ti-cgt-arm_20.2.6.lts_tests.bat b/tests/axivion/compiler-errata/run_axivion_compiler_errata_ti-cgt-arm_20.2.6.lts_tests.bat new file mode 100644 index 00000000..62361242 --- /dev/null +++ b/tests/axivion/compiler-errata/run_axivion_compiler_errata_ti-cgt-arm_20.2.6.lts_tests.bat @@ -0,0 +1,85 @@ +@REM Copyright (c) 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. +@REM All rights reserved. +@REM +@REM SPDX-License-Identifier: BSD-3-Clause +@REM +@REM Redistribution and use in source and binary forms, with or without +@REM modification, are permitted provided that the following conditions are met: +@REM +@REM 1. Redistributions of source code must retain the above copyright notice, this +@REM list of conditions and the following disclaimer. +@REM +@REM 2. Redistributions in binary form must reproduce the above copyright notice, +@REM this list of conditions and the following disclaimer in the documentation +@REM and/or other materials provided with the distribution. +@REM +@REM 3. Neither the name of the copyright holder nor the names of its +@REM contributors may be used to endorse or promote products derived from +@REM this software without specific prior written permission. +@REM +@REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +@REM AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +@REM IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +@REM DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +@REM FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +@REM DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +@REM SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +@REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +@REM OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@REM OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@REM +@REM We kindly request you to use one or more of the following phrases to refer to +@REM foxBMS in your hardware, software, documentation or advertising materials: +@REM +@REM - "This product uses parts of foxBMS®" +@REM - "This product includes parts of foxBMS®" +@REM - "This product is derived from foxBMS®" + +@setlocal enableextensions enabledelayedexpansion + +@pushd %~dp0 +@CALL :NORMALIZE_PATH "%~dp0\..\" +@SET BAUHAUS_CONFIG=%NORMALIZED_PATH% +@ECHO Setting 'BAUHAUS_CONFIG' to '%BAUHAUS_CONFIG%' + +@for /f "tokens=*" %%s in (%~dp0..\..\..\conf\env\paths_win32.txt) do @( + @echo %%s | findstr /i "bauhaus">nul && (@SET BAUHAUS_DIR=%%s) +) + +@REM ensure output directory +@SET AXIVION_BUILD_DIR=%~dp0..\..\..\build\axivion +@IF NOT EXIST %AXIVION_BUILD_DIR% ( + @mkdir %AXIVION_BUILD_DIR% +) + +@REM prefer the perform_tests.exe that is found on PATH +@SET TEST_EXE=perform_tests.exe +@ECHO Searching program '%TEST_EXE%' +@WHERE %TEST_EXE% 1>NUL 2>NUL +@IF %ERRORLEVEL% neq 0 ( + @ECHO '%TEST_EXE%' is not in %%PATH%% + @SET TEST_RUNNER=%BAUHAUS_DIR%\%TEST_EXE% +) ELSE ( + @SET TEST_RUNNER=%TEST_EXE% +) + +@IF exist %TEST_RUNNER% ( + @ECHO Using '%TEST_RUNNER%' +) ELSE ( + @WHERE %TEST_EXE% 1>NUL 2>NUL + @IF %ERRORLEVEL% neq 0 ( + @ECHO Could not find program '%TEST_RUNNER%' + @EXIT /b 1 + ) +) +@echo Found '%TEST_RUNNER%' +%TEST_RUNNER% %* --language C11 ti-cgt-arm_20.2.6.lts/*.c +@SET TEST_RUNNER_EXIT_LEVEL=%ERRORLEVEL% + +@SET BAUHAUS_CONFIG= +@popd +@EXIT /B %TEST_RUNNER_EXIT_LEVEL% + +:NORMALIZE_PATH + @SET NORMALIZED_PATH=%~dpfn1 + @EXIT /B diff --git a/tests/axivion/compiler_config.json b/tests/axivion/compiler_config.json index 3bbf27ad..5799f2e4 100644 --- a/tests/axivion/compiler_config.json +++ b/tests/axivion/compiler_config.json @@ -32,7 +32,7 @@ "variadic_macros": "enabled" }, "language_version": "C11", - "native_compiler": "C:\\ti\\ccs1100\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.5.LTS\\bin\\armcl.EXE", + "native_compiler": "C:\\ti\\ccs1200\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.6.LTS\\bin\\armcl.EXE", "preprocessing": { "predefined_macros": { "_OPTIMIZE_FOR_SPACE": "1", @@ -113,20 +113,20 @@ }, "sys_include_envvar": null, "sys_include_path": [ - "C:\\ti\\ccs1100\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.5.LTS\\include" + "C:\\ti\\ccs1200\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.6.LTS\\include" ], "user_include_path": [] } }, - "language_c.command.#": "C:\\ti\\ccs1100\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.5.LTS\\bin\\armcl.EXE --silicon_version=7R5 --code_state=32 --float_support=VFPv3D16 -g --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --c11 -Ooff --issue_remarks --strict_ansi", - "language_c.info.#": "20.2.5\n", + "language_c.command.#": "C:\\ti\\ccs1200\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.6.LTS\\bin\\armcl.EXE --silicon_version=7R5 --code_state=32 --float_support=VFPv3D16 -g --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --c11 -Ooff --issue_remarks --strict_ansi", + "language_c.info.#": "20.2.6\n", "language_cxx": { "features": { "exceptions": false, "runtime_type_information": false }, "language_version": "Cpp14", - "native_compiler": "C:\\ti\\ccs1100\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.5.LTS\\bin\\armcl.EXE", + "native_compiler": "C:\\ti\\ccs1200\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.6.LTS\\bin\\armcl.EXE", "preprocessing": { "predefined_macros": { "_BOOL": "1", @@ -209,23 +209,23 @@ "__unsigned_chars__": "1" }, "sys_include_path": [ - "C:\\ti\\ccs1100\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.5.LTS\\include\\libcxx", - "C:\\ti\\ccs1100\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.5.LTS\\include" + "C:\\ti\\ccs1200\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.6.LTS\\include\\libcxx", + "C:\\ti\\ccs1200\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.6.LTS\\include" ], "user_include_path": [] } }, - "language_cxx.command.#": "C:\\ti\\ccs1100\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.5.LTS\\bin\\armcl.EXE --silicon_version=7R5 --code_state=32 --float_support=VFPv3D16 -g --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --c11 -Ooff --issue_remarks --strict_ansi", - "language_cxx.info.#": "20.2.5\n", + "language_cxx.command.#": "C:\\ti\\ccs1200\\ccs\\tools\\compiler\\ti-cgt-arm_20.2.6.LTS\\bin\\armcl.EXE --silicon_version=7R5 --code_state=32 --float_support=VFPv3D16 -g --diag_wrap=off --display_error_number --enum_type=packed --abi=eabi --c11 -Ooff --issue_remarks --strict_ansi", + "language_cxx.info.#": "20.2.6\n", "linker": { - "library_path": [], "advanced": { "ignore_input_files": { "$(delta:+)": [ "*.cmd" ] } - } + }, + "library_path": [] }, "preincludes": { "$(delta:+)": [ @@ -549,11 +549,11 @@ } }, "_Format": "1.0", - "_Version": "7.4.0", + "_Version": "7.4.6", "_VersionNum": [ 7, 4, - 0, - 9870 + 6, + 10210 ] } diff --git a/tests/axivion/config-test/run_axivion_config_tests.bat b/tests/axivion/config-test/run_axivion_config_tests.bat index 1ba762b5..fb65d615 100644 --- a/tests/axivion/config-test/run_axivion_config_tests.bat +++ b/tests/axivion/config-test/run_axivion_config_tests.bat @@ -38,7 +38,7 @@ @setlocal enableextensions enabledelayedexpansion @pushd %~dp0 -@CALL :NORMALIZEPATH "%~dp0\..\ +@CALL :NORMALIZE_PATH "%~dp0\..\" @SET BAUHAUS_CONFIG=%NORMALIZED_PATH% @ECHO Setting 'BAUHAUS_CONFIG' to '%BAUHAUS_CONFIG%' @@ -46,9 +46,15 @@ @echo %%s | findstr /i "bauhaus">nul && (@SET BAUHAUS_DIR=%%s) ) -@REM preferr the perform_tests.exe that is found on PATH +@REM ensure output directory +@SET AXIVION_BUILD_DIR=%~dp0..\..\..\build\axivion +@IF NOT EXIST %AXIVION_BUILD_DIR% ( + @mkdir %AXIVION_BUILD_DIR% +) + +@REM prefer the perform_tests.exe that is found on PATH @SET TEST_EXE=perform_tests.exe -@ECHO Seraching program '%TEST_EXE%' +@ECHO Searching program '%TEST_EXE%' @WHERE %TEST_EXE% 1>NUL 2>NUL @IF %ERRORLEVEL% neq 0 ( @ECHO '%TEST_EXE%' is not in %%PATH%% @@ -73,6 +79,6 @@ @popd @EXIT /B %ERRORLEVEL% -:NORMALIZEPATH +:NORMALIZE_PATH @SET NORMALIZED_PATH=%~dpfn1 @EXIT /B diff --git a/tests/axivion/qualification-test/.clang-format b/tests/axivion/qualification-test/.clang-format new file mode 100644 index 00000000..9d159247 --- /dev/null +++ b/tests/axivion/qualification-test/.clang-format @@ -0,0 +1,2 @@ +DisableFormat: true +SortIncludes: false diff --git a/tests/axivion/qualification-test/README.md b/tests/axivion/qualification-test/README.md new file mode 100644 index 00000000..9575110a --- /dev/null +++ b/tests/axivion/qualification-test/README.md @@ -0,0 +1,22 @@ +# Axivion Tool Qualification Kit + +This directory and its subdirectories contain the Axivion Tool Qualification +Kit (TQK). + +> **NOTE:** ``perform_tests.exe`` must be on PATH in the correct version. + +- The test files of the TQK are in the directory ``./qualification-kit/``. + **The test files are not part of the public foxBMS 2 release.** +- To ensure that the test suite is not changed inadvertently, the SHA-256 of + the directory is checked in CI: + ```console + C:\Users\vulpes\Documents\foxbms-2>tools\utils\cmd\run-python-script.bat tools\utils\verify_checksums.py tests\axivion\qualification-test\qualification-kit -vv + ``` +- If the TQK is changed/updated the following needs to be done: + - The changes need to be applied in ``./qualification-kit/`` + - The known SHA-256 of the test files needs to be updated in the CI step. + - the commit message **MUST** contain ``Axivion``. + This ensures that the TQK is run. +- When the Axivion Bauhaus Suite is updated, the TQK needs also to be updated. + The pinned Bauhaus version is found in + ``/conf/env/paths_win32.txt``. diff --git a/tests/axivion/qualification-test/run_axivion_qualification_kit_tests.bat b/tests/axivion/qualification-test/run_axivion_qualification_kit_tests.bat new file mode 100644 index 00000000..7dc1717a --- /dev/null +++ b/tests/axivion/qualification-test/run_axivion_qualification_kit_tests.bat @@ -0,0 +1,85 @@ +@REM Copyright (c) 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. +@REM All rights reserved. +@REM +@REM SPDX-License-Identifier: BSD-3-Clause +@REM +@REM Redistribution and use in source and binary forms, with or without +@REM modification, are permitted provided that the following conditions are met: +@REM +@REM 1. Redistributions of source code must retain the above copyright notice, this +@REM list of conditions and the following disclaimer. +@REM +@REM 2. Redistributions in binary form must reproduce the above copyright notice, +@REM this list of conditions and the following disclaimer in the documentation +@REM and/or other materials provided with the distribution. +@REM +@REM 3. Neither the name of the copyright holder nor the names of its +@REM contributors may be used to endorse or promote products derived from +@REM this software without specific prior written permission. +@REM +@REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +@REM AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +@REM IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +@REM DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +@REM FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +@REM DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +@REM SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +@REM CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +@REM OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@REM OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +@REM +@REM We kindly request you to use one or more of the following phrases to refer to +@REM foxBMS in your hardware, software, documentation or advertising materials: +@REM +@REM - "This product uses parts of foxBMS®" +@REM - "This product includes parts of foxBMS®" +@REM - "This product is derived from foxBMS®" + +@setlocal enableextensions enabledelayedexpansion + +@pushd %~dp0 +@CALL :NORMALIZE_PATH "%~dp0\..\" +@SET BAUHAUS_CONFIG=%NORMALIZED_PATH% +@ECHO Setting 'BAUHAUS_CONFIG' to '%BAUHAUS_CONFIG%' + +@for /f "tokens=*" %%s in (%~dp0..\..\..\conf\env\paths_win32.txt) do @( + @echo %%s | findstr /i "bauhaus">nul && (@SET BAUHAUS_DIR=%%s) +) + +@REM ensure output directory +@SET AXIVION_BUILD_DIR=%~dp0..\..\..\build\axivion +@IF NOT EXIST %AXIVION_BUILD_DIR% ( + @mkdir %AXIVION_BUILD_DIR% +) + +@REM prefer the perform_tests.exe that is found on PATH +@SET TEST_EXE=perform_tests.exe +@ECHO Searching program '%TEST_EXE%' +@WHERE %TEST_EXE% 1>NUL 2>NUL +@IF %ERRORLEVEL% neq 0 ( + @ECHO '%TEST_EXE%' is not in %%PATH%% + @SET TEST_RUNNER=%BAUHAUS_DIR%\%TEST_EXE% +) ELSE ( + @SET TEST_RUNNER=%TEST_EXE% +) + +@IF exist %TEST_RUNNER% ( + @ECHO Using '%TEST_RUNNER%' +) ELSE ( + @WHERE %TEST_EXE% 1>NUL 2>NUL + @IF %ERRORLEVEL% neq 0 ( + @ECHO Could not find program '%TEST_RUNNER%' + @EXIT /b 1 + ) +) +@echo Found '%TEST_RUNNER%' +%TEST_RUNNER% %* --language C11 */*/*.c */*/*.tst */*/*/*.c */*/*/*.tst */*/*/*/*.c */*/*/*/*.tst */*/*/*/*/*.c */*/*/*/*/*.tst +@SET TEST_RUNNER_EXIT_LEVEL=%ERRORLEVEL% + +@SET BAUHAUS_CONFIG= +@popd +@EXIT /B %TEST_RUNNER_EXIT_LEVEL% + +:NORMALIZE_PATH + @SET NORMALIZED_PATH=%~dpfn1 + @EXIT /B diff --git a/tests/axivion/rule_config_addon.json b/tests/axivion/rule_config_addon.json index 1b8823f4..3224daa9 100644 --- a/tests/axivion/rule_config_addon.json +++ b/tests/axivion/rule_config_addon.json @@ -69,11 +69,11 @@ } }, "_Format": "1.0", - "_Version": "7.4.0", + "_Version": "7.4.6", "_VersionNum": [ 7, 4, - 0, - 9870 + 6, + 10210 ] } diff --git a/tests/axivion/rule_config_bad_tokens.json b/tests/axivion/rule_config_bad_tokens.json index 73173dbc..23119dd8 100644 --- a/tests/axivion/rule_config_bad_tokens.json +++ b/tests/axivion/rule_config_bad_tokens.json @@ -20,11 +20,11 @@ } }, "_Format": "1.0", - "_Version": "7.4.0", + "_Version": "7.4.6", "_VersionNum": [ 7, 4, - 0, - 9870 + 6, + 10210 ] } diff --git a/tests/axivion/rule_config_c.json b/tests/axivion/rule_config_c.json index 9e42dae8..74e53369 100644 --- a/tests/axivion/rule_config_c.json +++ b/tests/axivion/rule_config_c.json @@ -1384,11 +1384,11 @@ } }, "_Format": "1.0", - "_Version": "7.4.0", + "_Version": "7.4.6", "_VersionNum": [ 7, 4, - 0, - 9870 + 6, + 10210 ] } diff --git a/tests/axivion/rule_config_c.py b/tests/axivion/rule_config_c.py index 15a36c05..0b31f9d8 100644 --- a/tests/axivion/rule_config_c.py +++ b/tests/axivion/rule_config_c.py @@ -89,7 +89,7 @@ def disallow_unjustified_deviations(issue): """forbid suppressing without justification""" - if issue.disabled: # TODO: see mail #9172 + if hasattr(issue, "disabled"): # TODO: see mail #9172 if not issue.justification: issue.disabled = False diff --git a/tests/axivion/rule_config_metric_lines.json b/tests/axivion/rule_config_metric_lines.json index 63a9b194..ff3cf983 100644 --- a/tests/axivion/rule_config_metric_lines.json +++ b/tests/axivion/rule_config_metric_lines.json @@ -94,11 +94,11 @@ } }, "_Format": "1.0", - "_Version": "7.4.0", + "_Version": "7.4.6", "_VersionNum": [ 7, 4, - 0, - 9870 + 6, + 10210 ] } diff --git a/tests/axivion/rule_config_names.json b/tests/axivion/rule_config_names.json index e772bc30..5c8ca2f8 100644 --- a/tests/axivion/rule_config_names.json +++ b/tests/axivion/rule_config_names.json @@ -150,11 +150,11 @@ } }, "_Format": "1.0", - "_Version": "7.4.0", + "_Version": "7.4.6", "_VersionNum": [ 7, 4, - 0, - 9870 + 6, + 10210 ] } diff --git a/tests/axivion/scripts/README.md b/tests/axivion/scripts/README.md index d02b19eb..00264a89 100644 --- a/tests/axivion/scripts/README.md +++ b/tests/axivion/scripts/README.md @@ -1,5 +1,7 @@ # Helper Scripts to Interact with Axivion Bauhaus Suite +## Directory Description + These are helper scripts for the interaction with the Axivion Bauhaus Suite in the foxBMS 2 project (The Axivion configuration is described in this [README.md](../README.md)). @@ -13,13 +15,20 @@ Files here might need to be updated to the local Axivion setup. ``` gravis --script tests/axivion/scripts/gravis_export_architecture_svg.py ``` -- ``scripts/ci_check_freshness_of_architecture_svg.py`` is used to check whether the - git timestamps of the architecture documentation and the rendered SVG are aligned, i.e., - one can not change the architecture without updating the architecture image - in the documentation. +- ``scripts/ci_check_freshness_of_architecture_svg.py`` is used to check + whether the git timestamps of the architecture documentation and the rendered + SVG are aligned, i.e., one can not change the architecture without updating + the architecture image in the documentation. The script needs to be invoked by as follows: ``` tools/utils/cmd/run-python-script.bat tests/axivion/scripts ci_check_freshness_of_architecture_svg.py ``` -- ``scripts/wrapper_make_race_pdfs.bat`` wrapper script to simplify creating the -race condition report. +- ``scripts/wrapper_make_race_pdfs.bat`` wrapper script to simplify creating + the race condition report. + +## Local Build + +1. Run once ``tests/axivion/scripts/start_local_dashserver.bat`` to start a + local dashserver. +1. Then, run ``tests/axivion/scripts/start_local_analysis.bat`` to run a local + analysis build. diff --git a/tests/axivion/scripts/start_local_analysis.bat b/tests/axivion/scripts/start_local_analysis.bat index d7661e1b..57378009 100644 --- a/tests/axivion/scripts/start_local_analysis.bat +++ b/tests/axivion/scripts/start_local_analysis.bat @@ -41,5 +41,26 @@ @set AXIVION_LOCAL_BUILD=TRUE @set STORE_REQUESTS_CA_BUNDLE=%REQUESTS_CA_BUNDLE% @set REQUESTS_CA_BUNDLE=%USERPROFILE%\.bauhaus\auto.crt + + +@FOR /F "tokens=* USEBACKQ" %%F IN (`git branch --show-current`) DO @( + @SET AXIVION_BRANCH_NAME=%%F +) + +@SET projectName=foxbms-2 +@SET analysisProjectName = %projectName% + "-" + %AXIVION_BRANCH_NAME% + "-" + %USERNAME% +@ECHO %analysisProjectName% + +@SET projectShadowRepo=%USERPROFILE%\.bauhaus\%projectName% +@ECHO Shadow repo is at '%projectShadowRepo%'. +@IF NOT EXIST %projectShadowRepo% ( + @mkdir %projectShadowRepo% +) + +@IF %ERRORLEVEL% NEQ 0 ( + @EXIT /b %ERRORLEVEL% +) +@ECHO Dashboard url is: %AXIVION_DASHBOARD_URL% + @call %~dp0start_analysis.bat @set REQUESTS_CA_BUNDLE=%STORE_REQUESTS_CA_BUNDLE% diff --git a/tests/axivion/scripts/wrapper_make_race_pdfs.bat b/tests/axivion/scripts/wrapper_make_race_pdfs.bat index b09c6cd7..1a10e3a9 100644 --- a/tests/axivion/scripts/wrapper_make_race_pdfs.bat +++ b/tests/axivion/scripts/wrapper_make_race_pdfs.bat @@ -38,5 +38,5 @@ @SETLOCAL EnableExtensions EnableDelayedExpansion @SET BAUHAUS_CONFIG=%~dp0\..\ -@SET PATH=%PATH%;C:\Bauhaus\7.4.0\doc\html\_downloads\87991abe35fa881bf14ce6d55f075d2d +@SET PATH=%PATH%;C:\Bauhaus\7.4.6\doc\html\_downloads\87991abe35fa881bf14ce6d55f075d2d @call make_race_pdfs.bat %USERPROFILE%\.bauhaus\localbuild\projects\foxbms-2.ir %USERPROFILE%\.bauhaus\localbuild\projects\foxbms-2.rfg diff --git a/tests/c-std/c-std-test-inline-helper.h b/tests/c-std/c-std-test-inline-helper.h index 5b7de3a3..3fa0dd95 100644 --- a/tests/c-std/c-std-test-inline-helper.h +++ b/tests/c-std/c-std-test-inline-helper.h @@ -43,8 +43,8 @@ * @file c-std-test-inline-helper.h * @author foxBMS Team * @date 2022-03-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TESTS * @prefix TEST * diff --git a/tests/c-std/c-std-test.c b/tests/c-std/c-std-test.c index 34319a58..98a9bd5c 100644 --- a/tests/c-std/c-std-test.c +++ b/tests/c-std/c-std-test.c @@ -43,8 +43,8 @@ * @file c-std-test.c * @author foxBMS Team * @date 2022-03-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup TESTS * @prefix TEST * diff --git a/tests/can/check_ids.py b/tests/can/check_ids.py new file mode 100644 index 00000000..a5970cd2 --- /dev/null +++ b/tests/can/check_ids.py @@ -0,0 +1,432 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (c) 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# We kindly request you to use one or more of the following phrases to refer to +# foxBMS in your hardware, software, documentation or advertising materials: +# +# - "This product uses parts of foxBMS®" +# - "This product includes parts of foxBMS®" +# - "This product is derived from foxBMS®" + +"""Python script to check if all callbacks defined in the .dbc file are +implemented in callback functions.""" +import argparse +import logging +import os +import re +import sys +from pathlib import Path +from dataclasses import dataclass +from enum import Enum, auto + +import cantools +import tabulate + +HAVE_GIT = False +try: + from git import Repo + from git.exc import InvalidGitRepositoryError + + HAVE_GIT = True +except ImportError: + pass + +FILE_RE = r"\(in:([a-z_-]{1,}\.c):([A-Z]{2,5}_.*), fv:((tx)|(rx))\)" +FILE_RE_COMPILED = re.compile(FILE_RE) + + +def get_git_root(path: str) -> str: + """helper function to find the repository root + + Args: + path (string): path of test_f_guidelines + + Returns: + root (string): root path of the git repository + """ + root = os.path.join(os.path.dirname(path), "..", "..", "..") + if HAVE_GIT: + try: + repo = Repo(path, search_parent_directories=True) + root = repo.git.rev_parse("--show-toplevel") + except InvalidGitRepositoryError: + pass + return root + + +ROOT = Path(get_git_root(os.path.realpath(__file__))) +BDC_DIR_REL = Path(os.path.join("tools", "dbc")) +SRC_DIR_REL = Path(os.path.join("src", "app")) +DRIVER_CONFIGURATION_FILES = Path(os.path.join("driver", "config")) +RX_MESSAGES = ( + ROOT + / SRC_DIR_REL + / DRIVER_CONFIGURATION_FILES + / Path("can_cfg_rx-message-definitions.h") +) +TX_MESSAGES = ( + ROOT + / SRC_DIR_REL + / DRIVER_CONFIGURATION_FILES + / Path("can_cfg_tx-message-definitions.h") +) + + +class RxTx(Enum): + """Defines whether a message is to be received or transmitted""" + + Tx = auto() # pylint: disable=invalid-name + Rx = auto() # pylint: disable=invalid-name + + +@dataclass +class ExpectedCanMessageDefines: + """container for defines""" + + msg_name: str + exp_message_id_macro: str + exp_period_macro: str + exp_phase_macro: str + exp_full_message_macro: str + msg_id: str + direction: RxTx + + +@dataclass +class FoundCanMessageDefine: + """container for defines""" + + define_name: str + msg_id: str + where: str + is_dummy: bool = False + + +def construct_msg_define(msg) -> ExpectedCanMessageDefines: + """Create the base expected define name for the message""" + define_name: str = msg.name + if define_name.lower().startswith("foxbms_"): + define_name = define_name[7:] + basic_define_name = define_name[0].upper() + message_macro = basic_define_name + for i, char in enumerate(define_name[1:]): + if define_name[i].islower() and char.isupper(): # i!!! + message_macro = message_macro + "_" + elif define_name[i].isnumeric() and char.isupper(): # i!!! + message_macro = message_macro + "_" + message_macro = message_macro + char.upper() + message_id_macro = message_macro + "_ID" + period_macro = message_macro + "_PERIOD_ms" + phase_macro = message_macro + "_PHASE_ms" + full_message_macro = message_macro + "_MESSAGE" + + # once we are here, we know that this regex will match + m = FILE_RE_COMPILED.search(msg.comment) # pylint: disable=invalid-name + if m.group(3).lower() == "rx": + direction = RxTx.Rx + pref = "CANRX_" + phase_macro = "Rx has no phase" # receive messages have ne phase + elif m.group(3).lower() == "tx": + direction = RxTx.Tx + pref = "CANTX_" + phase_macro = "CANTX_" + phase_macro + else: + sys.exit("Something went wrong.") + message_id_macro = pref + message_id_macro + period_macro = pref + period_macro + full_message_macro = pref + full_message_macro + + logging.debug(f"created define '{message_id_macro}' for '{msg.name}'.") + logging.debug(f"created define '{period_macro}' for '{msg.name}'.") + if phase_macro != "Rx has no phase": + logging.debug(f"created define '{phase_macro}' for '{msg.name}'.") + logging.debug(f"created define '{full_message_macro}' for '{msg.name}'.") + return ExpectedCanMessageDefines( + msg.name, + message_id_macro, + period_macro, + phase_macro, + full_message_macro, + hex(msg.frame_id), + direction, + ) + + +def get_defines_from_file( + file_to_check: Path, selector: str +) -> list[FoundCanMessageDefine]: + """Generate a list of specific CAN defines found in a provided file.""" + defines = [] + with open(file_to_check, "r", encoding="utf-8") as f: + txt = f.read() + for i, line in enumerate(txt.splitlines()): + line: str = line.strip() + if not line.startswith("#define"): + continue + if not selector in line: + continue + line = line.split() + found_define = FoundCanMessageDefine( + line[1], line[2][1:-1], f"{file_to_check}:{i-1}" + ) + if found_define.msg_id.endswith("u"): + found_define.msg_id = found_define.msg_id[:-1] + if "dummy" in line: + found_define.is_dummy = True + defines.append(found_define) + logging.debug(found_define) + return defines + + +def log_found_msgs( + selector: str, implemented_defines: list[FoundCanMessageDefine] +) -> None: + """Logging helper for found messages""" + header = ["Name", "Define name", "ID"] + table = [] + for i in implemented_defines: + table.append([i.where, i.define_name, i.msg_id]) + table = tabulate.tabulate(table, header, tablefmt="pipe") + logging.info(f"Implemented {selector} defines are:\n{table}\n") + + +def log_found(expected_define_name, where) -> None: + """Logging helper for found messages""" + logging.debug(f"-> Found expected: {expected_define_name} @ {where}") + + +def log_not_found(exp: ExpectedCanMessageDefines, i: str, expected_file: str) -> None: + """Logging helper for NOT found messages""" + logging.error( + f"Did not find {exp.direction.name} implementation of expected macro '{i}' for" + f"'{exp.exp_message_id_macro} ({exp.msg_id})' in '{expected_file}'." + ) + + +def main(): # pylint: disable=too-many-branches + """This script checks that the CAN message IDs that are defined in the dbc + file are correctly implemented.""" + parser = argparse.ArgumentParser() + parser.add_argument( + "-v", + "--verbosity", + dest="verbosity", + action="count", + default=0, + help="set verbosity level", + ) + parser.add_argument( + "-i", + "--input-file", + dest="input_file", + action="store", + default=BDC_DIR_REL / "foxbms.dbc", + help="DBC file to be verified.", + ) + parser.add_argument( + "-t", + "--tx-message-definition-file", + dest="tx_message_definition_file", + action="store", + default=TX_MESSAGES, + help="Path to file containing the implementation TX CAN message IDs", + ) + parser.add_argument( + "-r", + "--rx-message-definition-file", + dest="rx_message_definition_file", + action="store", + default=RX_MESSAGES, + help="Path to file containing the implementation RX CAN message IDs", + ) + args = parser.parse_args() + + if args.verbosity == 1: + logging.basicConfig(level=logging.INFO) + elif args.verbosity > 1: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.ERROR) + logging.debug(args) + + if not isinstance(args.input_file, Path): + args.input_file = Path(args.input_file) + input_file = args.input_file.absolute() + can_db = cantools.database.load_file(input_file) + sorted_messages = sorted(can_db.messages, key=lambda x: x.frame_id) + + errors = 0 + for i in sorted_messages: + if not i.comment: + errors += 1 + logging.error( + f"Could not find any comment for message '{i.name}' ({hex(i.frame_id)})." + ) + continue + logging.info( + f"Found comment for message '{i.name}' ({hex(i.frame_id)}): '{i.comment}'." + ) + m = FILE_RE_COMPILED.search(i.comment) # pylint: disable=invalid-name + if not m: + errors += 1 + logging.error( + "Could not find comment for message " + f"'{i.name}' ({hex(i.frame_id)}) that matches '{FILE_RE}'." + ) + continue + if errors: + return errors + + if not isinstance(args.tx_message_definition_file, Path): + args.tx_message_definition_file = Path(args.tx_message_definition_file) + if not args.tx_message_definition_file.is_file(): + sys.exit(f"'{args.tx_message_definition_file}' is not a valid file path.") + + if not isinstance(args.rx_message_definition_file, Path): + args.rx_message_definition_file = Path(args.rx_message_definition_file) + if not args.rx_message_definition_file.is_file(): + sys.exit(f"'{args.rx_message_definition_file}' is not a valid file path.") + + expected_defines = [construct_msg_define(msg) for msg in sorted_messages] + header = [ + "Name", + "Expected message macro", + "Expected period macro", + "Expected phase macro", + "Full message macro", + "ID", + "Direction", + ] + table = [] + for i in expected_defines: + table.append( + [ + i.msg_name, + i.exp_message_id_macro, + i.exp_period_macro, + i.exp_phase_macro, + i.exp_full_message_macro, + i.msg_id, + i.direction.name, + ] + ) + table = tabulate.tabulate(table, header, tablefmt="pipe") + logging.info(f"Expected defines are:\n{table}\n") + + all_tx_defines = get_defines_from_file(args.tx_message_definition_file, "CANTX") + implemented_tx_defines = [ + i + for i in all_tx_defines + if (i.define_name.startswith("CANTX_") and i.define_name.endswith("_ID")) + ] + log_found_msgs("TX", implemented_tx_defines) + + all_rx_defines = get_defines_from_file(args.rx_message_definition_file, "CANRX") + implemented_rx_defines = [ + i + for i in all_rx_defines + if (i.define_name.startswith("CANRX_") and i.define_name.endswith("_ID")) + ] + log_found_msgs("RX", implemented_rx_defines) + errors = len(expected_defines) * 4 + for exp in expected_defines: + for i in [ + exp.exp_message_id_macro, + exp.exp_period_macro, + exp.exp_phase_macro, + exp.exp_full_message_macro, + ]: + found = False + if exp.direction == RxTx.Rx: + implemented_macros = all_rx_defines + expected_file = args.rx_message_definition_file + if i == "Rx has no phase": # rx messages do not have a phase + found = True + errors -= 1 + continue + elif exp.direction == RxTx.Tx: + implemented_macros = all_tx_defines + expected_file = args.tx_message_definition_file + else: + sys.exit("Something went really wrong...") + logging.debug(f"Searching {i} ({exp.msg_id}) in {expected_file}") + for macro in implemented_macros: + logging.debug(f" Comparing against {macro.define_name}") + if macro.define_name == i: + log_found(i, macro.where) + errors -= 1 + found = True + break + if not found: + log_not_found(exp, i, expected_file) + + # check if the id, period and phase macro appear twice in the message + # definition file. If so, we can assume that it has been defined once + # and used a second time. + dummies = [i.define_name for i in all_tx_defines + all_rx_defines if i.is_dummy] + for i in [ + exp.exp_message_id_macro, + exp.exp_period_macro, + exp.exp_phase_macro, + ]: + if i in dummies: + continue + if exp.direction == RxTx.Rx: + expected_file = args.rx_message_definition_file + if i == "Rx has no phase": # rx messages do not have a phase + continue + elif exp.direction == RxTx.Tx: + expected_file = args.tx_message_definition_file + else: + sys.exit("Something went really wrong...") + + with open(expected_file, "r", encoding="utf-8") as f: + txt = f.read() + # some message might start with the same name, therefore checking + # if it occurs two times is not good, but modulo 2 and no remainder + # is! + if not txt.count(i) % 2 == 0: + errors += 1 + logging.error( + f"Expected to find {i} twice: definition and in *_MESSAGE usage.\n" + f"Found it {txt.count(i)} times." + ) + + return errors + + +if __name__ == "__main__": + nr_of_errors = main() + if nr_of_errors: + logging.error(f"{nr_of_errors} found.") + sys.exit(nr_of_errors) diff --git a/tests/can/check_implemented.py b/tests/can/check_implemented.py index 7e39cc87..d4a4a844 100644 --- a/tests/can/check_implemented.py +++ b/tests/can/check_implemented.py @@ -58,7 +58,7 @@ except ImportError: pass -FILE_RE = r"\(in:(.*):(.*)\)" +FILE_RE = r"\(in:([a-z_-]{1,}\.c):([A-Z]{2,5}_.*), fv:((tx)|(rx))\)" FILE_RE_COMPILED = re.compile(FILE_RE) @@ -99,7 +99,7 @@ def evaluate_implementation(callback_file: Path, function_name: str) -> bool: def main(): - """This script produces a symbole file for cell voltages and temperatures""" + """This script checks whether a expected callback is implemented.""" parser = argparse.ArgumentParser() parser.add_argument( "-v", diff --git a/tests/ccs/ccs1200/ccs1200_cc-options.yaml b/tests/ccs/ccs1200/ccs1200_cc-options.yaml new file mode 100644 index 00000000..341295ab --- /dev/null +++ b/tests/ccs/ccs1200/ccs1200_cc-options.yaml @@ -0,0 +1,112 @@ +# Copyright (c) 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# We kindly request you to use one or more of the following phrases to refer to +# foxBMS in your hardware, software, documentation or advertising materials: +# +# - "This product uses parts of foxBMS®" +# - "This product includes parts of foxBMS®" +# - "This product is derived from foxBMS®" + +FOXBMS_2_CCS_VERSION_STRICT: "v20.2.6.LTS" + +INCLUDE_PATHS: + win32: + linux: + +LIBRARY_PATHS: + win32: + linux: + +LIBRARIES: + ST: # libraries following the pattern "lib.a" + TARGET: # libraries following the pattern ".lib" + - rtsv7R4_A_be_v3D16_eabi + +CFLAGS: + # flags that are used for ALL source files (foxBMS, Operating System, HAL) + common: + - --silicon_version=7R5 + - --code_state=32 + - --float_support=VFPv3D16 + - -g + - --diag_wrap=off + - --display_error_number + - --enum_type=packed + - --abi=eabi + - --c11 + # these flags are not used when generating ppi/ppd/ppm information + common_compile_only: + - --emit_warnings_as_errors + # additional flags that are ONLY applied to foxBMS sources + foxbms: + - -Ooff + - -DASSERT_LEVEL=0 + - --issue_remarks + - --strict_ansi + # additional flags that are ONLY applied to hal sources + hal: + - -O3 # default + # additional flags that are ONLY applied to operating system sources + operating_system: + - -O3 # default + - --strict_ansi + +LINKFLAGS: + - --emit_warnings_as_errors + - --be32 + - --rom_model + - --heap_size=0x800 + - --stack_size=0x800 + - --undef_sym=__TI_static_base__ + - --undef_sym=resetEntry + - -o4 + - --unused_section_elimination + - --strict_compatibility=on + - --zero_init=on + - --scan_libraries + +HEXGENFLAGS: + - --memwidth=32 + - --tektronix + - -image + - --load_image + - --load_image:combine_sections=true + - --load_image:endian=big + - --load_image:file_type=executable + - --load_image:format=elf + - --load_image:machine=ARM + - --load_image:output_symbols=true + - --load_image:section_addresses=false + +NMFLAGS: + - --all + - -f + - -l diff --git a/tests/ccs/ccs1200/ccs1200_linker_pulls.json b/tests/ccs/ccs1200/ccs1200_linker_pulls.json new file mode 100644 index 00000000..b3cf64d3 --- /dev/null +++ b/tests/ccs/ccs1200/ccs1200_linker_pulls.json @@ -0,0 +1,5 @@ +{ + "_c_int00": "src/app/main/fstartup.c.1.obj", + "canMessageNotification": "src/app/driver/libfoxbms-driver.a", + "dmaGroupANotification": "src/app/driver/libfoxbms-driver.a" +} diff --git a/tests/ccs/ccs1200/ccs1200_paths_linux.txt b/tests/ccs/ccs1200/ccs1200_paths_linux.txt new file mode 100644 index 00000000..4832b935 --- /dev/null +++ b/tests/ccs/ccs1200/ccs1200_paths_linux.txt @@ -0,0 +1,4 @@ +/opt/ti/ccs1200/ccs/tools/compiler/ti-cgt-arm_20.2.6.LTS/bin +/opt/ti/ccs1200/ccs/tools/compiler/ti-cgt-arm_20.2.6.LTS/lib +/opt/ti/ccs1200/ccs/utils/bin +/opt/ti/ccs1200/ccs/utils/tiobj2bin diff --git a/tests/ccs/ccs1200/ccs1200_paths_win32.txt b/tests/ccs/ccs1200/ccs1200_paths_win32.txt new file mode 100644 index 00000000..c1970e61 --- /dev/null +++ b/tests/ccs/ccs1200/ccs1200_paths_win32.txt @@ -0,0 +1,10 @@ +C:\ti\ccs1200\ccs\tools\compiler\ti-cgt-arm_20.2.6.LTS\bin +C:\ti\ccs1200\ccs\tools\compiler\ti-cgt-arm_20.2.6.LTS\lib +C:\ti\ccs1200\ccs\utils\bin +C:\ti\ccs1200\ccs\utils\cygwin +C:\ti\ccs1200\ccs\utils\tiobj2bin +C:\ti\Hercules\HALCoGen\v04.07.01 +C:\Program Files\LLVM\13.0.0\bin +C:\Ruby\Ruby272-x64\bin +C:\MinGW64\x86_64-8.1.0-release-posix-seh-rt_v6-rev0\mingw64\bin +C:\Bauhaus\7.2.0\bin diff --git a/tests/ccs/ccs1200/ccs1200_remarks.txt b/tests/ccs/ccs1200/ccs1200_remarks.txt new file mode 100644 index 00000000..a9030778 --- /dev/null +++ b/tests/ccs/ccs1200/ccs1200_remarks.txt @@ -0,0 +1,28 @@ +/* entries in this file are ordered by ascending order */ + +/* define has no value, and will be treated as if equal 0 */ +"--"diag_suppress=195 + +/* function has no prototype */ +"--"diag_error=225 + +/* unnecessary semicolon at line end */ +"--"diag_error=383 + +/* not referenced */ +"--"diag_remark=880 + +/* signed and unsigned comparison */ +"--"diag_error=2142 + +/* shadowing variable */ +"--"diag_remark=2710 + +/* enum comparison of different enum types */ +"--"diag_error=2912 + +/* automatic Runtime Support library selection */ +"--"diag_error=10205 + +/* Symbol defined multiple times */ +"--"diag_remark=10252 diff --git a/tests/dbc/check_parseable.py b/tests/dbc/check_parseable.py new file mode 100644 index 00000000..b1a5e60d --- /dev/null +++ b/tests/dbc/check_parseable.py @@ -0,0 +1,110 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (c) 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# We kindly request you to use one or more of the following phrases to refer to +# foxBMS in your hardware, software, documentation or advertising materials: +# +# - "This product uses parts of foxBMS®" +# - "This product includes parts of foxBMS®" +# - "This product is derived from foxBMS®" + +"""Ensure that the CAN definition files (symbol and dbc) are parsable.""" + +import sys +import logging +from pathlib import Path +import git +from git.exc import InvalidGitRepositoryError +import click +import colorama +import cantools + + +SCRIPT_DIR = Path(__file__).parent.resolve() + +try: + repo = git.Repo(SCRIPT_DIR, search_parent_directories=True) + REPO_ROOT = Path(repo.git.rev_parse("--show-toplevel")) +except InvalidGitRepositoryError: + sys.exit("Test can only be run in a git repository.") + + +def set_logging_level(verbose: int = 0) -> None: + """sets the module logging level + + :param verbose: verbosity level""" + if verbose == 1: + logging.basicConfig(level=logging.INFO) + elif verbose > 1: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.ERROR) + + +@click.command(context_settings=dict(help_option_names=["-h", "--help"])) +@click.option("-v", "--verbose", default=0, count=True, help="Verbose information.") +@click.option( + "-s", + "--symbol", + "symbol_file", + default=REPO_ROOT / "tools" / "dbc" / "foxbms.sym", + type=click.Path(exists=True, dir_okay=False), + is_eager=True, + help="FILE path of the symbol file", +) +@click.option( + "-d", + "--dbc", + "dbc_file", + default=REPO_ROOT / "tools" / "dbc" / "foxbms.dbc", + type=click.Path(exists=True, dir_okay=False), + is_eager=True, + help="FILE path of the dbc file", +) +@click.pass_context +def main(ctx: click.Context, verbose: int, symbol_file: Path, dbc_file: Path) -> None: + """Convert symbol file to dbc file""" + colorama.init() + set_logging_level(verbose) + logging.debug("Parsing symbol file...") + cantools.database.load_file(str(symbol_file)) + logging.debug("done") + logging.debug("Parsing dbc file...") + cantools.database.load_file(str(dbc_file)) + logging.debug("done") + logging.info(f"{symbol_file} and {dbc_file} files are parsable.") + ctx.exit(0) + + +if __name__ == "__main__": + main() # pylint: disable=no-value-for-parameter diff --git a/tests/dbc/overlapping-signals.dbc b/tests/dbc/overlapping-signals.dbc new file mode 100644 index 00000000..138d5754 --- /dev/null +++ b/tests/dbc/overlapping-signals.dbc @@ -0,0 +1,89 @@ +VERSION "" + + +NS_ : + +BS_: + +BU_: Vector__XXX + +BO_ 544 foxBMS_State: 8 Vector__XXX +SG_ foxBMS_State : 3|4@0+ (1,0) [0|15] "" Vector__XXX +SG_ foxBMS_generalError : 10|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_generalWarning : 9|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_Error_dieTemperatureMCU : 18|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_Error_OvertempPCB : 19|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_Error_UndertempPCB : 20|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_Error_PrechargeVolt : 16|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_Error_PrechargeCurrent : 17|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_insulationMonitoring : 13|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_chargingComplete : 8|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_EmergencyShutoff : 11|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_MainFuseBlown : 21|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_insulationResistance : 63|8@0+ (100,0) [0|25500] "kOhm" Vector__XXX +SG_ foxBMS_Error_Interlock : 22|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_Error_Insulation : 23|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_Error_Cantiming : 24|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_SysMonError : 12|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_alertFlag : 27|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_NegativeContState : 5|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_PositiveContState : 6|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_PrechargeContState : 7|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_AuxiliaryFuseBlown : 23|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_chargingFuseBlown : 24|1@1+ (1,0) [0|1] "" Vector__XXX + + +CM_ BO_ 544 "Message contains foxBMS state (in:can_cbs_tx_state.c:CAN_TxState)"; +CM_ SG_ 544 foxBMS_generalError "0x00: No error detected, 0x01: Error detected"; +CM_ SG_ 544 foxBMS_generalWarning "0x00: No warning detected, 0x01: Warning detected"; +CM_ SG_ 544 foxBMS_Error_dieTemperatureMCU "0x00: No error, 0x01: Error detected"; +CM_ SG_ 544 foxBMS_Error_OvertempPCB "foxBMS Master-PCB: 0x00: No error, 0x01: Error detected"; +CM_ SG_ 544 foxBMS_Error_UndertempPCB "foxBMS Master-PCB: 0x00: No error, 0x01: Error detected"; +CM_ SG_ 544 foxBMS_Error_PrechargeVolt "0x00: precharging successful, 0x01: precharge aborted because of voltage difference"; +CM_ SG_ 544 foxBMS_Error_PrechargeCurrent "0x00: precharging successful, 0x01: precharge aborted because current limit violated"; +CM_ SG_ 544 foxBMS_insulationMonitoring "0x00: insulation monitoring active, 0x01: insulation monitoring not active"; +CM_ SG_ 544 foxBMS_chargingComplete "0x01: charging complete"; +CM_ SG_ 544 foxBMS_EmergencyShutoff "The BMS is preparing to open the contactors soon due to detected error"; +CM_ SG_ 544 foxBMS_MainFuseBlown "0x00: fuse okay, 0x01: fuse blown"; +CM_ SG_ 544 foxBMS_Error_Interlock "0x00: interlock okay, 0x01: interlock open"; +CM_ SG_ 544 foxBMS_Error_Insulation "0x00: No error, 0x01: Error detected"; +CM_ SG_ 544 foxBMS_Error_Cantiming "0x00: No error, 0x01: Error detected"; +CM_ SG_ 544 foxBMS_SysMonError "If this bit is set, it indicates that a task has violated its timing requirements."; +CM_ SG_ 544 foxBMS_alertFlag "foxBMS Alter flag: 0x00: No error, 0x01: Alert flag set"; +CM_ SG_ 544 foxBMS_NegativeContState "0x00: contactor switched OFF, 0x01: contactor switched ON"; +CM_ SG_ 544 foxBMS_PositiveContState "0x00: contactor switched OFF, 0x01: contactor switched ON"; +CM_ SG_ 544 foxBMS_PrechargeContState "0x00: contactor switched OFF, 0x01: contactor switched ON"; +CM_ SG_ 544 foxBMS_AuxiliaryFuseBlown "0x00: fuse okay, 0x01: fuse blown"; +CM_ SG_ 544 foxBMS_chargingFuseBlown "0x00: fuse okay, 0x01: fuse blown"; + +BA_DEF_ "BusType" STRING ; +BA_DEF_ SG_ "GenSigStartValue" FLOAT -3.4E+038 3.4E+038; + +BA_DEF_DEF_ "BusType" "CAN"; +BA_DEF_DEF_ "GenSigStartValue" 0; + +BA_ "BusType" "CAN"; + +BA_ "GenSigStartValue" SG_ 544 foxBMS_State 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_generalError 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_generalWarning 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_dieTemperatureMCU 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_OvertempPCB 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_UndertempPCB 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_PrechargeVolt 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_PrechargeCurrent 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_insulationMonitoring 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_chargingComplete 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_EmergencyShutoff 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_MainFuseBlown 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_insulationResistance 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_Interlock 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_Insulation 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_Cantiming 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_SysMonError 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_alertFlag 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_NegativeContState 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_PositiveContState 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_PrechargeContState 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_AuxiliaryFuseBlown 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_chargingFuseBlown 0; diff --git a/tests/dbc/overlapping-signals.py b/tests/dbc/overlapping-signals.py new file mode 100644 index 00000000..35497884 --- /dev/null +++ b/tests/dbc/overlapping-signals.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (c) 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# We kindly request you to use one or more of the following phrases to refer to +# foxBMS in your hardware, software, documentation or advertising materials: +# +# - "This product uses parts of foxBMS®" +# - "This product includes parts of foxBMS®" +# - "This product is derived from foxBMS®" + +"""Unit test script, to check cantools behavior regarding overlapping signals.""" + +# pylint: disable=invalid-name + +import unittest +from pathlib import Path +import cantools +from cantools.database import load_file + +SCRIPT_DIR = Path(__file__).parent.resolve() + + +class OverlappingSignals(unittest.TestCase): + """Derived test case""" + + def test_overlapping_signals(self): + """check that cantools raises an error if signals are overlapping in a + message""" + self.assertRaises( + cantools.database.errors.Error, + load_file, + SCRIPT_DIR / "overlapping-signals.dbc", + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/dbc/overlapping-signals.sym b/tests/dbc/overlapping-signals.sym new file mode 100644 index 00000000..48658624 --- /dev/null +++ b/tests/dbc/overlapping-signals.sym @@ -0,0 +1,35 @@ +FormatVersion=5.0 // Do not edit this line! +Title="2022-09-12_foxbms" + +{ENUMS} +enum VtSig_foxBMS_modeRequest(0="mode_Standby", 1="mode_Discharge", + 2="mode_Charge") + +{SENDRECEIVE} + +[foxBMS_State] +ID=220h // Message contains foxBMS state (in:can_cbs_tx_state.c:CAN_TxState) +DLC=8 +Var=foxBMS_State unsigned 4,4 -m +Var=foxBMS_generalError bit 13,1 -m // 0x00: No error detected, 0x01: Error detected +Var=foxBMS_generalWarning bit 14,1 -m // 0x00: No warning detected, 0x01: Warning detected +Var=foxBMS_Error_dieTemperatureMCU bit 21,1 -m // 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_OvertempPCB bit 20,1 -m // foxBMS Master-PCB: 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_UndertempPCB bit 19,1 -m // foxBMS Master-PCB: 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_PrechargeVolt bit 23,1 -m // 0x00: precharging successful, 0x01: precharge aborted because of voltage difference +Var=foxBMS_Error_PrechargeCurrent bit 22,1 -m // 0x00: precharging successful, 0x01: precharge aborted because current limit violated +Var=foxBMS_insulationMonitoring bit 10,1 -m // 0x00: insulation monitoring active, 0x01: insulation monitoring not active +Var=foxBMS_chargingComplete bit 15,1 -m // 0x01: charging complete +Var=foxBMS_EmergencyShutoff bit 12,1 -m // The BMS is preparing to open the contactors soon due to detected error +Var=foxBMS_MainFuseBlown bit 18,1 -m // 0x00: fuse okay, 0x01: fuse blown +Var=foxBMS_insulationResistance unsigned 56,8 -m /u:kOhm /f:100 /d:0 +Var=foxBMS_Error_Interlock bit 17,1 -m // 0x00: interlock okay, 0x01: interlock open +Var=foxBMS_Error_Insulation bit 16,1 -m // 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_Cantiming bit 31,1 -m // 0x00: No error, 0x01: Error detected +Var=foxBMS_SysMonError bit 12,1 // If this bit is set, it indicates that a task has violated its timing requirements. +Var=foxBMS_alertFlag bit 28,1 -m // foxBMS Alter flag: 0x00: No error, 0x01: Alert flag set +Var=foxBMS_NegativeContState bit 5,1 // 0x00: contactor switched OFF, 0x01: contactor switched ON +Var=foxBMS_PositiveContState bit 6,1 // 0x00: contactor switched OFF, 0x01: contactor switched ON +Var=foxBMS_PrechargeContState bit 7,1 // 0x00: contactor switched OFF, 0x01: contactor switched ON +Var=foxBMS_AuxiliaryFuseBlown bit 23,1 // 0x00: fuse okay, 0x01: fuse blown +Var=foxBMS_chargingFuseBlown bit 24,1 // 0x00: fuse okay, 0x01: fuse blown diff --git a/tests/env/packages/env_test_pathspec.py b/tests/env/packages/env_test_pathspec.py index ca0e16aa..9ac6564a 100644 --- a/tests/env/packages/env_test_pathspec.py +++ b/tests/env/packages/env_test_pathspec.py @@ -39,13 +39,26 @@ # - "This product is derived from foxBMS®" """Testing 'pathspec' package""" - +import sys import argparse import logging +from pathlib import Path + # package to test import pathspec # pylint: disable=unused-import +import git +from git.exc import InvalidGitRepositoryError + +SCRIPT_DIR = Path(__file__).parent.resolve() + +try: + repo = git.Repo(SCRIPT_DIR, search_parent_directories=True) + REPO_ROOT = Path(repo.git.rev_parse("--show-toplevel")) +except InvalidGitRepositoryError: + sys.exit("Test can only be run in a git repository.") + def main(): """Testing 'pathspec' package""" @@ -67,6 +80,11 @@ def main(): else: logging.basicConfig(level=logging.ERROR) + gitignore = Path(REPO_ROOT / ".gitignore").read_text(encoding="utf-8") + pathspec.PathSpec.from_lines( + pathspec.patterns.GitWildMatchPattern, gitignore.splitlines() + ) + if __name__ == "__main__": main() diff --git a/tests/scripts/waf-tools/f_guidelines/tests/c-004_tests/c-004_test5.c b/tests/scripts/waf-tools/f_guidelines/tests/c-004_tests/c-004_test5.c index c7f4b70b..1a701192 100644 --- a/tests/scripts/waf-tools/f_guidelines/tests/c-004_tests/c-004_test5.c +++ b/tests/scripts/waf-tools/f_guidelines/tests/c-004_tests/c-004_test5.c @@ -3,7 +3,7 @@ * @file c-004_test0.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-02-22 (date of last update) + * @updated 2022-08-01 (date of last update) * @version v1.0.0 * @ingroup TEMPERATURE_SENSORS * @prefix TSEN diff --git a/tests/unit/app/application/algorithm/config/test_algorithm_cfg.c b/tests/unit/app/application/algorithm/config/test_algorithm_cfg.c index cc2a7464..8787d82b 100644 --- a/tests/unit/app/application/algorithm/config/test_algorithm_cfg.c +++ b/tests/unit/app/application/algorithm/config/test_algorithm_cfg.c @@ -43,8 +43,8 @@ * @file test_algorithm_cfg.c * @author foxBMS Team * @date 2020-06-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/moving_average/test_moving_average.c b/tests/unit/app/application/algorithm/moving_average/test_moving_average.c index d6fdd556..3d7b0094 100644 --- a/tests/unit/app/application/algorithm/moving_average/test_moving_average.c +++ b/tests/unit/app/application/algorithm/moving_average/test_moving_average.c @@ -43,8 +43,8 @@ * @file test_moving_average.c * @author foxBMS Team * @date 2020-07-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soc/counting/test_soc_counting.c b/tests/unit/app/application/algorithm/state_estimation/soc/counting/test_soc_counting.c index 0ed1115d..ddb4e6d7 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soc/counting/test_soc_counting.c +++ b/tests/unit/app/application/algorithm/state_estimation/soc/counting/test_soc_counting.c @@ -43,8 +43,8 @@ * @file test_soc_counting.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soc/counting/test_soc_counting_cfg.c b/tests/unit/app/application/algorithm/state_estimation/soc/counting/test_soc_counting_cfg.c index 2af36f01..3332ee9a 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soc/counting/test_soc_counting_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/soc/counting/test_soc_counting_cfg.c @@ -43,8 +43,8 @@ * @file test_soc_counting_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soc/debug/test_soc_debug.c b/tests/unit/app/application/algorithm/state_estimation/soc/debug/test_soc_debug.c index 9a61b214..9a07e0b3 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soc/debug/test_soc_debug.c +++ b/tests/unit/app/application/algorithm/state_estimation/soc/debug/test_soc_debug.c @@ -43,8 +43,8 @@ * @file test_soc_debug.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soc/debug/test_soc_debug_cfg.c b/tests/unit/app/application/algorithm/state_estimation/soc/debug/test_soc_debug_cfg.c index 0edb3fbe..f310224d 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soc/debug/test_soc_debug_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/soc/debug/test_soc_debug_cfg.c @@ -43,8 +43,8 @@ * @file test_soc_debug_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soc/none/test_soc_none.c b/tests/unit/app/application/algorithm/state_estimation/soc/none/test_soc_none.c index 3261a41c..b2b08302 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soc/none/test_soc_none.c +++ b/tests/unit/app/application/algorithm/state_estimation/soc/none/test_soc_none.c @@ -43,8 +43,8 @@ * @file test_soc_none.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soc/none/test_soc_none_cfg.c b/tests/unit/app/application/algorithm/state_estimation/soc/none/test_soc_none_cfg.c index d33e4089..cba7125d 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soc/none/test_soc_none_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/soc/none/test_soc_none_cfg.c @@ -43,8 +43,8 @@ * @file test_soc_none_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soe/counting/test_soe_counting.c b/tests/unit/app/application/algorithm/state_estimation/soe/counting/test_soe_counting.c index 54ca71a0..01e33256 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soe/counting/test_soe_counting.c +++ b/tests/unit/app/application/algorithm/state_estimation/soe/counting/test_soe_counting.c @@ -43,8 +43,8 @@ * @file test_soe_counting.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soe/counting/test_soe_counting_cfg.c b/tests/unit/app/application/algorithm/state_estimation/soe/counting/test_soe_counting_cfg.c index 7a7e490d..a8224244 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soe/counting/test_soe_counting_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/soe/counting/test_soe_counting_cfg.c @@ -43,8 +43,8 @@ * @file test_soe_counting_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soe/debug/test_soe_debug.c b/tests/unit/app/application/algorithm/state_estimation/soe/debug/test_soe_debug.c index 4348414b..0b241881 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soe/debug/test_soe_debug.c +++ b/tests/unit/app/application/algorithm/state_estimation/soe/debug/test_soe_debug.c @@ -43,8 +43,8 @@ * @file test_soe_debug.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soe/debug/test_soe_debug_cfg.c b/tests/unit/app/application/algorithm/state_estimation/soe/debug/test_soe_debug_cfg.c index 763096b8..ad92bf65 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soe/debug/test_soe_debug_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/soe/debug/test_soe_debug_cfg.c @@ -43,8 +43,8 @@ * @file test_soe_debug_cfg.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soe/none/test_soe_none.c b/tests/unit/app/application/algorithm/state_estimation/soe/none/test_soe_none.c index 4e390a94..867625ed 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soe/none/test_soe_none.c +++ b/tests/unit/app/application/algorithm/state_estimation/soe/none/test_soe_none.c @@ -43,8 +43,8 @@ * @file test_soe_none.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soe/none/test_soe_none_cfg.c b/tests/unit/app/application/algorithm/state_estimation/soe/none/test_soe_none_cfg.c index 0c06aab7..9ecea653 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soe/none/test_soe_none_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/soe/none/test_soe_none_cfg.c @@ -43,8 +43,8 @@ * @file test_soe_none_cfg.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/sof/trapezoid/test_sof_trapezoid.c b/tests/unit/app/application/algorithm/state_estimation/sof/trapezoid/test_sof_trapezoid.c index 8293178f..f2a24745 100644 --- a/tests/unit/app/application/algorithm/state_estimation/sof/trapezoid/test_sof_trapezoid.c +++ b/tests/unit/app/application/algorithm/state_estimation/sof/trapezoid/test_sof_trapezoid.c @@ -43,8 +43,8 @@ * @file test_sof_trapezoid.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/sof/trapezoid/test_sof_trapezoid_cfg.c b/tests/unit/app/application/algorithm/state_estimation/sof/trapezoid/test_sof_trapezoid_cfg.c index eb3a524b..baebcb84 100644 --- a/tests/unit/app/application/algorithm/state_estimation/sof/trapezoid/test_sof_trapezoid_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/sof/trapezoid/test_sof_trapezoid_cfg.c @@ -43,8 +43,8 @@ * @file test_sof_trapezoid_cfg.c * @author foxBMS Team * @date 2020-10-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soh/debug/test_soh_debug.c b/tests/unit/app/application/algorithm/state_estimation/soh/debug/test_soh_debug.c index 924c1969..d1cd0179 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soh/debug/test_soh_debug.c +++ b/tests/unit/app/application/algorithm/state_estimation/soh/debug/test_soh_debug.c @@ -43,8 +43,8 @@ * @file test_soh_debug.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soh/debug/test_soh_debug_cfg.c b/tests/unit/app/application/algorithm/state_estimation/soh/debug/test_soh_debug_cfg.c index 49c627f9..eb3e689e 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soh/debug/test_soh_debug_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/soh/debug/test_soh_debug_cfg.c @@ -43,8 +43,8 @@ * @file test_soh_debug_cfg.c * @author foxBMS Team * @date 2021-12-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soh/none/test_soh_none.c b/tests/unit/app/application/algorithm/state_estimation/soh/none/test_soh_none.c index c3d9a693..81b06b93 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soh/none/test_soh_none.c +++ b/tests/unit/app/application/algorithm/state_estimation/soh/none/test_soh_none.c @@ -43,8 +43,8 @@ * @file test_soh_none.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/soh/none/test_soh_none_cfg.c b/tests/unit/app/application/algorithm/state_estimation/soh/none/test_soh_none_cfg.c index e1c1bfb2..0c466a0d 100644 --- a/tests/unit/app/application/algorithm/state_estimation/soh/none/test_soh_none_cfg.c +++ b/tests/unit/app/application/algorithm/state_estimation/soh/none/test_soh_none_cfg.c @@ -43,8 +43,8 @@ * @file test_soh_none_cfg.c * @author foxBMS Team * @date 2021-12-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/state_estimation/test_state_estimation.c b/tests/unit/app/application/algorithm/state_estimation/test_state_estimation.c index 8e7e0ce7..420b716f 100644 --- a/tests/unit/app/application/algorithm/state_estimation/test_state_estimation.c +++ b/tests/unit/app/application/algorithm/state_estimation/test_state_estimation.c @@ -43,8 +43,8 @@ * @file test_state_estimation.c * @author foxBMS Team * @date 2020-10-14 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/algorithm/test_algorithm.c b/tests/unit/app/application/algorithm/test_algorithm.c index 7fe0778d..02dbfc31 100644 --- a/tests/unit/app/application/algorithm/test_algorithm.c +++ b/tests/unit/app/application/algorithm/test_algorithm.c @@ -43,8 +43,8 @@ * @file test_algorithm.c * @author foxBMS Team * @date 2020-06-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/bal/history/test_bal_strategy_history.c b/tests/unit/app/application/bal/history/test_bal_strategy_history.c index 9956fcc4..f064ed57 100644 --- a/tests/unit/app/application/bal/history/test_bal_strategy_history.c +++ b/tests/unit/app/application/bal/history/test_bal_strategy_history.c @@ -43,8 +43,8 @@ * @file test_bal_strategy_history.c * @author foxBMS Team * @date 2020-06-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/bal/none/test_bal_strategy_none.c b/tests/unit/app/application/bal/none/test_bal_strategy_none.c index 2120f38a..a4f6eb00 100644 --- a/tests/unit/app/application/bal/none/test_bal_strategy_none.c +++ b/tests/unit/app/application/bal/none/test_bal_strategy_none.c @@ -43,8 +43,8 @@ * @file test_bal_strategy_none.c * @author foxBMS Team * @date 2020-08-03 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/bal/test_bal.c b/tests/unit/app/application/bal/test_bal.c index afef5218..af660860 100644 --- a/tests/unit/app/application/bal/test_bal.c +++ b/tests/unit/app/application/bal/test_bal.c @@ -43,8 +43,8 @@ * @file test_bal.c * @author foxBMS Team * @date 2020-08-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/bal/voltage/test_bal_strategy_voltage.c b/tests/unit/app/application/bal/voltage/test_bal_strategy_voltage.c index 95369ba2..8f18e999 100644 --- a/tests/unit/app/application/bal/voltage/test_bal_strategy_voltage.c +++ b/tests/unit/app/application/bal/voltage/test_bal_strategy_voltage.c @@ -43,8 +43,8 @@ * @file test_bal_strategy_voltage.c * @author foxBMS Team * @date 2020-06-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/bms/test_bms.c b/tests/unit/app/application/bms/test_bms.c index dcc3bfbf..5b0c49c5 100644 --- a/tests/unit/app/application/bms/test_bms.c +++ b/tests/unit/app/application/bms/test_bms.c @@ -43,8 +43,8 @@ * @file test_bms.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -68,6 +68,8 @@ #include "Mockplausibility.h" #include "Mocksoa.h" +#include "sps_cfg.h" + #include "bms.h" #include "foxmath.h" #include "test_assert_helper.h" @@ -85,6 +87,32 @@ BS_STRING_PRECHARGE_PRESENT_e bs_stringsWithPrecharge[BS_NR_OF_STRINGS] = { BS_STRING_WITH_PRECHARGE, }; +CONT_CONTACTOR_STATE_s cont_contactorStates[] = { + /* String contactors configuration */ + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_FEEDBACK_NORMALLY_OPEN, + BS_STRING0, + CONT_PLUS, + SPS_CHANNEL_0, + CONT_CHARGING_DIRECTION}, + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_FEEDBACK_NORMALLY_OPEN, + BS_STRING0, + CONT_MINUS, + SPS_CHANNEL_1, + CONT_DISCHARGING_DIRECTION}, + /* Precharge contactors configuration */ + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_HAS_NO_FEEDBACK, + BS_STRING0, + CONT_PRECHARGE, + SPS_CHANNEL_2, + CONT_BIDIRECTIONAL}, +}; + /*========== Setup and Teardown =============================================*/ void setUp(void) { } diff --git a/tests/unit/app/application/config/test_bal_cfg.c b/tests/unit/app/application/config/test_bal_cfg.c index 3584b28f..ee290995 100644 --- a/tests/unit/app/application/config/test_bal_cfg.c +++ b/tests/unit/app/application/config/test_bal_cfg.c @@ -43,8 +43,8 @@ * @file test_bal_cfg.c * @author foxBMS Team * @date 2022-02-26 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/config/test_battery_cell_cfg.c b/tests/unit/app/application/config/test_battery_cell_cfg.c index 8cabbb3d..804af86c 100644 --- a/tests/unit/app/application/config/test_battery_cell_cfg.c +++ b/tests/unit/app/application/config/test_battery_cell_cfg.c @@ -43,8 +43,8 @@ * @file test_battery_cell_cfg.c * @author foxBMS Team * @date 2020-10-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/config/test_battery_system_cfg.c b/tests/unit/app/application/config/test_battery_system_cfg.c index da434b34..dd712e5d 100644 --- a/tests/unit/app/application/config/test_battery_system_cfg.c +++ b/tests/unit/app/application/config/test_battery_system_cfg.c @@ -43,8 +43,8 @@ * @file test_battery_system_cfg.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/config/test_soa_cfg.c b/tests/unit/app/application/config/test_soa_cfg.c index 57da8c4b..f45c8dc4 100644 --- a/tests/unit/app/application/config/test_soa_cfg.c +++ b/tests/unit/app/application/config/test_soa_cfg.c @@ -43,8 +43,8 @@ * @file test_soa_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/plausibility/test_plausibility.c b/tests/unit/app/application/plausibility/test_plausibility.c index dc55289a..a52af495 100644 --- a/tests/unit/app/application/plausibility/test_plausibility.c +++ b/tests/unit/app/application/plausibility/test_plausibility.c @@ -43,8 +43,8 @@ * @file test_plausibility.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/redundancy/test_redundancy.c b/tests/unit/app/application/redundancy/test_redundancy.c index 571db472..db039fcc 100644 --- a/tests/unit/app/application/redundancy/test_redundancy.c +++ b/tests/unit/app/application/redundancy/test_redundancy.c @@ -43,8 +43,8 @@ * @file test_redundancy.c * @author foxBMS Team * @date 2020-07-31 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/application/soa/test_soa.c b/tests/unit/app/application/soa/test_soa.c index b37d8260..67769668 100644 --- a/tests/unit/app/application/soa/test_soa.c +++ b/tests/unit/app/application/soa/test_soa.c @@ -43,8 +43,8 @@ * @file test_soa.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/adc/test_adc.c b/tests/unit/app/driver/adc/test_adc.c index add54bd4..83a5f12c 100644 --- a/tests/unit/app/driver/adc/test_adc.c +++ b/tests/unit/app/driver/adc/test_adc.c @@ -43,8 +43,8 @@ * @file test_adc.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/api/test_afe_plausibility.c b/tests/unit/app/driver/afe/api/test_afe_plausibility.c index 917761e6..3abff93a 100644 --- a/tests/unit/app/driver/afe/api/test_afe_plausibility.c +++ b/tests/unit/app/driver/afe/api/test_afe_plausibility.c @@ -43,8 +43,8 @@ * @file test_afe_plausibility.c * @author foxBMS Team * @date 2020-07-13 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/debug/default/api/test_debug_default_afe.c b/tests/unit/app/driver/afe/debug/default/api/test_debug_default_afe.c index 213c1285..c124f93c 100644 --- a/tests/unit/app/driver/afe/debug/default/api/test_debug_default_afe.c +++ b/tests/unit/app/driver/afe/debug/default/api/test_debug_default_afe.c @@ -43,8 +43,8 @@ * @file test_debug_default_afe.c * @author foxBMS Team * @date 2020-05-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/debug/default/api/test_debug_default_afe_dma.c b/tests/unit/app/driver/afe/debug/default/api/test_debug_default_afe_dma.c index e48e34a3..686dbcd0 100644 --- a/tests/unit/app/driver/afe/debug/default/api/test_debug_default_afe_dma.c +++ b/tests/unit/app/driver/afe/debug/default/api/test_debug_default_afe_dma.c @@ -43,8 +43,8 @@ * @file test_debug_default_afe_dma.c * @author foxBMS Team * @date 2020-06-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/debug/default/config/test_debug_default_cfg.c b/tests/unit/app/driver/afe/debug/default/config/test_debug_default_cfg.c index 9792335d..2fab3d94 100644 --- a/tests/unit/app/driver/afe/debug/default/config/test_debug_default_cfg.c +++ b/tests/unit/app/driver/afe/debug/default/config/test_debug_default_cfg.c @@ -43,8 +43,8 @@ * @file test_debug_default_cfg.c * @author foxBMS Team * @date 2020-09-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/debug/default/test_debug_default.c b/tests/unit/app/driver/afe/debug/default/test_debug_default.c index a660baeb..5446f051 100644 --- a/tests/unit/app/driver/afe/debug/default/test_debug_default.c +++ b/tests/unit/app/driver/afe/debug/default/test_debug_default.c @@ -43,8 +43,8 @@ * @file test_debug_default.c * @author foxBMS Team * @date 2020-09-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/6806/config/test_ltc_6806_cfg.c b/tests/unit/app/driver/afe/ltc/6806/config/test_ltc_6806_cfg.c index 5aa8399b..789c7d69 100644 --- a/tests/unit/app/driver/afe/ltc/6806/config/test_ltc_6806_cfg.c +++ b/tests/unit/app/driver/afe/ltc/6806/config/test_ltc_6806_cfg.c @@ -43,8 +43,8 @@ * @file test_ltc_6806_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/6806/test_ltc_6806.c b/tests/unit/app/driver/afe/ltc/6806/test_ltc_6806.c index ae31fb30..e5844efb 100644 --- a/tests/unit/app/driver/afe/ltc/6806/test_ltc_6806.c +++ b/tests/unit/app/driver/afe/ltc/6806/test_ltc_6806.c @@ -43,8 +43,8 @@ * @file test_ltc_6806.c * @author foxBMS Team * @date 2020-07-13 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/6806/test_ltc_6806_pec_in_arrays.c b/tests/unit/app/driver/afe/ltc/6806/test_ltc_6806_pec_in_arrays.c index d31f5028..a818e9b7 100644 --- a/tests/unit/app/driver/afe/ltc/6806/test_ltc_6806_pec_in_arrays.c +++ b/tests/unit/app/driver/afe/ltc/6806/test_ltc_6806_pec_in_arrays.c @@ -43,8 +43,8 @@ * @file test_ltc_6806_pec_in_arrays.c * @author foxBMS Team * @date 2020-12-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/6813-1/config/test_ltc_6813-1_cfg.c b/tests/unit/app/driver/afe/ltc/6813-1/config/test_ltc_6813-1_cfg.c index 4ddc10f9..9b668019 100644 --- a/tests/unit/app/driver/afe/ltc/6813-1/config/test_ltc_6813-1_cfg.c +++ b/tests/unit/app/driver/afe/ltc/6813-1/config/test_ltc_6813-1_cfg.c @@ -43,8 +43,8 @@ * @file test_ltc_6813-1_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/6813-1/test_ltc_6813-1.c b/tests/unit/app/driver/afe/ltc/6813-1/test_ltc_6813-1.c index 9ddc60a7..22225fc6 100644 --- a/tests/unit/app/driver/afe/ltc/6813-1/test_ltc_6813-1.c +++ b/tests/unit/app/driver/afe/ltc/6813-1/test_ltc_6813-1.c @@ -43,8 +43,8 @@ * @file test_ltc_6813-1.c * @author foxBMS Team * @date 2020-03-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/6813-1/test_ltc_6813-1_pec_in_arrays.c b/tests/unit/app/driver/afe/ltc/6813-1/test_ltc_6813-1_pec_in_arrays.c index f9777e53..b45d78f7 100644 --- a/tests/unit/app/driver/afe/ltc/6813-1/test_ltc_6813-1_pec_in_arrays.c +++ b/tests/unit/app/driver/afe/ltc/6813-1/test_ltc_6813-1_pec_in_arrays.c @@ -43,8 +43,8 @@ * @file test_ltc_6813-1_pec_in_arrays.c * @author foxBMS Team * @date 2020-03-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/api/test_ltc_afe.c b/tests/unit/app/driver/afe/ltc/api/test_ltc_afe.c index 6cab539a..5a64e558 100644 --- a/tests/unit/app/driver/afe/ltc/api/test_ltc_afe.c +++ b/tests/unit/app/driver/afe/ltc/api/test_ltc_afe.c @@ -43,8 +43,8 @@ * @file test_ltc_afe.c * @author foxBMS Team * @date 2020-05-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/common/config/test_ltc_afe_dma_cfg.c b/tests/unit/app/driver/afe/ltc/common/config/test_ltc_afe_dma_cfg.c index dff0f4f0..f7df636e 100644 --- a/tests/unit/app/driver/afe/ltc/common/config/test_ltc_afe_dma_cfg.c +++ b/tests/unit/app/driver/afe/ltc/common/config/test_ltc_afe_dma_cfg.c @@ -43,8 +43,8 @@ * @file test_ltc_afe_dma_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/ltc/common/test_ltc_afe_dma.c b/tests/unit/app/driver/afe/ltc/common/test_ltc_afe_dma.c index 842a4515..20ff33b4 100644 --- a/tests/unit/app/driver/afe/ltc/common/test_ltc_afe_dma.c +++ b/tests/unit/app/driver/afe/ltc/common/test_ltc_afe_dma.c @@ -43,8 +43,8 @@ * @file test_ltc_afe_dma.c * @author foxBMS Team * @date 2020-06-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/maxim/api/test_mxm_afe.c b/tests/unit/app/driver/afe/maxim/api/test_mxm_afe.c index a4a4df45..081521b2 100644 --- a/tests/unit/app/driver/afe/maxim/api/test_mxm_afe.c +++ b/tests/unit/app/driver/afe/maxim/api/test_mxm_afe.c @@ -43,8 +43,8 @@ * @file test_mxm_afe.c * @author foxBMS Team * @date 2020-06-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/maxim/common/config/test_mxm_cfg.c b/tests/unit/app/driver/afe/maxim/common/config/test_mxm_cfg.c index f9eb4b50..1b2c9f97 100644 --- a/tests/unit/app/driver/afe/maxim/common/config/test_mxm_cfg.c +++ b/tests/unit/app/driver/afe/maxim/common/config/test_mxm_cfg.c @@ -43,8 +43,8 @@ * @file test_mxm_cfg.c * @author foxBMS Team * @date 2020-06-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_17841b.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_17841b.c index 70974b6c..3edcf8b2 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_17841b.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_17841b.c @@ -43,8 +43,8 @@ * @file test_mxm_17841b.c * @author foxBMS Team * @date 2020-06-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix MXM * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_1785x.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_1785x.c index dab33ae2..d2cefaa3 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_1785x.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_1785x.c @@ -43,8 +43,8 @@ * @file test_mxm_1785x.c * @author foxBMS Team * @date 2020-07-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix MXM * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_1785x_tools.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_1785x_tools.c index bf706df2..7be79bbd 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_1785x_tools.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_1785x_tools.c @@ -43,8 +43,8 @@ * @file test_mxm_1785x_tools.c * @author foxBMS Team * @date 2020-07-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix MXM * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_afe_dma.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_afe_dma.c index a3ddeafc..4385c397 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_afe_dma.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_afe_dma.c @@ -43,8 +43,8 @@ * @file test_mxm_afe_dma.c * @author foxBMS Team * @date 2020-06-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_battery_management.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_battery_management.c index 4d9d7a5d..c5fa20a0 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_battery_management.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_battery_management.c @@ -43,8 +43,8 @@ * @file test_mxm_battery_management.c * @author foxBMS Team * @date 2020-07-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix MXM * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_bitextract.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_bitextract.c index 4740364d..87df944e 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_bitextract.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_bitextract.c @@ -43,8 +43,8 @@ * @file test_mxm_bitextract.c * @author foxBMS Team * @date 2020-04-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_crc8.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_crc8.c index fa2be686..efccd9f1 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_crc8.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_crc8.c @@ -43,8 +43,8 @@ * @file test_mxm_crc8.c * @author foxBMS Team * @date 2020-03-13 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix MXM * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_register_map.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_register_map.c index 38c17163..16e71fe5 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_register_map.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_register_map.c @@ -43,8 +43,8 @@ * @file test_mxm_register_map.c * @author foxBMS Team * @date 2020-04-07 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/maxim/common/test_mxm_registry.c b/tests/unit/app/driver/afe/maxim/common/test_mxm_registry.c index d772ebb1..74506c45 100644 --- a/tests/unit/app/driver/afe/maxim/common/test_mxm_registry.c +++ b/tests/unit/app/driver/afe/maxim/common/test_mxm_registry.c @@ -43,8 +43,8 @@ * @file test_mxm_registry.c * @author foxBMS Team * @date 2020-07-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix MXM * diff --git a/tests/unit/app/driver/afe/maxim/max17852/test_mxm_17852.c b/tests/unit/app/driver/afe/maxim/max17852/test_mxm_17852.c index c4522301..a0d5fecd 100644 --- a/tests/unit/app/driver/afe/maxim/max17852/test_mxm_17852.c +++ b/tests/unit/app/driver/afe/maxim/max17852/test_mxm_17852.c @@ -43,8 +43,8 @@ * @file test_mxm_17852.c * @author foxBMS Team * @date 2021-11-30 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix MXM * diff --git a/tests/unit/app/driver/afe/nxp/api/test_nxp_afe.c b/tests/unit/app/driver/afe/nxp/api/test_nxp_afe.c index 1cf7bc0a..1873568b 100644 --- a/tests/unit/app/driver/afe/nxp/api/test_nxp_afe.c +++ b/tests/unit/app/driver/afe/nxp/api/test_nxp_afe.c @@ -43,8 +43,8 @@ * @file test_nxp_afe.c * @author foxBMS Team * @date 2020-06-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/nxp/mc33775a/api/test_nxp_mc33775a_afe.c b/tests/unit/app/driver/afe/nxp/mc33775a/api/test_nxp_mc33775a_afe.c index ed950c5e..9da089b8 100644 --- a/tests/unit/app/driver/afe/nxp/mc33775a/api/test_nxp_mc33775a_afe.c +++ b/tests/unit/app/driver/afe/nxp/mc33775a/api/test_nxp_mc33775a_afe.c @@ -43,8 +43,8 @@ * @file test_nxp_mc33775a_afe.c * @author foxBMS Team * @date 2020-06-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/nxp/mc33775a/config/test_nxp_afe_dma_cfg.c b/tests/unit/app/driver/afe/nxp/mc33775a/config/test_nxp_afe_dma_cfg.c index 71018e99..daec6005 100644 --- a/tests/unit/app/driver/afe/nxp/mc33775a/config/test_nxp_afe_dma_cfg.c +++ b/tests/unit/app/driver/afe/nxp/mc33775a/config/test_nxp_afe_dma_cfg.c @@ -43,8 +43,8 @@ * @file test_nxp_afe_dma_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/nxp/mc33775a/config/test_nxp_mc33775a_cfg.c b/tests/unit/app/driver/afe/nxp/mc33775a/config/test_nxp_mc33775a_cfg.c index 90f5a9a3..e3a6bec4 100644 --- a/tests/unit/app/driver/afe/nxp/mc33775a/config/test_nxp_mc33775a_cfg.c +++ b/tests/unit/app/driver/afe/nxp/mc33775a/config/test_nxp_mc33775a_cfg.c @@ -43,8 +43,8 @@ * @file test_nxp_mc33775a_cfg.c * @author foxBMS Team * @date 2020-06-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_afe_dma.c b/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_afe_dma.c index 93878a0a..59364c05 100644 --- a/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_afe_dma.c +++ b/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_afe_dma.c @@ -43,8 +43,8 @@ * @file test_nxp_afe_dma.c * @author foxBMS Team * @date 2020-06-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_mc33775a-ll.c b/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_mc33775a-ll.c index 3c702eb0..977354f3 100644 --- a/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_mc33775a-ll.c +++ b/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_mc33775a-ll.c @@ -43,8 +43,8 @@ * @file test_nxp_mc33775a-ll.c * @author foxBMS Team * @date 2021-10-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_mc33775a.c b/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_mc33775a.c index b462c15c..38544fc2 100644 --- a/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_mc33775a.c +++ b/tests/unit/app/driver/afe/nxp/mc33775a/test_nxp_mc33775a.c @@ -43,8 +43,8 @@ * @file test_nxp_mc33775a.c * @author foxBMS Team * @date 2021-10-20 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_rx_current_sensor.c b/tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_current-sensor.c similarity index 96% rename from tests/unit/app/driver/can/cbs/test_can_cbs_rx_current_sensor.c rename to tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_current-sensor.c index 0815b390..9d776df8 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_rx_current_sensor.c +++ b/tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_current-sensor.c @@ -40,11 +40,11 @@ */ /** - * @file test_can_cbs_rx_current_sensor.c + * @file test_can_cbs_rx_current-sensor.c * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -64,10 +64,10 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_rx.h" #include "can_helper.h" -TEST_FILE("can_cbs_rx_current_sensor.c") +TEST_FILE("can_cbs_rx_current-sensor.c") /*========== Definitions and Implementations for Unit Test ==================*/ diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_rx_imd.c b/tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_imd.c similarity index 98% rename from tests/unit/app/driver/can/cbs/test_can_cbs_rx_imd.c rename to tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_imd.c index 25a828a1..b377edee 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_rx_imd.c +++ b/tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_imd.c @@ -43,8 +43,8 @@ * @file test_can_cbs_rx_imd.c * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -64,7 +64,7 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_rx.h" #include "can_helper.h" TEST_FILE("can_cbs_rx_imd.c") diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_rx_misc.c b/tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_misc.c similarity index 98% rename from tests/unit/app/driver/can/cbs/test_can_cbs_rx_misc.c rename to tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_misc.c index fd161a02..2c274a17 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_rx_misc.c +++ b/tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_misc.c @@ -43,8 +43,8 @@ * @file test_can_cbs_rx_misc.c * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -64,7 +64,7 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_rx.h" #include "can_helper.h" TEST_FILE("can_cbs_rx_misc.c") diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_rx_command.c b/tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_state-request.c similarity index 81% rename from tests/unit/app/driver/can/cbs/test_can_cbs_rx_command.c rename to tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_state-request.c index cf28453b..ee24b900 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_rx_command.c +++ b/tests/unit/app/driver/can/cbs/rx/test_can_cbs_rx_state-request.c @@ -40,11 +40,11 @@ */ /** - * @file test_can_cbs_rx_command.c + * @file test_can_cbs_rx_state-request.c * @author foxBMS Team * @date 2021-07-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -68,11 +68,12 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_rx.h" +#include "can_cfg_rx-message-definitions.h" #include "can_helper.h" #include "test_assert_helper.h" -TEST_FILE("can_cbs_rx_command.c") +TEST_FILE("can_cbs_rx_state-request.c") /*========== Definitions and Implementations for Unit Test ==================*/ @@ -128,21 +129,38 @@ void tearDown(void) { /*========== Test Cases =====================================================*/ /** test the handling of illegal input by callback */ void testRxRequestIllegalInput(void) { - uint32_t id = 0u; - uint8_t dlc = 0u; - CAN_ENDIANNESS_e endianness = CAN_LITTLE_ENDIAN; + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CAN_MAX_11BIT_ID, + .dlc = 0u, + .endianness = CAN_LITTLE_ENDIAN, + }; + uint8_t canData[CAN_MAX_DLC] = {0}; - TEST_ASSERT_FAIL_ASSERT(CAN_RxRequest(CAN_MAX_11BIT_ID, dlc, endianness, canData, &can_kShim)); - TEST_ASSERT_FAIL_ASSERT(CAN_RxRequest(id, (CAN_DLC + 1u), endianness, canData, &can_kShim)); - TEST_ASSERT_FAIL_ASSERT(CAN_RxRequest(id, dlc, endianness, NULL_PTR, &can_kShim)); - TEST_ASSERT_FAIL_ASSERT(CAN_RxRequest(id, dlc, endianness, canData, NULL_PTR)); + + /* test 0 */ + TEST_ASSERT_FAIL_ASSERT(CANRX_BmsStateRequest(testMessage, canData, &can_kShim)); + + /* test 1 */ + testMessage.id = 0u; + testMessage.dlc = CAN_DEFAULT_DLC + 1u; + + TEST_ASSERT_FAIL_ASSERT(CANRX_BmsStateRequest(testMessage, canData, &can_kShim)); + + /* test 2 */ + TEST_ASSERT_FAIL_ASSERT(CANRX_BmsStateRequest(testMessage, NULL_PTR, &can_kShim)); + + /* test 3 */ + TEST_ASSERT_FAIL_ASSERT(CANRX_BmsStateRequest(testMessage, canData, NULL_PTR)); } /** test mode request */ void testRxRequestModeRequest(void) { - uint32_t id = 0u; - uint8_t dlc = 0u; - CAN_ENDIANNESS_e endianness = CAN_BIG_ENDIAN; + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANRX_BMS_STATE_REQUEST_ID, + .dlc = CAN_FOXBMS_MESSAGES_DEFAULT_DLC, + .endianness = CAN_BIG_ENDIAN, + }; + uint8_t canData[CAN_MAX_DLC] = {0}; /* ignore reads that are not used in this test */ @@ -153,28 +171,28 @@ void testRxRequestModeRequest(void) { /* request disconnect (STANDBY) */ canData[0u] = 0u; - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); TEST_ASSERT_EQUAL(BMS_REQ_ID_STANDBY, can_tableStateRequest.stateRequestViaCan); /* request discharge (NORMAL) */ canData[0u] = 1u; - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); TEST_ASSERT_EQUAL(BMS_REQ_ID_NORMAL, can_tableStateRequest.stateRequestViaCan); /* request charge (CHARGE) */ canData[0u] = 2u; - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); TEST_ASSERT_EQUAL(BMS_REQ_ID_CHARGE, can_tableStateRequest.stateRequestViaCan); /* no valid request */ canData[0u] = 3u; - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); TEST_ASSERT_EQUAL(BMS_REQ_ID_NOREQ, can_tableStateRequest.stateRequestViaCan); /* state counter overflow */ can_tableStateRequest.stateCounter = UINT8_MAX; canData[0u] = 0u; - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); TEST_ASSERT_EQUAL(0u, can_tableStateRequest.stateCounter); /* state: no update without change an no time */ @@ -183,7 +201,7 @@ void testRxRequestModeRequest(void) { OS_CheckTimeHasPassed_IgnoreArg_oldTimeStamp_ms(); OS_CheckTimeHasPassed_IgnoreArg_timeToPass_ms(); can_tableStateRequest.stateRequestViaCanPending = 42u; - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); TEST_ASSERT_EQUAL(42u, can_tableStateRequest.stateRequestViaCanPending); /* state: update with change of time */ @@ -192,15 +210,17 @@ void testRxRequestModeRequest(void) { OS_CheckTimeHasPassed_IgnoreArg_oldTimeStamp_ms(); OS_CheckTimeHasPassed_IgnoreArg_timeToPass_ms(); can_tableStateRequest.stateRequestViaCanPending = 42u; - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); TEST_ASSERT_EQUAL(BMS_REQ_ID_STANDBY, can_tableStateRequest.stateRequestViaCanPending); } /** test balancing request */ void testRxRequestBalancingRequest(void) { - uint32_t id = 0u; - uint8_t dlc = 0u; - CAN_ENDIANNESS_e endianness = CAN_BIG_ENDIAN; + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANRX_BMS_STATE_REQUEST_ID, + .dlc = CAN_FOXBMS_MESSAGES_DEFAULT_DLC, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t canData[CAN_MAX_DLC] = {0}; /* ignore reads that are not used in this test */ @@ -214,7 +234,7 @@ void testRxRequestBalancingRequest(void) { BAL_GetInitializationState_ExpectAndReturn(STD_OK); BAL_SetStateRequest_ExpectAndReturn(BAL_STATE_GLOBAL_DISABLE_REQUEST, BAL_OK); BAL_SetBalancingThreshold_Expect(0u); - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); /* request balancing */ canData[1u] = 1u; @@ -222,21 +242,23 @@ void testRxRequestBalancingRequest(void) { BAL_GetInitializationState_ExpectAndReturn(STD_OK); BAL_SetStateRequest_ExpectAndReturn(BAL_STATE_GLOBAL_ENABLE_REQUEST, BAL_OK); BAL_SetBalancingThreshold_Expect(0x42u); - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); /* balancing not initialized */ canData[1u] = 1u; canData[2u] = 0x33u; BAL_GetInitializationState_ExpectAndReturn(STD_NOT_OK); BAL_SetBalancingThreshold_Expect(0x33u); - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); } /** test reset flags request */ void testRxRequestResetFlags(void) { - uint32_t id = 0u; - uint8_t dlc = 0u; - CAN_ENDIANNESS_e endianness = CAN_BIG_ENDIAN; + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANRX_BMS_STATE_REQUEST_ID, + .dlc = CAN_FOXBMS_MESSAGES_DEFAULT_DLC, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t canData[CAN_MAX_DLC] = {0}; /* ignore reads that are not used in this test */ @@ -253,5 +275,5 @@ void testRxRequestResetFlags(void) { DIAG_ID_DEEP_DISCHARGE_DETECTED, DIAG_EVENT_OK, DIAG_STRING, s, DIAG_HANDLER_RETURN_OK); } SYSM_ClearAllTimingViolations_Expect(); - CAN_RxRequest(id, dlc, endianness, canData, &can_kShim); + CANRX_BmsStateRequest(testMessage, canData, &can_kShim); } diff --git a/tests/unit/app/driver/can/cbs/test_can_helper.c b/tests/unit/app/driver/can/cbs/test_can_helper.c index 0c14d088..b5cd6e86 100644 --- a/tests/unit/app/driver/can/cbs/test_can_helper.c +++ b/tests/unit/app/driver/can/cbs/test_can_helper.c @@ -43,8 +43,8 @@ * @file test_can_helper.c * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -64,7 +64,7 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" #include "can_helper.h" #include "test_assert_helper.h" diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_temperature.c b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_cell-temperatures.c similarity index 93% rename from tests/unit/app/driver/can/cbs/test_can_cbs_tx_temperature.c rename to tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_cell-temperatures.c index bb2faa42..01f28f74 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_temperature.c +++ b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_cell-temperatures.c @@ -40,11 +40,11 @@ */ /** - * @file test_can_cbs_tx_temperature.c + * @file test_can_cbs_tx_cell-temperatures.c * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -64,11 +64,12 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" #include "database_helper.h" -TEST_FILE("can_cbs_tx_temperature.c") +TEST_FILE("can_cbs_tx_cell-temperatures.c") /*========== Definitions and Implementations for Unit Test ==================*/ @@ -119,6 +120,11 @@ void tearDown(void) { /*========== Test Cases =====================================================*/ void testCAN_TxCellTemperature(void) { + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANTX_CELL_TEMPERATURES_ID, + .dlc = 8u, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t data[8] = {0}; DATA_Read1DataBlock_IgnoreAndReturn(0u); @@ -132,7 +138,7 @@ void testCAN_TxCellTemperature(void) { can_kShim.pTableCellTemperature->cellTemperature_ddegC[s][5] = -100; } - CAN_TxCellTemperature(0x111, 8, CAN_BIG_ENDIAN, data, &muxId, &can_kShim); + CANTX_CellTemperatures(testMessage, data, &muxId, &can_kShim); TEST_ASSERT_EQUAL(0, data[0]); TEST_ASSERT_EQUAL(0, data[1]); diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_voltage.c b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_cell-voltages.c similarity index 93% rename from tests/unit/app/driver/can/cbs/test_can_cbs_tx_voltage.c rename to tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_cell-voltages.c index c472f886..b2f561ff 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_voltage.c +++ b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_cell-voltages.c @@ -40,11 +40,11 @@ */ /** - * @file test_can_cbs_tx_voltage.c + * @file test_can_cbs_tx_cell-voltages.c * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -64,11 +64,12 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" #include "database_helper.h" -TEST_FILE("can_cbs_tx_voltage.c") +TEST_FILE("can_cbs_tx_cell-voltages.c") /*========== Definitions and Implementations for Unit Test ==================*/ @@ -119,6 +120,11 @@ void tearDown(void) { /*========== Test Cases =====================================================*/ void testCAN_TxVoltage(void) { + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANTX_CELL_VOLTAGES_ID, + .dlc = 8u, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t data[8] = {0}; DATA_Read1DataBlock_IgnoreAndReturn(0u); @@ -130,7 +136,7 @@ void testCAN_TxVoltage(void) { can_kShim.pTableCellVoltage->cellVoltage_mV[s][3] = 3700; } - CAN_TxVoltage(CAN_ID_TX_VOLTAGES, 8, CAN_BIG_ENDIAN, data, &muxId, &can_kShim); + CANTX_CellVoltages(testMessage, data, &muxId, &can_kShim); /* MuxID: 0 * Cell voltage 0: 2000mV diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_limits.c b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_limit-values.c similarity index 93% rename from tests/unit/app/driver/can/cbs/test_can_cbs_tx_limits.c rename to tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_limit-values.c index 8a89f641..49102161 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_limits.c +++ b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_limit-values.c @@ -40,11 +40,11 @@ */ /** - * @file test_can_cbs_tx_limits.c + * @file test_can_cbs_tx_limit-values.c * @author foxBMS Team * @date 2021-07-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -65,10 +65,11 @@ #include "battery_cell_cfg.h" #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" -TEST_FILE("can_cbs_tx_limits.c") +TEST_FILE("can_cbs_tx_limit-values.c") /*========== Definitions and Implementations for Unit Test ==================*/ @@ -119,6 +120,11 @@ void tearDown(void) { /*========== Test Cases =====================================================*/ void testCAN_TxLimitValues(void) { + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANTX_LIMIT_VALUES_ID, + .dlc = 8u, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t data[8] = {0}; for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) { @@ -128,7 +134,7 @@ void testCAN_TxLimitValues(void) { DATA_Read1DataBlock_IgnoreAndReturn(0u); - CAN_TxLimitValues(CAN_ID_TX_LIMIT_VALUES, 8, CAN_BIG_ENDIAN, data, NULL_PTR, &can_kShim); + CANTX_LimitValues(testMessage, data, NULL_PTR, &can_kShim); /** Values of: * max. charge current: 240A diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_minmax.c b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_minimum-maximum-values.c similarity index 89% rename from tests/unit/app/driver/can/cbs/test_can_cbs_tx_minmax.c rename to tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_minimum-maximum-values.c index 9b235bb3..0261a567 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_minmax.c +++ b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_minimum-maximum-values.c @@ -40,11 +40,11 @@ */ /** - * @file test_can_cbs_tx_minmax.c + * @file test_can_cbs_tx_minimum-maximum-values.c * @author foxBMS Team * @date 2021-04-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -65,10 +65,11 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" -TEST_FILE("can_cbs_tx_minmax.c") +TEST_FILE("can_cbs_tx_minimum-maximum-values.c") /*========== Definitions and Implementations for Unit Test ==================*/ @@ -118,7 +119,12 @@ void tearDown(void) { } /*========== Test Cases =====================================================*/ -void testCAN_TxMinimumMaximumValuesAllStringsOpen(void) { +void testCANTX_MinimumMaximumValuesAllStringsOpen(void) { + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANTX_MINIMUM_MAXIMUM_VALUES_ID, + .dlc = 8u, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t data[8] = {0}; for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) { @@ -130,7 +136,7 @@ void testCAN_TxMinimumMaximumValuesAllStringsOpen(void) { DATA_Read1DataBlock_IgnoreAndReturn(0u); BMS_GetNumberOfConnectedStrings_IgnoreAndReturn(0u); - CAN_TxMinimumMaximumValues(CAN_ID_TX_MINIMUM_MAXIMUM_VALUES, 8, CAN_BIG_ENDIAN, data, NULL_PTR, &can_kShim); + CANTX_MinimumMaximumValues(testMessage, data, NULL_PTR, &can_kShim); /** Values of: * minimum cell voltage: 2000mV @@ -148,7 +154,12 @@ void testCAN_TxMinimumMaximumValuesAllStringsOpen(void) { TEST_ASSERT_EQUAL(0xF1, data[7]); } -void testCAN_TxMinimumMaximumValuesAllStringsClosed(void) { +void testCANTX_MinimumMaximumValuesAllStringsClosed(void) { + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANTX_MINIMUM_MAXIMUM_VALUES_ID, + .dlc = 8u, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t data[8] = {0}; for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) { @@ -163,7 +174,7 @@ void testCAN_TxMinimumMaximumValuesAllStringsClosed(void) { for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) { BMS_IsStringClosed_IgnoreAndReturn(true); } - CAN_TxMinimumMaximumValues(CAN_ID_TX_MINIMUM_MAXIMUM_VALUES, 8, CAN_BIG_ENDIAN, data, NULL_PTR, &can_kShim); + CANTX_MinimumMaximumValues(testMessage, data, NULL_PTR, &can_kShim); /** Values of: * minimum cell voltage: 2000mV diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_state_estimation.c b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_pack-state-estimation.c similarity index 92% rename from tests/unit/app/driver/can/cbs/test_can_cbs_tx_state_estimation.c rename to tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_pack-state-estimation.c index fea2a091..bb47edb9 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_state_estimation.c +++ b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_pack-state-estimation.c @@ -40,11 +40,11 @@ */ /** - * @file test_can_cbs_tx_state_estimation.c + * @file test_can_cbs_tx_pack-state-estimation.c * @author foxBMS Team * @date 2021-07-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -65,10 +65,11 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" -TEST_FILE("can_cbs_tx_state_estimation.c") +TEST_FILE("can_cbs_tx_pack-state-estimation.c") /*========== Definitions and Implementations for Unit Test ==================*/ @@ -119,6 +120,11 @@ void tearDown(void) { /*========== Test Cases =====================================================*/ void testCAN_TxStateEstimationCharging(void) { + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANTX_PACK_STATE_ESTIMATION_ID, + .dlc = 8u, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t data[8] = {0}; for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) { @@ -142,7 +148,7 @@ void testCAN_TxStateEstimationCharging(void) { BMS_GetNumberOfConnectedStrings_IgnoreAndReturn(BS_NR_OF_STRINGS); BMS_GetNumberOfConnectedStrings_IgnoreAndReturn(BS_NR_OF_STRINGS); - CAN_TxStateEstimation(CAN_ID_TX_PACK_STATE_ESTIMATION, 8, CAN_BIG_ENDIAN, data, NULL_PTR, &can_kShim); + CANTX_PackStateEstimation(testMessage, data, NULL_PTR, &can_kShim); /** Values of: * pack SOC: 74.2% @@ -161,6 +167,12 @@ void testCAN_TxStateEstimationCharging(void) { } void testCAN_TxStateEstimationDischarging(void) { + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANTX_PACK_STATE_ESTIMATION_ID, + .dlc = 8u, + .endianness = CAN_BIG_ENDIAN, + }; + uint8_t data[8] = {0}; for (uint8_t s = 0u; s < BS_NR_OF_STRINGS; s++) { @@ -184,7 +196,7 @@ void testCAN_TxStateEstimationDischarging(void) { BMS_GetNumberOfConnectedStrings_IgnoreAndReturn(BS_NR_OF_STRINGS); BMS_GetNumberOfConnectedStrings_IgnoreAndReturn(BS_NR_OF_STRINGS); - CAN_TxStateEstimation(CAN_ID_TX_PACK_STATE_ESTIMATION, 8, CAN_BIG_ENDIAN, data, NULL_PTR, &can_kShim); + CANTX_PackStateEstimation(testMessage, data, NULL_PTR, &can_kShim); /** Values of: * pack SOC: 74.2% diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_state.c b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_state.c similarity index 98% rename from tests/unit/app/driver/can/cbs/test_can_cbs_tx_state.c rename to tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_state.c index 6a831f47..a6684d29 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_state.c +++ b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_state.c @@ -43,8 +43,8 @@ * @file test_can_cbs_tx_state.c * @author foxBMS Team * @date 2021-07-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -66,7 +66,7 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" #include "can_helper.h" TEST_FILE("can_cbs_tx_state.c") diff --git a/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_string-state-estimation.c b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_string-state-estimation.c new file mode 100644 index 00000000..7716dacb --- /dev/null +++ b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_string-state-estimation.c @@ -0,0 +1,123 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file test_can_cbs_tx_string-state-estimation.c + * @author foxBMS Team + * @date 2021-07-27 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup UNIT_TEST_IMPLEMENTATION + * @prefix TEST + * + * @brief Tests for the CAN driver callbacks + * + */ + +/*========== Includes =======================================================*/ +#include "unity.h" +#include "Mockbms.h" +#include "Mockcan.h" +#include "Mockdatabase.h" +#include "Mockdiag.h" +#include "Mockfoxmath.h" +#include "Mockimd.h" +#include "Mockmpu_prototypes.h" +#include "Mockos.h" + +#include "database_cfg.h" + +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" +#include "can_helper.h" + +TEST_FILE("can_cbs_tx_string-state-estimation.c") + +/*========== Definitions and Implementations for Unit Test ==================*/ + +static DATA_BLOCK_CELL_VOLTAGE_s can_tableCellVoltages = {.header.uniqueId = DATA_BLOCK_ID_CELL_VOLTAGE}; +static DATA_BLOCK_CELL_TEMPERATURE_s can_tableTemperatures = {.header.uniqueId = DATA_BLOCK_ID_CELL_TEMPERATURE}; +static DATA_BLOCK_MIN_MAX_s can_tableMinimumMaximumValues = {.header.uniqueId = DATA_BLOCK_ID_MIN_MAX}; +static DATA_BLOCK_CURRENT_SENSOR_s can_tableCurrentSensor = {.header.uniqueId = DATA_BLOCK_ID_CURRENT_SENSOR}; +static DATA_BLOCK_OPEN_WIRE_s can_tableOpenWire = {.header.uniqueId = DATA_BLOCK_ID_OPEN_WIRE_BASE}; +static DATA_BLOCK_STATEREQUEST_s can_tableStateRequest = {.header.uniqueId = DATA_BLOCK_ID_STATEREQUEST}; +static DATA_BLOCK_PACK_VALUES_s can_tablePackValues = {.header.uniqueId = DATA_BLOCK_ID_PACK_VALUES}; +static DATA_BLOCK_SOF_s can_tableSof = {.header.uniqueId = DATA_BLOCK_ID_SOF}; +static DATA_BLOCK_SOX_s can_tableSox = {.header.uniqueId = DATA_BLOCK_ID_SOX}; +static DATA_BLOCK_ERRORSTATE_s can_tableErrorState = {.header.uniqueId = DATA_BLOCK_ID_ERRORSTATE}; +static DATA_BLOCK_INSULATION_MONITORING_s can_tableInsulation = { + .header.uniqueId = DATA_BLOCK_ID_INSULATION_MONITORING}; +static DATA_BLOCK_MSL_FLAG_s can_tableMslFlags = {.header.uniqueId = DATA_BLOCK_ID_MSL_FLAG}; +static DATA_BLOCK_RSL_FLAG_s can_tableRslFlags = {.header.uniqueId = DATA_BLOCK_ID_RSL_FLAG}; +static DATA_BLOCK_MOL_FLAG_s can_tableMolFlags = {.header.uniqueId = DATA_BLOCK_ID_MOL_FLAG}; + +QueueHandle_t imd_canDataQueue = NULL_PTR; + +const CAN_SHIM_s can_kShim = { + .pQueueImd = &imd_canDataQueue, + .pTableCellVoltage = &can_tableCellVoltages, + .pTableCellTemperature = &can_tableTemperatures, + .pTableMinMax = &can_tableMinimumMaximumValues, + .pTableCurrentSensor = &can_tableCurrentSensor, + .pTableOpenWire = &can_tableOpenWire, + .pTableStateRequest = &can_tableStateRequest, + .pTablePackValues = &can_tablePackValues, + .pTableSof = &can_tableSof, + .pTableSox = &can_tableSox, + .pTableErrorState = &can_tableErrorState, + .pTableInsulation = &can_tableInsulation, + .pTableMsl = &can_tableMslFlags, + .pTableRsl = &can_tableRslFlags, + .pTableMol = &can_tableMolFlags, +}; + +static uint8_t muxId = 0u; + +/*========== Setup and Teardown =============================================*/ +void setUp(void) { +} + +void tearDown(void) { +} + +/*========== Test Cases =====================================================*/ +void testDummy(void) { +} diff --git a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_system_values.c b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_system-values.c similarity index 93% rename from tests/unit/app/driver/can/cbs/test_can_cbs_tx_system_values.c rename to tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_system-values.c index a64d4e6e..4c762ce0 100644 --- a/tests/unit/app/driver/can/cbs/test_can_cbs_tx_system_values.c +++ b/tests/unit/app/driver/can/cbs/tx/test_can_cbs_tx_system-values.c @@ -40,11 +40,11 @@ */ /** - * @file test_can_cbs_tx_system_values.c + * @file test_can_cbs_tx_system-values.c * @author foxBMS Team * @date 2021-07-27 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -64,10 +64,11 @@ #include "database_cfg.h" -#include "can_cbs.h" +#include "can_cbs_tx.h" +#include "can_cfg_tx-message-definitions.h" #include "can_helper.h" -TEST_FILE("can_cbs_tx_system_values.c") +TEST_FILE("can_cbs_tx_system-values.c") /*========== Definitions and Implementations for Unit Test ==================*/ @@ -118,6 +119,11 @@ void tearDown(void) { /*========== Test Cases =====================================================*/ void testCAN_TxPackValues(void) { + CAN_MESSAGE_PROPERTIES_s testMessage = { + .id = CANTX_PACK_VALUES_ID, + .dlc = 8u, + .endianness = CAN_BIG_ENDIAN, + }; uint8_t data[8] = {0}; can_kShim.pTablePackValues->packCurrent_mA = -200500; @@ -126,7 +132,7 @@ void testCAN_TxPackValues(void) { can_kShim.pTablePackValues->packPower_W = -65100; DATA_Read1DataBlock_IgnoreAndReturn(0u); - CAN_TxPackValues(CAN_ID_TX_PACK_VALUES, 8, CAN_BIG_ENDIAN, data, NULL_PTR, &can_kShim); + CANTX_PackValues(testMessage, data, NULL_PTR, &can_kShim); /** Values of: * pack current: -200.5A diff --git a/tests/unit/app/driver/can/test_can.c b/tests/unit/app/driver/can/test_can.c index 3dc9a43a..305e498c 100644 --- a/tests/unit/app/driver/can/test_can.c +++ b/tests/unit/app/driver/can/test_can.c @@ -43,8 +43,8 @@ * @file test_can.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -74,17 +74,38 @@ #include "test_assert_helper.h" /*========== Definitions and Implementations for Unit Test ==================*/ -/* Dummy for version file implementation */ -const VER_VERSION_s ver_foxbmsVersionInformation = { - .underVersionControl = true, - .isDirty = true, - .major = 1, - .minor = 1, - .patch = 1, - .distanceFromLastRelease = 42, - .commitHash = "deadbeef", - .gitRemote = "onTheDarkSideOfTheMoon.git", -}; + +/* see src/app/driver/config/can_cfg_rx-message-definitions.h, but we omit + this include here */ +#define CANRX_NOT_PERIODIC (0u) + +/* TX test case */ +#define TEST_CANTX_ID_DUMMY (0x001) +#define TEST_CANTX_DUMMY_PERIOD_ms (100) +#define TEST_CANTX_DUMMY_PHASE_ms (0) + +#define TEST_CANTX_DUMMY_MESSAGE \ + { \ + .id = TEST_CANTX_ID_DUMMY, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_LITTLE_ENDIAN, \ + }, \ + { \ + .period = TEST_CANTX_DUMMY_PERIOD_ms, .phase = TEST_CANTX_DUMMY_PHASE_ms \ + } + +/* Rx test case*/ +#define TEST_CANRX_ID_DUMMY (0x002) + +#define TEST_CANRX_DUMMY_MESSAGE \ + { \ + .id = TEST_CANRX_ID_DUMMY, \ + .dlc = CAN_DEFAULT_DLC, \ + .endianness = CAN_LITTLE_ENDIAN, \ + }, \ + { \ + .period = CANRX_NOT_PERIODIC \ + } static DATA_BLOCK_CELL_VOLTAGE_s can_tableCellVoltages = {.header.uniqueId = DATA_BLOCK_ID_CELL_VOLTAGE}; static DATA_BLOCK_CELL_TEMPERATURE_s can_tableTemperatures = {.header.uniqueId = DATA_BLOCK_ID_CELL_TEMPERATURE}; @@ -105,22 +126,27 @@ const CAN_SHIM_s can_kShim = { .pTableStateRequest = &can_tableStateRequest, }; -static uint32_t can_dummy( - uint32_t id, - uint8_t dlc, - CAN_ENDIANNESS_e endianness, +static uint32_t TEST_CANTX_DummyCallback( + CAN_MESSAGE_PROPERTIES_s message, uint8_t *pCanData, uint8_t *pMuxId, - const CAN_SHIM_s const *kpkCanShim) { + const CAN_SHIM_s *const kpkCanShim) { + return 0; +} + +static uint32_t TEST_CANRX_DummyCallback( + CAN_MESSAGE_PROPERTIES_s message, + const uint8_t *const kpkCanData, + const CAN_SHIM_s *const kpkCanShim) { return 0; } -const CAN_MSG_TX_TYPE_s can_txMessages[] = { - {CAN1_NODE, 0x001, 8, 100, 0, CAN_LITTLE_ENDIAN, &can_dummy, NULL_PTR}, +const CAN_TX_MESSAGE_TYPE_s can_txMessages[] = { + {CAN_NODE_1, TEST_CANTX_DUMMY_MESSAGE, &TEST_CANTX_DummyCallback, NULL_PTR}, }; -const CAN_MSG_RX_TYPE_s can_rxMessages[] = { - {CAN1_NODE, 0x002, 8, CAN_LITTLE_ENDIAN, &can_dummy}, +const CAN_RX_MESSAGE_TYPE_s can_rxMessages[] = { + {CAN_NODE_1, TEST_CANRX_DUMMY_MESSAGE, &TEST_CANRX_DummyCallback}, }; const uint8_t can_txLength = sizeof(can_txMessages) / sizeof(can_txMessages[0]); @@ -166,7 +192,7 @@ void testDataSendNullPointerAsData(void) { } void testDataSendNoMessagePending(void) { - canBASE_t *pNode = CAN1_NODE; + canBASE_t *pNode = CAN_NODE_1; uint8_t data = 0; canIsTxMessagePending_IgnoreAndReturn(1u); @@ -177,7 +203,7 @@ void testDataSendNoMessagePending(void) { } void testDataSendMessagePending(void) { - canBASE_t *pNode = CAN1_NODE; + canBASE_t *pNode = CAN_NODE_1; uint8_t data = 0; /* simulate first messageBox has pending message */ @@ -241,7 +267,7 @@ void testCAN_TransmitBootMessage(void) { } /** - * @brief test #CAN_TransmitDieId() + * @brief test #CANTX_TransmitDieId() * @details Currently not implemented. Implementing a test for this function * would require implementing a harness that mocks away the * systemREG1 (defined in HAL) as otherwise the test would attempt to @@ -251,5 +277,5 @@ void testCAN_TransmitBootMessage(void) { * tested in the integration test. * */ -void testCAN_TransmitDieId(void) { +void testCANTX_TransmitDieId(void) { } diff --git a/tests/unit/app/driver/checksum/test_checksum.c b/tests/unit/app/driver/checksum/test_checksum.c index 0c7f9ca5..8ad66a7e 100644 --- a/tests/unit/app/driver/checksum/test_checksum.c +++ b/tests/unit/app/driver/checksum/test_checksum.c @@ -43,8 +43,8 @@ * @file test_checksum.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/config/test_can_cfg.c b/tests/unit/app/driver/config/test_can_cfg.c index dca2fae2..4813b84c 100644 --- a/tests/unit/app/driver/config/test_can_cfg.c +++ b/tests/unit/app/driver/config/test_can_cfg.c @@ -43,8 +43,8 @@ * @file test_can_cfg.c * @author foxBMS Team * @date 2020-07-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -55,7 +55,6 @@ /*========== Includes =======================================================*/ #include "unity.h" #include "Mockcan.h" -#include "Mockcan_cbs.h" #include "Mockdatabase.h" #include "Mockdiag.h" #include "Mockfoxmath.h" diff --git a/tests/unit/app/driver/config/test_can_cfg_rx.c b/tests/unit/app/driver/config/test_can_cfg_rx.c new file mode 100644 index 00000000..d1b0b28f --- /dev/null +++ b/tests/unit/app/driver/config/test_can_cfg_rx.c @@ -0,0 +1,88 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file test_can_cfg_rx.c + * @author foxBMS Team + * @date 2020-07-28 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup UNIT_TEST_IMPLEMENTATION + * @prefix TEST + * + * @brief Tests for the CAN driver + * + */ + +/*========== Includes =======================================================*/ +#include "unity.h" +#include "Mockcan.h" +#include "Mockcan_cbs_rx.h" +#include "Mockdatabase.h" +#include "Mockdiag.h" +#include "Mockfoxmath.h" +#include "Mockftask.h" +#include "Mockimd.h" +#include "Mockmpu_prototypes.h" +#include "Mockos.h" + +#include "can_cfg.h" +#include "database_cfg.h" + +TEST_FILE("can_cfg_rx.c") + +/*========== Definitions and Implementations for Unit Test ==================*/ + +QueueHandle_t ftsk_dataQueue = NULL_PTR; +QueueHandle_t ftsk_imdCanDataQueue = NULL_PTR; +QueueHandle_t ftsk_canRxQueue = NULL_PTR; +volatile bool ftsk_allQueuesCreated = false; + +/*========== Setup and Teardown =============================================*/ +void setUp(void) { +} + +void tearDown(void) { +} + +/*========== Test Cases =====================================================*/ +void testDummy(void) { +} diff --git a/tests/unit/app/driver/config/test_can_cfg_tx.c b/tests/unit/app/driver/config/test_can_cfg_tx.c new file mode 100644 index 00000000..eee1f15d --- /dev/null +++ b/tests/unit/app/driver/config/test_can_cfg_tx.c @@ -0,0 +1,88 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file test_can_cfg_tx.c + * @author foxBMS Team + * @date 2020-07-28 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup UNIT_TEST_IMPLEMENTATION + * @prefix TEST + * + * @brief Tests for the CAN driver + * + */ + +/*========== Includes =======================================================*/ +#include "unity.h" +#include "Mockcan.h" +#include "Mockcan_cbs_tx.h" +#include "Mockdatabase.h" +#include "Mockdiag.h" +#include "Mockfoxmath.h" +#include "Mockftask.h" +#include "Mockimd.h" +#include "Mockmpu_prototypes.h" +#include "Mockos.h" + +#include "can_cfg.h" +#include "database_cfg.h" + +TEST_FILE("can_cfg_tx.c") + +/*========== Definitions and Implementations for Unit Test ==================*/ + +QueueHandle_t ftsk_dataQueue = NULL_PTR; +QueueHandle_t ftsk_imdCanDataQueue = NULL_PTR; +QueueHandle_t ftsk_canRxQueue = NULL_PTR; +volatile bool ftsk_allQueuesCreated = false; + +/*========== Setup and Teardown =============================================*/ +void setUp(void) { +} + +void tearDown(void) { +} + +/*========== Test Cases =====================================================*/ +void testDummy(void) { +} diff --git a/tests/unit/app/driver/config/test_can_cfg_tx_boot-message.c b/tests/unit/app/driver/config/test_can_cfg_tx_boot-message.c new file mode 100644 index 00000000..e9ea19c6 --- /dev/null +++ b/tests/unit/app/driver/config/test_can_cfg_tx_boot-message.c @@ -0,0 +1,90 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file test_can_cfg_tx_boot-message.c + * @author foxBMS Team + * @date 2022-08-17 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup UNIT_TEST_IMPLEMENTATION + * @prefix TEST + * + * @brief Tests for the CAN driver callbacks + * + */ + +/*========== Includes =======================================================*/ +#include "unity.h" +#include "Mockcan.h" + +#include "database_cfg.h" +#include "version_cfg.h" + +#include "can_cbs_tx.h" +#include "can_helper.h" +#include "foxmath.h" + +TEST_FILE("can_cfg_tx_boot-message.c") + +/*========== Definitions and Implementations for Unit Test ==================*/ +/* Dummy for version file implementation */ +const VER_VERSION_s ver_foxbmsVersionInformation = { + .underVersionControl = true, + .isDirty = true, + .major = 1, + .minor = 1, + .patch = 1, + .distanceFromLastRelease = 42, + .commitHash = "deadbeef", + .gitRemote = "onTheDarkSideOfTheMoon.git", +}; + +/*========== Setup and Teardown =============================================*/ +void setUp(void) { +} + +void tearDown(void) { +} + +/*========== Test Cases =====================================================*/ +void testDummy(void) { +} diff --git a/tests/unit/app/driver/config/test_contactor_cfg.c b/tests/unit/app/driver/config/test_contactor_cfg.c index 44c30367..bc69e62a 100644 --- a/tests/unit/app/driver/config/test_contactor_cfg.c +++ b/tests/unit/app/driver/config/test_contactor_cfg.c @@ -43,8 +43,8 @@ * @file test_contactor_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/config/test_dma_cfg.c b/tests/unit/app/driver/config/test_dma_cfg.c index 0e1f8d98..2017035c 100644 --- a/tests/unit/app/driver/config/test_dma_cfg.c +++ b/tests/unit/app/driver/config/test_dma_cfg.c @@ -43,8 +43,8 @@ * @file test_dma_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/config/test_fram_cfg.c b/tests/unit/app/driver/config/test_fram_cfg.c index b3897285..4f6bc820 100644 --- a/tests/unit/app/driver/config/test_fram_cfg.c +++ b/tests/unit/app/driver/config/test_fram_cfg.c @@ -43,8 +43,8 @@ * @file test_fram_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/config/test_interlock_cfg.c b/tests/unit/app/driver/config/test_interlock_cfg.c index 0f6f4ee9..09ac13b9 100644 --- a/tests/unit/app/driver/config/test_interlock_cfg.c +++ b/tests/unit/app/driver/config/test_interlock_cfg.c @@ -43,8 +43,8 @@ * @file test_interlock_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/config/test_nxpfs85xx_cfg.c b/tests/unit/app/driver/config/test_nxpfs85xx_cfg.c index 0e28d414..3eb53dbf 100644 --- a/tests/unit/app/driver/config/test_nxpfs85xx_cfg.c +++ b/tests/unit/app/driver/config/test_nxpfs85xx_cfg.c @@ -43,8 +43,8 @@ * @file test_nxpfs85xx_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/config/test_pex_cfg.c b/tests/unit/app/driver/config/test_pex_cfg.c index 0e0f7cae..9cb027ea 100644 --- a/tests/unit/app/driver/config/test_pex_cfg.c +++ b/tests/unit/app/driver/config/test_pex_cfg.c @@ -43,8 +43,8 @@ * @file test_pex_cfg.c * @author foxBMS Team * @date 2021-08-03 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/config/test_spi_cfg.c b/tests/unit/app/driver/config/test_spi_cfg.c index 028a2176..b6a87171 100644 --- a/tests/unit/app/driver/config/test_spi_cfg.c +++ b/tests/unit/app/driver/config/test_spi_cfg.c @@ -43,8 +43,8 @@ * @file test_spi_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/config/test_sps_cfg.c b/tests/unit/app/driver/config/test_sps_cfg.c index a6ec381e..74d96ebd 100644 --- a/tests/unit/app/driver/config/test_sps_cfg.c +++ b/tests/unit/app/driver/config/test_sps_cfg.c @@ -43,8 +43,8 @@ * @file test_sps_cfg.c * @author foxBMS Team * @date 2020-10-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/contactor/test_contactor.c b/tests/unit/app/driver/contactor/test_contactor.c index b1a076c2..2d217436 100644 --- a/tests/unit/app/driver/contactor/test_contactor.c +++ b/tests/unit/app/driver/contactor/test_contactor.c @@ -43,8 +43,8 @@ * @file test_contactor.c * @author foxBMS Team * @date 2020-03-31 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -55,6 +55,7 @@ /*========== Includes =======================================================*/ #include "unity.h" #include "Mockcontactor_cfg.h" +#include "Mockdiag.h" #include "Mockfassert.h" #include "Mockio.h" #include "Mockmcu.h" @@ -69,10 +70,30 @@ BS_STRING_PRECHARGE_PRESENT_e bs_stringsWithPrecharge[BS_NR_OF_STRINGS] = { BS_STRING_WITH_PRECHARGE, }; -CONT_CONTACTOR_STATE_s cont_contactorStates[BS_NR_OF_CONTACTORS] = { - {CONT_SWITCH_OFF, CONT_SWITCH_OFF, CONT_FEEDBACK_THROUGH_CURRENT, 0u, CONT_STRING0_PLUS}, - {CONT_SWITCH_OFF, CONT_SWITCH_OFF, CONT_FEEDBACK_THROUGH_CURRENT, 1u, CONT_STRING0_MINUS}, - {CONT_SWITCH_OFF, CONT_SWITCH_OFF, CONT_FEEDBACK_THROUGH_CURRENT, 2u, CONT_STRING1_PLUS}, +CONT_CONTACTOR_STATE_s cont_contactorStates[] = { + /* String contactors configuration */ + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_FEEDBACK_NORMALLY_OPEN, + BS_STRING0, + CONT_PLUS, + SPS_CHANNEL_0, + CONT_CHARGING_DIRECTION}, + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_FEEDBACK_NORMALLY_OPEN, + BS_STRING0, + CONT_MINUS, + SPS_CHANNEL_1, + CONT_DISCHARGING_DIRECTION}, + /* Precharge contactors configuration */ + {CONT_SWITCH_OFF, + CONT_SWITCH_OFF, + CONT_HAS_NO_FEEDBACK, + BS_STRING0, + CONT_PRECHARGE, + SPS_CHANNEL_2, + CONT_BIDIRECTIONAL}, }; /*========== Setup and Teardown =============================================*/ @@ -94,59 +115,3 @@ void testCONT_InitializationCheckOfContactorRegistryWrongAffiliation(void) { SPS_GetChannelAffiliation_IgnoreAndReturn(SPS_AFF_GENERAL_IO); TEST_ASSERT_FAIL_ASSERT(TEST_CONT_InitializationCheckOfContactorRegistry()); } -void testCONT_ResolveContactorNameExistingNamesFirst(void) { - /* check if the name of the first entry returns the first entry of the array */ - CONT_CONTACTOR_INDEX index = 0u; - TEST_ASSERT_PASS_ASSERT(TEST_ASSERT_EQUAL(index, TEST_CONT_ResolveContactorName(cont_contactorStates[index].name))); -} - -void testCONT_ResolveContactorNameExistingNamesLast(void) { - /* check if the name of the last entry returns the last entry of the array */ - CONT_CONTACTOR_INDEX index = BS_NR_OF_CONTACTORS - 1u; - TEST_ASSERT_PASS_ASSERT(TEST_ASSERT_EQUAL(index, TEST_CONT_ResolveContactorName(cont_contactorStates[index].name))); -} - -void testCONT_ResolveContactorNameInvalidName(void) { - /* check if an invalid name asserts */ - TEST_ASSERT_FAIL_ASSERT(TEST_ASSERT_EQUAL(0u, TEST_CONT_ResolveContactorName(84u))); -} - -void testCONT_SetContactorStateInvalidState(void) { - SPS_RequestContactorState_Ignore(); - - TEST_ASSERT_FAIL_ASSERT(CONT_SetContactorState(0u, 42u)); -} - -void testCONT_SetContactorStateInvalidContactorNumber(void) { - SPS_RequestContactorState_Ignore(); - - TEST_ASSERT_FAIL_ASSERT(CONT_SetContactorState(42u, CONT_SWITCH_OFF)); -} - -void testCONT_SetContactorStateCopyStates(void) { - /* Check that every contactor is requested off when undef is used */ - for (uint8_t contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { - /* when undef is called, channels should not be touched normally */ - SPS_RequestContactorState_Expect(contactor, SPS_CHANNEL_OFF); - TEST_ASSERT_PASS_ASSERT(TEST_ASSERT_EQUAL(STD_NOT_OK, CONT_SetContactorState(contactor, CONT_SWITCH_UNDEF))); - } - - /* Check that every contactor is requested on */ - for (uint8_t contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { - SPS_RequestContactorState_Expect(contactor, SPS_CHANNEL_ON); - TEST_ASSERT_PASS_ASSERT(TEST_ASSERT_EQUAL(STD_OK, CONT_SetContactorState(contactor, CONT_SWITCH_ON))); - } - - /* Check that every contactor is requested off when undef is used */ - for (uint8_t contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { - /* when undef is called, channels should not be touched normally */ - SPS_RequestContactorState_Expect(contactor, SPS_CHANNEL_ON); - TEST_ASSERT_PASS_ASSERT(TEST_ASSERT_EQUAL(STD_NOT_OK, CONT_SetContactorState(contactor, CONT_SWITCH_UNDEF))); - } - - /* Check that every contactor is requested off */ - for (uint8_t contactor = 0u; contactor < BS_NR_OF_CONTACTORS; contactor++) { - SPS_RequestContactorState_Expect(contactor, SPS_CHANNEL_OFF); - TEST_ASSERT_PASS_ASSERT(TEST_ASSERT_EQUAL(STD_OK, CONT_SetContactorState(contactor, CONT_SWITCH_OFF))); - } -} diff --git a/tests/unit/app/driver/crc/test_crc.c b/tests/unit/app/driver/crc/test_crc.c index fb5a2e9e..30e10e0f 100644 --- a/tests/unit/app/driver/crc/test_crc.c +++ b/tests/unit/app/driver/crc/test_crc.c @@ -43,8 +43,8 @@ * @file test_crc.c * @author foxBMS Team * @date 2022-02-23 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/dma/test_dma.c b/tests/unit/app/driver/dma/test_dma.c index 4b902ba8..f4f635a1 100644 --- a/tests/unit/app/driver/dma/test_dma.c +++ b/tests/unit/app/driver/dma/test_dma.c @@ -43,8 +43,8 @@ * @file test_dma.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/foxmath/test_foxmath.c b/tests/unit/app/driver/foxmath/test_foxmath.c index e2c23a7d..b6c092e2 100644 --- a/tests/unit/app/driver/foxmath/test_foxmath.c +++ b/tests/unit/app/driver/foxmath/test_foxmath.c @@ -43,8 +43,8 @@ * @file test_foxmath.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/fram/test_fram.c b/tests/unit/app/driver/fram/test_fram.c index 05d31cba..1c2d2789 100644 --- a/tests/unit/app/driver/fram/test_fram.c +++ b/tests/unit/app/driver/fram/test_fram.c @@ -43,8 +43,8 @@ * @file test_fram.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/htsensor/test_htsensor.c b/tests/unit/app/driver/htsensor/test_htsensor.c index 2f2949d0..bf0d11c1 100644 --- a/tests/unit/app/driver/htsensor/test_htsensor.c +++ b/tests/unit/app/driver/htsensor/test_htsensor.c @@ -43,8 +43,8 @@ * @file test_htsensor.c * @author foxBMS Team * @date 2021-08-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/i2c/test_i2c.c b/tests/unit/app/driver/i2c/test_i2c.c index f0a13762..dd6a62ab 100644 --- a/tests/unit/app/driver/i2c/test_i2c.c +++ b/tests/unit/app/driver/i2c/test_i2c.c @@ -43,8 +43,8 @@ * @file test_i2c.c * @author foxBMS Team * @date 2021-07-23 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/imd/bender/ir155/test_bender_ir155.c b/tests/unit/app/driver/imd/bender/ir155/test_bender_ir155.c index f4c8f7a6..89ff29af 100644 --- a/tests/unit/app/driver/imd/bender/ir155/test_bender_ir155.c +++ b/tests/unit/app/driver/imd/bender/ir155/test_bender_ir155.c @@ -43,8 +43,8 @@ * @file test_bender_ir155.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/imd/bender/ir155/test_bender_ir155_helper.c b/tests/unit/app/driver/imd/bender/ir155/test_bender_ir155_helper.c index 0f85e683..fbda3fe2 100644 --- a/tests/unit/app/driver/imd/bender/ir155/test_bender_ir155_helper.c +++ b/tests/unit/app/driver/imd/bender/ir155/test_bender_ir155_helper.c @@ -43,8 +43,8 @@ * @file test_bender_ir155_helper.c * @author foxBMS Team * @date 2020-11-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/imd/bender/iso165c/config/test_bender_iso165c_cfg.c b/tests/unit/app/driver/imd/bender/iso165c/config/test_bender_iso165c_cfg.c index 64423efb..adac55bb 100644 --- a/tests/unit/app/driver/imd/bender/iso165c/config/test_bender_iso165c_cfg.c +++ b/tests/unit/app/driver/imd/bender/iso165c/config/test_bender_iso165c_cfg.c @@ -43,8 +43,8 @@ * @file test_bender_iso165c_cfg.c * @author foxBMS Team * @date 2021-03-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/imd/bender/iso165c/test_bender_iso165c.c b/tests/unit/app/driver/imd/bender/iso165c/test_bender_iso165c.c index efc5b68e..3951101d 100644 --- a/tests/unit/app/driver/imd/bender/iso165c/test_bender_iso165c.c +++ b/tests/unit/app/driver/imd/bender/iso165c/test_bender_iso165c.c @@ -43,8 +43,8 @@ * @file test_bender_iso165c.c * @author foxBMS Team * @date 2021-01-19 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -65,6 +65,7 @@ #include "Mockos.h" #include "bender_iso165c.h" +#include "can_cfg_rx-message-definitions.h" #include "test_assert_helper.h" /*========== Definitions and Implementations for Unit Test ==================*/ @@ -88,7 +89,7 @@ void tearDown(void) { * */ void testMessageComposition(void) { - CAN_BUFFERELEMENT_s canMessage; + CAN_BUFFER_ELEMENT_s canMessage; uint8_t dataWord; uint8_t dataByte; uint16_t data16; @@ -193,25 +194,25 @@ void testMessageComposition(void) { TEST_ASSERT_FAIL_ASSERT(TEST_I165C_CheckResponse(command, NULL_PTR)); /* Check that response ID corresponds to awaited acknowledge */ - canMessage.id = CAN_ID_IMD_RESPONSE; + canMessage.id = CANRX_IMD_RESPONSE_ID; canMessage.data[0u] = 0xA; command = 0xA; TEST_ASSERT_EQUAL(true, TEST_I165C_CheckResponse(command, &canMessage)); /* Check that response ID does not correspond to awaited acknowledge */ - canMessage.id = CAN_ID_IMD_RESPONSE; + canMessage.id = CANRX_IMD_RESPONSE_ID; canMessage.data[0u] = 0xA; command = 0xB; TEST_ASSERT_EQUAL(false, TEST_I165C_CheckResponse(command, &canMessage)); - /* Check that response failed if ID is not CAN_ID_IMD_RESPONSE, even if response matches command */ - canMessage.id = CAN_ID_IMD_INFO; + /* Check that response failed if ID is not CANRX_IMD_RESPONSE_ID, even if response matches command */ + canMessage.id = CANRX_IMD_INFO_ID; canMessage.data[0u] = 0xA; command = 0xA; TEST_ASSERT_EQUAL(false, TEST_I165C_CheckResponse(command, &canMessage)); - /* Check that response failed if ID is not CAN_ID_IMD_RESPONSE, if respose does not match command */ - canMessage.id = CAN_ID_IMD_INFO; + /* Check that response failed if ID is not CANRX_IMD_RESPONSE_ID, if respose does not match command */ + canMessage.id = CANRX_IMD_INFO_ID; canMessage.data[0u] = 0xA; command = 0xB; TEST_ASSERT_EQUAL(false, TEST_I165C_CheckResponse(command, &canMessage)); @@ -258,7 +259,7 @@ void testMessageComposition(void) { TEST_ASSERT_FAIL_ASSERT(TEST_I165C_CheckAcknowledgeArrived(command, &tries, NULL_PTR)); /* Acknowledge arrived */ - canMessage.id = CAN_ID_IMD_RESPONSE; + canMessage.id = CANRX_IMD_RESPONSE_ID; tries = 0u; command = 0xA; canMessage.data[0] = 0xA; @@ -269,7 +270,7 @@ void testMessageComposition(void) { TEST_ASSERT_EQUAL(0u, tries); /* Acknowledge not arrived, increment try counter */ - canMessage.id = CAN_ID_IMD_RESPONSE; + canMessage.id = CANRX_IMD_RESPONSE_ID; tries = 0u; command = 0xA; canMessage.data[0] = 0xB; diff --git a/tests/unit/app/driver/imd/none/test_no-imd.c b/tests/unit/app/driver/imd/none/test_no-imd.c index bcdc2e2a..09706055 100644 --- a/tests/unit/app/driver/imd/none/test_no-imd.c +++ b/tests/unit/app/driver/imd/none/test_no-imd.c @@ -43,8 +43,8 @@ * @file test_no-imd.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/imd/test_imd.c b/tests/unit/app/driver/imd/test_imd.c index 879b2a65..6a02865c 100644 --- a/tests/unit/app/driver/imd/test_imd.c +++ b/tests/unit/app/driver/imd/test_imd.c @@ -43,8 +43,8 @@ * @file test_imd.c * @author foxBMS Team * @date 2021-11-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/interlock/test_interlock.c b/tests/unit/app/driver/interlock/test_interlock.c index b26766c7..618a3373 100644 --- a/tests/unit/app/driver/interlock/test_interlock.c +++ b/tests/unit/app/driver/interlock/test_interlock.c @@ -43,8 +43,8 @@ * @file test_interlock.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/io/test_io.c b/tests/unit/app/driver/io/test_io.c index b7b99f25..f376bb66 100644 --- a/tests/unit/app/driver/io/test_io.c +++ b/tests/unit/app/driver/io/test_io.c @@ -43,8 +43,8 @@ * @file test_io.c * @author foxBMS Team * @date 2020-06-10 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/led/test_led.c b/tests/unit/app/driver/led/test_led.c index 77ee9ec5..3794f506 100644 --- a/tests/unit/app/driver/led/test_led.c +++ b/tests/unit/app/driver/led/test_led.c @@ -43,8 +43,8 @@ * @file test_led.c * @author foxBMS Team * @date 2020-10-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/mcu/test_mcu.c b/tests/unit/app/driver/mcu/test_mcu.c index 02d2eee6..5cdb9bb6 100644 --- a/tests/unit/app/driver/mcu/test_mcu.c +++ b/tests/unit/app/driver/mcu/test_mcu.c @@ -43,8 +43,8 @@ * @file test_mcu.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/meas/test_meas.c b/tests/unit/app/driver/meas/test_meas.c index 18688fb9..965e6547 100644 --- a/tests/unit/app/driver/meas/test_meas.c +++ b/tests/unit/app/driver/meas/test_meas.c @@ -43,8 +43,8 @@ * @file test_meas.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/pex/test_pex.c b/tests/unit/app/driver/pex/test_pex.c index d5c8ad1c..0e0cd661 100644 --- a/tests/unit/app/driver/pex/test_pex.c +++ b/tests/unit/app/driver/pex/test_pex.c @@ -43,8 +43,8 @@ * @file test_pex.c * @author foxBMS Team * @date 2021-09-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/pwm/test_pwm.c b/tests/unit/app/driver/pwm/test_pwm.c index 0d714f9e..bd0cc88f 100644 --- a/tests/unit/app/driver/pwm/test_pwm.c +++ b/tests/unit/app/driver/pwm/test_pwm.c @@ -43,8 +43,8 @@ * @file test_pwm.c * @author foxBMS Team * @date 2021-10-08 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/rtc/test_rtc.c b/tests/unit/app/driver/rtc/test_rtc.c index 35042f0b..9e89d9c9 100644 --- a/tests/unit/app/driver/rtc/test_rtc.c +++ b/tests/unit/app/driver/rtc/test_rtc.c @@ -43,8 +43,8 @@ * @file test_rtc.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/sbc/test_nxpfs85xx.c b/tests/unit/app/driver/sbc/test_nxpfs85xx.c index 4cca35c8..dd0163fb 100644 --- a/tests/unit/app/driver/sbc/test_nxpfs85xx.c +++ b/tests/unit/app/driver/sbc/test_nxpfs85xx.c @@ -43,8 +43,8 @@ * @file test_nxpfs85xx.c * @author foxBMS Team * @date 2020-04-06 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix SBC * diff --git a/tests/unit/app/driver/sbc/test_sbc.c b/tests/unit/app/driver/sbc/test_sbc.c index b61578b0..5549db44 100644 --- a/tests/unit/app/driver/sbc/test_sbc.c +++ b/tests/unit/app/driver/sbc/test_sbc.c @@ -43,8 +43,8 @@ * @file test_sbc.c * @author foxBMS Team * @date 2020-07-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix SBC * diff --git a/tests/unit/app/driver/spi/test_spi.c b/tests/unit/app/driver/spi/test_spi.c index 925ff4ff..da32c557 100644 --- a/tests/unit/app/driver/spi/test_spi.c +++ b/tests/unit/app/driver/spi/test_spi.c @@ -43,8 +43,8 @@ * @file test_spi.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/sps/test_sps.c b/tests/unit/app/driver/sps/test_sps.c index 00c14d5c..ebb15fdf 100644 --- a/tests/unit/app/driver/sps/test_sps.c +++ b/tests/unit/app/driver/sps/test_sps.c @@ -43,8 +43,8 @@ * @file test_sps.c * @author foxBMS Team * @date 2020-10-28 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/api/test_tsi_limits.c b/tests/unit/app/driver/ts/api/test_tsi_limits.c index ad44c0d2..ea5c2b42 100644 --- a/tests/unit/app/driver/ts/api/test_tsi_limits.c +++ b/tests/unit/app/driver/ts/api/test_tsi_limits.c @@ -43,8 +43,8 @@ * @file test_tsi_limits.c * @author foxBMS Team * @date 2021-01-15 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TSI * diff --git a/tests/unit/app/driver/ts/epcos/b57251v5103j060/lookup-table/test_epcos_b57251v5103j060_lookup-table.c b/tests/unit/app/driver/ts/epcos/b57251v5103j060/lookup-table/test_epcos_b57251v5103j060_lookup-table.c index 8c92ca5a..dc68ba48 100644 --- a/tests/unit/app/driver/ts/epcos/b57251v5103j060/lookup-table/test_epcos_b57251v5103j060_lookup-table.c +++ b/tests/unit/app/driver/ts/epcos/b57251v5103j060/lookup-table/test_epcos_b57251v5103j060_lookup-table.c @@ -43,8 +43,8 @@ * @file test_epcos_b57251v5103j060_lookup-table.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/epcos/b57251v5103j060/polynomial/test_epcos_b57251v5103j060_polynomial.c b/tests/unit/app/driver/ts/epcos/b57251v5103j060/polynomial/test_epcos_b57251v5103j060_polynomial.c index 481a3222..b64cd41e 100644 --- a/tests/unit/app/driver/ts/epcos/b57251v5103j060/polynomial/test_epcos_b57251v5103j060_polynomial.c +++ b/tests/unit/app/driver/ts/epcos/b57251v5103j060/polynomial/test_epcos_b57251v5103j060_polynomial.c @@ -43,8 +43,8 @@ * @file test_epcos_b57251v5103j060_polynomial.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/epcos/b57251v5103j060/test_epcos_b57251v5103j060.c b/tests/unit/app/driver/ts/epcos/b57251v5103j060/test_epcos_b57251v5103j060.c index 2e11988b..be800103 100644 --- a/tests/unit/app/driver/ts/epcos/b57251v5103j060/test_epcos_b57251v5103j060.c +++ b/tests/unit/app/driver/ts/epcos/b57251v5103j060/test_epcos_b57251v5103j060.c @@ -43,8 +43,8 @@ * @file test_epcos_b57251v5103j060.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/epcos/b57861s0103f045/lookup-table/test_epcos_b57861s0103f045_lookup-table.c b/tests/unit/app/driver/ts/epcos/b57861s0103f045/lookup-table/test_epcos_b57861s0103f045_lookup-table.c index 0e35a817..63fa39f8 100644 --- a/tests/unit/app/driver/ts/epcos/b57861s0103f045/lookup-table/test_epcos_b57861s0103f045_lookup-table.c +++ b/tests/unit/app/driver/ts/epcos/b57861s0103f045/lookup-table/test_epcos_b57861s0103f045_lookup-table.c @@ -43,8 +43,8 @@ * @file test_epcos_b57861s0103f045_lookup-table.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/epcos/b57861s0103f045/polynomial/test_epcos_b57861s0103f045_polynomial.c b/tests/unit/app/driver/ts/epcos/b57861s0103f045/polynomial/test_epcos_b57861s0103f045_polynomial.c index 955aeaed..1435b5d7 100644 --- a/tests/unit/app/driver/ts/epcos/b57861s0103f045/polynomial/test_epcos_b57861s0103f045_polynomial.c +++ b/tests/unit/app/driver/ts/epcos/b57861s0103f045/polynomial/test_epcos_b57861s0103f045_polynomial.c @@ -43,8 +43,8 @@ * @file test_epcos_b57861s0103f045_polynomial.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/epcos/b57861s0103f045/test_epcos_b57861s0103f045.c b/tests/unit/app/driver/ts/epcos/b57861s0103f045/test_epcos_b57861s0103f045.c index ed13e8ad..7233269e 100644 --- a/tests/unit/app/driver/ts/epcos/b57861s0103f045/test_epcos_b57861s0103f045.c +++ b/tests/unit/app/driver/ts/epcos/b57861s0103f045/test_epcos_b57861s0103f045.c @@ -43,8 +43,8 @@ * @file test_epcos_b57861s0103f045.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/fake/none/lookup-table/test_fake_none_lookup-table.c b/tests/unit/app/driver/ts/fake/none/lookup-table/test_fake_none_lookup-table.c index 853476ff..854af03e 100644 --- a/tests/unit/app/driver/ts/fake/none/lookup-table/test_fake_none_lookup-table.c +++ b/tests/unit/app/driver/ts/fake/none/lookup-table/test_fake_none_lookup-table.c @@ -43,8 +43,8 @@ * @file test_fake_none_lookup-table.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/fake/none/polynomial/test_fake_none_polynomial.c b/tests/unit/app/driver/ts/fake/none/polynomial/test_fake_none_polynomial.c index 58cd09a9..698c33fb 100644 --- a/tests/unit/app/driver/ts/fake/none/polynomial/test_fake_none_polynomial.c +++ b/tests/unit/app/driver/ts/fake/none/polynomial/test_fake_none_polynomial.c @@ -43,8 +43,8 @@ * @file test_fake_none_polynomial.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/fake/none/test_fake_none.c b/tests/unit/app/driver/ts/fake/none/test_fake_none.c index 103b169c..0876d4d8 100644 --- a/tests/unit/app/driver/ts/fake/none/test_fake_none.c +++ b/tests/unit/app/driver/ts/fake/none/test_fake_none.c @@ -43,8 +43,8 @@ * @file test_fake_none.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/lookup-table/test_murata_ncu15xh103f6sxx_lookup-table.c b/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/lookup-table/test_murata_ncu15xh103f6sxx_lookup-table.c new file mode 100644 index 00000000..92f29ddd --- /dev/null +++ b/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/lookup-table/test_murata_ncu15xh103f6sxx_lookup-table.c @@ -0,0 +1,79 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file test_murata_ncu15xh103f6sxx_lookup-table.c + * @author foxBMS Team + * @date 2022-10-13 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup UNIT_TEST_IMPLEMENTATION + * @prefix TEST + * + * @brief Test of fake temperature sensor + * + */ + +/*========== Includes =======================================================*/ +#include "unity.h" +#include "Mockmurata_ncu15xh103f6sxx.h" + +#include "foxmath.h" +#include "tsi.h" + +TEST_FILE("murata_ncu15xh103f6sxx_lookup-table.c") + +/*========== Definitions and Implementations for Unit Test ==================*/ + +/*========== Setup and Teardown =============================================*/ +void setUp(void) { +} + +void tearDown(void) { +} + +/*========== Test Cases =====================================================*/ +void testTSI_GetTemperatureFromEpcosB57861S0103F045LookupTable(void) { + const uint8_t test_adcVoltage_mv = 5; + const float test_temperature = 1.0; + TS_Mur00GetTemperatureFromLut_ExpectAndReturn(test_adcVoltage_mv, test_temperature); + TEST_ASSERT_EQUAL(test_temperature, TSI_GetTemperature(test_adcVoltage_mv)); +} diff --git a/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/polynomial/test_murata_ncu15xh103f6sxx_polynomial.c b/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/polynomial/test_murata_ncu15xh103f6sxx_polynomial.c new file mode 100644 index 00000000..d64c5dc3 --- /dev/null +++ b/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/polynomial/test_murata_ncu15xh103f6sxx_polynomial.c @@ -0,0 +1,80 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file test_murata_ncu15xh103f6sxx_polynomial.c + * @author foxBMS Team + * @date 2022-12-13 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup UNIT_TEST_IMPLEMENTATION + * @prefix TEST + * + * @brief Test of fake temperature sensor + * + */ + +/*========== Includes =======================================================*/ +#include "unity.h" +#include "Mockmurata_ncu15xh103f6sxx.h" + +#include "foxmath.h" +#include "test_assert_helper.h" +#include "tsi.h" + +TEST_FILE("murata_ncu15xh103f6sxx_polynomial.c") + +/*========== Definitions and Implementations for Unit Test ==================*/ + +/*========== Setup and Teardown =============================================*/ +void setUp(void) { +} + +void tearDown(void) { +} + +/*========== Test Cases =====================================================*/ +void testTSI_GetTemperatureFromMurataNcu15xh103f6sxx(void) { + const uint8_t test_adcVoltage_mv = 0x64; + const float test_temperature = 3.5; + TS_Mur00GetTemperatureFromPolynomial_ExpectAndReturn(test_adcVoltage_mv, test_temperature); + TEST_ASSERT_EQUAL(test_temperature, TSI_GetTemperature(test_adcVoltage_mv)); +} diff --git a/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/test_murata_ncu15xh103f6sxx.c b/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/test_murata_ncu15xh103f6sxx.c new file mode 100644 index 00000000..f94c3eed --- /dev/null +++ b/tests/unit/app/driver/ts/murata/ncu15xh103f6sxx/test_murata_ncu15xh103f6sxx.c @@ -0,0 +1,80 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file test_murata_ncu15xh103f6sxx.c + * @author foxBMS Team + * @date 2022-10-13 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup UNIT_TEST_IMPLEMENTATION + * @prefix TEST + * + * @brief Tests for the epcos_b57861s0103f045 module + * + */ + +/*========== Includes =======================================================*/ +#include "unity.h" + +#include "foxmath.h" +#include "murata_ncu15xh103f6sxx.h" +#include "test_assert_helper.h" + +/*========== Definitions and Implementations for Unit Test ==================*/ + +/*========== Setup and Teardown =============================================*/ +void setUp(void) { +} + +void tearDown(void) { +} + +/*========== Test Cases =====================================================*/ +void testTS_Mur00GetTemperatureFromLutFixedValues(void) { + TEST_ASSERT_EQUAL_INT16(INT16_MAX, TS_Mur00GetTemperatureFromLut(0u)); + TEST_ASSERT_EQUAL_INT16(INT16_MIN, TS_Mur00GetTemperatureFromLut(4000u)); + TEST_ASSERT_EQUAL_INT16(139, TS_Mur00GetTemperatureFromLut(2000u)); +} + +void testTS_Mur00GetTemperatureFromPolynomialFixedValues(void) { + TEST_ASSERT_FAIL_ASSERT(TS_Mur00GetTemperatureFromPolynomial(100u)); +} diff --git a/tests/unit/app/driver/ts/test_beta.c b/tests/unit/app/driver/ts/test_beta.c index fbf16126..ebc95f89 100644 --- a/tests/unit/app/driver/ts/test_beta.c +++ b/tests/unit/app/driver/ts/test_beta.c @@ -43,8 +43,8 @@ * @file test_beta.c * @author foxBMS Team * @date 2020-03-13 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix BETA * diff --git a/tests/unit/app/driver/ts/vishay/ntcalug01a103g/lookup-table/test_vishay_ntcalug01a103g_lookup-table.c b/tests/unit/app/driver/ts/vishay/ntcalug01a103g/lookup-table/test_vishay_ntcalug01a103g_lookup-table.c index 544f33db..61be7e30 100644 --- a/tests/unit/app/driver/ts/vishay/ntcalug01a103g/lookup-table/test_vishay_ntcalug01a103g_lookup-table.c +++ b/tests/unit/app/driver/ts/vishay/ntcalug01a103g/lookup-table/test_vishay_ntcalug01a103g_lookup-table.c @@ -43,8 +43,8 @@ * @file test_vishay_ntcalug01a103g_lookup-table.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/vishay/ntcalug01a103g/polynomial/test_vishay_ntcalug01a103g_polynomial.c b/tests/unit/app/driver/ts/vishay/ntcalug01a103g/polynomial/test_vishay_ntcalug01a103g_polynomial.c index d9cc7e51..5d38bd47 100644 --- a/tests/unit/app/driver/ts/vishay/ntcalug01a103g/polynomial/test_vishay_ntcalug01a103g_polynomial.c +++ b/tests/unit/app/driver/ts/vishay/ntcalug01a103g/polynomial/test_vishay_ntcalug01a103g_polynomial.c @@ -43,8 +43,8 @@ * @file test_vishay_ntcalug01a103g_polynomial.c * @author foxBMS Team * @date 2020-08-25 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/vishay/ntcalug01a103g/test_vishay_ntcalug01a103g.c b/tests/unit/app/driver/ts/vishay/ntcalug01a103g/test_vishay_ntcalug01a103g.c index 0fed8d46..27e49406 100644 --- a/tests/unit/app/driver/ts/vishay/ntcalug01a103g/test_vishay_ntcalug01a103g.c +++ b/tests/unit/app/driver/ts/vishay/ntcalug01a103g/test_vishay_ntcalug01a103g.c @@ -43,8 +43,8 @@ * @file test_vishay_ntcalug01a103g.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/vishay/ntcle317e4103sba/lookup-table/test_vishay_ntcle317e4103sba_lookup-table.c b/tests/unit/app/driver/ts/vishay/ntcle317e4103sba/lookup-table/test_vishay_ntcle317e4103sba_lookup-table.c index 333cde07..f101b0be 100644 --- a/tests/unit/app/driver/ts/vishay/ntcle317e4103sba/lookup-table/test_vishay_ntcle317e4103sba_lookup-table.c +++ b/tests/unit/app/driver/ts/vishay/ntcle317e4103sba/lookup-table/test_vishay_ntcle317e4103sba_lookup-table.c @@ -43,8 +43,8 @@ * @file test_vishay_ntcle317e4103sba_lookup-table.c * @author foxBMS Team * @date 2021-11-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/driver/ts/vishay/ntcle317e4103sba/test_vishay_ntcle317e4103sba.c b/tests/unit/app/driver/ts/vishay/ntcle317e4103sba/test_vishay_ntcle317e4103sba.c index 0fbf8223..14e91701 100644 --- a/tests/unit/app/driver/ts/vishay/ntcle317e4103sba/test_vishay_ntcle317e4103sba.c +++ b/tests/unit/app/driver/ts/vishay/ntcle317e4103sba/test_vishay_ntcle317e4103sba.c @@ -43,8 +43,8 @@ * @file test_vishay_ntcle317e4103sba.c * @author foxBMS Team * @date 2021-11-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/config/test_database_cfg.c b/tests/unit/app/engine/config/test_database_cfg.c index 9dd14a87..037c5720 100644 --- a/tests/unit/app/engine/config/test_database_cfg.c +++ b/tests/unit/app/engine/config/test_database_cfg.c @@ -43,8 +43,8 @@ * @file test_database_cfg.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/config/test_diag_cfg.c b/tests/unit/app/engine/config/test_diag_cfg.c index d4b7dbdc..816b7c77 100644 --- a/tests/unit/app/engine/config/test_diag_cfg.c +++ b/tests/unit/app/engine/config/test_diag_cfg.c @@ -43,8 +43,8 @@ * @file test_diag_cfg.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/config/test_sys_cfg.c b/tests/unit/app/engine/config/test_sys_cfg.c index bde37f00..0e1682d2 100644 --- a/tests/unit/app/engine/config/test_sys_cfg.c +++ b/tests/unit/app/engine/config/test_sys_cfg.c @@ -43,8 +43,8 @@ * @file test_sys_cfg.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -55,6 +55,7 @@ /*========== Includes =======================================================*/ #include "unity.h" #include "Mockcan.h" +#include "Mockcan_cfg_tx_boot-message.h" #include "sys_cfg.h" @@ -69,7 +70,7 @@ void tearDown(void) { /*========== Test Cases =====================================================*/ void testSysSendBootMessageExists(void) { - CAN_TransmitBootMessage_IgnoreAndReturn(STD_OK); - CAN_TransmitDieId_IgnoreAndReturn(STD_OK); + CANTX_TransmitBootMessage_IgnoreAndReturn(STD_OK); + CANTX_TransmitDieId_IgnoreAndReturn(STD_OK); SYS_SendBootMessage(); } diff --git a/tests/unit/app/engine/config/test_sys_mon_cfg.c b/tests/unit/app/engine/config/test_sys_mon_cfg.c index 2e95816f..33e7ab6d 100644 --- a/tests/unit/app/engine/config/test_sys_mon_cfg.c +++ b/tests/unit/app/engine/config/test_sys_mon_cfg.c @@ -43,8 +43,8 @@ * @file test_sys_mon_cfg.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/database/test_database.c b/tests/unit/app/engine/database/test_database.c index 825857c0..6c95e236 100644 --- a/tests/unit/app/engine/database/test_database.c +++ b/tests/unit/app/engine/database/test_database.c @@ -43,8 +43,8 @@ * @file test_database.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/database/test_database_helper.c b/tests/unit/app/engine/database/test_database_helper.c index f81f1183..0e27f30d 100644 --- a/tests/unit/app/engine/database/test_database_helper.c +++ b/tests/unit/app/engine/database/test_database_helper.c @@ -43,8 +43,8 @@ * @file test_database_helper.c * @author foxBMS Team * @date 2021-05-05 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_afe.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_afe.c index 33a7a85d..648bfbaf 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_afe.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_afe.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_afe.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_bms.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_bms.c new file mode 100644 index 00000000..0a28cd9c --- /dev/null +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_bms.c @@ -0,0 +1,118 @@ +/** + * + * @copyright © 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * We kindly request you to use one or more of the following phrases to refer to + * foxBMS in your hardware, software, documentation or advertising materials: + * + * - ″This product uses parts of foxBMS®″ + * - ″This product includes parts of foxBMS®″ + * - ″This product is derived from foxBMS®″ + * + */ + +/** + * @file test_diag_cbs_bms.c + * @author foxBMS Team + * @date 2022-07-27 (date of creation) + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 + * @ingroup UNIT_TEST_IMPLEMENTATION + * @prefix TEST + * + * @brief Test of the BMS diag handler implementation. + * + */ + +/*========== Includes =======================================================*/ +#include "unity.h" +#include "Mockdiag_cfg.h" + +#include "diag_cbs.h" +#include "test_assert_helper.h" + +TEST_FILE("diag_cbs_bms.c") + +/*========== Definitions and Implementations for Unit Test ==================*/ +/** local copy of the #DATA_BLOCK_ERRORSTATE_s table */ +static DATA_BLOCK_ERRORSTATE_s test_tableErrorFlags = {.header.uniqueId = DATA_BLOCK_ID_ERRORSTATE}; + +/** local copy of the #DATA_BLOCK_MOL_FLAG_s table */ +static DATA_BLOCK_MOL_FLAG_s test_tableMolFlags = {.header.uniqueId = DATA_BLOCK_ID_MOL_FLAG}; + +/** local copy of the #DATA_BLOCK_RSL_FLAG_s table */ +static DATA_BLOCK_RSL_FLAG_s test_tableRslFlags = {.header.uniqueId = DATA_BLOCK_ID_RSL_FLAG}; + +/** local copy of the #DATA_BLOCK_MSL_FLAG_s table */ +static DATA_BLOCK_MSL_FLAG_s test_tableMslFlags = {.header.uniqueId = DATA_BLOCK_ID_MSL_FLAG}; + +const DIAG_DATABASE_SHIM_s diag_kpkDatabaseShim = { + .pTableError = &test_tableErrorFlags, + .pTableMol = &test_tableMolFlags, + .pTableRsl = &test_tableRslFlags, + .pTableMsl = &test_tableMslFlags, +}; + +/*========== Setup and Teardown =============================================*/ +void setUp(void) { + diag_kpkDatabaseShim.pTableError->alertFlag = false; +} + +void tearDown(void) { +} + +/*========== Test Cases =====================================================*/ +void testDIAG_AlertFlag(void) { + /* reset event sets the interlock back in ok mode */ + DIAG_AlertFlag(DIAG_ID_ALERT_MODE, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, 0u); + TEST_ASSERT_EQUAL(false, diag_kpkDatabaseShim.pTableError->alertFlag); + /* ok event must not change the interlock state */ + DIAG_AlertFlag(DIAG_ID_ALERT_MODE, DIAG_EVENT_OK, &diag_kpkDatabaseShim, 0u); + TEST_ASSERT_EQUAL(false, diag_kpkDatabaseShim.pTableError->alertFlag); + + /* not ok event sets the alert mode back in not ok mode */ + DIAG_AlertFlag(DIAG_ID_ALERT_MODE, DIAG_EVENT_NOT_OK, &diag_kpkDatabaseShim, 0u); + TEST_ASSERT_EQUAL(true, diag_kpkDatabaseShim.pTableError->alertFlag); + /* Alert mode can not be reset via ok event, therefore the alert mode is still activated */ + DIAG_AlertFlag(DIAG_ID_ALERT_MODE, DIAG_EVENT_OK, &diag_kpkDatabaseShim, 0u); + TEST_ASSERT_EQUAL(true, diag_kpkDatabaseShim.pTableError->alertFlag); + + /* reset event sets the interlock back in ok mode */ + DIAG_AlertFlag(DIAG_ID_ALERT_MODE, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, 0u); + TEST_ASSERT_EQUAL(false, diag_kpkDatabaseShim.pTableError->alertFlag); +} + +/** tests invalid input values */ +void testDIAG_AlertFlagInvalidInput(void) { + TEST_ASSERT_FAIL_ASSERT(DIAG_AlertFlag(DIAG_ID_MAX, DIAG_EVENT_OK, &diag_kpkDatabaseShim, 0u)); + TEST_ASSERT_FAIL_ASSERT(DIAG_AlertFlag(DIAG_ID_ALERT_MODE, 42, &diag_kpkDatabaseShim, 0u)); + TEST_ASSERT_FAIL_ASSERT(DIAG_AlertFlag(DIAG_ID_ALERT_MODE, DIAG_EVENT_OK, NULL_PTR, 0u)); +} diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_can.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_can.c index 9fb8121c..7422192a 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_can.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_can.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_can.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_contactor.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_contactor.c index 7290c84d..4920755d 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_contactor.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_contactor.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_contactor.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -84,8 +84,9 @@ const DIAG_DATABASE_SHIM_s diag_kpkDatabaseShim = { /*========== Setup and Teardown =============================================*/ void setUp(void) { for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { - diag_kpkDatabaseShim.pTableError->stringContactor[s] = 0u; - diag_kpkDatabaseShim.pTableError->prechargeContactor[s] = 0u; + diag_kpkDatabaseShim.pTableError->stringMinusContactor[s] = 0u; + diag_kpkDatabaseShim.pTableError->stringPlusContactor[s] = 0u; + diag_kpkDatabaseShim.pTableError->prechargeContactor[s] = 0u; } } @@ -97,47 +98,50 @@ void tearDown(void) { void testDiagContactorStringContactorFeedback(void) { for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { /* reset event sets the string contactor feedback back in ok mode */ - DIAG_StringContactorFeedback(DIAG_ID_STRING_CONTACTOR_FEEDBACK, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, s); + DIAG_StringContactorFeedback( + DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, s); } for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { /* reset event sets the string contactor feedback back in ok mode */ - TEST_ASSERT_EQUAL(0, diag_kpkDatabaseShim.pTableError->stringContactor[s]); + TEST_ASSERT_EQUAL(0, diag_kpkDatabaseShim.pTableError->stringMinusContactor[s]); } for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { /* reset event sets the string contactor feedback back in ok mode */ - DIAG_StringContactorFeedback(DIAG_ID_STRING_CONTACTOR_FEEDBACK, DIAG_EVENT_OK, &diag_kpkDatabaseShim, s); + DIAG_StringContactorFeedback(DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, DIAG_EVENT_OK, &diag_kpkDatabaseShim, s); } for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { /* reset event sets the string contactor feedback back in ok mode */ - TEST_ASSERT_EQUAL(0, diag_kpkDatabaseShim.pTableError->stringContactor[s]); + TEST_ASSERT_EQUAL(0, diag_kpkDatabaseShim.pTableError->stringMinusContactor[s]); } /* not ok event sets the string contactor feedback back in not ok mode */ for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { /* reset event sets the string contactor feedback back in ok mode */ - DIAG_StringContactorFeedback(DIAG_ID_STRING_CONTACTOR_FEEDBACK, DIAG_EVENT_NOT_OK, &diag_kpkDatabaseShim, s); + DIAG_StringContactorFeedback( + DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, DIAG_EVENT_NOT_OK, &diag_kpkDatabaseShim, s); } for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { /* reset event sets the string contactor feedback back in ok mode */ - TEST_ASSERT_EQUAL(1, diag_kpkDatabaseShim.pTableError->stringContactor[s]); + TEST_ASSERT_EQUAL(1, diag_kpkDatabaseShim.pTableError->stringMinusContactor[s]); } /* string contactor feedback can be resetted via ok event (instead a reset is required), therefore the * string contactor feedback must stay in not ok mode */ for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { - DIAG_StringContactorFeedback(DIAG_ID_STRING_CONTACTOR_FEEDBACK, DIAG_EVENT_OK, &diag_kpkDatabaseShim, s); + DIAG_StringContactorFeedback(DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, DIAG_EVENT_OK, &diag_kpkDatabaseShim, s); } for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { - TEST_ASSERT_EQUAL(1, diag_kpkDatabaseShim.pTableError->stringContactor[s]); + TEST_ASSERT_EQUAL(1, diag_kpkDatabaseShim.pTableError->stringMinusContactor[s]); } /* reset event sets the string contactor feedback back in ok mode */ for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { - DIAG_StringContactorFeedback(DIAG_ID_STRING_CONTACTOR_FEEDBACK, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, s); + DIAG_StringContactorFeedback( + DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, s); } for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { - TEST_ASSERT_EQUAL(0, diag_kpkDatabaseShim.pTableError->stringContactor[s]); + TEST_ASSERT_EQUAL(0, diag_kpkDatabaseShim.pTableError->stringMinusContactor[s]); } } @@ -191,23 +195,13 @@ void testDiagContactorPrechargeContactorFeedback(void) { } } -void testDIAG_DoNothingOnWrongIdContactorModule(void) { - uint8_t testValue = 42; - for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { - diag_kpkDatabaseShim.pTableError->stringContactor[s] = testValue; - diag_kpkDatabaseShim.pTableError->prechargeContactor[s] = testValue; - testValue++; - } - +void testDIAG_AssertOnWrongIdContactorModule(void) { /* Use a wrong ID to make sure, that this does not alter the CAN entry */ for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { - DIAG_PrechargeContactorFeedback( - DIAG_ID_CELL_VOLTAGE_OVERVOLTAGE_RSL, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, s); - DIAG_StringContactorFeedback(DIAG_ID_CELL_VOLTAGE_OVERVOLTAGE_RSL, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, s); - } - for (uint8_t s = 0; s < BS_NR_OF_STRINGS; s++) { - TEST_ASSERT_EQUAL(testValue - BS_NR_OF_STRINGS + s, diag_kpkDatabaseShim.pTableError->prechargeContactor[s]); - TEST_ASSERT_EQUAL(testValue - BS_NR_OF_STRINGS + s, diag_kpkDatabaseShim.pTableError->stringContactor[s]); + TEST_ASSERT_FAIL_ASSERT(DIAG_PrechargeContactorFeedback( + DIAG_ID_CELL_VOLTAGE_OVERVOLTAGE_RSL, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, s)); + TEST_ASSERT_FAIL_ASSERT(DIAG_StringContactorFeedback( + DIAG_ID_CELL_VOLTAGE_OVERVOLTAGE_RSL, DIAG_EVENT_RESET, &diag_kpkDatabaseShim, s)); } } @@ -215,11 +209,11 @@ void testDIAG_DoNothingOnWrongIdContactorModule(void) { void testDIAG_StringContactorFeedbackInvalidInput(void) { TEST_ASSERT_FAIL_ASSERT(DIAG_StringContactorFeedback(DIAG_ID_MAX, DIAG_EVENT_OK, &diag_kpkDatabaseShim, 0u)); TEST_ASSERT_FAIL_ASSERT( - DIAG_StringContactorFeedback(DIAG_ID_STRING_CONTACTOR_FEEDBACK, 42, &diag_kpkDatabaseShim, 0u)); + DIAG_StringContactorFeedback(DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, 42, &diag_kpkDatabaseShim, 0u)); TEST_ASSERT_FAIL_ASSERT( - DIAG_StringContactorFeedback(DIAG_ID_STRING_CONTACTOR_FEEDBACK, DIAG_EVENT_OK, NULL_PTR, 0u)); + DIAG_StringContactorFeedback(DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, DIAG_EVENT_OK, NULL_PTR, 0u)); TEST_ASSERT_FAIL_ASSERT(DIAG_StringContactorFeedback( - DIAG_ID_STRING_CONTACTOR_FEEDBACK, DIAG_EVENT_OK, &diag_kpkDatabaseShim, BS_NR_OF_STRINGS)); + DIAG_ID_STRING_MINUS_CONTACTOR_FEEDBACK, DIAG_EVENT_OK, &diag_kpkDatabaseShim, BS_NR_OF_STRINGS)); } /** tests invalid input values */ diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_current-sensor.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_current-sensor.c index f4ae107e..766dc4be 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_current-sensor.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_current-sensor.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_current-sensor.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_current.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_current.c index 31c39614..1d1aa7d2 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_current.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_current.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_current.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_deep-discharge.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_deep-discharge.c index 767046ab..ead4238b 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_deep-discharge.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_deep-discharge.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_deep-discharge.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_dummy.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_dummy.c index 7e30d76c..87e09789 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_dummy.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_dummy.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_dummy.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_fram.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_fram.c index 117a67f6..13d25ea7 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_fram.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_fram.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_fram.c * @author foxBMS Team * @date 2022-02-24 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_i2c.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_i2c.c index ff07359b..75d9c430 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_i2c.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_i2c.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_i2c.c * @author foxBMS Team * @date 2021-09-29 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_insulation.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_insulation.c index 5f04e291..ce695330 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_insulation.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_insulation.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_insulation.c * @author foxBMS Team * @date 2021-02-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_interlock.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_interlock.c index 54385746..037f0579 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_interlock.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_interlock.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_interlock.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_plausibility.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_plausibility.c index 51556a08..980a4880 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_plausibility.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_plausibility.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_plausibility.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_power-measurement.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_power-measurement.c index ecd013db..2c983d47 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_power-measurement.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_power-measurement.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_power-measurement.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_sbc.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_sbc.c index 9d6b4d40..1d2a5730 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_sbc.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_sbc.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_sbc.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_sys-mon.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_sys-mon.c index 1c41e697..2567a449 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_sys-mon.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_sys-mon.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_sys-mon.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_temperature.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_temperature.c index 9cfb610a..f4bb7fcd 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_temperature.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_temperature.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_temperature.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/cbs/test_diag_cbs_voltage.c b/tests/unit/app/engine/diag/cbs/test_diag_cbs_voltage.c index 3edaaf64..b160ac35 100644 --- a/tests/unit/app/engine/diag/cbs/test_diag_cbs_voltage.c +++ b/tests/unit/app/engine/diag/cbs/test_diag_cbs_voltage.c @@ -43,8 +43,8 @@ * @file test_diag_cbs_voltage.c * @author foxBMS Team * @date 2021-02-17 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/diag/test_diag.c b/tests/unit/app/engine/diag/test_diag.c index f7ec5c86..aa4708c3 100644 --- a/tests/unit/app/engine/diag/test_diag.c +++ b/tests/unit/app/engine/diag/test_diag.c @@ -43,8 +43,8 @@ * @file test_diag.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/hwinfo/test_masterinfo.c b/tests/unit/app/engine/hwinfo/test_masterinfo.c index 67bfd7e6..da62e08b 100644 --- a/tests/unit/app/engine/hwinfo/test_masterinfo.c +++ b/tests/unit/app/engine/hwinfo/test_masterinfo.c @@ -43,8 +43,8 @@ * @file test_masterinfo.c * @author foxBMS Team * @date 2020-07-09 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/sys/test_sys.c b/tests/unit/app/engine/sys/test_sys.c index 68d2f693..3e9f27a1 100644 --- a/tests/unit/app/engine/sys/test_sys.c +++ b/tests/unit/app/engine/sys/test_sys.c @@ -43,8 +43,8 @@ * @file test_sys.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/engine/sys_mon/test_sys_mon.c b/tests/unit/app/engine/sys_mon/test_sys_mon.c index f123a083..092e8a21 100644 --- a/tests/unit/app/engine/sys_mon/test_sys_mon.c +++ b/tests/unit/app/engine/sys_mon/test_sys_mon.c @@ -43,8 +43,8 @@ * @file test_sys_mon.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/main/test_fassert.c b/tests/unit/app/main/test_fassert.c index d05ace33..e0944a70 100644 --- a/tests/unit/app/main/test_fassert.c +++ b/tests/unit/app/main/test_fassert.c @@ -43,8 +43,8 @@ * @file test_fassert.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/main/test_fstartup.c b/tests/unit/app/main/test_fstartup.c index 5d7ef7f7..ff15269f 100644 --- a/tests/unit/app/main/test_fstartup.c +++ b/tests/unit/app/main/test_fstartup.c @@ -43,8 +43,8 @@ * @file test_fstartup.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/main/test_main.c b/tests/unit/app/main/test_main.c index c4d06a4c..55403b21 100644 --- a/tests/unit/app/main/test_main.c +++ b/tests/unit/app/main/test_main.c @@ -43,8 +43,8 @@ * @file test_main.c * @author foxBMS Team * @date 2020-04-01 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/task/config/test_ftask_cfg.c b/tests/unit/app/task/config/test_ftask_cfg.c index 887f98ff..49115f80 100644 --- a/tests/unit/app/task/config/test_ftask_cfg.c +++ b/tests/unit/app/task/config/test_ftask_cfg.c @@ -43,8 +43,8 @@ * @file test_ftask_cfg.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -98,9 +98,9 @@ TaskHandle_t ftsk_taskHandleAfe; #define FTSK_DATA_QUEUE_LENGTH (1u) #define FTSK_DATA_QUEUE_ITEM_SIZE (sizeof(DATA_QUEUE_MESSAGE_s)) #define FTSK_IMD_QUEUE_LENGTH (5u) -#define FTSK_IMD_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s)) +#define FTSK_IMD_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFER_ELEMENT_s)) #define FTSK_CAN_RX_QUEUE_LENGTH (50u) -#define FTSK_CAN_RX_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s)) +#define FTSK_CAN_RX_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFER_ELEMENT_s)) volatile OS_BOOT_STATE_e os_boot = OS_OFF; volatile OS_TIMER_s os_timer = {0, 0, 0, 0, 0, 0, 0}; diff --git a/tests/unit/app/task/ftask/freertos/test_ftask_freertos.c b/tests/unit/app/task/ftask/freertos/test_ftask_freertos.c index 3678e262..8878df5f 100644 --- a/tests/unit/app/task/ftask/freertos/test_ftask_freertos.c +++ b/tests/unit/app/task/ftask/freertos/test_ftask_freertos.c @@ -43,8 +43,8 @@ * @file test_ftask_freertos.c * @author foxBMS Team * @date 2021-11-26 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/task/ftask/test_ftask.c b/tests/unit/app/task/ftask/test_ftask.c index 82947e85..662ad5d2 100644 --- a/tests/unit/app/task/ftask/test_ftask.c +++ b/tests/unit/app/task/ftask/test_ftask.c @@ -43,8 +43,8 @@ * @file test_ftask.c * @author foxBMS Team * @date 2020-04-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * @@ -97,9 +97,9 @@ TaskHandle_t ftsk_taskHandleAfe; #define FTSK_DATA_QUEUE_LENGTH (1u) #define FTSK_DATA_QUEUE_ITEM_SIZE (sizeof(DATA_QUEUE_MESSAGE_s)) #define FTSK_IMD_QUEUE_LENGTH (5u) -#define FTSK_IMD_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s)) +#define FTSK_IMD_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFER_ELEMENT_s)) #define FTSK_CAN_RX_QUEUE_LENGTH (50u) -#define FTSK_CAN_RX_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFERELEMENT_s)) +#define FTSK_CAN_RX_QUEUE_ITEM_SIZE (sizeof(CAN_BUFFER_ELEMENT_s)) volatile OS_BOOT_STATE_e os_boot = OS_OFF; volatile OS_TIMER_s os_timer = {0, 0, 0, 0, 0, 0, 0}; diff --git a/tests/unit/app/task/os/freertos/test_os_freertos.c b/tests/unit/app/task/os/freertos/test_os_freertos.c index ec48f5ea..76775c8f 100644 --- a/tests/unit/app/task/os/freertos/test_os_freertos.c +++ b/tests/unit/app/task/os/freertos/test_os_freertos.c @@ -43,8 +43,8 @@ * @file test_os_freertos.c * @author foxBMS Team * @date 2021-11-26 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/app/task/os/test_os.c b/tests/unit/app/task/os/test_os.c index aac4afb4..b902ec17 100644 --- a/tests/unit/app/task/os/test_os.c +++ b/tests/unit/app/task/os/test_os.c @@ -43,8 +43,8 @@ * @file test_os.c * @author foxBMS Team * @date 2020-03-13 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix OS * diff --git a/tests/unit/doxygen_tests.h b/tests/unit/doxygen_tests.h index 53169d60..04861c8d 100644 --- a/tests/unit/doxygen_tests.h +++ b/tests/unit/doxygen_tests.h @@ -43,8 +43,8 @@ * @file doxygen_tests.h * @author foxBMS Team * @date 2019-06-02 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix DX * diff --git a/tests/unit/opt/cells/config/test_lg_inr18650mj1.c b/tests/unit/opt/cells/config/test_lg_inr18650mj1.c index 5bcf90f4..35d31408 100644 --- a/tests/unit/opt/cells/config/test_lg_inr18650mj1.c +++ b/tests/unit/opt/cells/config/test_lg_inr18650mj1.c @@ -43,8 +43,8 @@ * @file test_lg_inr18650mj1.c * @author foxBMS Team * @date 2020-07-31 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/support/test_algorithm_stubs.h b/tests/unit/support/test_algorithm_stubs.h index 3e17b0c6..bc73859e 100644 --- a/tests/unit/support/test_algorithm_stubs.h +++ b/tests/unit/support/test_algorithm_stubs.h @@ -43,8 +43,8 @@ * @file test_algorithm_stubs.h * @author foxBMS Team * @date 2020-12-09 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/support/test_assert_helper.h b/tests/unit/support/test_assert_helper.h index 43a42bbd..57d98bd2 100644 --- a/tests/unit/support/test_assert_helper.h +++ b/tests/unit/support/test_assert_helper.h @@ -43,8 +43,8 @@ * @file test_assert_helper.h * @author foxBMS Team * @date 2020-07-22 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/support/test_can_mpu_prototype_queue_create_stub.h b/tests/unit/support/test_can_mpu_prototype_queue_create_stub.h index d36744f5..5c020a53 100644 --- a/tests/unit/support/test_can_mpu_prototype_queue_create_stub.h +++ b/tests/unit/support/test_can_mpu_prototype_queue_create_stub.h @@ -43,8 +43,8 @@ * @file test_can_mpu_prototype_queue_create_stub.h * @author foxBMS Team * @date 2021-06-09 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/unit/support/test_pec_helper.h b/tests/unit/support/test_pec_helper.h index ec90f63f..9651e09d 100644 --- a/tests/unit/support/test_pec_helper.h +++ b/tests/unit/support/test_pec_helper.h @@ -43,8 +43,8 @@ * @file test_pec_helper.h * @author foxBMS Team * @date 2020-12-16 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup UNIT_TEST_IMPLEMENTATION * @prefix TEST * diff --git a/tests/variants/lib-build/lib-build_main.c b/tests/variants/lib-build/lib-build_main.c index 72895abe..fee45ba6 100644 --- a/tests/variants/lib-build/lib-build_main.c +++ b/tests/variants/lib-build/lib-build_main.c @@ -43,8 +43,8 @@ * @file lib-build_main.c * @author foxBMS Team * @date 2020-10-06 (date of creation) - * @updated 2022-07-28 (date of last update) - * @version v1.4.0 + * @updated 2022-10-27 (date of last update) + * @version v1.4.1 * @ingroup GENERAL * @prefix TODO * diff --git a/tools/dbc/foxbms.dbc b/tools/dbc/foxbms.dbc index 1c92c6b3..7b37af41 100644 --- a/tools/dbc/foxbms.dbc +++ b/tools/dbc/foxbms.dbc @@ -32,24 +32,16 @@ SG_ foxBMS_inletTemperature : 39|8@0- (1,0) [-128|127] "degC" Vector__XXX SG_ foxBMS_outletTemperature : 47|8@0- (1,0) [-128|127] "degC" Vector__XXX -BO_ 640 foxBMS_StringValues: 8 Vector__XXX -SG_ foxBMS_StringValues_Mux M : 7|3@0+ (1,0) [0|0] "" Vector__XXX -SG_ foxBMS_String0_current m0 : 19|18@0- (0.01,0) [-1310.72|1310.71] "A" Vector__XXX -SG_ foxBMS_String0_voltage m0 : 4|17@0+ (0.01,0) [0|1310.71] "V" Vector__XXX -SG_ foxBMS_String0_power m0 : 33|18@0- (0.01,0) [-1310.72|1310.71] "kW" Vector__XXX -SG_ foxBMS_String1_current m1 : 19|18@0- (0.01,0) [-1310.72|1310.71] "A" Vector__XXX -SG_ foxBMS_String1_voltage m1 : 4|17@0+ (0.01,0) [0|1310.71] "V" Vector__XXX -SG_ foxBMS_String1_power m1 : 33|18@0- (0.01,0) [-1310.72|1310.71] "kW" Vector__XXX -SG_ foxBMS_String2_current m2 : 19|18@0- (0.01,0) [-1310.72|1310.71] "A" Vector__XXX -SG_ foxBMS_String2_voltage m2 : 4|17@0+ (0.01,0) [0|1310.71] "V" Vector__XXX -SG_ foxBMS_String2_power m2 : 33|18@0- (0.01,0) [-1310.72|1310.71] "kW" Vector__XXX +BO_ 640 foxBMS_StringValuesP0: 8 Vector__XXX +SG_ foxBMS_StringValuesP0_Mux M : 7|3@0+ (1,0) [0|0] "" Vector__XXX +SG_ foxBMS_String0Current : 19|18@0- (0.01,0) [-1310.72|1310.71] "A" Vector__XXX +SG_ foxBMS_String0Voltage : 4|17@0+ (0.01,0) [0|1310.71] "V" Vector__XXX +SG_ foxBMS_String0Power : 33|18@0- (0.01,0) [-1310.72|1310.71] "kW" Vector__XXX -BO_ 643 foxBMS_StringValues2: 8 Vector__XXX -SG_ foxBMS_StringValues2_Mux M : 7|4@0+ (1,0) [0|0] "" Vector__XXX -SG_ String0_energyCount m0 : 15|32@0- (1,0) [-2147483648|2147483647] "Wh" Vector__XXX -SG_ String1_energyCount m1 : 15|32@0- (1,0) [-2147483648|2147483647] "Wh" Vector__XXX -SG_ String2_energyCount m2 : 15|32@0- (1,0) [-2147483648|2147483647] "Wh" Vector__XXX +BO_ 643 foxBMS_StringValuesP1: 8 Vector__XXX +SG_ foxBMS_StringValuesP1_Mux M : 7|4@0+ (1,0) [0|0] "" Vector__XXX +SG_ foxBMS_String0EnergyCount : 15|32@0- (1,0) [-2147483648|2147483647] "Wh" Vector__XXX BO_ 549 foxBMS_PackStateEstimation: 8 Vector__XXX @@ -59,8 +51,8 @@ SG_ foxBMS_packEnergy : 47|24@0+ (0.01,0) [0|167772.15] "kWh" Vector__XXX SG_ foxBMS_packSoh : 27|12@0+ (0.025,0) [0|102.375] "%" Vector__XXX -BO_ 576 foxBMS_CellVoltage: 8 Vector__XXX -SG_ foxBMS_CellVoltage_Mux M : 7|8@0+ (1,0) [0|0] "" Vector__XXX +BO_ 576 foxBMS_CellVoltages: 8 Vector__XXX +SG_ foxBMS_CellVoltages_Mux M : 7|8@0+ (1,0) [0|0] "" Vector__XXX SG_ cellVoltage_000_invalidFlag m0 : 12|1@0+ (1,0) [0|1] "" Vector__XXX SG_ cellVoltage_001_invalidFlag m0 : 13|1@0+ (1,0) [0|1] "" Vector__XXX SG_ cellVoltage_002_invalidFlag m0 : 14|1@0+ (1,0) [0|1] "" Vector__XXX @@ -495,8 +487,8 @@ SG_ cellVoltage_214 m53 : 33|13@0+ (1,0) [0|8191] "mV" Vector__XXX SG_ cellVoltage_215 m53 : 52|13@0+ (1,0) [0|8191] "mV" Vector__XXX -BO_ 592 foxBMS_CellTemperature: 8 Vector__XXX -SG_ foxBMS_CellTemperature_Mux M : 7|8@0+ (1,0) [0|0] "" Vector__XXX +BO_ 592 foxBMS_CellTemperatures: 8 Vector__XXX +SG_ foxBMS_CellTemperatures_Mux M : 7|8@0+ (1,0) [0|0] "" Vector__XXX SG_ cellTemperature_000_invalidFlag m0 : 8|1@0+ (1,0) [0|1] "" Vector__XXX SG_ cellTemperature_001_invalidFlag m0 : 9|1@0+ (1,0) [0|1] "" Vector__XXX SG_ cellTemperature_002_invalidFlag m0 : 10|1@0+ (1,0) [0|1] "" Vector__XXX @@ -859,19 +851,19 @@ SG_ cellTemperature_178 m29 : 55|8@0- (1,0) [-128|127] "degC" Vector__XXX SG_ cellTemperature_179 m29 : 63|8@0- (1,0) [-128|127] "degC" Vector__XXX -BO_ 560 foxBMS_Command: 8 Vector__XXX +BO_ 560 foxBMS_BmsStateRequest: 8 Vector__XXX SG_ foxBMS_modeRequest : 1|2@0+ (1,0) [0|3] "" Vector__XXX SG_ foxBMS_activateBalancing : 8|1@0+ (1,0) [0|1] "" Vector__XXX SG_ foxBMS_balancingThreshold : 23|8@0+ (1,0) [0|255] "mV" Vector__XXX SG_ foxBMS_externallyPrecharged : 3|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_resetFlags : 2|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_chargerConnected : 4|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_disableInsulationMon : 5|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_heaterOverride_ON : 6|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_heaterOverride_OFF : 7|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_resetFlags : 2|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_chargerConnected : 4|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_disableInsulationMon : 5|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_heaterOverride_ON : 6|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_heaterOverride_OFF : 7|1@0+ (1,0) [0|1] "" Vector__XXX -BO_ 544 foxBMS_State: 8 Vector__XXX +BO_ 544 foxBMS_BmsState: 8 Vector__XXX SG_ foxBMS_State : 3|4@0+ (1,0) [0|15] "" Vector__XXX SG_ BMS_nrOfConnectedStrings : 7|4@0+ (1,0) [0|15] "" Vector__XXX SG_ foxBMS_generalError : 10|1@0+ (1,0) [0|1] "" Vector__XXX @@ -894,211 +886,88 @@ SG_ foxBMS_Error_Insulation : 23|1@0+ (1,0) [0|1] "" Vector__XXX SG_ foxBMS_Error_Cantiming : 24|1@0+ (1,0) [0|1] "" Vector__XXX SG_ foxBMS_Error_PackOvercurr_Charge : 25|1@0+ (1,0) [0|1] "" Vector__XXX SG_ foxBMS_Error_PackOvercur_Dischrg : 26|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_SysMonError : 12|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_SysMonError : 12|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_alertFlag : 27|1@0+ (1,0) [0|1] "" Vector__XXX BO_ 545 foxBMS_StringState: 8 Vector__XXX SG_ foxBMS_StringState_Mux M : 3|4@0+ (1,0) [0|0] "" Vector__XXX -SG_ String0_stringConnected m0 : 4|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_balancing_active m0 : 5|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_overtemp_charge m0 : 8|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_undertemp_charge m0 : 9|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_overtemp_discharge m0 : 10|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_undertemp_discharge m0 : 11|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_Overcurrent_charge m0 : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_Overcurre_discharge m0 : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_Overvoltage m0 : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_Undervoltage m0 : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_deep_discharge m0 : 7|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_CS_currentMeas m0 : 43|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_positiveContactor m0 : 32|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_openWire m0 : 49|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_openWireNumber m0 : 63|8@0+ (1,0) [0|255] "" Vector__XXX -SG_ String0_Err_plaus_cell_volt m0 : 52|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_plaus_cell_temp m0 : 51|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_plaus_string_volt m0 : 53|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_slave_hardware m0 : 34|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_dsyChainBase_Comm m0 : 35|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_dsyChainPrim_CRC m0 : 37|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_dsyChainRedun_Comm m0 : 36|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_dsyChainRedun_CRC m0 : 38|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_dsyPrim_voltMeasOor m0 : 39|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_dsyRedun_voltMeasOor m0 : 40|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_dsyPrim_tempMeasOor m0 : 41|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_dsyRedun_tempMeasOor m0 : 42|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_CS_coulombCountMeas m0 : 44|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_CS_energyCountMeas m0 : 45|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_plaus_volt_spread m0 : 55|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_plaus_temp_spread m0 : 54|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String0_fuseBlown m0 : 6|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Warning_overvoltage_MOL m0 : 22|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Warning_undervoltage_MOL m0 : 23|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_chargeOverTemp_MOL m0 : 16|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_dischrgOverTemp_MOL m0 : 18|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_chargeUnderTemp_MOL m0 : 17|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_dischrgUnderTmp_MOL m0 : 19|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_chargeOverCur_MOL m0 : 20|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_dischargOverCur_MOL m0 : 21|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_chargeOverTemp_RSL m0 : 24|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_chargeUnderTemp_RSL m0 : 25|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_dischrgOverTemp_RSL m0 : 26|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_dischrgUnderTmp_RSL m0 : 27|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_chargeOverCur_RSL m0 : 28|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_dischargOverCur_RSL m0 : 29|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_overvoltage_RSL m0 : 30|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Wrng_undervoltage_RSL m0 : 31|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_negativeContactor m0 : 33|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_CS_voltage1Meas m0 : 46|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_CS_voltage2Meas m0 : 47|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String0_Err_CS_voltage3Meas m0 : 48|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_stringConnected m1 : 4|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_balancing_active m1 : 5|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_overtemp_charge m1 : 8|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_undertemp_charge m1 : 9|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_overtemp_discharge m1 : 10|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_undertemp_discharge m1 : 11|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_Overcurrent_charge m1 : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_Overcurre_discharge m1 : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_Overvoltage m1 : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_Undervoltage m1 : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_deep_discharge m1 : 7|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_CS_currentMeas m1 : 43|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_positiveContactor m1 : 32|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_openWire m1 : 49|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_openWireNumber m1 : 63|8@0+ (1,0) [0|255] "" Vector__XXX -SG_ String1_Err_plaus_cell_volt m1 : 52|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_plaus_cell_temp m1 : 51|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_plaus_string_volt m1 : 53|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_slave_hardware m1 : 34|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_dsyChainPrim_Comm m1 : 35|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_dsyChainPrim_CRC m1 : 37|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_dsyChainRedun_Comm m1 : 36|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_dsyChainRedun_CRC m1 : 38|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_dsyPrim_voltMeasOor m1 : 39|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_dsyRedun_voltMeasOor m1 : 40|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_dsyPrim_tempMeasOor m1 : 41|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_dsyRedun_tempMeasOor m1 : 42|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_CS_coulombCountMeas m1 : 44|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_CS_energyCountMeas m1 : 45|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_plaus_volt_spread m1 : 55|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_plaus_temp_spread m1 : 54|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String1_fuseBlown m1 : 6|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Warning_overvoltage_MOL m1 : 22|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Warning_undervoltage_MOL m1 : 23|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_chargeOverTemp_MOL m1 : 16|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_dischrgOverTemp_MOL m1 : 18|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_chargeUnderTemp_MOL m1 : 17|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_dischrgUnderTmp_MOL m1 : 19|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_chargeOverCur_MOL m1 : 20|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_dischargOverCur_MOL m1 : 21|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_chargeOverTemp_RSL m1 : 24|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_chargeUnderTemp_RSL m1 : 25|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_dischrgOverTemp_RSL m1 : 26|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_dischrgUnderTmp_RSL m1 : 27|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_chargeOverCur_RSL m1 : 28|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_dischargOverCur_RSL m1 : 29|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_overvoltage_RSL m1 : 30|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Wrng_undervoltage_RSL m1 : 31|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_negativeContactor m1 : 33|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_CS_voltage1Meas m1 : 46|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_CS_voltage2Meas m1 : 47|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String1_Err_CS_voltage3Meas m1 : 48|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_stringConnected m2 : 4|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_balancing_active m2 : 5|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_overtemp_charge m2 : 8|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_undertemp_charge m2 : 9|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_overtemp_discharge m2 : 10|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_undertemp_discharge m2 : 11|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_Overcurrent_charge m2 : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_Overcurre_discharge m2 : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_Overvoltage m2 : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_Undervoltage m2 : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_deep_discharge m2 : 7|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_CS_currentMeas m2 : 43|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_positiveContactor m2 : 32|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_openWire m2 : 49|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_openWireNumber m2 : 63|8@0+ (1,0) [0|255] "" Vector__XXX -SG_ String2_Err_plaus_cell_volt m2 : 52|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_plaus_cell_temp m2 : 51|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_plaus_string_volt m2 : 53|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_slave_hardware m2 : 34|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_dsyChainPrim_Comm m2 : 35|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_dsyChainPrim_CRC m2 : 37|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_dsyChainRedun_Comm m2 : 36|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_dsyChainRedun_CRC m2 : 38|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_dsyPrim_voltMeasOor m2 : 39|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_dsyRedun_voltMeasOor m2 : 40|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_dsyPrim_tempMeasOor m2 : 41|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_dsyRedun_tempMeasOor m2 : 42|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_CS_coulombCountMeas m2 : 44|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_CS_energyCountMeas m2 : 45|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_plaus_volt_spread m2 : 55|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_plaus_temp_spread m2 : 54|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ String2_fuseBlown m2 : 6|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Warning_overvoltage_MOL m2 : 22|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Warning_undervoltage_MOL m2 : 23|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_chargeOverTemp_MOL m2 : 16|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_dischrgOverTemp_MOL m2 : 18|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_chargeUnderTemp_MOL m2 : 17|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_dischrgUnderTmp_MOL m2 : 19|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_chargeOverCur_MOL m2 : 20|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_dischargOverCur_MOL m2 : 21|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_chargeOverTemp_RSL m2 : 24|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_chargeUnderTemp_RSL m2 : 25|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_dischrgOverTemp_RSL m2 : 26|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_dischrgUnderTmp_RSL m2 : 27|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_chargeOverCur_RSL m2 : 28|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_dischargOverCur_RSL m2 : 29|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_overvoltage_RSL m2 : 30|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Wrng_undervoltage_RSL m2 : 31|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_negativeContactor m2 : 33|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_CS_voltage1Meas m2 : 46|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_CS_voltage2Meas m2 : 47|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ String2_Err_CS_voltage3Meas m2 : 48|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ String0_stringConnected : 4|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_balancing_active : 5|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_overtemp_charge : 8|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_undertemp_charge : 9|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_overtemp_discharge : 10|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_undertemp_discharge : 11|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_Overcurrent_charge : 12|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_Overcurre_discharge : 13|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_Overvoltage : 14|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_Undervoltage : 15|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_deep_discharge : 7|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_CS_currentMeas : 43|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_positiveContactor : 32|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_openWire : 49|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_openWireNumber : 63|8@0+ (1,0) [0|255] "" Vector__XXX +SG_ String0_Err_plaus_cell_volt : 52|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_plaus_cell_temp : 51|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_plaus_string_volt : 53|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_slave_hardware : 34|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_dsyChainBase_Comm : 35|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_dsyChainPrim_CRC : 37|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_dsyChainRedun_Comm : 36|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_dsyChainRedun_CRC : 38|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_dsyPrim_voltMeasOor : 39|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_dsyRedun_voltMeasOor : 40|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_dsyPrim_tempMeasOor : 41|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_dsyRedun_tempMeasOor : 42|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_CS_coulombCountMeas : 44|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_CS_energyCountMeas : 45|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_plaus_volt_spread : 55|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_plaus_temp_spread : 54|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_fuseBlown : 6|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Warning_overvoltage_MOL : 22|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Warning_undervoltage_MOL : 23|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_chargeOverTemp_MOL : 16|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_dischrgOverTemp_MOL : 18|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_chargeUnderTemp_MOL : 17|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_dischrgUnderTmp_MOL : 19|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_chargeOverCur_MOL : 20|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_dischargOverCur_MOL : 21|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_chargeOverTemp_RSL : 24|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_chargeUnderTemp_RSL : 25|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_dischrgOverTemp_RSL : 26|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_dischrgUnderTmp_RSL : 27|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_chargeOverCur_RSL : 28|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_dischargOverCur_RSL : 29|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_overvoltage_RSL : 30|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Wrng_undervoltage_RSL : 31|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_negativeContactor : 33|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_CS_voltage1Meas : 46|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_CS_voltage2Meas : 47|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ String0_Err_CS_voltage3Meas : 48|1@0+ (1,0) [0|1] "" Vector__XXX BO_ 641 foxBMS_StringMinMaxValues: 8 Vector__XXX SG_ foxBMS_StringMinMaxValues_Mux M : 3|4@0+ (1,0) [0|0] "" Vector__XXX -SG_ String0_minimumCellVoltage m0 : 18|13@0+ (1,0) [0|8191] "mV" Vector__XXX -SG_ String0_maximumCellVoltage m0 : 15|13@0+ (1,0) [0|8191] "mV" Vector__XXX -SG_ String0_maximumCellTemperature m0 : 37|9@0- (0.5,0) [-128|127.5] "degC" Vector__XXX -SG_ String0_minimumCellTemperature m0 : 44|9@0- (0.5,0) [-128|127.5] "degC" Vector__XXX -SG_ String1_minimumCellVoltage m1 : 18|13@0+ (1,0) [0|8191] "mV" Vector__XXX -SG_ String1_maximumCellVoltage m1 : 15|13@0+ (1,0) [0|8191] "mV" Vector__XXX -SG_ String1_maximumCellTemperature m1 : 37|9@0- (0.5,0) [-128|127.5] "degC" Vector__XXX -SG_ String1_minimumCellTemperature m1 : 44|9@0- (0.5,0) [-128|127.5] "degC" Vector__XXX -SG_ String2_minimumCellVoltage m2 : 18|13@0+ (1,0) [0|8191] "mV" Vector__XXX -SG_ String2_maximumCellVoltage m2 : 15|13@0+ (1,0) [0|8191] "mV" Vector__XXX -SG_ String2_maximumCellTemperature m2 : 37|9@0- (0.5,0) [-128|127.5] "degC" Vector__XXX -SG_ String2_minimumCellTemperature m2 : 44|9@0- (0.5,0) [-128|127.5] "degC" Vector__XXX +SG_ String0_minimumCellVoltage : 18|13@0+ (1,0) [0|8191] "mV" Vector__XXX +SG_ String0_maximumCellVoltage : 15|13@0+ (1,0) [0|8191] "mV" Vector__XXX +SG_ String0_maximumCellTemperature : 37|9@0- (0.5,0) [-128|127.5] "degC" Vector__XXX +SG_ String0_minimumCellTemperature : 44|9@0- (0.5,0) [-128|127.5] "degC" Vector__XXX BO_ 642 foxBMS_StringStateEstimation: 8 Vector__XXX SG_ foxBMS_StringStateEstimation_Mux M : 7|4@0+ (1,0) [0|0] "" Vector__XXX -SG_ String0_minimumSOC m0 : 3|9@0+ (0.25,0) [0|127.75] "%" Vector__XXX -SG_ String0_averageSOC m0 : 10|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX -SG_ String0_maximumSOC m0 : 17|9@0+ (0.25,0) [0|63.75] "%" Vector__XXX -SG_ String0_SOE m0 : 24|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX -SG_ String0_Energy_kWh m0 : 54|15@0+ (0.01,0) [0|327.67] "kWh" Vector__XXX -SG_ String0_SOH m0 : 47|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX -SG_ String1_minimumSOC m1 : 3|9@0+ (0.25,0) [0|127.75] "%" Vector__XXX -SG_ String1_averageSOC m1 : 10|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX -SG_ String1_maximumSOC m1 : 17|9@0+ (0.25,0) [0|63.75] "%" Vector__XXX -SG_ String1_SOE m1 : 24|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX -SG_ String1_Energy_kWh m1 : 54|15@0+ (0.01,0) [0|327.67] "kWh" Vector__XXX -SG_ String1_SOH m1 : 47|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX -SG_ String2_minimumSOC m2 : 3|9@0+ (0.25,0) [0|127.75] "%" Vector__XXX -SG_ String2_averageSOC m2 : 10|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX -SG_ String2_maximumSOC m2 : 17|9@0+ (0.25,0) [0|63.75] "%" Vector__XXX -SG_ String2_SOE m2 : 24|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX -SG_ String2_Energy_kWh m2 : 54|15@0+ (0.01,0) [0|327.67] "kWh" Vector__XXX -SG_ String2_SOH m2 : 47|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX +SG_ String0_minimumSOC : 3|9@0+ (0.25,0) [0|127.75] "%" Vector__XXX +SG_ String0_averageSOC : 10|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX +SG_ String0_maximumSOC : 17|9@0+ (0.25,0) [0|63.75] "%" Vector__XXX +SG_ String0_SOE : 24|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX +SG_ String0_Energy_kWh : 54|15@0+ (0.01,0) [0|327.67] "kWh" Vector__XXX +SG_ String0_SOH : 47|9@0+ (0.25,0) [0|127.5] "%" Vector__XXX BO_ 512 foxBMS_Debug: 8 Vector__XXX -BO_ 1313 IVT0_Msg_Result_I: 6 Vector__XXX +BO_ 1313 foxBMS_String0Current: 6 Vector__XXX SG_ IVT0_Result_I_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_I_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_I_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX @@ -1108,7 +977,7 @@ SG_ IVT0_MsgCount_Result_I : 11|4@0+ (1,0) [0|15] "" Vector__XXX SG_ IVT0_Result_I_mA : 23|32@0- (1,0) [-2147483648|2147483647] "mA" Vector__XXX -BO_ 1314 IVT0_Msg_Result_U1: 6 Vector__XXX +BO_ 1314 foxBMS_String0Voltage1: 6 Vector__XXX SG_ IVT0_Result_U1_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_U1_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_U1_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX @@ -1118,7 +987,7 @@ SG_ IVT0_MsgCount_Result_U1 : 11|4@0+ (1,0) [0|15] "" Vector__XXX SG_ IVT0_Result_U1_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX -BO_ 1315 IVT0_Msg_Result_U2: 6 Vector__XXX +BO_ 1315 foxBMS_String0Voltage2: 6 Vector__XXX SG_ IVT0_Result_U2_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_U2_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_U2_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX @@ -1128,7 +997,7 @@ SG_ IVT0_MsgCount_Result_U2 : 11|4@0+ (1,0) [0|15] "" Vector__XXX SG_ IVT0_Result_U2_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX -BO_ 1316 IVT0_Msg_Result_U3: 6 Vector__XXX +BO_ 1316 foxBMS_String0Voltage3: 6 Vector__XXX SG_ IVT0_Result_U3_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_U3_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_U3_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX @@ -1138,7 +1007,7 @@ SG_ IVT0_MsgCount_Result_U3 : 11|4@0+ (1,0) [0|15] "" Vector__XXX SG_ IVT0_Result_U3_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX -BO_ 1317 IVT0_Msg_Result_T: 6 Vector__XXX +BO_ 1317 foxBMS_String0Temperature: 6 Vector__XXX SG_ IVT0_Result_T_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_T_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_T_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX @@ -1148,7 +1017,7 @@ SG_ IVT0_MsgCount_Result_T : 11|4@0+ (1,0) [0|15] "" Vector__XXX SG_ IVT0_Result_T_ddegC : 23|32@0- (0.1,0) [-214748364.8|214748364.7] "ddegC" Vector__XXX -BO_ 1318 IVT0_Msg_Result_W: 6 Vector__XXX +BO_ 1318 foxBMS_String0Power: 6 Vector__XXX SG_ IVT0_Result_W_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_W_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_W_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX @@ -1158,7 +1027,7 @@ SG_ IVT0_MsgCount_Result_W : 11|4@0+ (1,0) [0|15] "" Vector__XXX SG_ IVT0_ID_Result_W : 7|8@0+ (1,0) [5|5] "" Vector__XXX -BO_ 1319 IVT0_Msg_Result_As: 6 Vector__XXX +BO_ 1319 foxBMS_String0CurrentCounter: 6 Vector__XXX SG_ IVT0_Result_As_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_As_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_As_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX @@ -1168,7 +1037,7 @@ SG_ IVT0_MsgCount_Result_As : 11|4@0+ (1,0) [0|15] "" Vector__XXX SG_ IVT0_ID_Result_As : 7|8@0+ (1,0) [6|6] "" Vector__XXX -BO_ 1320 IVT0_Msg_Result_Wh: 6 Vector__XXX +BO_ 1320 foxBMS_String0EnergyCounter: 6 Vector__XXX SG_ IVT0_Result_Wh_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_Wh_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX SG_ IVT0_Result_Wh_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX @@ -1178,188 +1047,28 @@ SG_ IVT0_MsgCount_Result_Wh : 11|4@0+ (1,0) [0|15] "" Vector__XXX SG_ IVT0_ID_Result_Wh : 7|8@0+ (1,0) [7|7] "" Vector__XXX -BO_ 1569 IVT1_Msg_Result_I: 6 Vector__XXX -SG_ IVT1_Result_I_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_I_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_I_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_I_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_ID_Result_I : 7|8@0+ (1,0) [0|255] "" Vector__XXX -SG_ IVT1_MsgCount_Result_I : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT1_Result_I_mA : 23|32@0- (1,0) [-2147483648|2147483647] "mA" Vector__XXX - - -BO_ 1570 IVT1_Msg_Result_U1: 6 Vector__XXX -SG_ IVT1_Result_U1_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U1_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U1_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U1_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_ID_Result_U1 : 7|8@0+ (1,0) [1|1] "" Vector__XXX -SG_ IVT1_MsgCount_Result_U1 : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT1_Result_U1_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX - - -BO_ 1571 IVT1_Msg_Result_U2: 6 Vector__XXX -SG_ IVT1_Result_U2_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U2_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U2_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U2_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_ID_Result_U2 : 7|8@0+ (1,0) [2|2] "" Vector__XXX -SG_ IVT1_MsgCount_Result_U2 : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT1_Result_U2_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX - - -BO_ 1572 IVT1_Msg_Result_U3: 6 Vector__XXX -SG_ IVT1_Result_U3_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U3_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U3_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_U3_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_ID_Result_U3 : 7|8@0+ (1,0) [3|3] "" Vector__XXX -SG_ IVT1_MsgCount_Result_U3 : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT1_Result_U3_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX - - -BO_ 1573 IVT1_Msg_Result_T: 6 Vector__XXX -SG_ IVT1_Result_T_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_T_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_T_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_T_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_ID_Result_T : 7|8@0+ (1,0) [4|4] "" Vector__XXX -SG_ IVT1_MsgCount_Result_T : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT1_Result_T_ddegC : 23|32@0- (0.1,0) [-214748364.8|214748364.7] "ddegC" Vector__XXX - - -BO_ 1574 IVT1_Msg_Result_W: 6 Vector__XXX -SG_ IVT1_Result_W_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_W_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_W_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_W_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_W : 23|32@0- (1,0) [-2147483648|2147483647] "W" Vector__XXX -SG_ IVT1_MsgCount_Result_W : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT1_ID_Result_W : 7|8@0+ (1,0) [5|5] "" Vector__XXX - - -BO_ 1575 IVT1_Msg_Result_As: 6 Vector__XXX -SG_ IVT1_Result_As_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_As_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_As_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_As_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_As : 23|32@0- (1,0) [-2147483648|2147483647] "As" Vector__XXX -SG_ IVT1_MsgCount_Result_As : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT1_ID_Result_As : 7|8@0+ (1,0) [6|6] "" Vector__XXX - - -BO_ 1576 IVT1_Msg_Result_Wh: 6 Vector__XXX -SG_ IVT1_Result_Wh_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_Wh_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_Wh_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_Wh_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT1_Result_Wh : 23|32@0- (1,0) [-2147483648|2147483647] "Wh" Vector__XXX -SG_ IVT1_MsgCount_Result_Wh : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT1_ID_Result_Wh : 7|8@0+ (1,0) [7|7] "" Vector__XXX - - -BO_ 1825 IVT2_Msg_Result_I: 6 Vector__XXX -SG_ IVT2_Result_I_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_I_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_I_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_I_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_ID_Result_I : 7|8@0+ (1,0) [0|255] "" Vector__XXX -SG_ IVT2_MsgCount_Result_I : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT2_Result_I_mA : 23|32@0- (1,0) [-2147483648|2147483647] "mA" Vector__XXX - - -BO_ 1826 IVT2_Msg_Result_U1: 6 Vector__XXX -SG_ IVT2_Result_U1_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U1_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U1_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U1_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_ID_Result_U1 : 7|8@0+ (1,0) [1|1] "" Vector__XXX -SG_ IVT2_MsgCount_Result_U1 : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT2_Result_U1_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX - - -BO_ 1827 IVT2_Msg_Result_U2: 6 Vector__XXX -SG_ IVT2_Result_U2_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U2_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U2_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U2_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_ID_Result_U2 : 7|8@0+ (1,0) [2|2] "" Vector__XXX -SG_ IVT2_MsgCount_Result_U2 : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT2_Result_U2_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX - - -BO_ 1828 IVT2_Msg_Result_U3: 6 Vector__XXX -SG_ IVT2_Result_U3_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U3_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U3_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_U3_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_ID_Result_U3 : 7|8@0+ (1,0) [3|3] "" Vector__XXX -SG_ IVT2_MsgCount_Result_U3 : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT2_Result_U3_mV : 23|32@0- (1,0) [-2147483648|2147483647] "mV" Vector__XXX - - -BO_ 1829 IVT2_Msg_Result_T: 6 Vector__XXX -SG_ IVT2_Result_T_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_T_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_T_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_T_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_ID_Result_T : 7|8@0+ (1,0) [4|4] "" Vector__XXX -SG_ IVT2_MsgCount_Result_T : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT2_Result_T_ddegC : 23|32@0- (0.1,0) [-214748364.8|214748364.7] "ddegC" Vector__XXX - - -BO_ 1830 IVT2_Msg_Result_W: 6 Vector__XXX -SG_ IVT2_Result_W_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_W_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_W_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_W_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_W : 23|32@0- (1,0) [-2147483648|2147483647] "W" Vector__XXX -SG_ IVT2_MsgCount_Result_W : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT2_ID_Result_W : 7|8@0+ (1,0) [5|5] "" Vector__XXX - - -BO_ 1831 IVT2_Msg_Result_As: 6 Vector__XXX -SG_ IVT2_Result_As_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_As_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_As_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_As_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_As : 23|32@0- (1,0) [-2147483648|2147483647] "As" Vector__XXX -SG_ IVT2_MsgCount_Result_As : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT2_ID_Result_As : 7|8@0+ (1,0) [6|6] "" Vector__XXX - - -BO_ 1832 IVT2_Msg_Result_Wh: 6 Vector__XXX -SG_ IVT2_Result_Wh_systemError : 15|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_Wh_OCS : 12|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_Wh_overallMeasError : 14|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_Wh_channelMeasError : 13|1@0+ (1,0) [0|1] "" Vector__XXX -SG_ IVT2_Result_Wh : 23|32@0- (1,0) [-2147483648|2147483647] "Wh" Vector__XXX -SG_ IVT2_MsgCount_Result_Wh : 11|4@0+ (1,0) [0|15] "" Vector__XXX -SG_ IVT2_ID_Result_Wh : 7|8@0+ (1,0) [7|7] "" Vector__XXX - - -BO_ 409 foxBMS_Startup: 8 Vector__XXX +BO_ 409 foxBMS_Boot: 8 Vector__XXX SG_ foxBMS_majorVersionNumber : 7|8@0+ (1,0) [0|255] "" Vector__XXX SG_ foxBMS_minorVersionNumber : 15|8@0+ (1,0) [0|255] "" Vector__XXX SG_ foxBMS_patchVersionNumber : 23|8@0+ (1,0) [0|255] "" Vector__XXX SG_ foxBMS_uniqueId : 39|32@0+ (1,0) [0|4294967295] "" Vector__XXX -SG_ foxBMS_underVersionControl : 24|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_dirtyFlag : 25|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_underVersionControl : 24|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_dirtyFlag : 25|1@0+ (1,0) [0|1] "" Vector__XXX SG_ foxBMS_releaseDistance : 31|5@0+ (1,0) [0|31] "" Vector__XXX -SG_ foxBMS_releaseDistanceOverflow : 26|1@1+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_releaseDistanceOverflow : 26|1@0+ (1,0) [0|1] "" Vector__XXX -BO_ 550 foxBMS_DetailState: 8 Vector__XXX -SG_ foxBMS_TimingViolationEngine : 0|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolation1ms : 1|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolation10ms : 2|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolation100ms : 3|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolation100msAlgo : 4|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolation10msRec : 10|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolation100msRec : 11|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolation100msAlgoR : 12|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolationEngineRec : 8|1@1+ (1,0) [0|1] "" Vector__XXX -SG_ foxBMS_TimingViolation1msRec : 9|1@1+ (1,0) [0|1] "" Vector__XXX +BO_ 550 foxBMS_BmsStateDetails: 8 Vector__XXX +SG_ foxBMS_TimingViolationEngine : 0|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolation1ms : 1|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolation10ms : 2|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolation100ms : 3|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolation100msAlgo : 4|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolation10msRec : 10|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolation100msRec : 11|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolation100msAlgoR : 12|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolationEngineRec : 8|1@0+ (1,0) [0|1] "" Vector__XXX +SG_ foxBMS_TimingViolation1msRec : 9|1@0+ (1,0) [0|1] "" Vector__XXX BO_ 551 foxBMS_DieId: 8 Vector__XXX @@ -1369,31 +1078,29 @@ SG_ MCU_xWaferCoordinate : 51|12@0+ (1,0) [0|1] "" Vector__XXX SG_ MCU_yWaferCoordinate : 47|12@0+ (1,0) [0|1] "" Vector__XXX -CM_ BO_ 546 "(in:can_cbs_tx_system_values.c:CAN_TxPackValues)"; +CM_ BO_ 546 "(in:can_cbs_tx_system-values.c:CANTX_PackValues, fv:tx)"; CM_ SG_ 546 foxBMS_packCurrent "Battery pack current"; CM_ SG_ 546 foxBMS_batteryVoltage "Battery voltage between negative and positive pole of the battery"; CM_ SG_ 546 foxBMS_busVoltage "Battery voltage between negative pole and after main positive contactor"; CM_ SG_ 546 foxBMS_packPower "Battery power"; -CM_ BO_ 548 "(in:can_cbs_tx_limits.c:CAN_TxLimitValues)"; +CM_ BO_ 548 "(in:can_cbs_tx_limit-values.c:CANTX_LimitValues, fv:tx)"; CM_ SG_ 548 foxBMS_maxChargeCurrent "Maximum battery pack charge current"; CM_ SG_ 548 foxBMS_maxDischargeCurrent "Maximum battery pack discharge current"; -CM_ BO_ 547 "(in:can_cbs_tx_minmax.c:CAN_TxMinimumMaximumValues)"; +CM_ BO_ 547 "(in:can_cbs_tx_minimum-maximum-values.c:CANTX_MinimumMaximumValues, fv:tx)"; CM_ SG_ 547 foxBMS_minimumCellVoltage "Minimum cell voltage of all connected strings, if no string connected maximum value of whole system is transmitted"; CM_ SG_ 547 foxBMS_maximumCellVoltage "Maximum cell voltage of all connected strings, if no string connected maximum value of whole system is transmitted"; CM_ SG_ 547 foxBMS_maximumCellTemp "Maximum cell temperature of all connected strings, if no string connected maximum value of whole system is transmitted"; CM_ SG_ 547 foxBMS_minimumCellTemp "Minium cell temperature of all connected string, if no string connected maximum value of whole system is transmitted"; -CM_ BO_ 640 "Message contains string voltage, current and power (in:can_cbs_tx_system_values.c:CAN_TxStringValues)"; -CM_ BO_ 643 "Message contains energy counting value (in:can_cbs_tx_system_values.c:CAN_TxStringValues2)"; -CM_ SG_ 643 String0_energyCount "Current sensor string 0 energy counting value"; -CM_ SG_ 643 String1_energyCount "Current sensor string 1 energy counting value"; -CM_ SG_ 643 String2_energyCount "Current sensor string 2 energy counting value"; -CM_ BO_ 549 "(in:can_cbs_tx_state_estimation.c:CAN_TxStateEstimation)"; +CM_ BO_ 640 "Message contains string voltage, current and power (in:can_cbs_tx_system-values.c:CANTX_StringValuesP0, fv:tx)"; +CM_ BO_ 643 "Message contains energy counting value (in:can_cbs_tx_system-values.c:CANTX_StringValuesP1, fv:tx)"; +CM_ SG_ 643 foxBMS_String0EnergyCount "Current sensor string 0 energy counting value"; +CM_ BO_ 549 "(in:can_cbs_tx_pack-state-estimation.c:CANTX_PackStateEstimation, fv:tx)"; CM_ SG_ 549 foxBMS_packSoc "SOC currently connected to HV bus (100% if all strings connected and all strings at 100%)"; CM_ SG_ 549 foxBMS_packSoe "SOE currently connected to HV bus (100% if all strings connected and all strings at 100%)"; CM_ SG_ 549 foxBMS_packEnergy "Energy left in Wh that is currently connected to HV bus"; -CM_ BO_ 576 "(in:can_cbs_tx_voltage.c:CAN_TxVoltage)"; -CM_ BO_ 592 "(in:can_cbs_tx_temperature.c:CAN_TxCellTemperature)"; -CM_ BO_ 560 "(in:can_cbs_rx_command.c:CAN_RxRequest)"; +CM_ BO_ 576 "(in:can_cbs_tx_cell-voltages.c:CANTX_CellVoltages, fv:tx)"; +CM_ BO_ 592 "(in:can_cbs_tx_cell-temperatures.c:CANTX_CellTemperatures, fv:tx)"; +CM_ BO_ 560 "(in:can_cbs_rx_state-request.c:CANRX_BmsStateRequest, fv:rx)"; CM_ SG_ 560 foxBMS_modeRequest "0x0: Disconnect strings from HV bus, 0x01: Connect strings to HV bus to start discharge, 0x02: Connect strings to HV bus to start charging"; CM_ SG_ 560 foxBMS_activateBalancing "0: Deactivate balancing, 1: Activate balancing"; CM_ SG_ 560 foxBMS_balancingThreshold "Required voltage difference to minimum cell voltage to activate balancing"; @@ -1403,7 +1110,7 @@ CM_ SG_ 560 foxBMS_chargerConnected "0x00: charger not connected, 0x01: charger CM_ SG_ 560 foxBMS_disableInsulationMon "0x00: Check battery system insulation, 0x01: Do not check insulation of battery system"; CM_ SG_ 560 foxBMS_heaterOverride_ON "0: no override active, 1: override active -> force heater on"; CM_ SG_ 560 foxBMS_heaterOverride_OFF "0: no override active, 1: override active -> force heater off"; -CM_ BO_ 544 "Message contains foxBMS state (in:can_cbs_tx_state.c:CAN_TxState)"; +CM_ BO_ 544 "Message contains foxBMS state (in:can_cbs_tx_state.c:CANTX_BmsState, fv:tx)"; CM_ SG_ 544 foxBMS_generalError "0x00: No error detected, 0x01: Error detected"; CM_ SG_ 544 foxBMS_generalWarning "0x00: No warning detected, 0x01: Warning detected"; CM_ SG_ 544 foxBMS_Error_dieTemperatureMCU "0x00: No error, 0x01: Error detected"; @@ -1423,7 +1130,8 @@ CM_ SG_ 544 foxBMS_Error_Cantiming "0x00: No error, 0x01: Error detected"; CM_ SG_ 544 foxBMS_Error_PackOvercurr_Charge "0x00: No error, 0x01: Error detected"; CM_ SG_ 544 foxBMS_Error_PackOvercur_Dischrg "0x00: No error, 0x01: Error detected"; CM_ SG_ 544 foxBMS_SysMonError "If this bit is set, it indicates that a task has violated its timing requirements."; -CM_ BO_ 545 "Message contains string related error and warning flags (in:can_cbs_tx_state.c:CAN_TxStringState)"; +CM_ SG_ 544 foxBMS_alertFlag "foxBMS Alter flag: 0x00: No error, 0x01: Alert flag set"; +CM_ BO_ 545 "Message contains string related error and warning flags (in:can_cbs_tx_state.c:CANTX_StringState, fv:tx)"; CM_ SG_ 545 String0_stringConnected "0x00: String not connected, 0x01: String connected to HV bus"; CM_ SG_ 545 String0_balancing_active "0x00: No balancing active, 0x01: Balancing in this string active"; CM_ SG_ 545 String0_Err_overtemp_charge "0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 45 degree celsius."; @@ -1455,116 +1163,26 @@ CM_ SG_ 545 String0_Err_CS_coulombCountMeas "0x00: No error, 0x01: Error"; CM_ SG_ 545 String0_Err_CS_energyCountMeas "0x00: No error, 0x01: Error"; CM_ SG_ 545 String0_Err_plaus_volt_spread "0x00: No error, 0x01: Error"; CM_ SG_ 545 String0_Err_plaus_temp_spread "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_stringConnected "0x00: String not connected, 0x01: String connected to HV bus"; -CM_ SG_ 545 String1_balancing_active "0x00: No balancing active, 0x01: Balancing in this string active"; -CM_ SG_ 545 String1_Err_overtemp_charge "0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 45 degree celsius."; -CM_ SG_ 545 String1_Err_undertemp_charge "0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below 0 degree celsius."; -CM_ SG_ 545 String1_Err_overtemp_discharge "0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 60 degree celsius."; -CM_ SG_ 545 String1_Err_undertemp_discharge "0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below -20 degree celsius."; -CM_ SG_ 545 String1_Err_Overcurrent_charge "0x00: No error, 0x01: Error: Flag will be set if string charge current is above 30400mA."; -CM_ SG_ 545 String1_Err_Overcurre_discharge "0x00: No error, 0x01: Error: Flag will be set if discharge current is above maximum string current."; -CM_ SG_ 545 String1_Err_Overvoltage "0x00: No error, 0x01: Error: Flag will be set if maximum cell voltage is above 4200mV."; -CM_ SG_ 545 String1_Err_Undervoltage "0x00: No error, 0x01: Error: Flag will be set if minimum cell voltage is below 3000mV. This equals roughly 4% remaining SOC. Minimum data sheet values if 2500mV."; -CM_ SG_ 545 String1_Err_deep_discharge "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_CS_currentMeas "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_positiveContactor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_openWire "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_openWireNumber "Number of first open wire that has been detected in this string"; -CM_ SG_ 545 String1_Err_plaus_cell_volt "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_plaus_cell_temp "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_plaus_string_volt "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_slave_hardware "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_dsyChainPrim_Comm "0x00: No error, 0x01: Error (i.e. SPI)"; -CM_ SG_ 545 String1_Err_dsyChainPrim_CRC "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_dsyChainRedun_Comm "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_dsyChainRedun_CRC "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_dsyPrim_voltMeasOor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_dsyRedun_voltMeasOor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_dsyPrim_tempMeasOor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_dsyRedun_tempMeasOor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_CS_coulombCountMeas "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_CS_energyCountMeas "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_plaus_volt_spread "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String1_Err_plaus_temp_spread "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_stringConnected "0x00: String not connected, 0x01: String connected to HV bus"; -CM_ SG_ 545 String2_balancing_active "0x00: No balancing active, 0x01: Balancing in this string active"; -CM_ SG_ 545 String2_Err_overtemp_charge "0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 45 degree celsius."; -CM_ SG_ 545 String2_Err_undertemp_charge "0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below 0 degree celsius."; -CM_ SG_ 545 String2_Err_overtemp_discharge "0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 60 degree celsius."; -CM_ SG_ 545 String2_Err_undertemp_discharge "0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below -20 degree celsius."; -CM_ SG_ 545 String2_Err_Overcurrent_charge "0x00: No error, 0x01: Error: Flag will be set if string charge current is above 30400mA."; -CM_ SG_ 545 String2_Err_Overcurre_discharge "0x00: No error, 0x01: Error: Flag will be set if discharge current is above maximum string current."; -CM_ SG_ 545 String2_Err_Overvoltage "0x00: No error, 0x01: Error: Flag will be set if maximum cell voltage is above 4200mV."; -CM_ SG_ 545 String2_Err_Undervoltage "0x00: No error, 0x01: Error: Flag will be set if minimum cell voltage is below 3000mV. This equals roughly 4% remaining SOC. Minimum data sheet values if 2500mV."; -CM_ SG_ 545 String2_Err_deep_discharge "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_CS_currentMeas "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_positiveContactor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_openWire "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_openWireNumber "Number of first open wire that has been detected in this string"; -CM_ SG_ 545 String2_Err_plaus_cell_volt "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_plaus_cell_temp "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_plaus_string_volt "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_slave_hardware "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_dsyChainPrim_Comm "0x00: No error, 0x01: Error (i.e. SPI)"; -CM_ SG_ 545 String2_Err_dsyChainPrim_CRC "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_dsyChainRedun_Comm "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_dsyChainRedun_CRC "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_dsyPrim_voltMeasOor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_dsyRedun_voltMeasOor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_dsyPrim_tempMeasOor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_dsyRedun_tempMeasOor "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_CS_coulombCountMeas "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_CS_energyCountMeas "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_plaus_volt_spread "0x00: No error, 0x01: Error"; -CM_ SG_ 545 String2_Err_plaus_temp_spread "0x00: No error, 0x01: Error"; -CM_ BO_ 641 "Message contains minimum and maximum cell temperature and cell voltage values of respective string (in:can_cbs_tx_minmax.c:CAN_TxStringMinimumMaximumValues)"; +CM_ BO_ 641 "Message contains minimum and maximum cell temperature and cell voltage values of respective string (in:can_cbs_tx_minimum-maximum-values.c:CANTX_StringMinimumMaximumValues, fv:tx)"; CM_ SG_ 641 String0_minimumCellVoltage "Minimum cell voltage in this string"; CM_ SG_ 641 String0_maximumCellVoltage "Maximum cell voltage in this string"; CM_ SG_ 641 String0_maximumCellTemperature "Maximum cell temperature in this string"; CM_ SG_ 641 String0_minimumCellTemperature "Minium cell temperature in this string"; -CM_ SG_ 641 String1_minimumCellVoltage "Minimum cell voltage in this string"; -CM_ SG_ 641 String1_maximumCellVoltage "Maximum cell voltage in this string"; -CM_ SG_ 641 String1_maximumCellTemperature "Maximum cell temperature in this string"; -CM_ SG_ 641 String1_minimumCellTemperature "Minium cell temperature in this string"; -CM_ SG_ 641 String2_minimumCellVoltage "Minimum cell voltage in this string"; -CM_ SG_ 641 String2_maximumCellVoltage "Maximum cell voltage in this string"; -CM_ SG_ 641 String2_maximumCellTemperature "Maximum cell temperature in this string"; -CM_ SG_ 641 String2_minimumCellTemperature "Minium cell temperature in this string"; -CM_ BO_ 642 "Message contains SOC, SOE and SOH state estimations (in:can_cbs_tx_state_estimation.c:CAN_TxStringStateEstimation)"; +CM_ BO_ 642 "Message contains SOC, SOE and SOH state estimations (in:can_cbs_tx_string-state-estimation.c:CANTX_StringStateEstimation, fv:tx)"; CM_ SG_ 642 String0_SOE "SOE is depending on current direction, if battery system is charging: SOE_max is transmitted, else SOE_min"; CM_ SG_ 642 String0_Energy_kWh "Remaining energy left in this string"; -CM_ SG_ 642 String1_SOE "SOE is depending on current direction, if battery system is charging: SOE_max is transmitted, else SOE_min"; -CM_ SG_ 642 String1_Energy_kWh "Remaining energy left in this string"; -CM_ SG_ 642 String2_SOE "SOE is depending on current direction, if battery system is charging: SOE_max is transmitted, else SOE_min"; -CM_ SG_ 642 String2_Energy_kWh "Remaining energy left in this string"; -CM_ BO_ 512 "Reserved - for debug/development purpose only (in:can_cbs_rx_misc.c:CAN_RxDebug)"; -CM_ BO_ 1313 "Current sensor string 0: current (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1314 "Current sensor string 0: voltage 1 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1315 "Current sensor string 0: voltage 2 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1316 "Current sensor string 0: voltage 3 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1317 "Current sensor string 0: temperature (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1318 "Current sensor string 0: power (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1319 "Current sensor string 0: coulomb counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1320 "Current sensor string 0: energy counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1569 "Current sensor string 1: current (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1570 "Current sensor string 1: voltage 1 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1571 "Current sensor string 1: voltage 2 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1572 "Current sensor string 1: voltage 3 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1573 "Current sensor string 1: temperature (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1574 "Current sensor string 1: power (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1575 "Current sensor string 1: coulomb counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1576 "Current sensor string 1: energy counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1825 "Current sensor string 2: current (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1826 "Current sensor string 2: voltage 1 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1827 "Current sensor string 2: voltage 2 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1828 "Current sensor string 2: voltage 3 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1829 "Current sensor string 2: temperature (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1830 "Current sensor string 2: power (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1831 "Current sensor string 2: coulomb counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 1832 "Current sensor string 2: energy counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor)"; -CM_ BO_ 409 "(in:can.c:CAN_TransmitBootMessage)"; +CM_ BO_ 512 "Reserved - for debug/development purpose only (in:can_cbs_rx_misc.c:CANRX_Debug, fv:rx)"; +CM_ BO_ 1313 "Current sensor string 0: current (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_I"; +CM_ BO_ 1314 "Current sensor string 0: voltage 1 (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_U1"; +CM_ BO_ 1315 "Current sensor string 0: voltage 2 (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_U2"; +CM_ BO_ 1316 "Current sensor string 0: voltage 3 (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_U3"; +CM_ BO_ 1317 "Current sensor string 0: temperature (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_T"; +CM_ BO_ 1318 "Current sensor string 0: power (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_W"; +CM_ BO_ 1319 "Current sensor string 0: coulomb counting (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_As"; +CM_ BO_ 1320 "Current sensor string 0: energy counting (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_Wh"; +CM_ BO_ 409 "(in:can_cfg_tx_boot-message.c:CANTX_TransmitBootMessage, fv:tx)"; CM_ SG_ 409 foxBMS_uniqueId "Content of Device Identification Register (DEVID)"; -CM_ BO_ 550 "Transmits details on flags transmitted by foxBMS_State (in:can_cbs_tx_state.c:CAN_TxDetailState)"; +CM_ BO_ 550 "Transmits details on flags transmitted by foxBMS_State (in:can_cbs_tx_state.c:CANTX_BmsStateDetails, fv:tx)"; CM_ SG_ 550 foxBMS_TimingViolationEngine "Indicates whether the timing of the engine task has been violated."; CM_ SG_ 550 foxBMS_TimingViolation1ms "Indicates whether the timing of the 1ms task has been violated."; CM_ SG_ 550 foxBMS_TimingViolation10ms "Indicates whether the timing of the 10ms task has been violated."; @@ -1575,20 +1193,36 @@ CM_ SG_ 550 foxBMS_TimingViolation100msRec "Indicates whether a violation of the CM_ SG_ 550 foxBMS_TimingViolation100msAlgoR "Indicates whether a violation of the timing of the 100ms algorithm task has been recorded."; CM_ SG_ 550 foxBMS_TimingViolationEngineRec "Indicates whether a violation of the timing of the engine task has been recorded."; CM_ SG_ 550 foxBMS_TimingViolation1msRec "Indicates whether a violation of the timing of the 1ms task has been recorded."; -CM_ BO_ 551 "Transmits the unique die id of the MCU on which foxBMS is currently running (in:can.c:CAN_TransmitDieId)"; +CM_ BO_ 551 "Transmits the unique die id of the MCU on which foxBMS is currently running (in:can_cfg_tx_boot-message.c:CANTX_TransmitDieId, fv:tx)"; CM_ SG_ 551 MCU_lotNumber "lot number of the MCU (read from DIEIDH register)"; CM_ SG_ 551 MCU_waferNumber "wafer number of the MCU (read from DIEDL register)"; CM_ SG_ 551 MCU_xWaferCoordinate "x coordinate of the MCU die on the wafer (read from DIEIDL register)"; CM_ SG_ 551 MCU_yWaferCoordinate "y coordinate of the MCU die on the wafer (read from DIEIDL register)"; BA_DEF_ "BusType" STRING ; +BA_DEF_ BO_ "GenMsgCycleTime" INT 0 65535; BA_DEF_ SG_ "GenSigStartValue" FLOAT -3.4E+038 3.4E+038; BA_DEF_DEF_ "BusType" "CAN"; +BA_DEF_DEF_ "GenMsgCycleTime" 0; BA_DEF_DEF_ "GenSigStartValue" 0; BA_ "BusType" "CAN"; +BA_ "GenMsgCycleTime" BO_ 546 100; +BA_ "GenMsgCycleTime" BO_ 548 100; +BA_ "GenMsgCycleTime" BO_ 547 100; +BA_ "GenMsgCycleTime" BO_ 640 100; +BA_ "GenMsgCycleTime" BO_ 643 100; +BA_ "GenMsgCycleTime" BO_ 549 1000; +BA_ "GenMsgCycleTime" BO_ 576 5400; +BA_ "GenMsgCycleTime" BO_ 592 4500; +BA_ "GenMsgCycleTime" BO_ 544 100; +BA_ "GenMsgCycleTime" BO_ 545 100; +BA_ "GenMsgCycleTime" BO_ 641 100; +BA_ "GenMsgCycleTime" BO_ 642 1000; +BA_ "GenMsgCycleTime" BO_ 550 1000; + BA_ "GenSigStartValue" SG_ 546 foxBMS_packCurrent 0; BA_ "GenSigStartValue" SG_ 546 foxBMS_batteryVoltage 0; BA_ "GenSigStartValue" SG_ 546 foxBMS_busVoltage 0; @@ -1605,18 +1239,10 @@ BA_ "GenSigStartValue" SG_ 547 foxBMS_maximumCellTemp 0; BA_ "GenSigStartValue" SG_ 547 foxBMS_minimumCellTemp 0; BA_ "GenSigStartValue" SG_ 547 foxBMS_inletTemperature 0; BA_ "GenSigStartValue" SG_ 547 foxBMS_outletTemperature 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String0_current 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String0_voltage 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String0_power 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String1_current 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String1_voltage 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String1_power 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String2_current 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String2_voltage 0; -BA_ "GenSigStartValue" SG_ 640 foxBMS_String2_power 0; -BA_ "GenSigStartValue" SG_ 643 String0_energyCount 0; -BA_ "GenSigStartValue" SG_ 643 String1_energyCount 0; -BA_ "GenSigStartValue" SG_ 643 String2_energyCount 0; +BA_ "GenSigStartValue" SG_ 640 foxBMS_String0Current 0; +BA_ "GenSigStartValue" SG_ 640 foxBMS_String0Voltage 0; +BA_ "GenSigStartValue" SG_ 640 foxBMS_String0Power 0; +BA_ "GenSigStartValue" SG_ 643 foxBMS_String0EnergyCount 0; BA_ "GenSigStartValue" SG_ 549 foxBMS_packSoc 0; BA_ "GenSigStartValue" SG_ 549 foxBMS_packSoe 0; BA_ "GenSigStartValue" SG_ 549 foxBMS_packEnergy 0; @@ -2445,6 +2071,7 @@ BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_Cantiming 0; BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_PackOvercurr_Charge 0; BA_ "GenSigStartValue" SG_ 544 foxBMS_Error_PackOvercur_Dischrg 0; BA_ "GenSigStartValue" SG_ 544 foxBMS_SysMonError 0; +BA_ "GenSigStartValue" SG_ 544 foxBMS_alertFlag 0; BA_ "GenSigStartValue" SG_ 545 String0_stringConnected 0; BA_ "GenSigStartValue" SG_ 545 String0_balancing_active 0; BA_ "GenSigStartValue" SG_ 545 String0_Err_overtemp_charge 0; @@ -2497,140 +2124,16 @@ BA_ "GenSigStartValue" SG_ 545 String0_Err_negativeContactor 0; BA_ "GenSigStartValue" SG_ 545 String0_Err_CS_voltage1Meas 0; BA_ "GenSigStartValue" SG_ 545 String0_Err_CS_voltage2Meas 0; BA_ "GenSigStartValue" SG_ 545 String0_Err_CS_voltage3Meas 0; -BA_ "GenSigStartValue" SG_ 545 String1_stringConnected 0; -BA_ "GenSigStartValue" SG_ 545 String1_balancing_active 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_overtemp_charge 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_undertemp_charge 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_overtemp_discharge 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_undertemp_discharge 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_Overcurrent_charge 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_Overcurre_discharge 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_Overvoltage 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_Undervoltage 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_deep_discharge 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_CS_currentMeas 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_positiveContactor 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_openWire 0; -BA_ "GenSigStartValue" SG_ 545 String1_openWireNumber 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_plaus_cell_volt 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_plaus_cell_temp 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_plaus_string_volt 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_slave_hardware 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_dsyChainPrim_Comm 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_dsyChainPrim_CRC 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_dsyChainRedun_Comm 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_dsyChainRedun_CRC 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_dsyPrim_voltMeasOor 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_dsyRedun_voltMeasOor 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_dsyPrim_tempMeasOor 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_dsyRedun_tempMeasOor 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_CS_coulombCountMeas 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_CS_energyCountMeas 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_plaus_volt_spread 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_plaus_temp_spread 0; -BA_ "GenSigStartValue" SG_ 545 String1_fuseBlown 0; -BA_ "GenSigStartValue" SG_ 545 String1_Warning_overvoltage_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Warning_undervoltage_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_chargeOverTemp_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_dischrgOverTemp_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_chargeUnderTemp_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_dischrgUnderTmp_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_chargeOverCur_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_dischargOverCur_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_chargeOverTemp_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_chargeUnderTemp_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_dischrgOverTemp_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_dischrgUnderTmp_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_chargeOverCur_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_dischargOverCur_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_overvoltage_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Wrng_undervoltage_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_negativeContactor 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_CS_voltage1Meas 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_CS_voltage2Meas 0; -BA_ "GenSigStartValue" SG_ 545 String1_Err_CS_voltage3Meas 0; -BA_ "GenSigStartValue" SG_ 545 String2_stringConnected 0; -BA_ "GenSigStartValue" SG_ 545 String2_balancing_active 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_overtemp_charge 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_undertemp_charge 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_overtemp_discharge 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_undertemp_discharge 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_Overcurrent_charge 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_Overcurre_discharge 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_Overvoltage 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_Undervoltage 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_deep_discharge 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_CS_currentMeas 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_positiveContactor 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_openWire 0; -BA_ "GenSigStartValue" SG_ 545 String2_openWireNumber 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_plaus_cell_volt 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_plaus_cell_temp 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_plaus_string_volt 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_slave_hardware 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_dsyChainPrim_Comm 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_dsyChainPrim_CRC 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_dsyChainRedun_Comm 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_dsyChainRedun_CRC 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_dsyPrim_voltMeasOor 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_dsyRedun_voltMeasOor 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_dsyPrim_tempMeasOor 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_dsyRedun_tempMeasOor 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_CS_coulombCountMeas 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_CS_energyCountMeas 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_plaus_volt_spread 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_plaus_temp_spread 0; -BA_ "GenSigStartValue" SG_ 545 String2_fuseBlown 0; -BA_ "GenSigStartValue" SG_ 545 String2_Warning_overvoltage_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Warning_undervoltage_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_chargeOverTemp_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_dischrgOverTemp_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_chargeUnderTemp_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_dischrgUnderTmp_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_chargeOverCur_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_dischargOverCur_MOL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_chargeOverTemp_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_chargeUnderTemp_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_dischrgOverTemp_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_dischrgUnderTmp_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_chargeOverCur_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_dischargOverCur_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_overvoltage_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Wrng_undervoltage_RSL 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_negativeContactor 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_CS_voltage1Meas 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_CS_voltage2Meas 0; -BA_ "GenSigStartValue" SG_ 545 String2_Err_CS_voltage3Meas 0; BA_ "GenSigStartValue" SG_ 641 String0_minimumCellVoltage 0; BA_ "GenSigStartValue" SG_ 641 String0_maximumCellVoltage 0; BA_ "GenSigStartValue" SG_ 641 String0_maximumCellTemperature 0; BA_ "GenSigStartValue" SG_ 641 String0_minimumCellTemperature 0; -BA_ "GenSigStartValue" SG_ 641 String1_minimumCellVoltage 0; -BA_ "GenSigStartValue" SG_ 641 String1_maximumCellVoltage 0; -BA_ "GenSigStartValue" SG_ 641 String1_maximumCellTemperature 0; -BA_ "GenSigStartValue" SG_ 641 String1_minimumCellTemperature 0; -BA_ "GenSigStartValue" SG_ 641 String2_minimumCellVoltage 0; -BA_ "GenSigStartValue" SG_ 641 String2_maximumCellVoltage 0; -BA_ "GenSigStartValue" SG_ 641 String2_maximumCellTemperature 0; -BA_ "GenSigStartValue" SG_ 641 String2_minimumCellTemperature 0; BA_ "GenSigStartValue" SG_ 642 String0_minimumSOC 0; BA_ "GenSigStartValue" SG_ 642 String0_averageSOC 0; BA_ "GenSigStartValue" SG_ 642 String0_maximumSOC 0; BA_ "GenSigStartValue" SG_ 642 String0_SOE 0; BA_ "GenSigStartValue" SG_ 642 String0_Energy_kWh 0; BA_ "GenSigStartValue" SG_ 642 String0_SOH 0; -BA_ "GenSigStartValue" SG_ 642 String1_minimumSOC 0; -BA_ "GenSigStartValue" SG_ 642 String1_averageSOC 0; -BA_ "GenSigStartValue" SG_ 642 String1_maximumSOC 0; -BA_ "GenSigStartValue" SG_ 642 String1_SOE 0; -BA_ "GenSigStartValue" SG_ 642 String1_Energy_kWh 0; -BA_ "GenSigStartValue" SG_ 642 String1_SOH 0; -BA_ "GenSigStartValue" SG_ 642 String2_minimumSOC 0; -BA_ "GenSigStartValue" SG_ 642 String2_averageSOC 0; -BA_ "GenSigStartValue" SG_ 642 String2_maximumSOC 0; -BA_ "GenSigStartValue" SG_ 642 String2_SOE 0; -BA_ "GenSigStartValue" SG_ 642 String2_Energy_kWh 0; -BA_ "GenSigStartValue" SG_ 642 String2_SOH 0; BA_ "GenSigStartValue" SG_ 1313 IVT0_Result_I_systemError 0; BA_ "GenSigStartValue" SG_ 1313 IVT0_Result_I_OCS 0; BA_ "GenSigStartValue" SG_ 1313 IVT0_Result_I_overallMeasError 0; @@ -2687,118 +2190,6 @@ BA_ "GenSigStartValue" SG_ 1320 IVT0_Result_Wh_channelMeasError 0; BA_ "GenSigStartValue" SG_ 1320 IVT0_Result_Wh 0; BA_ "GenSigStartValue" SG_ 1320 IVT0_MsgCount_Result_Wh 0; BA_ "GenSigStartValue" SG_ 1320 IVT0_ID_Result_Wh 7; -BA_ "GenSigStartValue" SG_ 1569 IVT1_Result_I_systemError 0; -BA_ "GenSigStartValue" SG_ 1569 IVT1_Result_I_OCS 0; -BA_ "GenSigStartValue" SG_ 1569 IVT1_Result_I_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1569 IVT1_Result_I_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1569 IVT1_ID_Result_I 0; -BA_ "GenSigStartValue" SG_ 1569 IVT1_MsgCount_Result_I 0; -BA_ "GenSigStartValue" SG_ 1569 IVT1_Result_I_mA 0; -BA_ "GenSigStartValue" SG_ 1570 IVT1_Result_U1_systemError 0; -BA_ "GenSigStartValue" SG_ 1570 IVT1_Result_U1_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1570 IVT1_Result_U1_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1570 IVT1_Result_U1_OCS 0; -BA_ "GenSigStartValue" SG_ 1570 IVT1_ID_Result_U1 1; -BA_ "GenSigStartValue" SG_ 1570 IVT1_MsgCount_Result_U1 0; -BA_ "GenSigStartValue" SG_ 1570 IVT1_Result_U1_mV 0; -BA_ "GenSigStartValue" SG_ 1571 IVT1_Result_U2_systemError 0; -BA_ "GenSigStartValue" SG_ 1571 IVT1_Result_U2_OCS 0; -BA_ "GenSigStartValue" SG_ 1571 IVT1_Result_U2_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1571 IVT1_Result_U2_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1571 IVT1_ID_Result_U2 2; -BA_ "GenSigStartValue" SG_ 1571 IVT1_MsgCount_Result_U2 0; -BA_ "GenSigStartValue" SG_ 1571 IVT1_Result_U2_mV 0; -BA_ "GenSigStartValue" SG_ 1572 IVT1_Result_U3_systemError 0; -BA_ "GenSigStartValue" SG_ 1572 IVT1_Result_U3_OCS 0; -BA_ "GenSigStartValue" SG_ 1572 IVT1_Result_U3_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1572 IVT1_Result_U3_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1572 IVT1_ID_Result_U3 3; -BA_ "GenSigStartValue" SG_ 1572 IVT1_MsgCount_Result_U3 0; -BA_ "GenSigStartValue" SG_ 1572 IVT1_Result_U3_mV 0; -BA_ "GenSigStartValue" SG_ 1573 IVT1_Result_T_systemError 0; -BA_ "GenSigStartValue" SG_ 1573 IVT1_Result_T_OCS 0; -BA_ "GenSigStartValue" SG_ 1573 IVT1_Result_T_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1573 IVT1_Result_T_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1573 IVT1_ID_Result_T 4; -BA_ "GenSigStartValue" SG_ 1573 IVT1_MsgCount_Result_T 0; -BA_ "GenSigStartValue" SG_ 1573 IVT1_Result_T_ddegC 0; -BA_ "GenSigStartValue" SG_ 1574 IVT1_Result_W_systemError 0; -BA_ "GenSigStartValue" SG_ 1574 IVT1_Result_W_OCS 0; -BA_ "GenSigStartValue" SG_ 1574 IVT1_Result_W_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1574 IVT1_Result_W_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1574 IVT1_Result_W 0; -BA_ "GenSigStartValue" SG_ 1574 IVT1_MsgCount_Result_W 0; -BA_ "GenSigStartValue" SG_ 1574 IVT1_ID_Result_W 5; -BA_ "GenSigStartValue" SG_ 1575 IVT1_Result_As_systemError 0; -BA_ "GenSigStartValue" SG_ 1575 IVT1_Result_As_OCS 0; -BA_ "GenSigStartValue" SG_ 1575 IVT1_Result_As_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1575 IVT1_Result_As_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1575 IVT1_Result_As 0; -BA_ "GenSigStartValue" SG_ 1575 IVT1_MsgCount_Result_As 0; -BA_ "GenSigStartValue" SG_ 1575 IVT1_ID_Result_As 6; -BA_ "GenSigStartValue" SG_ 1576 IVT1_Result_Wh_systemError 0; -BA_ "GenSigStartValue" SG_ 1576 IVT1_Result_Wh_OCS 0; -BA_ "GenSigStartValue" SG_ 1576 IVT1_Result_Wh_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1576 IVT1_Result_Wh_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1576 IVT1_Result_Wh 0; -BA_ "GenSigStartValue" SG_ 1576 IVT1_MsgCount_Result_Wh 0; -BA_ "GenSigStartValue" SG_ 1576 IVT1_ID_Result_Wh 7; -BA_ "GenSigStartValue" SG_ 1825 IVT2_Result_I_systemError 0; -BA_ "GenSigStartValue" SG_ 1825 IVT2_Result_I_OCS 0; -BA_ "GenSigStartValue" SG_ 1825 IVT2_Result_I_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1825 IVT2_Result_I_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1825 IVT2_ID_Result_I 0; -BA_ "GenSigStartValue" SG_ 1825 IVT2_MsgCount_Result_I 0; -BA_ "GenSigStartValue" SG_ 1825 IVT2_Result_I_mA 0; -BA_ "GenSigStartValue" SG_ 1826 IVT2_Result_U1_systemError 0; -BA_ "GenSigStartValue" SG_ 1826 IVT2_Result_U1_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1826 IVT2_Result_U1_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1826 IVT2_Result_U1_OCS 0; -BA_ "GenSigStartValue" SG_ 1826 IVT2_ID_Result_U1 1; -BA_ "GenSigStartValue" SG_ 1826 IVT2_MsgCount_Result_U1 0; -BA_ "GenSigStartValue" SG_ 1826 IVT2_Result_U1_mV 0; -BA_ "GenSigStartValue" SG_ 1827 IVT2_Result_U2_systemError 0; -BA_ "GenSigStartValue" SG_ 1827 IVT2_Result_U2_OCS 0; -BA_ "GenSigStartValue" SG_ 1827 IVT2_Result_U2_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1827 IVT2_Result_U2_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1827 IVT2_ID_Result_U2 2; -BA_ "GenSigStartValue" SG_ 1827 IVT2_MsgCount_Result_U2 0; -BA_ "GenSigStartValue" SG_ 1827 IVT2_Result_U2_mV 0; -BA_ "GenSigStartValue" SG_ 1828 IVT2_Result_U3_systemError 0; -BA_ "GenSigStartValue" SG_ 1828 IVT2_Result_U3_OCS 0; -BA_ "GenSigStartValue" SG_ 1828 IVT2_Result_U3_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1828 IVT2_Result_U3_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1828 IVT2_ID_Result_U3 3; -BA_ "GenSigStartValue" SG_ 1828 IVT2_MsgCount_Result_U3 0; -BA_ "GenSigStartValue" SG_ 1828 IVT2_Result_U3_mV 0; -BA_ "GenSigStartValue" SG_ 1829 IVT2_Result_T_systemError 0; -BA_ "GenSigStartValue" SG_ 1829 IVT2_Result_T_OCS 0; -BA_ "GenSigStartValue" SG_ 1829 IVT2_Result_T_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1829 IVT2_Result_T_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1829 IVT2_ID_Result_T 4; -BA_ "GenSigStartValue" SG_ 1829 IVT2_MsgCount_Result_T 0; -BA_ "GenSigStartValue" SG_ 1829 IVT2_Result_T_ddegC 0; -BA_ "GenSigStartValue" SG_ 1830 IVT2_Result_W_systemError 0; -BA_ "GenSigStartValue" SG_ 1830 IVT2_Result_W_OCS 0; -BA_ "GenSigStartValue" SG_ 1830 IVT2_Result_W_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1830 IVT2_Result_W_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1830 IVT2_Result_W 0; -BA_ "GenSigStartValue" SG_ 1830 IVT2_MsgCount_Result_W 0; -BA_ "GenSigStartValue" SG_ 1830 IVT2_ID_Result_W 5; -BA_ "GenSigStartValue" SG_ 1831 IVT2_Result_As_systemError 0; -BA_ "GenSigStartValue" SG_ 1831 IVT2_Result_As_OCS 0; -BA_ "GenSigStartValue" SG_ 1831 IVT2_Result_As_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1831 IVT2_Result_As_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1831 IVT2_Result_As 0; -BA_ "GenSigStartValue" SG_ 1831 IVT2_MsgCount_Result_As 0; -BA_ "GenSigStartValue" SG_ 1831 IVT2_ID_Result_As 6; -BA_ "GenSigStartValue" SG_ 1832 IVT2_Result_Wh_systemError 0; -BA_ "GenSigStartValue" SG_ 1832 IVT2_Result_Wh_OCS 0; -BA_ "GenSigStartValue" SG_ 1832 IVT2_Result_Wh_overallMeasError 0; -BA_ "GenSigStartValue" SG_ 1832 IVT2_Result_Wh_channelMeasError 0; -BA_ "GenSigStartValue" SG_ 1832 IVT2_Result_Wh 0; -BA_ "GenSigStartValue" SG_ 1832 IVT2_MsgCount_Result_Wh 0; -BA_ "GenSigStartValue" SG_ 1832 IVT2_ID_Result_Wh 7; BA_ "GenSigStartValue" SG_ 409 foxBMS_majorVersionNumber 0; BA_ "GenSigStartValue" SG_ 409 foxBMS_minorVersionNumber 0; BA_ "GenSigStartValue" SG_ 409 foxBMS_patchVersionNumber 0; @@ -2822,13 +2213,14 @@ BA_ "GenSigStartValue" SG_ 551 MCU_waferNumber 0; BA_ "GenSigStartValue" SG_ 551 MCU_xWaferCoordinate 0; BA_ "GenSigStartValue" SG_ 551 MCU_yWaferCoordinate 0; -VAL_ 640 foxBMS_StringValues_Mux 0 "mux_valuesString_0" 1 "mux_valuesString_1" 2 "mux_valuesString_2" ; -VAL_ 643 foxBMS_StringValues2_Mux 0 "mux_values2String_0" 1 "mux_values2String_1" 2 "mux_values2String_2" ; -VAL_ 576 foxBMS_CellVoltage_Mux 0 "mux_cellVoltage_000_003" 1 "mux_cellVoltage_004_007" 2 "mux_cellVoltage_008_011" 3 "mux_cellVoltage_012_015" 4 "mux_cellVoltage_016_019" 5 "mux_cellVoltage_020_023" 6 "mux_cellVoltage_024_027" 7 "mux_cellVoltage_028_031" 8 "mux_cellVoltage_032_035" 9 "mux_cellVoltage_036_039" 10 "mux_cellVoltage_040_043" 11 "mux_cellVoltage_044_047" 12 "mux_cellVoltage_048_051" 13 "mux_cellVoltage_052_055" 14 "mux_cellVoltage_056_059" 15 "mux_cellVoltage_060_063" 16 "mux_cellVoltage_064_067" 17 "mux_cellVoltage_068_071" 18 "mux_cellVoltage_072_075" 19 "mux_cellVoltage_076_079" 20 "mux_cellVoltage_080_083" 21 "mux_cellVoltage_084_087" 22 "mux_cellVoltage_088_091" 23 "mux_cellVoltage_092_095" 24 "mux_cellVoltage_096_099" 25 "mux_cellVoltage_100_103" 26 "mux_cellVoltage_104_107" 27 "mux_cellVoltage_108_111" 28 "mux_cellVoltage_112_115" 29 "mux_cellVoltage_116_119" 30 "mux_cellVoltage_120_123" 31 "mux_cellVoltage_124_127" 32 "mux_cellVoltage_128_131" 33 "mux_cellVoltage_132_135" 34 "mux_cellVoltage_136_139" 35 "mux_cellVoltage_140_143" +VAL_ 640 foxBMS_StringValuesP0_Mux 0 "mux_valuesP0String_0" ; +VAL_ 643 foxBMS_StringValuesP1_Mux 0 "mux_valuesP1String_0" ; +VAL_ 576 foxBMS_CellVoltages_Mux 0 "mux_cellVoltage_000_003" 1 "mux_cellVoltage_004_007" 2 "mux_cellVoltage_008_011" 3 "mux_cellVoltage_012_015" 4 "mux_cellVoltage_016_019" 5 "mux_cellVoltage_020_023" 6 "mux_cellVoltage_024_027" 7 "mux_cellVoltage_028_031" 8 "mux_cellVoltage_032_035" 9 "mux_cellVoltage_036_039" 10 "mux_cellVoltage_040_043" 11 "mux_cellVoltage_044_047" 12 "mux_cellVoltage_048_051" 13 "mux_cellVoltage_052_055" 14 "mux_cellVoltage_056_059" 15 "mux_cellVoltage_060_063" 16 "mux_cellVoltage_064_067" 17 "mux_cellVoltage_068_071" 18 "mux_cellVoltage_072_075" 19 "mux_cellVoltage_076_079" 20 "mux_cellVoltage_080_083" 21 "mux_cellVoltage_084_087" 22 "mux_cellVoltage_088_091" 23 "mux_cellVoltage_092_095" 24 "mux_cellVoltage_096_099" 25 "mux_cellVoltage_100_103" 26 "mux_cellVoltage_104_107" 27 "mux_cellVoltage_108_111" 28 "mux_cellVoltage_112_115" 29 "mux_cellVoltage_116_119" 30 "mux_cellVoltage_120_123" 31 "mux_cellVoltage_124_127" 32 "mux_cellVoltage_128_131" 33 "mux_cellVoltage_132_135" 34 "mux_cellVoltage_136_139" 35 "mux_cellVoltage_140_143" 36 "mux_cellVoltage_144_147" 37 "mux_cellVoltage_148_151" 38 "mux_cellVoltage_152_155" 39 "mux_cellVoltage_156_159" 40 "mux_cellVoltage_160_163" 41 "mux_cellVoltage_164_167" 42 "mux_cellVoltage_168_171" 43 "mux_cellVoltage_172_175" 44 "mux_cellVoltage_176_179" 45 "mux_cellVoltage_180_183" 46 "mux_cellVoltage_184_187" 47 "mux_cellVoltage_188_191" 48 "mux_cellVoltage_192_195" 49 "mux_cellVoltage_196_199" 50 "mux_cellVoltage_200_203" 51 "mux_cellVoltage_204_207" 52 "mux_cellVoltage_208_211" 53 "mux_cellVoltage_212_215" ; -VAL_ 592 foxBMS_CellTemperature_Mux 0 "mux_cellTemperature_000_005" 1 "mux_cellTemperature_006_011" 2 "mux_cellTemperature_012_017" 3 "mux_cellTemperature_018_023" 4 "mux_cellTemperature_024_029" 5 "mux_cellTemperature_030_035" 6 "mux_cellTemperature_036_041" 7 "mux_cellTemperature_042_047" 8 "mux_cellTemperature_048_053" 9 "mux_cellTemperature_054_059" 10 "mux_cellTemperature_060_065" 11 "mux_cellTemperature_066_071" 12 "mux_cellTemperature_072_077" 13 "mux_cellTemperature_078_083" 14 "mux_cellTemperature_084_089" 15 "mux_cellTemperature_090_095" 16 "mux_cellTemperature_096_101" 17 "mux_cellTemperature_102_107" 18 "mux_cellTemperature_108_113" 19 "mux_cellTemperature_114_119" 20 "mux_cellTemperature_120_125" 21 "mux_cellTemperature_126_131" 22 "mux_cellTemperature_132_137" 23 "mux_cellTemperature_138_143" 24 "mux_cellTemperature_144_149" 25 "mux_cellTemperature_150_155" 26 "mux_cellTemperature_156_161" 27 "mux_cellTemperature_162_167" 28 "mux_cellTemperature_168_173" 29 "mux_cellTemperature_174_179" ; -VAL_ 545 foxBMS_StringState_Mux 0 "mux_stateString0" 1 "mux_stateString1" 2 "mux_stateString2" ; -VAL_ 641 foxBMS_StringMinMaxValues_Mux 0 "mux_minMaxValuesString0" 1 "mux_minMaxValuesString1" 2 "mux_minMaxValuesString2" ; -VAL_ 642 foxBMS_StringStateEstimation_Mux 0 "mux_String0_SOC_SOE" 1 "mux_String1_SOC_SOE" 2 "mux_String2_SOC_SOE" ; +VAL_ 592 foxBMS_CellTemperatures_Mux 0 "mux_cellTemperature_000_005" 1 "mux_cellTemperature_006_011" 2 "mux_cellTemperature_012_017" 3 "mux_cellTemperature_018_023" 4 "mux_cellTemperature_024_029" 5 "mux_cellTemperature_030_035" 6 "mux_cellTemperature_036_041" 7 "mux_cellTemperature_042_047" 8 "mux_cellTemperature_048_053" 9 "mux_cellTemperature_054_059" 10 "mux_cellTemperature_060_065" 11 "mux_cellTemperature_066_071" 12 "mux_cellTemperature_072_077" 13 "mux_cellTemperature_078_083" 14 "mux_cellTemperature_084_089" 15 "mux_cellTemperature_090_095" 16 "mux_cellTemperature_096_101" 17 "mux_cellTemperature_102_107" 18 "mux_cellTemperature_108_113" 19 "mux_cellTemperature_114_119" 20 "mux_cellTemperature_120_125" 21 "mux_cellTemperature_126_131" 22 "mux_cellTemperature_132_137" 23 "mux_cellTemperature_138_143" 24 "mux_cellTemperature_144_149" 25 "mux_cellTemperature_150_155" 26 "mux_cellTemperature_156_161" 27 "mux_cellTemperature_162_167" 28 "mux_cellTemperature_168_173" 29 "mux_cellTemperature_174_179" ; +VAL_ 545 foxBMS_StringState_Mux 0 "mux_stateString0" ; +VAL_ 641 foxBMS_StringMinMaxValues_Mux 0 "mux_minMaxValuesString0" ; +VAL_ 642 foxBMS_StringStateEstimation_Mux 0 "mux_String0_SOC_SOE" ; VAL_ 560 foxBMS_modeRequest 0 "mode_Standby" 1 "mode_Discharge" 2 "mode_Charge" ; VAL_ 544 foxBMS_State 0 "BMS_UNINITIALIZED" 1 "BMS_INITIALIZATION" 2 "BMS_INITIALIZED" 3 "BMS_IDLE" 4 "BMS_OPEN_CONTACTORS" 5 "BMS_STANDBY" 6 "BMS_PRECHARGE" 7 "BMS_NORMAL" 8 "BMS_DISCHARGE" 9 "BMS_CHARGE" 10 "BMS_ERROR" 11 "BMS_UNDEFINED" ; +VAL_ 545 String0_fuseBlown 0 "Fuse okay" 1 "Fuse blown" ; diff --git a/tools/dbc/foxbms.sym b/tools/dbc/foxbms.sym index 3d8b40bb..d2ee5333 100644 --- a/tools/dbc/foxbms.sym +++ b/tools/dbc/foxbms.sym @@ -1,753 +1,792 @@ -FormatVersion=5.0 // Do not edit this line! +FormatVersion=6.0 // Do not edit this line! +UniqueVariables=True Title="foxBMS" {ENUMS} -enum modeRequest_e(0="mode_Standby", // Disconnect strings from HV bus - 1="mode_Discharge", // Connect strings to HV bus to start discharge +Enum=foxBMS_ModeRequest(0="mode_Standby", // Disconnect strings from HV bus + 1="mode_Discharge", // Connect strings to HV bus to start discharge 2="mode_Charge") // Connect strings to HV bus to start charging // Possible states (i.e., values) the BMS state machine can have -enum state_e(0="BMS_UNINITIALIZED", // BMS state machine is uninitialized - 1="BMS_INITIALIZATION", // BMS state machine is currently trying to initialize - 2="BMS_INITIALIZED", // BMS state machine is initialized - 3="BMS_IDLE", // BMS state machine is idling - 4="BMS_OPEN_CONTACTORS", 5="BMS_STANDBY", 6="BMS_PRECHARGE", 7="BMS_NORMAL", - 8="BMS_DISCHARGE", 9="BMS_CHARGE", 10="BMS_ERROR", 11="BMS_UNDEFINED") +Enum=foxBMS_State(0="BMS_UNINITIALIZED", // BMS state machine is uninitialized + 1="BMS_INITIALIZATION", // BMS state machine is currently trying to initialize + 2="BMS_INITIALIZED", // BMS state machine is initialized + 3="BMS_IDLE", // BMS state machine is idling + 4="BMS_OPEN_CONTACTORS", 5="BMS_STANDBY", 6="BMS_PRECHARGE", 7="BMS_NORMAL", 8="BMS_DISCHARGE", 9="BMS_CHARGE", + 10="BMS_ERROR", 11="BMS_UNDEFINED") +Enum=foxBMS_FuseState(0="Fuse okay", 1="Fuse blown") {SENDRECEIVE} [foxBMS_PackValues] -ID=222h // (in:can_cbs_tx_system_values.c:CAN_TxPackValues) -DLC=8 -Var=foxBMS_packCurrent signed 46,18 -m /u:A /f:0.01 // Battery pack current -Var=foxBMS_batteryVoltage unsigned 0,14 -m /u:V /f:0.1 // Battery voltage between negative and positive pole of the battery -Var=foxBMS_busVoltage unsigned 14,14 -m /u:V /f:0.1 // Battery voltage between negative pole and after main positive contactor -Var=foxBMS_packPower signed 28,18 -m /u:kW /f:0.01 // Battery power +ID=222h // (in:can_cbs_tx_system-values.c:CANTX_PackValues, fv:tx) +Len=8 +CycleTime=100 -p +Var=foxBMS_packCurrent signed 46,18 -m /u:A /f:0.01 // Battery pack current +Var=foxBMS_batteryVoltage unsigned 0,14 -m /u:V /f:0.1 // Battery voltage between negative and positive pole of the battery +Var=foxBMS_busVoltage unsigned 14,14 -m /u:V /f:0.1 // Battery voltage between negative pole and after main positive contactor +Var=foxBMS_packPower signed 28,18 -m /u:kW /f:0.01 // Battery power [foxBMS_LimitValues] -ID=224h // (in:can_cbs_tx_limits.c:CAN_TxLimitValues) -DLC=8 -Var=foxBMS_maxChargeCurrent unsigned 12,12 -m /u:A /f:0.25 // Maximum battery pack charge current -Var=foxBMS_maxDischargeCurrent unsigned 0,12 -m /u:A /f:0.25 // Maximum battery pack discharge current +ID=224h // (in:can_cbs_tx_limit-values.c:CANTX_LimitValues, fv:tx) +Len=8 +CycleTime=100 -p +Var=foxBMS_maxChargeCurrent unsigned 12,12 -m /u:A /f:0.25 // Maximum battery pack charge current +Var=foxBMS_maxDischargeCurrent unsigned 0,12 -m /u:A /f:0.25 // Maximum battery pack discharge current Var=foxBMS_maxChargePower unsigned 36,12 -m /u:kW /f:0.2 Var=foxBMS_maxDischargePower unsigned 24,12 -m /u:kW /f:0.1 Var=foxBMS_maxBatteryVoltage unsigned 48,8 -m /u:V /f:4 Var=foxBMS_minBatteryVoltage unsigned 56,8 -m /u:V /f:4 [foxBMS_MinimumMaximumValues] -ID=223h // (in:can_cbs_tx_minmax.c:CAN_TxMinimumMaximumValues) -DLC=8 -Var=foxBMS_minimumCellVoltage unsigned 13,13 -m /u:mV // Minimum cell voltage of all connected strings, if no string connected maximum value of whole system is transmitted -Var=foxBMS_maximumCellVoltage unsigned 0,13 -m /u:mV // Maximum cell voltage of all connected strings, if no string connected maximum value of whole system is transmitted -Var=foxBMS_maximumCellTemp signed 48,8 -m /u:degC // Maximum cell temperature of all connected strings, if no string connected maximum value of whole system is transmitted -Var=foxBMS_minimumCellTemp signed 56,8 -m /u:degC // Minium cell temperature of all connected string, if no string connected maximum value of whole system is transmitted +ID=223h // (in:can_cbs_tx_minimum-maximum-values.c:CANTX_MinimumMaximumValues, fv:tx) +Len=8 +CycleTime=100 -p +Var=foxBMS_minimumCellVoltage unsigned 13,13 -m /u:mV // Minimum cell voltage of all connected strings, if no string connected maximum value of whole system is transmitted +Var=foxBMS_maximumCellVoltage unsigned 0,13 -m /u:mV // Maximum cell voltage of all connected strings, if no string connected maximum value of whole system is transmitted +Var=foxBMS_maximumCellTemp signed 48,8 -m /u:degC // Maximum cell temperature of all connected strings, if no string connected maximum value of whole system is transmitted +Var=foxBMS_minimumCellTemp signed 56,8 -m /u:degC // Minium cell temperature of all connected string, if no string connected maximum value of whole system is transmitted Var=foxBMS_inletTemperature signed 32,8 -m /u:degC Var=foxBMS_outletTemperature signed 40,8 -m /u:degC -[foxBMS_StringValues] -ID=280h // Message contains string voltage, current and power (in:can_cbs_tx_system_values.c:CAN_TxStringValues) -DLC=8 -Mux=mux_valuesString_0 0,3 0 -m -Var=foxBMS_String0_current signed 20,18 -m /u:A /f:0.01 -Var=foxBMS_String0_voltage unsigned 3,17 -m /u:V /f:0.01 -Var=foxBMS_String0_power signed 38,18 -m /u:kW /f:0.01 - -[foxBMS_StringValues] -DLC=8 -Mux=mux_valuesString_1 0,3 1 -m -Var=foxBMS_String1_current signed 20,18 -m /u:A /f:0.01 -Var=foxBMS_String1_voltage unsigned 3,17 -m /u:V /f:0.01 -Var=foxBMS_String1_power signed 38,18 -m /u:kW /f:0.01 - -[foxBMS_StringValues] -DLC=8 -Mux=mux_valuesString_2 0,3 2 -m -Var=foxBMS_String2_current signed 20,18 -m /u:A /f:0.01 -Var=foxBMS_String2_voltage unsigned 3,17 -m /u:V /f:0.01 -Var=foxBMS_String2_power signed 38,18 -m /u:kW /f:0.01 - -[foxBMS_StringValues2] -ID=283h // Message contains energy counting value (in:can_cbs_tx_system_values.c:CAN_TxStringValues2) -DLC=8 -Mux=mux_values2String_0 0,4 0 -m -Var=String0_energyCount signed 8,32 -m /u:Wh // Current sensor string 0 energy counting value - -[foxBMS_StringValues2] -DLC=8 -Mux=mux_values2String_1 0,4 1 -m -Var=String1_energyCount signed 8,32 -m /u:Wh // Current sensor string 1 energy counting value - -[foxBMS_StringValues2] -DLC=8 -Mux=mux_values2String_2 0,4 2 -m -Var=String2_energyCount signed 8,32 -m /u:Wh // Current sensor string 2 energy counting value +[foxBMS_StringValuesP0] +ID=280h // Message contains string voltage, current and power (in:can_cbs_tx_system-values.c:CANTX_StringValuesP0, fv:tx) +Len=8 +CycleTime=100 -p +Mux=mux_valuesP0String_0 0,3 0 -m +Var=foxBMS_String0Current signed 20,18 -m /u:A /f:0.01 +Var=foxBMS_String0Voltage unsigned 3,17 -m /u:V /f:0.01 +Var=foxBMS_String0Power signed 38,18 -m /u:kW /f:0.01 + +[foxBMS_StringValuesP1] +ID=283h // Message contains energy counting value (in:can_cbs_tx_system-values.c:CANTX_StringValuesP1, fv:tx) +Len=8 +CycleTime=100 -p +Mux=mux_valuesP1String_0 0,4 0 -m +Var=foxBMS_String0EnergyCount signed 8,32 -m /u:Wh // Current sensor string 0 energy counting value [foxBMS_PackStateEstimation] -ID=225h // (in:can_cbs_tx_state_estimation.c:CAN_TxStateEstimation) -DLC=8 -Var=foxBMS_packSoc unsigned 0,14 -m /u:% /f:0.01 /d:0 // SOC currently connected to HV bus (100% if all strings connected and all strings at 100%) -Var=foxBMS_packSoe unsigned 14,14 -m /u:% /f:0.01 /d:0 // SOE currently connected to HV bus (100% if all strings connected and all strings at 100%) -Var=foxBMS_packEnergy unsigned 40,24 -m /u:kWh /f:0.01 // Energy left in Wh that is currently connected to HV bus +ID=225h // (in:can_cbs_tx_pack-state-estimation.c:CANTX_PackStateEstimation, fv:tx) +Len=8 +CycleTime=1000 -p +Var=foxBMS_packSoc unsigned 0,14 -m /u:% /f:0.01 // SOC currently connected to HV bus (100% if all strings connected and all strings at 100%) +Var=foxBMS_packSoe unsigned 14,14 -m /u:% /f:0.01 // SOE currently connected to HV bus (100% if all strings connected and all strings at 100%) +Var=foxBMS_packEnergy unsigned 40,24 -m /u:kWh /f:0.01 // Energy left in Wh that is currently connected to HV bus Var=foxBMS_packSoh unsigned 28,12 -m /u:% /f:0.025 -[foxBMS_CellVoltage] -ID=240h // (in:can_cbs_tx_voltage.c:CAN_TxVoltage) -DLC=8 -Mux=mux_cellVoltage_000_003 0,8 0 -m -Var=cellVoltage_000_invalidFlag unsigned 11,1 -m -Var=cellVoltage_001_invalidFlag unsigned 10,1 -m -Var=cellVoltage_002_invalidFlag unsigned 9,1 -m -Var=cellVoltage_003_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +ID=240h // (in:can_cbs_tx_cell-voltages.c:CANTX_CellVoltages, fv:tx) +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_000_003 0,8 0 -m +Var=cellVoltage_000_invalidFlag bit 11,1 -m +Var=cellVoltage_001_invalidFlag bit 10,1 -m +Var=cellVoltage_002_invalidFlag bit 9,1 -m +Var=cellVoltage_003_invalidFlag bit 8,1 -m Var=cellVoltage_000 unsigned 12,13 -m /u:mV Var=cellVoltage_001 unsigned 25,13 -m /u:mV Var=cellVoltage_002 unsigned 38,13 -m /u:mV Var=cellVoltage_003 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_004_007 0,8 1 -m -Var=cellVoltage_004_invalidFlag unsigned 11,1 -m -Var=cellVoltage_005_invalidFlag unsigned 10,1 -m -Var=cellVoltage_006_invalidFlag unsigned 9,1 -m -Var=cellVoltage_007_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_004_007 0,8 1 -m +Var=cellVoltage_004_invalidFlag bit 11,1 -m +Var=cellVoltage_005_invalidFlag bit 10,1 -m +Var=cellVoltage_006_invalidFlag bit 9,1 -m +Var=cellVoltage_007_invalidFlag bit 8,1 -m Var=cellVoltage_004 unsigned 12,13 -m /u:mV Var=cellVoltage_005 unsigned 25,13 -m /u:mV Var=cellVoltage_006 unsigned 38,13 -m /u:mV Var=cellVoltage_007 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_008_011 0,8 2 -m -Var=cellVoltage_008_invalidFlag unsigned 11,1 -m -Var=cellVoltage_009_invalidFlag unsigned 10,1 -m -Var=cellVoltage_010_invalidFlag unsigned 9,1 -m -Var=cellVoltage_011_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_008_011 0,8 2 -m +Var=cellVoltage_008_invalidFlag bit 11,1 -m +Var=cellVoltage_009_invalidFlag bit 10,1 -m +Var=cellVoltage_010_invalidFlag bit 9,1 -m +Var=cellVoltage_011_invalidFlag bit 8,1 -m Var=cellVoltage_008 unsigned 12,13 -m /u:mV Var=cellVoltage_009 unsigned 25,13 -m /u:mV Var=cellVoltage_010 unsigned 38,13 -m /u:mV Var=cellVoltage_011 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_012_015 0,8 3 -m -Var=cellVoltage_012_invalidFlag unsigned 11,1 -m -Var=cellVoltage_013_invalidFlag unsigned 10,1 -m -Var=cellVoltage_014_invalidFlag unsigned 9,1 -m -Var=cellVoltage_015_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_012_015 0,8 3 -m +Var=cellVoltage_012_invalidFlag bit 11,1 -m +Var=cellVoltage_013_invalidFlag bit 10,1 -m +Var=cellVoltage_014_invalidFlag bit 9,1 -m +Var=cellVoltage_015_invalidFlag bit 8,1 -m Var=cellVoltage_012 unsigned 12,13 -m /u:mV Var=cellVoltage_013 unsigned 25,13 -m /u:mV Var=cellVoltage_014 unsigned 38,13 -m /u:mV Var=cellVoltage_015 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_016_019 0,8 4 -m -Var=cellVoltage_016_invalidFlag unsigned 11,1 -m -Var=cellVoltage_017_invalidFlag unsigned 10,1 -m -Var=cellVoltage_018_invalidFlag unsigned 9,1 -m -Var=cellVoltage_019_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_016_019 0,8 4 -m +Var=cellVoltage_016_invalidFlag bit 11,1 -m +Var=cellVoltage_017_invalidFlag bit 10,1 -m +Var=cellVoltage_018_invalidFlag bit 9,1 -m +Var=cellVoltage_019_invalidFlag bit 8,1 -m Var=cellVoltage_016 unsigned 12,13 -m /u:mV Var=cellVoltage_017 unsigned 25,13 -m /u:mV Var=cellVoltage_018 unsigned 38,13 -m /u:mV Var=cellVoltage_019 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_020_023 0,8 5 -m -Var=cellVoltage_020_invalidFlag unsigned 11,1 -m -Var=cellVoltage_021_invalidFlag unsigned 10,1 -m -Var=cellVoltage_022_invalidFlag unsigned 9,1 -m -Var=cellVoltage_023_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_020_023 0,8 5 -m +Var=cellVoltage_020_invalidFlag bit 11,1 -m +Var=cellVoltage_021_invalidFlag bit 10,1 -m +Var=cellVoltage_022_invalidFlag bit 9,1 -m +Var=cellVoltage_023_invalidFlag bit 8,1 -m Var=cellVoltage_020 unsigned 12,13 -m /u:mV Var=cellVoltage_021 unsigned 25,13 -m /u:mV Var=cellVoltage_022 unsigned 38,13 -m /u:mV Var=cellVoltage_023 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_024_027 0,8 6 -m -Var=cellVoltage_024_invalidFlag unsigned 11,1 -m -Var=cellVoltage_025_invalidFlag unsigned 10,1 -m -Var=cellVoltage_026_invalidFlag unsigned 9,1 -m -Var=cellVoltage_027_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_024_027 0,8 6 -m +Var=cellVoltage_024_invalidFlag bit 11,1 -m +Var=cellVoltage_025_invalidFlag bit 10,1 -m +Var=cellVoltage_026_invalidFlag bit 9,1 -m +Var=cellVoltage_027_invalidFlag bit 8,1 -m Var=cellVoltage_024 unsigned 12,13 -m /u:mV Var=cellVoltage_025 unsigned 25,13 -m /u:mV Var=cellVoltage_026 unsigned 38,13 -m /u:mV Var=cellVoltage_027 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_028_031 0,8 7 -m -Var=cellVoltage_028_invalidFlag unsigned 11,1 -m -Var=cellVoltage_029_invalidFlag unsigned 10,1 -m -Var=cellVoltage_030_invalidFlag unsigned 9,1 -m -Var=cellVoltage_031_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_028_031 0,8 7 -m +Var=cellVoltage_028_invalidFlag bit 11,1 -m +Var=cellVoltage_029_invalidFlag bit 10,1 -m +Var=cellVoltage_030_invalidFlag bit 9,1 -m +Var=cellVoltage_031_invalidFlag bit 8,1 -m Var=cellVoltage_028 unsigned 12,13 -m /u:mV Var=cellVoltage_029 unsigned 25,13 -m /u:mV Var=cellVoltage_030 unsigned 38,13 -m /u:mV Var=cellVoltage_031 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_032_035 0,8 8 -m -Var=cellVoltage_032_invalidFlag unsigned 11,1 -m -Var=cellVoltage_033_invalidFlag unsigned 10,1 -m -Var=cellVoltage_034_invalidFlag unsigned 9,1 -m -Var=cellVoltage_035_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_032_035 0,8 8 -m +Var=cellVoltage_032_invalidFlag bit 11,1 -m +Var=cellVoltage_033_invalidFlag bit 10,1 -m +Var=cellVoltage_034_invalidFlag bit 9,1 -m +Var=cellVoltage_035_invalidFlag bit 8,1 -m Var=cellVoltage_032 unsigned 12,13 -m /u:mV Var=cellVoltage_033 unsigned 25,13 -m /u:mV Var=cellVoltage_034 unsigned 38,13 -m /u:mV Var=cellVoltage_035 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_036_039 0,8 9 -m -Var=cellVoltage_036_invalidFlag unsigned 11,1 -m -Var=cellVoltage_037_invalidFlag unsigned 10,1 -m -Var=cellVoltage_038_invalidFlag unsigned 9,1 -m -Var=cellVoltage_039_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_036_039 0,8 9 -m +Var=cellVoltage_036_invalidFlag bit 11,1 -m +Var=cellVoltage_037_invalidFlag bit 10,1 -m +Var=cellVoltage_038_invalidFlag bit 9,1 -m +Var=cellVoltage_039_invalidFlag bit 8,1 -m Var=cellVoltage_036 unsigned 12,13 -m /u:mV Var=cellVoltage_037 unsigned 25,13 -m /u:mV Var=cellVoltage_038 unsigned 38,13 -m /u:mV Var=cellVoltage_039 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_040_043 0,8 0Ah -m -Var=cellVoltage_040_invalidFlag unsigned 11,1 -m -Var=cellVoltage_041_invalidFlag unsigned 10,1 -m -Var=cellVoltage_042_invalidFlag unsigned 9,1 -m -Var=cellVoltage_043_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_040_043 0,8 0Ah -m +Var=cellVoltage_040_invalidFlag bit 11,1 -m +Var=cellVoltage_041_invalidFlag bit 10,1 -m +Var=cellVoltage_042_invalidFlag bit 9,1 -m +Var=cellVoltage_043_invalidFlag bit 8,1 -m Var=cellVoltage_040 unsigned 12,13 -m /u:mV Var=cellVoltage_041 unsigned 25,13 -m /u:mV Var=cellVoltage_042 unsigned 38,13 -m /u:mV Var=cellVoltage_043 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_044_047 0,8 0Bh -m -Var=cellVoltage_044_invalidFlag unsigned 11,1 -m -Var=cellVoltage_045_invalidFlag unsigned 10,1 -m -Var=cellVoltage_046_invalidFlag unsigned 9,1 -m -Var=cellVoltage_047_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_044_047 0,8 0Bh -m +Var=cellVoltage_044_invalidFlag bit 11,1 -m +Var=cellVoltage_045_invalidFlag bit 10,1 -m +Var=cellVoltage_046_invalidFlag bit 9,1 -m +Var=cellVoltage_047_invalidFlag bit 8,1 -m Var=cellVoltage_044 unsigned 12,13 -m /u:mV Var=cellVoltage_045 unsigned 25,13 -m /u:mV Var=cellVoltage_046 unsigned 38,13 -m /u:mV Var=cellVoltage_047 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_048_051 0,8 0Ch -m -Var=cellVoltage_048_invalidFlag unsigned 11,1 -m -Var=cellVoltage_049_invalidFlag unsigned 10,1 -m -Var=cellVoltage_050_invalidFlag unsigned 9,1 -m -Var=cellVoltage_051_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_048_051 0,8 0Ch -m +Var=cellVoltage_048_invalidFlag bit 11,1 -m +Var=cellVoltage_049_invalidFlag bit 10,1 -m +Var=cellVoltage_050_invalidFlag bit 9,1 -m +Var=cellVoltage_051_invalidFlag bit 8,1 -m Var=cellVoltage_048 unsigned 12,13 -m /u:mV Var=cellVoltage_049 unsigned 25,13 -m /u:mV Var=cellVoltage_050 unsigned 38,13 -m /u:mV Var=cellVoltage_051 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_052_055 0,8 0Dh -m -Var=cellVoltage_052_invalidFlag unsigned 11,1 -m -Var=cellVoltage_053_invalidFlag unsigned 10,1 -m -Var=cellVoltage_054_invalidFlag unsigned 9,1 -m -Var=cellVoltage_055_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_052_055 0,8 0Dh -m +Var=cellVoltage_052_invalidFlag bit 11,1 -m +Var=cellVoltage_053_invalidFlag bit 10,1 -m +Var=cellVoltage_054_invalidFlag bit 9,1 -m +Var=cellVoltage_055_invalidFlag bit 8,1 -m Var=cellVoltage_052 unsigned 12,13 -m /u:mV Var=cellVoltage_053 unsigned 25,13 -m /u:mV Var=cellVoltage_054 unsigned 38,13 -m /u:mV Var=cellVoltage_055 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_056_059 0,8 0Eh -m -Var=cellVoltage_056_invalidFlag unsigned 11,1 -m -Var=cellVoltage_057_invalidFlag unsigned 10,1 -m -Var=cellVoltage_058_invalidFlag unsigned 9,1 -m -Var=cellVoltage_059_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_056_059 0,8 0Eh -m +Var=cellVoltage_056_invalidFlag bit 11,1 -m +Var=cellVoltage_057_invalidFlag bit 10,1 -m +Var=cellVoltage_058_invalidFlag bit 9,1 -m +Var=cellVoltage_059_invalidFlag bit 8,1 -m Var=cellVoltage_056 unsigned 12,13 -m /u:mV Var=cellVoltage_057 unsigned 25,13 -m /u:mV Var=cellVoltage_058 unsigned 38,13 -m /u:mV Var=cellVoltage_059 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_060_063 0,8 0Fh -m -Var=cellVoltage_060_invalidFlag unsigned 11,1 -m -Var=cellVoltage_061_invalidFlag unsigned 10,1 -m -Var=cellVoltage_062_invalidFlag unsigned 9,1 -m -Var=cellVoltage_063_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_060_063 0,8 0Fh -m +Var=cellVoltage_060_invalidFlag bit 11,1 -m +Var=cellVoltage_061_invalidFlag bit 10,1 -m +Var=cellVoltage_062_invalidFlag bit 9,1 -m +Var=cellVoltage_063_invalidFlag bit 8,1 -m Var=cellVoltage_060 unsigned 12,13 -m /u:mV Var=cellVoltage_061 unsigned 25,13 -m /u:mV Var=cellVoltage_062 unsigned 38,13 -m /u:mV Var=cellVoltage_063 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_064_067 0,8 10h -m -Var=cellVoltage_064_invalidFlag unsigned 11,1 -m -Var=cellVoltage_065_invalidFlag unsigned 10,1 -m -Var=cellVoltage_066_invalidFlag unsigned 9,1 -m -Var=cellVoltage_067_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_064_067 0,8 10h -m +Var=cellVoltage_064_invalidFlag bit 11,1 -m +Var=cellVoltage_065_invalidFlag bit 10,1 -m +Var=cellVoltage_066_invalidFlag bit 9,1 -m +Var=cellVoltage_067_invalidFlag bit 8,1 -m Var=cellVoltage_064 unsigned 12,13 -m /u:mV Var=cellVoltage_065 unsigned 25,13 -m /u:mV Var=cellVoltage_066 unsigned 38,13 -m /u:mV Var=cellVoltage_067 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_068_071 0,8 11h -m -Var=cellVoltage_068_invalidFlag unsigned 11,1 -m -Var=cellVoltage_069_invalidFlag unsigned 10,1 -m -Var=cellVoltage_070_invalidFlag unsigned 9,1 -m -Var=cellVoltage_071_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_068_071 0,8 11h -m +Var=cellVoltage_068_invalidFlag bit 11,1 -m +Var=cellVoltage_069_invalidFlag bit 10,1 -m +Var=cellVoltage_070_invalidFlag bit 9,1 -m +Var=cellVoltage_071_invalidFlag bit 8,1 -m Var=cellVoltage_068 unsigned 12,13 -m /u:mV Var=cellVoltage_069 unsigned 25,13 -m /u:mV Var=cellVoltage_070 unsigned 38,13 -m /u:mV Var=cellVoltage_071 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_072_075 0,8 12h -m -Var=cellVoltage_072_invalidFlag unsigned 11,1 -m -Var=cellVoltage_073_invalidFlag unsigned 10,1 -m -Var=cellVoltage_074_invalidFlag unsigned 9,1 -m -Var=cellVoltage_075_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_072_075 0,8 12h -m +Var=cellVoltage_072_invalidFlag bit 11,1 -m +Var=cellVoltage_073_invalidFlag bit 10,1 -m +Var=cellVoltage_074_invalidFlag bit 9,1 -m +Var=cellVoltage_075_invalidFlag bit 8,1 -m Var=cellVoltage_072 unsigned 12,13 -m /u:mV Var=cellVoltage_073 unsigned 25,13 -m /u:mV Var=cellVoltage_074 unsigned 38,13 -m /u:mV Var=cellVoltage_075 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_076_079 0,8 13h -m -Var=cellVoltage_076_invalidFlag unsigned 11,1 -m -Var=cellVoltage_077_invalidFlag unsigned 10,1 -m -Var=cellVoltage_078_invalidFlag unsigned 9,1 -m -Var=cellVoltage_079_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_076_079 0,8 13h -m +Var=cellVoltage_076_invalidFlag bit 11,1 -m +Var=cellVoltage_077_invalidFlag bit 10,1 -m +Var=cellVoltage_078_invalidFlag bit 9,1 -m +Var=cellVoltage_079_invalidFlag bit 8,1 -m Var=cellVoltage_076 unsigned 12,13 -m /u:mV Var=cellVoltage_077 unsigned 25,13 -m /u:mV Var=cellVoltage_078 unsigned 38,13 -m /u:mV Var=cellVoltage_079 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_080_083 0,8 14h -m -Var=cellVoltage_080_invalidFlag unsigned 11,1 -m -Var=cellVoltage_081_invalidFlag unsigned 10,1 -m -Var=cellVoltage_082_invalidFlag unsigned 9,1 -m -Var=cellVoltage_083_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_080_083 0,8 14h -m +Var=cellVoltage_080_invalidFlag bit 11,1 -m +Var=cellVoltage_081_invalidFlag bit 10,1 -m +Var=cellVoltage_082_invalidFlag bit 9,1 -m +Var=cellVoltage_083_invalidFlag bit 8,1 -m Var=cellVoltage_080 unsigned 12,13 -m /u:mV Var=cellVoltage_081 unsigned 25,13 -m /u:mV Var=cellVoltage_082 unsigned 38,13 -m /u:mV Var=cellVoltage_083 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_084_087 0,8 15h -m -Var=cellVoltage_084_invalidFlag unsigned 11,1 -m -Var=cellVoltage_085_invalidFlag unsigned 10,1 -m -Var=cellVoltage_086_invalidFlag unsigned 9,1 -m -Var=cellVoltage_087_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_084_087 0,8 15h -m +Var=cellVoltage_084_invalidFlag bit 11,1 -m +Var=cellVoltage_085_invalidFlag bit 10,1 -m +Var=cellVoltage_086_invalidFlag bit 9,1 -m +Var=cellVoltage_087_invalidFlag bit 8,1 -m Var=cellVoltage_084 unsigned 12,13 -m /u:mV Var=cellVoltage_085 unsigned 25,13 -m /u:mV Var=cellVoltage_086 unsigned 38,13 -m /u:mV Var=cellVoltage_087 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_088_091 0,8 16h -m -Var=cellVoltage_088_invalidFlag unsigned 11,1 -m -Var=cellVoltage_089_invalidFlag unsigned 10,1 -m -Var=cellVoltage_090_invalidFlag unsigned 9,1 -m -Var=cellVoltage_091_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_088_091 0,8 16h -m +Var=cellVoltage_088_invalidFlag bit 11,1 -m +Var=cellVoltage_089_invalidFlag bit 10,1 -m +Var=cellVoltage_090_invalidFlag bit 9,1 -m +Var=cellVoltage_091_invalidFlag bit 8,1 -m Var=cellVoltage_088 unsigned 12,13 -m /u:mV Var=cellVoltage_089 unsigned 25,13 -m /u:mV Var=cellVoltage_090 unsigned 38,13 -m /u:mV Var=cellVoltage_091 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_092_095 0,8 17h -m -Var=cellVoltage_092_invalidFlag unsigned 11,1 -m -Var=cellVoltage_093_invalidFlag unsigned 10,1 -m -Var=cellVoltage_094_invalidFlag unsigned 9,1 -m -Var=cellVoltage_095_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_092_095 0,8 17h -m +Var=cellVoltage_092_invalidFlag bit 11,1 -m +Var=cellVoltage_093_invalidFlag bit 10,1 -m +Var=cellVoltage_094_invalidFlag bit 9,1 -m +Var=cellVoltage_095_invalidFlag bit 8,1 -m Var=cellVoltage_092 unsigned 12,13 -m /u:mV Var=cellVoltage_093 unsigned 25,13 -m /u:mV Var=cellVoltage_094 unsigned 38,13 -m /u:mV Var=cellVoltage_095 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_096_099 0,8 18h -m -Var=cellVoltage_096_invalidFlag unsigned 11,1 -m -Var=cellVoltage_097_invalidFlag unsigned 10,1 -m -Var=cellVoltage_098_invalidFlag unsigned 9,1 -m -Var=cellVoltage_099_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_096_099 0,8 18h -m +Var=cellVoltage_096_invalidFlag bit 11,1 -m +Var=cellVoltage_097_invalidFlag bit 10,1 -m +Var=cellVoltage_098_invalidFlag bit 9,1 -m +Var=cellVoltage_099_invalidFlag bit 8,1 -m Var=cellVoltage_096 unsigned 12,13 -m /u:mV Var=cellVoltage_097 unsigned 25,13 -m /u:mV Var=cellVoltage_098 unsigned 38,13 -m /u:mV Var=cellVoltage_099 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_100_103 0,8 19h -m -Var=cellVoltage_100_invalidFlag unsigned 11,1 -m -Var=cellVoltage_101_invalidFlag unsigned 10,1 -m -Var=cellVoltage_102_invalidFlag unsigned 9,1 -m -Var=cellVoltage_103_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_100_103 0,8 19h -m +Var=cellVoltage_100_invalidFlag bit 11,1 -m +Var=cellVoltage_101_invalidFlag bit 10,1 -m +Var=cellVoltage_102_invalidFlag bit 9,1 -m +Var=cellVoltage_103_invalidFlag bit 8,1 -m Var=cellVoltage_100 unsigned 12,13 -m /u:mV Var=cellVoltage_101 unsigned 25,13 -m /u:mV Var=cellVoltage_102 unsigned 38,13 -m /u:mV Var=cellVoltage_103 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_104_107 0,8 1Ah -m -Var=cellVoltage_104_invalidFlag unsigned 11,1 -m -Var=cellVoltage_105_invalidFlag unsigned 10,1 -m -Var=cellVoltage_106_invalidFlag unsigned 9,1 -m -Var=cellVoltage_107_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_104_107 0,8 1Ah -m +Var=cellVoltage_104_invalidFlag bit 11,1 -m +Var=cellVoltage_105_invalidFlag bit 10,1 -m +Var=cellVoltage_106_invalidFlag bit 9,1 -m +Var=cellVoltage_107_invalidFlag bit 8,1 -m Var=cellVoltage_104 unsigned 12,13 -m /u:mV Var=cellVoltage_105 unsigned 25,13 -m /u:mV Var=cellVoltage_106 unsigned 38,13 -m /u:mV Var=cellVoltage_107 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_108_111 0,8 1Bh -m -Var=cellVoltage_108_invalidFlag unsigned 11,1 -m -Var=cellVoltage_109_invalidFlag unsigned 10,1 -m -Var=cellVoltage_110_invalidFlag unsigned 9,1 -m -Var=cellVoltage_111_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_108_111 0,8 1Bh -m +Var=cellVoltage_108_invalidFlag bit 11,1 -m +Var=cellVoltage_109_invalidFlag bit 10,1 -m +Var=cellVoltage_110_invalidFlag bit 9,1 -m +Var=cellVoltage_111_invalidFlag bit 8,1 -m Var=cellVoltage_108 unsigned 12,13 -m /u:mV Var=cellVoltage_109 unsigned 25,13 -m /u:mV Var=cellVoltage_110 unsigned 38,13 -m /u:mV Var=cellVoltage_111 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_112_115 0,8 1Ch -m -Var=cellVoltage_112_invalidFlag unsigned 11,1 -m -Var=cellVoltage_113_invalidFlag unsigned 10,1 -m -Var=cellVoltage_114_invalidFlag unsigned 9,1 -m -Var=cellVoltage_115_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_112_115 0,8 1Ch -m +Var=cellVoltage_112_invalidFlag bit 11,1 -m +Var=cellVoltage_113_invalidFlag bit 10,1 -m +Var=cellVoltage_114_invalidFlag bit 9,1 -m +Var=cellVoltage_115_invalidFlag bit 8,1 -m Var=cellVoltage_112 unsigned 12,13 -m /u:mV Var=cellVoltage_113 unsigned 25,13 -m /u:mV Var=cellVoltage_114 unsigned 38,13 -m /u:mV Var=cellVoltage_115 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_116_119 0,8 1Dh -m -Var=cellVoltage_116_invalidFlag unsigned 11,1 -m -Var=cellVoltage_117_invalidFlag unsigned 10,1 -m -Var=cellVoltage_118_invalidFlag unsigned 9,1 -m -Var=cellVoltage_119_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_116_119 0,8 1Dh -m +Var=cellVoltage_116_invalidFlag bit 11,1 -m +Var=cellVoltage_117_invalidFlag bit 10,1 -m +Var=cellVoltage_118_invalidFlag bit 9,1 -m +Var=cellVoltage_119_invalidFlag bit 8,1 -m Var=cellVoltage_116 unsigned 12,13 -m /u:mV Var=cellVoltage_117 unsigned 25,13 -m /u:mV Var=cellVoltage_118 unsigned 38,13 -m /u:mV Var=cellVoltage_119 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_120_123 0,8 1Eh -m -Var=cellVoltage_120_invalidFlag unsigned 11,1 -m -Var=cellVoltage_121_invalidFlag unsigned 10,1 -m -Var=cellVoltage_122_invalidFlag unsigned 9,1 -m -Var=cellVoltage_123_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_120_123 0,8 1Eh -m +Var=cellVoltage_120_invalidFlag bit 11,1 -m +Var=cellVoltage_121_invalidFlag bit 10,1 -m +Var=cellVoltage_122_invalidFlag bit 9,1 -m +Var=cellVoltage_123_invalidFlag bit 8,1 -m Var=cellVoltage_120 unsigned 12,13 -m /u:mV Var=cellVoltage_121 unsigned 25,13 -m /u:mV Var=cellVoltage_122 unsigned 38,13 -m /u:mV Var=cellVoltage_123 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_124_127 0,8 1Fh -m -Var=cellVoltage_124_invalidFlag unsigned 11,1 -m -Var=cellVoltage_125_invalidFlag unsigned 10,1 -m -Var=cellVoltage_126_invalidFlag unsigned 9,1 -m -Var=cellVoltage_127_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_124_127 0,8 1Fh -m +Var=cellVoltage_124_invalidFlag bit 11,1 -m +Var=cellVoltage_125_invalidFlag bit 10,1 -m +Var=cellVoltage_126_invalidFlag bit 9,1 -m +Var=cellVoltage_127_invalidFlag bit 8,1 -m Var=cellVoltage_124 unsigned 12,13 -m /u:mV Var=cellVoltage_125 unsigned 25,13 -m /u:mV Var=cellVoltage_126 unsigned 38,13 -m /u:mV Var=cellVoltage_127 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_128_131 0,8 20h -m -Var=cellVoltage_128_invalidFlag unsigned 11,1 -m -Var=cellVoltage_129_invalidFlag unsigned 10,1 -m -Var=cellVoltage_130_invalidFlag unsigned 9,1 -m -Var=cellVoltage_131_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_128_131 0,8 20h -m +Var=cellVoltage_128_invalidFlag bit 11,1 -m +Var=cellVoltage_129_invalidFlag bit 10,1 -m +Var=cellVoltage_130_invalidFlag bit 9,1 -m +Var=cellVoltage_131_invalidFlag bit 8,1 -m Var=cellVoltage_128 unsigned 12,13 -m /u:mV Var=cellVoltage_129 unsigned 25,13 -m /u:mV Var=cellVoltage_130 unsigned 38,13 -m /u:mV Var=cellVoltage_131 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_132_135 0,8 21h -m -Var=cellVoltage_132_invalidFlag unsigned 11,1 -m -Var=cellVoltage_133_invalidFlag unsigned 10,1 -m -Var=cellVoltage_134_invalidFlag unsigned 9,1 -m -Var=cellVoltage_135_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_132_135 0,8 21h -m +Var=cellVoltage_132_invalidFlag bit 11,1 -m +Var=cellVoltage_133_invalidFlag bit 10,1 -m +Var=cellVoltage_134_invalidFlag bit 9,1 -m +Var=cellVoltage_135_invalidFlag bit 8,1 -m Var=cellVoltage_132 unsigned 12,13 -m /u:mV Var=cellVoltage_133 unsigned 25,13 -m /u:mV Var=cellVoltage_134 unsigned 38,13 -m /u:mV Var=cellVoltage_135 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_136_139 0,8 22h -m -Var=cellVoltage_136_invalidFlag unsigned 11,1 -m -Var=cellVoltage_137_invalidFlag unsigned 10,1 -m -Var=cellVoltage_138_invalidFlag unsigned 9,1 -m -Var=cellVoltage_139_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_136_139 0,8 22h -m +Var=cellVoltage_136_invalidFlag bit 11,1 -m +Var=cellVoltage_137_invalidFlag bit 10,1 -m +Var=cellVoltage_138_invalidFlag bit 9,1 -m +Var=cellVoltage_139_invalidFlag bit 8,1 -m Var=cellVoltage_136 unsigned 12,13 -m /u:mV Var=cellVoltage_137 unsigned 25,13 -m /u:mV Var=cellVoltage_138 unsigned 38,13 -m /u:mV Var=cellVoltage_139 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_140_143 0,8 23h -m -Var=cellVoltage_140_invalidFlag unsigned 11,1 -m -Var=cellVoltage_141_invalidFlag unsigned 10,1 -m -Var=cellVoltage_142_invalidFlag unsigned 9,1 -m -Var=cellVoltage_143_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_140_143 0,8 23h -m +Var=cellVoltage_140_invalidFlag bit 11,1 -m +Var=cellVoltage_141_invalidFlag bit 10,1 -m +Var=cellVoltage_142_invalidFlag bit 9,1 -m +Var=cellVoltage_143_invalidFlag bit 8,1 -m Var=cellVoltage_140 unsigned 12,13 -m /u:mV Var=cellVoltage_141 unsigned 25,13 -m /u:mV Var=cellVoltage_142 unsigned 38,13 -m /u:mV Var=cellVoltage_143 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_144_147 0,8 24h -m -Var=cellVoltage_144_invalidFlag unsigned 11,1 -m -Var=cellVoltage_145_invalidFlag unsigned 10,1 -m -Var=cellVoltage_146_invalidFlag unsigned 9,1 -m -Var=cellVoltage_147_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_144_147 0,8 24h -m +Var=cellVoltage_144_invalidFlag bit 11,1 -m +Var=cellVoltage_145_invalidFlag bit 10,1 -m +Var=cellVoltage_146_invalidFlag bit 9,1 -m +Var=cellVoltage_147_invalidFlag bit 8,1 -m Var=cellVoltage_144 unsigned 12,13 -m /u:mV Var=cellVoltage_145 unsigned 25,13 -m /u:mV Var=cellVoltage_146 unsigned 38,13 -m /u:mV Var=cellVoltage_147 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_148_151 0,8 25h -m -Var=cellVoltage_148_invalidFlag unsigned 11,1 -m -Var=cellVoltage_149_invalidFlag unsigned 10,1 -m -Var=cellVoltage_150_invalidFlag unsigned 9,1 -m -Var=cellVoltage_151_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_148_151 0,8 25h -m +Var=cellVoltage_148_invalidFlag bit 11,1 -m +Var=cellVoltage_149_invalidFlag bit 10,1 -m +Var=cellVoltage_150_invalidFlag bit 9,1 -m +Var=cellVoltage_151_invalidFlag bit 8,1 -m Var=cellVoltage_148 unsigned 12,13 -m /u:mV Var=cellVoltage_149 unsigned 25,13 -m /u:mV Var=cellVoltage_150 unsigned 38,13 -m /u:mV Var=cellVoltage_151 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_152_155 0,8 26h -m -Var=cellVoltage_152_invalidFlag unsigned 11,1 -m -Var=cellVoltage_153_invalidFlag unsigned 10,1 -m -Var=cellVoltage_154_invalidFlag unsigned 9,1 -m -Var=cellVoltage_155_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_152_155 0,8 26h -m +Var=cellVoltage_152_invalidFlag bit 11,1 -m +Var=cellVoltage_153_invalidFlag bit 10,1 -m +Var=cellVoltage_154_invalidFlag bit 9,1 -m +Var=cellVoltage_155_invalidFlag bit 8,1 -m Var=cellVoltage_152 unsigned 12,13 -m /u:mV Var=cellVoltage_153 unsigned 25,13 -m /u:mV Var=cellVoltage_154 unsigned 38,13 -m /u:mV Var=cellVoltage_155 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_156_159 0,8 27h -m -Var=cellVoltage_156_invalidFlag unsigned 11,1 -m -Var=cellVoltage_157_invalidFlag unsigned 10,1 -m -Var=cellVoltage_158_invalidFlag unsigned 9,1 -m -Var=cellVoltage_159_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_156_159 0,8 27h -m +Var=cellVoltage_156_invalidFlag bit 11,1 -m +Var=cellVoltage_157_invalidFlag bit 10,1 -m +Var=cellVoltage_158_invalidFlag bit 9,1 -m +Var=cellVoltage_159_invalidFlag bit 8,1 -m Var=cellVoltage_156 unsigned 12,13 -m /u:mV Var=cellVoltage_157 unsigned 25,13 -m /u:mV Var=cellVoltage_158 unsigned 38,13 -m /u:mV Var=cellVoltage_159 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_160_163 0,8 28h -m -Var=cellVoltage_160_invalidFlag unsigned 11,1 -m -Var=cellVoltage_161_invalidFlag unsigned 10,1 -m -Var=cellVoltage_162_invalidFlag unsigned 9,1 -m -Var=cellVoltage_163_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_160_163 0,8 28h -m +Var=cellVoltage_160_invalidFlag bit 11,1 -m +Var=cellVoltage_161_invalidFlag bit 10,1 -m +Var=cellVoltage_162_invalidFlag bit 9,1 -m +Var=cellVoltage_163_invalidFlag bit 8,1 -m Var=cellVoltage_160 unsigned 12,13 -m /u:mV Var=cellVoltage_161 unsigned 25,13 -m /u:mV Var=cellVoltage_162 unsigned 38,13 -m /u:mV Var=cellVoltage_163 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_164_167 0,8 29h -m -Var=cellVoltage_164_invalidFlag unsigned 11,1 -m -Var=cellVoltage_165_invalidFlag unsigned 10,1 -m -Var=cellVoltage_166_invalidFlag unsigned 9,1 -m -Var=cellVoltage_167_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_164_167 0,8 29h -m +Var=cellVoltage_164_invalidFlag bit 11,1 -m +Var=cellVoltage_165_invalidFlag bit 10,1 -m +Var=cellVoltage_166_invalidFlag bit 9,1 -m +Var=cellVoltage_167_invalidFlag bit 8,1 -m Var=cellVoltage_164 unsigned 12,13 -m /u:mV Var=cellVoltage_165 unsigned 25,13 -m /u:mV Var=cellVoltage_166 unsigned 38,13 -m /u:mV Var=cellVoltage_167 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_168_171 0,8 2Ah -m -Var=cellVoltage_168_invalidFlag unsigned 11,1 -m -Var=cellVoltage_169_invalidFlag unsigned 10,1 -m -Var=cellVoltage_170_invalidFlag unsigned 9,1 -m -Var=cellVoltage_171_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_168_171 0,8 2Ah -m +Var=cellVoltage_168_invalidFlag bit 11,1 -m +Var=cellVoltage_169_invalidFlag bit 10,1 -m +Var=cellVoltage_170_invalidFlag bit 9,1 -m +Var=cellVoltage_171_invalidFlag bit 8,1 -m Var=cellVoltage_168 unsigned 12,13 -m /u:mV Var=cellVoltage_169 unsigned 25,13 -m /u:mV Var=cellVoltage_170 unsigned 38,13 -m /u:mV Var=cellVoltage_171 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_172_175 0,8 2Bh -m -Var=cellVoltage_172_invalidFlag unsigned 11,1 -m -Var=cellVoltage_173_invalidFlag unsigned 10,1 -m -Var=cellVoltage_174_invalidFlag unsigned 9,1 -m -Var=cellVoltage_175_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_172_175 0,8 2Bh -m +Var=cellVoltage_172_invalidFlag bit 11,1 -m +Var=cellVoltage_173_invalidFlag bit 10,1 -m +Var=cellVoltage_174_invalidFlag bit 9,1 -m +Var=cellVoltage_175_invalidFlag bit 8,1 -m Var=cellVoltage_172 unsigned 12,13 -m /u:mV Var=cellVoltage_173 unsigned 25,13 -m /u:mV Var=cellVoltage_174 unsigned 38,13 -m /u:mV Var=cellVoltage_175 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_176_179 0,8 2Ch -m -Var=cellVoltage_176_invalidFlag unsigned 11,1 -m -Var=cellVoltage_177_invalidFlag unsigned 10,1 -m -Var=cellVoltage_178_invalidFlag unsigned 9,1 -m -Var=cellVoltage_179_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_176_179 0,8 2Ch -m +Var=cellVoltage_176_invalidFlag bit 11,1 -m +Var=cellVoltage_177_invalidFlag bit 10,1 -m +Var=cellVoltage_178_invalidFlag bit 9,1 -m +Var=cellVoltage_179_invalidFlag bit 8,1 -m Var=cellVoltage_176 unsigned 12,13 -m /u:mV Var=cellVoltage_177 unsigned 25,13 -m /u:mV Var=cellVoltage_178 unsigned 38,13 -m /u:mV Var=cellVoltage_179 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_180_183 0,8 2Dh -m -Var=cellVoltage_180_invalidFlag unsigned 11,1 -m -Var=cellVoltage_181_invalidFlag unsigned 10,1 -m -Var=cellVoltage_182_invalidFlag unsigned 9,1 -m -Var=cellVoltage_183_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_180_183 0,8 2Dh -m +Var=cellVoltage_180_invalidFlag bit 11,1 -m +Var=cellVoltage_181_invalidFlag bit 10,1 -m +Var=cellVoltage_182_invalidFlag bit 9,1 -m +Var=cellVoltage_183_invalidFlag bit 8,1 -m Var=cellVoltage_180 unsigned 12,13 -m /u:mV Var=cellVoltage_181 unsigned 25,13 -m /u:mV Var=cellVoltage_182 unsigned 38,13 -m /u:mV Var=cellVoltage_183 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_184_187 0,8 2Eh -m -Var=cellVoltage_184_invalidFlag unsigned 11,1 -m -Var=cellVoltage_185_invalidFlag unsigned 10,1 -m -Var=cellVoltage_186_invalidFlag unsigned 9,1 -m -Var=cellVoltage_187_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_184_187 0,8 2Eh -m +Var=cellVoltage_184_invalidFlag bit 11,1 -m +Var=cellVoltage_185_invalidFlag bit 10,1 -m +Var=cellVoltage_186_invalidFlag bit 9,1 -m +Var=cellVoltage_187_invalidFlag bit 8,1 -m Var=cellVoltage_184 unsigned 12,13 -m /u:mV Var=cellVoltage_185 unsigned 25,13 -m /u:mV Var=cellVoltage_186 unsigned 38,13 -m /u:mV Var=cellVoltage_187 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_188_191 0,8 2Fh -m -Var=cellVoltage_188_invalidFlag unsigned 11,1 -m -Var=cellVoltage_189_invalidFlag unsigned 10,1 -m -Var=cellVoltage_190_invalidFlag unsigned 9,1 -m -Var=cellVoltage_191_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_188_191 0,8 2Fh -m +Var=cellVoltage_188_invalidFlag bit 11,1 -m +Var=cellVoltage_189_invalidFlag bit 10,1 -m +Var=cellVoltage_190_invalidFlag bit 9,1 -m +Var=cellVoltage_191_invalidFlag bit 8,1 -m Var=cellVoltage_188 unsigned 12,13 -m /u:mV Var=cellVoltage_189 unsigned 25,13 -m /u:mV Var=cellVoltage_190 unsigned 38,13 -m /u:mV Var=cellVoltage_191 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_192_195 0,8 30h -m -Var=cellVoltage_192_invalidFlag unsigned 11,1 -m -Var=cellVoltage_193_invalidFlag unsigned 10,1 -m -Var=cellVoltage_194_invalidFlag unsigned 9,1 -m -Var=cellVoltage_195_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_192_195 0,8 30h -m +Var=cellVoltage_192_invalidFlag bit 11,1 -m +Var=cellVoltage_193_invalidFlag bit 10,1 -m +Var=cellVoltage_194_invalidFlag bit 9,1 -m +Var=cellVoltage_195_invalidFlag bit 8,1 -m Var=cellVoltage_192 unsigned 12,13 -m /u:mV Var=cellVoltage_193 unsigned 25,13 -m /u:mV Var=cellVoltage_194 unsigned 38,13 -m /u:mV Var=cellVoltage_195 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_196_199 0,8 31h -m -Var=cellVoltage_196_invalidFlag unsigned 11,1 -m -Var=cellVoltage_197_invalidFlag unsigned 10,1 -m -Var=cellVoltage_198_invalidFlag unsigned 9,1 -m -Var=cellVoltage_199_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_196_199 0,8 31h -m +Var=cellVoltage_196_invalidFlag bit 11,1 -m +Var=cellVoltage_197_invalidFlag bit 10,1 -m +Var=cellVoltage_198_invalidFlag bit 9,1 -m +Var=cellVoltage_199_invalidFlag bit 8,1 -m Var=cellVoltage_196 unsigned 12,13 -m /u:mV Var=cellVoltage_197 unsigned 25,13 -m /u:mV Var=cellVoltage_198 unsigned 38,13 -m /u:mV Var=cellVoltage_199 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_200_203 0,8 32h -m -Var=cellVoltage_200_invalidFlag unsigned 11,1 -m -Var=cellVoltage_201_invalidFlag unsigned 10,1 -m -Var=cellVoltage_202_invalidFlag unsigned 9,1 -m -Var=cellVoltage_203_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_200_203 0,8 32h -m +Var=cellVoltage_200_invalidFlag bit 11,1 -m +Var=cellVoltage_201_invalidFlag bit 10,1 -m +Var=cellVoltage_202_invalidFlag bit 9,1 -m +Var=cellVoltage_203_invalidFlag bit 8,1 -m Var=cellVoltage_200 unsigned 12,13 -m /u:mV Var=cellVoltage_201 unsigned 25,13 -m /u:mV Var=cellVoltage_202 unsigned 38,13 -m /u:mV Var=cellVoltage_203 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_204_207 0,8 33h -m -Var=cellVoltage_204_invalidFlag unsigned 11,1 -m -Var=cellVoltage_205_invalidFlag unsigned 10,1 -m -Var=cellVoltage_206_invalidFlag unsigned 9,1 -m -Var=cellVoltage_207_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_204_207 0,8 33h -m +Var=cellVoltage_204_invalidFlag bit 11,1 -m +Var=cellVoltage_205_invalidFlag bit 10,1 -m +Var=cellVoltage_206_invalidFlag bit 9,1 -m +Var=cellVoltage_207_invalidFlag bit 8,1 -m Var=cellVoltage_204 unsigned 12,13 -m /u:mV Var=cellVoltage_205 unsigned 25,13 -m /u:mV Var=cellVoltage_206 unsigned 38,13 -m /u:mV Var=cellVoltage_207 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_208_211 0,8 34h -m -Var=cellVoltage_208_invalidFlag unsigned 11,1 -m -Var=cellVoltage_209_invalidFlag unsigned 10,1 -m -Var=cellVoltage_210_invalidFlag unsigned 9,1 -m -Var=cellVoltage_211_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_208_211 0,8 34h -m +Var=cellVoltage_208_invalidFlag bit 11,1 -m +Var=cellVoltage_209_invalidFlag bit 10,1 -m +Var=cellVoltage_210_invalidFlag bit 9,1 -m +Var=cellVoltage_211_invalidFlag bit 8,1 -m Var=cellVoltage_208 unsigned 12,13 -m /u:mV Var=cellVoltage_209 unsigned 25,13 -m /u:mV Var=cellVoltage_210 unsigned 38,13 -m /u:mV Var=cellVoltage_211 unsigned 51,13 -m /u:mV -[foxBMS_CellVoltage] -DLC=8 -Mux=mux_cellVoltage_212_215 0,8 35h -m -Var=cellVoltage_212_invalidFlag unsigned 11,1 -m -Var=cellVoltage_213_invalidFlag unsigned 10,1 -m -Var=cellVoltage_214_invalidFlag unsigned 9,1 -m -Var=cellVoltage_215_invalidFlag unsigned 8,1 -m +[foxBMS_CellVoltages] +Len=8 +CycleTime=5400 -p +Mux=mux_cellVoltage_212_215 0,8 35h -m +Var=cellVoltage_212_invalidFlag bit 11,1 -m +Var=cellVoltage_213_invalidFlag bit 10,1 -m +Var=cellVoltage_214_invalidFlag bit 9,1 -m +Var=cellVoltage_215_invalidFlag bit 8,1 -m Var=cellVoltage_212 unsigned 12,13 -m /u:mV Var=cellVoltage_213 unsigned 25,13 -m /u:mV Var=cellVoltage_214 unsigned 38,13 -m /u:mV Var=cellVoltage_215 unsigned 51,13 -m /u:mV -[foxBMS_CellTemperature] -ID=250h // (in:can_cbs_tx_temperature.c:CAN_TxCellTemperature) -DLC=8 -Mux=mux_cellTemperature_000_005 0,8 0 -m -Var=cellTemperature_000_invalidFlag unsigned 15,1 -m -Var=cellTemperature_001_invalidFlag unsigned 14,1 -m -Var=cellTemperature_002_invalidFlag unsigned 13,1 -m -Var=cellTemperature_003_invalidFlag unsigned 12,1 -m -Var=cellTemperature_004_invalidFlag unsigned 11,1 -m -Var=cellTemperature_005_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +ID=250h // (in:can_cbs_tx_cell-temperatures.c:CANTX_CellTemperatures, fv:tx) +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_000_005 0,8 0 -m +Var=cellTemperature_000_invalidFlag bit 15,1 -m +Var=cellTemperature_001_invalidFlag bit 14,1 -m +Var=cellTemperature_002_invalidFlag bit 13,1 -m +Var=cellTemperature_003_invalidFlag bit 12,1 -m +Var=cellTemperature_004_invalidFlag bit 11,1 -m +Var=cellTemperature_005_invalidFlag bit 10,1 -m Var=cellTemperature_000 signed 16,8 -m /u:degC Var=cellTemperature_001 signed 24,8 -m /u:degC Var=cellTemperature_002 signed 32,8 -m /u:degC @@ -755,15 +794,16 @@ Var=cellTemperature_003 signed 40,8 -m /u:degC Var=cellTemperature_004 signed 48,8 -m /u:degC Var=cellTemperature_005 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_006_011 0,8 1 -m -Var=cellTemperature_006_invalidFlag unsigned 15,1 -m -Var=cellTemperature_007_invalidFlag unsigned 14,1 -m -Var=cellTemperature_008_invalidFlag unsigned 13,1 -m -Var=cellTemperature_009_invalidFlag unsigned 12,1 -m -Var=cellTemperature_010_invalidFlag unsigned 11,1 -m -Var=cellTemperature_011_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_006_011 0,8 1 -m +Var=cellTemperature_006_invalidFlag bit 15,1 -m +Var=cellTemperature_007_invalidFlag bit 14,1 -m +Var=cellTemperature_008_invalidFlag bit 13,1 -m +Var=cellTemperature_009_invalidFlag bit 12,1 -m +Var=cellTemperature_010_invalidFlag bit 11,1 -m +Var=cellTemperature_011_invalidFlag bit 10,1 -m Var=cellTemperature_006 signed 16,8 -m /u:degC Var=cellTemperature_007 signed 24,8 -m /u:degC Var=cellTemperature_008 signed 32,8 -m /u:degC @@ -771,15 +811,16 @@ Var=cellTemperature_009 signed 40,8 -m /u:degC Var=cellTemperature_010 signed 48,8 -m /u:degC Var=cellTemperature_011 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_012_017 0,8 2 -m -Var=cellTemperature_012_invalidFlag unsigned 15,1 -m -Var=cellTemperature_013_invalidFlag unsigned 14,1 -m -Var=cellTemperature_014_invalidFlag unsigned 13,1 -m -Var=cellTemperature_015_invalidFlag unsigned 12,1 -m -Var=cellTemperature_016_invalidFlag unsigned 11,1 -m -Var=cellTemperature_017_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_012_017 0,8 2 -m +Var=cellTemperature_012_invalidFlag bit 15,1 -m +Var=cellTemperature_013_invalidFlag bit 14,1 -m +Var=cellTemperature_014_invalidFlag bit 13,1 -m +Var=cellTemperature_015_invalidFlag bit 12,1 -m +Var=cellTemperature_016_invalidFlag bit 11,1 -m +Var=cellTemperature_017_invalidFlag bit 10,1 -m Var=cellTemperature_012 signed 16,8 -m /u:degC Var=cellTemperature_013 signed 24,8 -m /u:degC Var=cellTemperature_014 signed 32,8 -m /u:degC @@ -787,15 +828,16 @@ Var=cellTemperature_015 signed 40,8 -m /u:degC Var=cellTemperature_016 signed 48,8 -m /u:degC Var=cellTemperature_017 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_018_023 0,8 3 -m -Var=cellTemperature_018_invalidFlag unsigned 15,1 -m -Var=cellTemperature_019_invalidFlag unsigned 14,1 -m -Var=cellTemperature_020_invalidFlag unsigned 13,1 -m -Var=cellTemperature_021_invalidFlag unsigned 12,1 -m -Var=cellTemperature_022_invalidFlag unsigned 11,1 -m -Var=cellTemperature_023_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_018_023 0,8 3 -m +Var=cellTemperature_018_invalidFlag bit 15,1 -m +Var=cellTemperature_019_invalidFlag bit 14,1 -m +Var=cellTemperature_020_invalidFlag bit 13,1 -m +Var=cellTemperature_021_invalidFlag bit 12,1 -m +Var=cellTemperature_022_invalidFlag bit 11,1 -m +Var=cellTemperature_023_invalidFlag bit 10,1 -m Var=cellTemperature_018 signed 16,8 -m /u:degC Var=cellTemperature_019 signed 24,8 -m /u:degC Var=cellTemperature_020 signed 32,8 -m /u:degC @@ -803,15 +845,16 @@ Var=cellTemperature_021 signed 40,8 -m /u:degC Var=cellTemperature_022 signed 48,8 -m /u:degC Var=cellTemperature_023 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_024_029 0,8 4 -m -Var=cellTemperature_024_invalidFlag unsigned 15,1 -m -Var=cellTemperature_025_invalidFlag unsigned 14,1 -m -Var=cellTemperature_026_invalidFlag unsigned 13,1 -m -Var=cellTemperature_027_invalidFlag unsigned 12,1 -m -Var=cellTemperature_028_invalidFlag unsigned 11,1 -m -Var=cellTemperature_029_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_024_029 0,8 4 -m +Var=cellTemperature_024_invalidFlag bit 15,1 -m +Var=cellTemperature_025_invalidFlag bit 14,1 -m +Var=cellTemperature_026_invalidFlag bit 13,1 -m +Var=cellTemperature_027_invalidFlag bit 12,1 -m +Var=cellTemperature_028_invalidFlag bit 11,1 -m +Var=cellTemperature_029_invalidFlag bit 10,1 -m Var=cellTemperature_024 signed 16,8 -m /u:degC Var=cellTemperature_025 signed 24,8 -m /u:degC Var=cellTemperature_026 signed 32,8 -m /u:degC @@ -819,15 +862,16 @@ Var=cellTemperature_027 signed 40,8 -m /u:degC Var=cellTemperature_028 signed 48,8 -m /u:degC Var=cellTemperature_029 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_030_035 0,8 5 -m -Var=cellTemperature_030_invalidFlag unsigned 15,1 -m -Var=cellTemperature_031_invalidFlag unsigned 14,1 -m -Var=cellTemperature_032_invalidFlag unsigned 13,1 -m -Var=cellTemperature_033_invalidFlag unsigned 12,1 -m -Var=cellTemperature_034_invalidFlag unsigned 11,1 -m -Var=cellTemperature_035_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_030_035 0,8 5 -m +Var=cellTemperature_030_invalidFlag bit 15,1 -m +Var=cellTemperature_031_invalidFlag bit 14,1 -m +Var=cellTemperature_032_invalidFlag bit 13,1 -m +Var=cellTemperature_033_invalidFlag bit 12,1 -m +Var=cellTemperature_034_invalidFlag bit 11,1 -m +Var=cellTemperature_035_invalidFlag bit 10,1 -m Var=cellTemperature_030 signed 16,8 -m /u:degC Var=cellTemperature_031 signed 24,8 -m /u:degC Var=cellTemperature_032 signed 32,8 -m /u:degC @@ -835,15 +879,16 @@ Var=cellTemperature_033 signed 40,8 -m /u:degC Var=cellTemperature_034 signed 48,8 -m /u:degC Var=cellTemperature_035 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_036_041 0,8 6 -m -Var=cellTemperature_036_invalidFlag unsigned 15,1 -m -Var=cellTemperature_037_invalidFlag unsigned 14,1 -m -Var=cellTemperature_038_invalidFlag unsigned 13,1 -m -Var=cellTemperature_039_invalidFlag unsigned 12,1 -m -Var=cellTemperature_040_invalidFlag unsigned 11,1 -m -Var=cellTemperature_041_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_036_041 0,8 6 -m +Var=cellTemperature_036_invalidFlag bit 15,1 -m +Var=cellTemperature_037_invalidFlag bit 14,1 -m +Var=cellTemperature_038_invalidFlag bit 13,1 -m +Var=cellTemperature_039_invalidFlag bit 12,1 -m +Var=cellTemperature_040_invalidFlag bit 11,1 -m +Var=cellTemperature_041_invalidFlag bit 10,1 -m Var=cellTemperature_036 signed 16,8 -m /u:degC Var=cellTemperature_037 signed 24,8 -m /u:degC Var=cellTemperature_038 signed 32,8 -m /u:degC @@ -851,15 +896,16 @@ Var=cellTemperature_039 signed 40,8 -m /u:degC Var=cellTemperature_040 signed 48,8 -m /u:degC Var=cellTemperature_041 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_042_047 0,8 7 -m -Var=cellTemperature_042_invalidFlag unsigned 15,1 -m -Var=cellTemperature_043_invalidFlag unsigned 14,1 -m -Var=cellTemperature_044_invalidFlag unsigned 13,1 -m -Var=cellTemperature_045_invalidFlag unsigned 12,1 -m -Var=cellTemperature_046_invalidFlag unsigned 11,1 -m -Var=cellTemperature_047_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_042_047 0,8 7 -m +Var=cellTemperature_042_invalidFlag bit 15,1 -m +Var=cellTemperature_043_invalidFlag bit 14,1 -m +Var=cellTemperature_044_invalidFlag bit 13,1 -m +Var=cellTemperature_045_invalidFlag bit 12,1 -m +Var=cellTemperature_046_invalidFlag bit 11,1 -m +Var=cellTemperature_047_invalidFlag bit 10,1 -m Var=cellTemperature_042 signed 16,8 -m /u:degC Var=cellTemperature_043 signed 24,8 -m /u:degC Var=cellTemperature_044 signed 32,8 -m /u:degC @@ -867,15 +913,16 @@ Var=cellTemperature_045 signed 40,8 -m /u:degC Var=cellTemperature_046 signed 48,8 -m /u:degC Var=cellTemperature_047 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_048_053 0,8 8 -m -Var=cellTemperature_048_invalidFlag unsigned 15,1 -m -Var=cellTemperature_049_invalidFlag unsigned 14,1 -m -Var=cellTemperature_050_invalidFlag unsigned 13,1 -m -Var=cellTemperature_051_invalidFlag unsigned 12,1 -m -Var=cellTemperature_052_invalidFlag unsigned 11,1 -m -Var=cellTemperature_053_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_048_053 0,8 8 -m +Var=cellTemperature_048_invalidFlag bit 15,1 -m +Var=cellTemperature_049_invalidFlag bit 14,1 -m +Var=cellTemperature_050_invalidFlag bit 13,1 -m +Var=cellTemperature_051_invalidFlag bit 12,1 -m +Var=cellTemperature_052_invalidFlag bit 11,1 -m +Var=cellTemperature_053_invalidFlag bit 10,1 -m Var=cellTemperature_048 signed 16,8 -m /u:degC Var=cellTemperature_049 signed 24,8 -m /u:degC Var=cellTemperature_050 signed 32,8 -m /u:degC @@ -883,15 +930,16 @@ Var=cellTemperature_051 signed 40,8 -m /u:degC Var=cellTemperature_052 signed 48,8 -m /u:degC Var=cellTemperature_053 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_054_059 0,8 9 -m -Var=cellTemperature_054_invalidFlag unsigned 15,1 -m -Var=cellTemperature_055_invalidFlag unsigned 14,1 -m -Var=cellTemperature_056_invalidFlag unsigned 13,1 -m -Var=cellTemperature_057_invalidFlag unsigned 12,1 -m -Var=cellTemperature_058_invalidFlag unsigned 11,1 -m -Var=cellTemperature_059_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_054_059 0,8 9 -m +Var=cellTemperature_054_invalidFlag bit 15,1 -m +Var=cellTemperature_055_invalidFlag bit 14,1 -m +Var=cellTemperature_056_invalidFlag bit 13,1 -m +Var=cellTemperature_057_invalidFlag bit 12,1 -m +Var=cellTemperature_058_invalidFlag bit 11,1 -m +Var=cellTemperature_059_invalidFlag bit 10,1 -m Var=cellTemperature_054 signed 16,8 -m /u:degC Var=cellTemperature_055 signed 24,8 -m /u:degC Var=cellTemperature_056 signed 32,8 -m /u:degC @@ -899,15 +947,16 @@ Var=cellTemperature_057 signed 40,8 -m /u:degC Var=cellTemperature_058 signed 48,8 -m /u:degC Var=cellTemperature_059 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_060_065 0,8 0Ah -m -Var=cellTemperature_060_invalidFlag unsigned 15,1 -m -Var=cellTemperature_061_invalidFlag unsigned 14,1 -m -Var=cellTemperature_062_invalidFlag unsigned 13,1 -m -Var=cellTemperature_063_invalidFlag unsigned 12,1 -m -Var=cellTemperature_064_invalidFlag unsigned 11,1 -m -Var=cellTemperature_065_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_060_065 0,8 0Ah -m +Var=cellTemperature_060_invalidFlag bit 15,1 -m +Var=cellTemperature_061_invalidFlag bit 14,1 -m +Var=cellTemperature_062_invalidFlag bit 13,1 -m +Var=cellTemperature_063_invalidFlag bit 12,1 -m +Var=cellTemperature_064_invalidFlag bit 11,1 -m +Var=cellTemperature_065_invalidFlag bit 10,1 -m Var=cellTemperature_060 signed 16,8 -m /u:degC Var=cellTemperature_061 signed 24,8 -m /u:degC Var=cellTemperature_062 signed 32,8 -m /u:degC @@ -915,15 +964,16 @@ Var=cellTemperature_063 signed 40,8 -m /u:degC Var=cellTemperature_064 signed 48,8 -m /u:degC Var=cellTemperature_065 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_066_071 0,8 0Bh -m -Var=cellTemperature_066_invalidFlag unsigned 15,1 -m -Var=cellTemperature_067_invalidFlag unsigned 14,1 -m -Var=cellTemperature_068_invalidFlag unsigned 13,1 -m -Var=cellTemperature_069_invalidFlag unsigned 12,1 -m -Var=cellTemperature_070_invalidFlag unsigned 11,1 -m -Var=cellTemperature_071_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_066_071 0,8 0Bh -m +Var=cellTemperature_066_invalidFlag bit 15,1 -m +Var=cellTemperature_067_invalidFlag bit 14,1 -m +Var=cellTemperature_068_invalidFlag bit 13,1 -m +Var=cellTemperature_069_invalidFlag bit 12,1 -m +Var=cellTemperature_070_invalidFlag bit 11,1 -m +Var=cellTemperature_071_invalidFlag bit 10,1 -m Var=cellTemperature_066 signed 16,8 -m /u:degC Var=cellTemperature_067 signed 24,8 -m /u:degC Var=cellTemperature_068 signed 32,8 -m /u:degC @@ -931,15 +981,16 @@ Var=cellTemperature_069 signed 40,8 -m /u:degC Var=cellTemperature_070 signed 48,8 -m /u:degC Var=cellTemperature_071 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_072_077 0,8 0Ch -m -Var=cellTemperature_072_invalidFlag unsigned 15,1 -m -Var=cellTemperature_073_invalidFlag unsigned 14,1 -m -Var=cellTemperature_074_invalidFlag unsigned 13,1 -m -Var=cellTemperature_075_invalidFlag unsigned 12,1 -m -Var=cellTemperature_076_invalidFlag unsigned 11,1 -m -Var=cellTemperature_077_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_072_077 0,8 0Ch -m +Var=cellTemperature_072_invalidFlag bit 15,1 -m +Var=cellTemperature_073_invalidFlag bit 14,1 -m +Var=cellTemperature_074_invalidFlag bit 13,1 -m +Var=cellTemperature_075_invalidFlag bit 12,1 -m +Var=cellTemperature_076_invalidFlag bit 11,1 -m +Var=cellTemperature_077_invalidFlag bit 10,1 -m Var=cellTemperature_072 signed 16,8 -m /u:degC Var=cellTemperature_073 signed 24,8 -m /u:degC Var=cellTemperature_074 signed 32,8 -m /u:degC @@ -947,15 +998,16 @@ Var=cellTemperature_075 signed 40,8 -m /u:degC Var=cellTemperature_076 signed 48,8 -m /u:degC Var=cellTemperature_077 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_078_083 0,8 0Dh -m -Var=cellTemperature_078_invalidFlag unsigned 15,1 -m -Var=cellTemperature_079_invalidFlag unsigned 14,1 -m -Var=cellTemperature_080_invalidFlag unsigned 13,1 -m -Var=cellTemperature_081_invalidFlag unsigned 12,1 -m -Var=cellTemperature_082_invalidFlag unsigned 11,1 -m -Var=cellTemperature_083_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_078_083 0,8 0Dh -m +Var=cellTemperature_078_invalidFlag bit 15,1 -m +Var=cellTemperature_079_invalidFlag bit 14,1 -m +Var=cellTemperature_080_invalidFlag bit 13,1 -m +Var=cellTemperature_081_invalidFlag bit 12,1 -m +Var=cellTemperature_082_invalidFlag bit 11,1 -m +Var=cellTemperature_083_invalidFlag bit 10,1 -m Var=cellTemperature_078 signed 16,8 -m /u:degC Var=cellTemperature_079 signed 24,8 -m /u:degC Var=cellTemperature_080 signed 32,8 -m /u:degC @@ -963,15 +1015,16 @@ Var=cellTemperature_081 signed 40,8 -m /u:degC Var=cellTemperature_082 signed 48,8 -m /u:degC Var=cellTemperature_083 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_084_089 0,8 0Eh -m -Var=cellTemperature_084_invalidFlag unsigned 15,1 -m -Var=cellTemperature_085_invalidFlag unsigned 14,1 -m -Var=cellTemperature_086_invalidFlag unsigned 13,1 -m -Var=cellTemperature_087_invalidFlag unsigned 12,1 -m -Var=cellTemperature_088_invalidFlag unsigned 11,1 -m -Var=cellTemperature_089_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_084_089 0,8 0Eh -m +Var=cellTemperature_084_invalidFlag bit 15,1 -m +Var=cellTemperature_085_invalidFlag bit 14,1 -m +Var=cellTemperature_086_invalidFlag bit 13,1 -m +Var=cellTemperature_087_invalidFlag bit 12,1 -m +Var=cellTemperature_088_invalidFlag bit 11,1 -m +Var=cellTemperature_089_invalidFlag bit 10,1 -m Var=cellTemperature_084 signed 16,8 -m /u:degC Var=cellTemperature_085 signed 24,8 -m /u:degC Var=cellTemperature_086 signed 32,8 -m /u:degC @@ -979,15 +1032,16 @@ Var=cellTemperature_087 signed 40,8 -m /u:degC Var=cellTemperature_088 signed 48,8 -m /u:degC Var=cellTemperature_089 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_090_095 0,8 0Fh -m -Var=cellTemperature_090_invalidFlag unsigned 15,1 -m -Var=cellTemperature_091_invalidFlag unsigned 14,1 -m -Var=cellTemperature_092_invalidFlag unsigned 13,1 -m -Var=cellTemperature_093_invalidFlag unsigned 12,1 -m -Var=cellTemperature_094_invalidFlag unsigned 11,1 -m -Var=cellTemperature_095_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_090_095 0,8 0Fh -m +Var=cellTemperature_090_invalidFlag bit 15,1 -m +Var=cellTemperature_091_invalidFlag bit 14,1 -m +Var=cellTemperature_092_invalidFlag bit 13,1 -m +Var=cellTemperature_093_invalidFlag bit 12,1 -m +Var=cellTemperature_094_invalidFlag bit 11,1 -m +Var=cellTemperature_095_invalidFlag bit 10,1 -m Var=cellTemperature_090 signed 16,8 -m /u:degC Var=cellTemperature_091 signed 24,8 -m /u:degC Var=cellTemperature_092 signed 32,8 -m /u:degC @@ -995,15 +1049,16 @@ Var=cellTemperature_093 signed 40,8 -m /u:degC Var=cellTemperature_094 signed 48,8 -m /u:degC Var=cellTemperature_095 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_096_101 0,8 10h -m -Var=cellTemperature_096_invalidFlag unsigned 15,1 -m -Var=cellTemperature_097_invalidFlag unsigned 14,1 -m -Var=cellTemperature_098_invalidFlag unsigned 13,1 -m -Var=cellTemperature_099_invalidFlag unsigned 12,1 -m -Var=cellTemperature_100_invalidFlag unsigned 11,1 -m -Var=cellTemperature_101_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_096_101 0,8 10h -m +Var=cellTemperature_096_invalidFlag bit 15,1 -m +Var=cellTemperature_097_invalidFlag bit 14,1 -m +Var=cellTemperature_098_invalidFlag bit 13,1 -m +Var=cellTemperature_099_invalidFlag bit 12,1 -m +Var=cellTemperature_100_invalidFlag bit 11,1 -m +Var=cellTemperature_101_invalidFlag bit 10,1 -m Var=cellTemperature_096 signed 16,8 -m /u:degC Var=cellTemperature_097 signed 24,8 -m /u:degC Var=cellTemperature_098 signed 32,8 -m /u:degC @@ -1011,15 +1066,16 @@ Var=cellTemperature_099 signed 40,8 -m /u:degC Var=cellTemperature_100 signed 48,8 -m /u:degC Var=cellTemperature_101 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_102_107 0,8 11h -m -Var=cellTemperature_102_invalidFlag unsigned 15,1 -m -Var=cellTemperature_103_invalidFlag unsigned 14,1 -m -Var=cellTemperature_104_invalidFlag unsigned 13,1 -m -Var=cellTemperature_105_invalidFlag unsigned 12,1 -m -Var=cellTemperature_106_invalidFlag unsigned 11,1 -m -Var=cellTemperature_107_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_102_107 0,8 11h -m +Var=cellTemperature_102_invalidFlag bit 15,1 -m +Var=cellTemperature_103_invalidFlag bit 14,1 -m +Var=cellTemperature_104_invalidFlag bit 13,1 -m +Var=cellTemperature_105_invalidFlag bit 12,1 -m +Var=cellTemperature_106_invalidFlag bit 11,1 -m +Var=cellTemperature_107_invalidFlag bit 10,1 -m Var=cellTemperature_102 signed 16,8 -m /u:degC Var=cellTemperature_103 signed 24,8 -m /u:degC Var=cellTemperature_104 signed 32,8 -m /u:degC @@ -1027,15 +1083,16 @@ Var=cellTemperature_105 signed 40,8 -m /u:degC Var=cellTemperature_106 signed 48,8 -m /u:degC Var=cellTemperature_107 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_108_113 0,8 12h -m -Var=cellTemperature_108_invalidFlag unsigned 15,1 -m -Var=cellTemperature_109_invalidFlag unsigned 14,1 -m -Var=cellTemperature_110_invalidFlag unsigned 13,1 -m -Var=cellTemperature_111_invalidFlag unsigned 12,1 -m -Var=cellTemperature_112_invalidFlag unsigned 11,1 -m -Var=cellTemperature_113_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_108_113 0,8 12h -m +Var=cellTemperature_108_invalidFlag bit 15,1 -m +Var=cellTemperature_109_invalidFlag bit 14,1 -m +Var=cellTemperature_110_invalidFlag bit 13,1 -m +Var=cellTemperature_111_invalidFlag bit 12,1 -m +Var=cellTemperature_112_invalidFlag bit 11,1 -m +Var=cellTemperature_113_invalidFlag bit 10,1 -m Var=cellTemperature_108 signed 16,8 -m /u:degC Var=cellTemperature_109 signed 24,8 -m /u:degC Var=cellTemperature_110 signed 32,8 -m /u:degC @@ -1043,15 +1100,16 @@ Var=cellTemperature_111 signed 40,8 -m /u:degC Var=cellTemperature_112 signed 48,8 -m /u:degC Var=cellTemperature_113 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_114_119 0,8 13h -m -Var=cellTemperature_114_invalidFlag unsigned 15,1 -m -Var=cellTemperature_115_invalidFlag unsigned 14,1 -m -Var=cellTemperature_116_invalidFlag unsigned 13,1 -m -Var=cellTemperature_117_invalidFlag unsigned 12,1 -m -Var=cellTemperature_118_invalidFlag unsigned 11,1 -m -Var=cellTemperature_119_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_114_119 0,8 13h -m +Var=cellTemperature_114_invalidFlag bit 15,1 -m +Var=cellTemperature_115_invalidFlag bit 14,1 -m +Var=cellTemperature_116_invalidFlag bit 13,1 -m +Var=cellTemperature_117_invalidFlag bit 12,1 -m +Var=cellTemperature_118_invalidFlag bit 11,1 -m +Var=cellTemperature_119_invalidFlag bit 10,1 -m Var=cellTemperature_114 signed 16,8 -m /u:degC Var=cellTemperature_115 signed 24,8 -m /u:degC Var=cellTemperature_116 signed 32,8 -m /u:degC @@ -1059,15 +1117,16 @@ Var=cellTemperature_117 signed 40,8 -m /u:degC Var=cellTemperature_118 signed 48,8 -m /u:degC Var=cellTemperature_119 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_120_125 0,8 14h -m -Var=cellTemperature_120_invalidFlag unsigned 15,1 -m -Var=cellTemperature_121_invalidFlag unsigned 14,1 -m -Var=cellTemperature_122_invalidFlag unsigned 13,1 -m -Var=cellTemperature_123_invalidFlag unsigned 12,1 -m -Var=cellTemperature_124_invalidFlag unsigned 11,1 -m -Var=cellTemperature_125_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_120_125 0,8 14h -m +Var=cellTemperature_120_invalidFlag bit 15,1 -m +Var=cellTemperature_121_invalidFlag bit 14,1 -m +Var=cellTemperature_122_invalidFlag bit 13,1 -m +Var=cellTemperature_123_invalidFlag bit 12,1 -m +Var=cellTemperature_124_invalidFlag bit 11,1 -m +Var=cellTemperature_125_invalidFlag bit 10,1 -m Var=cellTemperature_120 signed 16,8 -m /u:degC Var=cellTemperature_121 signed 24,8 -m /u:degC Var=cellTemperature_122 signed 32,8 -m /u:degC @@ -1075,15 +1134,16 @@ Var=cellTemperature_123 signed 40,8 -m /u:degC Var=cellTemperature_124 signed 48,8 -m /u:degC Var=cellTemperature_125 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_126_131 0,8 15h -m -Var=cellTemperature_126_invalidFlag unsigned 15,1 -m -Var=cellTemperature_127_invalidFlag unsigned 14,1 -m -Var=cellTemperature_128_invalidFlag unsigned 13,1 -m -Var=cellTemperature_129_invalidFlag unsigned 12,1 -m -Var=cellTemperature_130_invalidFlag unsigned 11,1 -m -Var=cellTemperature_131_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_126_131 0,8 15h -m +Var=cellTemperature_126_invalidFlag bit 15,1 -m +Var=cellTemperature_127_invalidFlag bit 14,1 -m +Var=cellTemperature_128_invalidFlag bit 13,1 -m +Var=cellTemperature_129_invalidFlag bit 12,1 -m +Var=cellTemperature_130_invalidFlag bit 11,1 -m +Var=cellTemperature_131_invalidFlag bit 10,1 -m Var=cellTemperature_126 signed 16,8 -m /u:degC Var=cellTemperature_127 signed 24,8 -m /u:degC Var=cellTemperature_128 signed 32,8 -m /u:degC @@ -1091,15 +1151,16 @@ Var=cellTemperature_129 signed 40,8 -m /u:degC Var=cellTemperature_130 signed 48,8 -m /u:degC Var=cellTemperature_131 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_132_137 0,8 16h -m -Var=cellTemperature_132_invalidFlag unsigned 15,1 -m -Var=cellTemperature_133_invalidFlag unsigned 14,1 -m -Var=cellTemperature_134_invalidFlag unsigned 13,1 -m -Var=cellTemperature_135_invalidFlag unsigned 12,1 -m -Var=cellTemperature_136_invalidFlag unsigned 11,1 -m -Var=cellTemperature_137_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_132_137 0,8 16h -m +Var=cellTemperature_132_invalidFlag bit 15,1 -m +Var=cellTemperature_133_invalidFlag bit 14,1 -m +Var=cellTemperature_134_invalidFlag bit 13,1 -m +Var=cellTemperature_135_invalidFlag bit 12,1 -m +Var=cellTemperature_136_invalidFlag bit 11,1 -m +Var=cellTemperature_137_invalidFlag bit 10,1 -m Var=cellTemperature_132 signed 16,8 -m /u:degC Var=cellTemperature_133 signed 24,8 -m /u:degC Var=cellTemperature_134 signed 32,8 -m /u:degC @@ -1107,15 +1168,16 @@ Var=cellTemperature_135 signed 40,8 -m /u:degC Var=cellTemperature_136 signed 48,8 -m /u:degC Var=cellTemperature_137 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_138_143 0,8 17h -m -Var=cellTemperature_138_invalidFlag unsigned 15,1 -m -Var=cellTemperature_139_invalidFlag unsigned 14,1 -m -Var=cellTemperature_140_invalidFlag unsigned 13,1 -m -Var=cellTemperature_141_invalidFlag unsigned 12,1 -m -Var=cellTemperature_142_invalidFlag unsigned 11,1 -m -Var=cellTemperature_143_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_138_143 0,8 17h -m +Var=cellTemperature_138_invalidFlag bit 15,1 -m +Var=cellTemperature_139_invalidFlag bit 14,1 -m +Var=cellTemperature_140_invalidFlag bit 13,1 -m +Var=cellTemperature_141_invalidFlag bit 12,1 -m +Var=cellTemperature_142_invalidFlag bit 11,1 -m +Var=cellTemperature_143_invalidFlag bit 10,1 -m Var=cellTemperature_138 signed 16,8 -m /u:degC Var=cellTemperature_139 signed 24,8 -m /u:degC Var=cellTemperature_140 signed 32,8 -m /u:degC @@ -1123,15 +1185,16 @@ Var=cellTemperature_141 signed 40,8 -m /u:degC Var=cellTemperature_142 signed 48,8 -m /u:degC Var=cellTemperature_143 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_144_149 0,8 18h -m -Var=cellTemperature_144_invalidFlag unsigned 15,1 -m -Var=cellTemperature_145_invalidFlag unsigned 14,1 -m -Var=cellTemperature_146_invalidFlag unsigned 13,1 -m -Var=cellTemperature_147_invalidFlag unsigned 12,1 -m -Var=cellTemperature_148_invalidFlag unsigned 11,1 -m -Var=cellTemperature_149_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_144_149 0,8 18h -m +Var=cellTemperature_144_invalidFlag bit 15,1 -m +Var=cellTemperature_145_invalidFlag bit 14,1 -m +Var=cellTemperature_146_invalidFlag bit 13,1 -m +Var=cellTemperature_147_invalidFlag bit 12,1 -m +Var=cellTemperature_148_invalidFlag bit 11,1 -m +Var=cellTemperature_149_invalidFlag bit 10,1 -m Var=cellTemperature_144 signed 16,8 -m /u:degC Var=cellTemperature_145 signed 24,8 -m /u:degC Var=cellTemperature_146 signed 32,8 -m /u:degC @@ -1139,15 +1202,16 @@ Var=cellTemperature_147 signed 40,8 -m /u:degC Var=cellTemperature_148 signed 48,8 -m /u:degC Var=cellTemperature_149 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_150_155 0,8 19h -m -Var=cellTemperature_150_invalidFlag unsigned 15,1 -m -Var=cellTemperature_151_invalidFlag unsigned 14,1 -m -Var=cellTemperature_152_invalidFlag unsigned 13,1 -m -Var=cellTemperature_153_invalidFlag unsigned 12,1 -m -Var=cellTemperature_154_invalidFlag unsigned 11,1 -m -Var=cellTemperature_155_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_150_155 0,8 19h -m +Var=cellTemperature_150_invalidFlag bit 15,1 -m +Var=cellTemperature_151_invalidFlag bit 14,1 -m +Var=cellTemperature_152_invalidFlag bit 13,1 -m +Var=cellTemperature_153_invalidFlag bit 12,1 -m +Var=cellTemperature_154_invalidFlag bit 11,1 -m +Var=cellTemperature_155_invalidFlag bit 10,1 -m Var=cellTemperature_150 signed 16,8 -m /u:degC Var=cellTemperature_151 signed 24,8 -m /u:degC Var=cellTemperature_152 signed 32,8 -m /u:degC @@ -1155,15 +1219,16 @@ Var=cellTemperature_153 signed 40,8 -m /u:degC Var=cellTemperature_154 signed 48,8 -m /u:degC Var=cellTemperature_155 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_156_161 0,8 1Ah -m -Var=cellTemperature_156_invalidFlag unsigned 15,1 -m -Var=cellTemperature_157_invalidFlag unsigned 14,1 -m -Var=cellTemperature_158_invalidFlag unsigned 13,1 -m -Var=cellTemperature_159_invalidFlag unsigned 12,1 -m -Var=cellTemperature_160_invalidFlag unsigned 11,1 -m -Var=cellTemperature_161_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_156_161 0,8 1Ah -m +Var=cellTemperature_156_invalidFlag bit 15,1 -m +Var=cellTemperature_157_invalidFlag bit 14,1 -m +Var=cellTemperature_158_invalidFlag bit 13,1 -m +Var=cellTemperature_159_invalidFlag bit 12,1 -m +Var=cellTemperature_160_invalidFlag bit 11,1 -m +Var=cellTemperature_161_invalidFlag bit 10,1 -m Var=cellTemperature_156 signed 16,8 -m /u:degC Var=cellTemperature_157 signed 24,8 -m /u:degC Var=cellTemperature_158 signed 32,8 -m /u:degC @@ -1171,15 +1236,16 @@ Var=cellTemperature_159 signed 40,8 -m /u:degC Var=cellTemperature_160 signed 48,8 -m /u:degC Var=cellTemperature_161 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_162_167 0,8 1Bh -m -Var=cellTemperature_162_invalidFlag unsigned 15,1 -m -Var=cellTemperature_163_invalidFlag unsigned 14,1 -m -Var=cellTemperature_164_invalidFlag unsigned 13,1 -m -Var=cellTemperature_165_invalidFlag unsigned 12,1 -m -Var=cellTemperature_166_invalidFlag unsigned 11,1 -m -Var=cellTemperature_167_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_162_167 0,8 1Bh -m +Var=cellTemperature_162_invalidFlag bit 15,1 -m +Var=cellTemperature_163_invalidFlag bit 14,1 -m +Var=cellTemperature_164_invalidFlag bit 13,1 -m +Var=cellTemperature_165_invalidFlag bit 12,1 -m +Var=cellTemperature_166_invalidFlag bit 11,1 -m +Var=cellTemperature_167_invalidFlag bit 10,1 -m Var=cellTemperature_162 signed 16,8 -m /u:degC Var=cellTemperature_163 signed 24,8 -m /u:degC Var=cellTemperature_164 signed 32,8 -m /u:degC @@ -1187,15 +1253,16 @@ Var=cellTemperature_165 signed 40,8 -m /u:degC Var=cellTemperature_166 signed 48,8 -m /u:degC Var=cellTemperature_167 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_168_173 0,8 1Ch -m -Var=cellTemperature_168_invalidFlag unsigned 15,1 -m -Var=cellTemperature_169_invalidFlag unsigned 14,1 -m -Var=cellTemperature_170_invalidFlag unsigned 13,1 -m -Var=cellTemperature_171_invalidFlag unsigned 12,1 -m -Var=cellTemperature_172_invalidFlag unsigned 11,1 -m -Var=cellTemperature_173_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_168_173 0,8 1Ch -m +Var=cellTemperature_168_invalidFlag bit 15,1 -m +Var=cellTemperature_169_invalidFlag bit 14,1 -m +Var=cellTemperature_170_invalidFlag bit 13,1 -m +Var=cellTemperature_171_invalidFlag bit 12,1 -m +Var=cellTemperature_172_invalidFlag bit 11,1 -m +Var=cellTemperature_173_invalidFlag bit 10,1 -m Var=cellTemperature_168 signed 16,8 -m /u:degC Var=cellTemperature_169 signed 24,8 -m /u:degC Var=cellTemperature_170 signed 32,8 -m /u:degC @@ -1203,15 +1270,16 @@ Var=cellTemperature_171 signed 40,8 -m /u:degC Var=cellTemperature_172 signed 48,8 -m /u:degC Var=cellTemperature_173 signed 56,8 -m /u:degC -[foxBMS_CellTemperature] -DLC=8 -Mux=mux_cellTemperature_174_179 0,8 1Dh -m -Var=cellTemperature_174_invalidFlag unsigned 15,1 -m -Var=cellTemperature_175_invalidFlag unsigned 14,1 -m -Var=cellTemperature_176_invalidFlag unsigned 13,1 -m -Var=cellTemperature_177_invalidFlag unsigned 12,1 -m -Var=cellTemperature_178_invalidFlag unsigned 11,1 -m -Var=cellTemperature_179_invalidFlag unsigned 10,1 -m +[foxBMS_CellTemperatures] +Len=8 +CycleTime=4500 -p +Mux=mux_cellTemperature_174_179 0,8 1Dh -m +Var=cellTemperature_174_invalidFlag bit 15,1 -m +Var=cellTemperature_175_invalidFlag bit 14,1 -m +Var=cellTemperature_176_invalidFlag bit 13,1 -m +Var=cellTemperature_177_invalidFlag bit 12,1 -m +Var=cellTemperature_178_invalidFlag bit 11,1 -m +Var=cellTemperature_179_invalidFlag bit 10,1 -m Var=cellTemperature_174 signed 16,8 -m /u:degC Var=cellTemperature_175 signed 24,8 -m /u:degC Var=cellTemperature_176 signed 32,8 -m /u:degC @@ -1219,278 +1287,135 @@ Var=cellTemperature_177 signed 40,8 -m /u:degC Var=cellTemperature_178 signed 48,8 -m /u:degC Var=cellTemperature_179 signed 56,8 -m /u:degC -[foxBMS_Command] -ID=230h // (in:can_cbs_rx_command.c:CAN_RxRequest) -DLC=8 -Var=foxBMS_modeRequest unsigned 6,2 -m /e:modeRequest_e // 0x0: Disconnect strings from HV bus, 0x01: Connect strings to HV bus to start discharge, 0x02: Connect strings to HV bus to start charging -Var=foxBMS_activateBalancing bit 15,1 -m // 0: Deactivate balancing, 1: Activate balancing -Var=foxBMS_balancingThreshold unsigned 16,8 -m /u:mV // Required voltage difference to minimum cell voltage to activate balancing -Var=foxBMS_externallyPrecharged bit 4,1 -m // 0x0: HV bus not externally precharged, 0x01: HV bus externally precharged -Var=foxBMS_resetFlags bit 2,1 // 0x01: reset persistent flags -Var=foxBMS_chargerConnected bit 4,1 // 0x00: charger not connected, 0x01: charger connected -Var=foxBMS_disableInsulationMon bit 5,1 // 0x00: Check battery system insulation, 0x01: Do not check insulation of battery system -Var=foxBMS_heaterOverride_ON bit 6,1 // 0: no override active, 1: override active -> force heater on -Var=foxBMS_heaterOverride_OFF unsigned 7,1 // 0: no override active, 1: override active -> force heater off - -[foxBMS_State] -ID=220h // Message contains foxBMS state (in:can_cbs_tx_state.c:CAN_TxState) -DLC=8 -Var=foxBMS_State unsigned 4,4 -m /e:state_e +[foxBMS_BmsStateRequest] +ID=230h // (in:can_cbs_rx_state-request.c:CANRX_BmsStateRequest, fv:rx) +Len=8 +Var=foxBMS_modeRequest unsigned 6,2 -m /e:foxBMS_ModeRequest // 0x0: Disconnect strings from HV bus, 0x01: Connect strings to HV bus to start discharge, 0x02: Connect strings to HV bus to start charging +Var=foxBMS_activateBalancing bit 15,1 -m // 0: Deactivate balancing, 1: Activate balancing +Var=foxBMS_balancingThreshold unsigned 16,8 -m /u:mV // Required voltage difference to minimum cell voltage to activate balancing +Var=foxBMS_externallyPrecharged bit 4,1 -m // 0x0: HV bus not externally precharged, 0x01: HV bus externally precharged +Var=foxBMS_resetFlags bit 5,1 -m // 0x01: reset persistent flags +Var=foxBMS_chargerConnected bit 3,1 -m // 0x00: charger not connected, 0x01: charger connected +Var=foxBMS_disableInsulationMon bit 2,1 -m // 0x00: Check battery system insulation, 0x01: Do not check insulation of battery system +Var=foxBMS_heaterOverride_ON bit 1,1 -m // 0: no override active, 1: override active -> force heater on +Var=foxBMS_heaterOverride_OFF bit 0,1 -m // 0: no override active, 1: override active -> force heater off + +[foxBMS_BmsState] +ID=220h // Message contains foxBMS state (in:can_cbs_tx_state.c:CANTX_BmsState, fv:tx) +Len=8 +CycleTime=100 -p +Var=foxBMS_State unsigned 4,4 -m /e:foxBMS_State Var=BMS_nrOfConnectedStrings unsigned 0,4 -m -Var=foxBMS_generalError bit 13,1 -m // 0x00: No error detected, 0x01: Error detected -Var=foxBMS_generalWarning bit 14,1 -m // 0x00: No warning detected, 0x01: Warning detected -Var=foxBMS_Error_dieTemperatureMCU bit 21,1 -m // 0x00: No error, 0x01: Error detected -Var=foxBMS_Error_OvertempPCB bit 20,1 -m // foxBMS Master-PCB: 0x00: No error, 0x01: Error detected -Var=foxBMS_Error_UndertempPCB bit 19,1 -m // foxBMS Master-PCB: 0x00: No error, 0x01: Error detected -Var=foxBMS_Error_PrechargeVolt bit 23,1 -m // 0x00: precharging successful, 0x01: precharge aborted because of voltage difference -Var=foxBMS_Error_PrechargeCurrent bit 22,1 -m // 0x00: precharging successful, 0x01: precharge aborted because current limit violated -Var=foxBMS_heaterState bit 9,1 -m // 0x00: Heater not activated, 0x01: Heater activated -Var=foxBMS_coolingState bit 8,1 -m // 0x00: Cooling not activated, 0x01: Cooling activated -Var=foxBMS_insulationMonitoring bit 10,1 -m // 0x00: insulation monitoring active, 0x01: insulation monitoring not active -Var=foxBMS_chargingComplete bit 15,1 -m // 0x01: charging complete -Var=foxBMS_EmergencyShutoff bit 12,1 -m // The BMS is preparing to open the contactors soon due to detected error -Var=foxBMS_MainFuseBlown bit 18,1 -m // 0x00: fuse okay, 0x01: fuse blown +Var=foxBMS_generalError bit 13,1 -m // 0x00: No error detected, 0x01: Error detected +Var=foxBMS_generalWarning bit 14,1 -m // 0x00: No warning detected, 0x01: Warning detected +Var=foxBMS_Error_dieTemperatureMCU bit 21,1 -m // 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_OvertempPCB bit 20,1 -m // foxBMS Master-PCB: 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_UndertempPCB bit 19,1 -m // foxBMS Master-PCB: 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_PrechargeVolt bit 23,1 -m // 0x00: precharging successful, 0x01: precharge aborted because of voltage difference +Var=foxBMS_Error_PrechargeCurrent bit 22,1 -m // 0x00: precharging successful, 0x01: precharge aborted because current limit violated +Var=foxBMS_heaterState bit 9,1 -m // 0x00: Heater not activated, 0x01: Heater activated +Var=foxBMS_coolingState bit 8,1 -m // 0x00: Cooling not activated, 0x01: Cooling activated +Var=foxBMS_insulationMonitoring bit 10,1 -m // 0x00: insulation monitoring active, 0x01: insulation monitoring not active +Var=foxBMS_chargingComplete bit 15,1 -m // 0x01: charging complete +Var=foxBMS_EmergencyShutoff bit 12,1 -m // The BMS is preparing to open the contactors soon due to detected error +Var=foxBMS_MainFuseBlown bit 18,1 -m // 0x00: fuse okay, 0x01: fuse blown Var=foxBMS_insulationResistance unsigned 56,8 -m /u:kOhm /f:10 -Var=foxBMS_Error_Interlock bit 17,1 -m // 0x00: interlock okay, 0x01: interlock open +Var=foxBMS_Error_Interlock bit 17,1 -m // 0x00: interlock okay, 0x01: interlock open Var=foxBMS_NrDeactivatedStrings unsigned 52,4 -m -Var=foxBMS_Error_Insulation bit 16,1 -m // 0x00: No error, 0x01: Error detected -Var=foxBMS_Error_Cantiming bit 31,1 -m // 0x00: No error, 0x01: Error detected -Var=foxBMS_Error_PackOvercurr_Charge bit 30,1 -m // 0x00: No error, 0x01: Error detected -Var=foxBMS_Error_PackOvercur_Dischrg bit 29,1 -m // 0x00: No error, 0x01: Error detected -Var=foxBMS_SysMonError bit 12,1 /ln:"system monitoring error" // If this bit is set, it indicates that a task has violated its timing requirements. +Var=foxBMS_Error_Insulation bit 16,1 -m // 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_Cantiming bit 31,1 -m // 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_PackOvercurr_Charge bit 30,1 -m // 0x00: No error, 0x01: Error detected +Var=foxBMS_Error_PackOvercur_Dischrg bit 29,1 -m // 0x00: No error, 0x01: Error detected +Var=foxBMS_SysMonError bit 11,1 -m /ln:"system monitoring error" // If this bit is set, it indicates that a task has violated its timing requirements. +Var=foxBMS_alertFlag bit 28,1 -m // foxBMS Alter flag: 0x00: No error, 0x01: Alert flag set [foxBMS_StringState] -ID=221h // Message contains string related error and warning flags (in:can_cbs_tx_state.c:CAN_TxStringState) -DLC=8 -Mux=mux_stateString0 4,4 0 -m -Var=String0_stringConnected bit 3,1 -m // 0x00: String not connected, 0x01: String connected to HV bus -Var=String0_balancing_active bit 2,1 -m // 0x00: No balancing active, 0x01: Balancing in this string active -Var=String0_Err_overtemp_charge bit 15,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 45 degree celsius. -Var=String0_Err_undertemp_charge bit 14,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below 0 degree celsius. -Var=String0_Err_overtemp_discharge bit 13,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 60 degree celsius. -Var=String0_Err_undertemp_discharge bit 12,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below -20 degree celsius. -Var=String0_Err_Overcurrent_charge bit 11,1 -m // 0x00: No error, 0x01: Error: Flag will be set if string charge current is above 30400mA. -Var=String0_Err_Overcurre_discharge bit 10,1 -m // 0x00: No error, 0x01: Error: Flag will be set if discharge current is above maximum string current. -Var=String0_Err_Overvoltage bit 9,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell voltage is above 4200mV. -Var=String0_Err_Undervoltage bit 8,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell voltage is below 3000mV. This equals roughly 4% remaining SOC. Minimum data sheet values if 2500mV. -Var=String0_Err_deep_discharge bit 0,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_CS_currentMeas bit 44,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_positiveContactor bit 39,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_openWire bit 54,1 -m // 0x00: No error, 0x01: Error -Var=String0_openWireNumber unsigned 56,8 -m // Number of first open wire that has been detected in this string -Var=String0_Err_plaus_cell_volt bit 51,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_plaus_cell_temp bit 52,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_plaus_string_volt bit 50,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_slave_hardware bit 37,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_dsyChainBase_Comm bit 36,1 -m // 0x00: No error, 0x01: Error (i.e. SPI) -Var=String0_Err_dsyChainPrim_CRC bit 34,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_dsyChainRedun_Comm bit 35,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_dsyChainRedun_CRC bit 33,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_dsyPrim_voltMeasOor bit 32,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_dsyRedun_voltMeasOor bit 47,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_dsyPrim_tempMeasOor bit 46,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_dsyRedun_tempMeasOor bit 45,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_CS_coulombCountMeas bit 43,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_CS_energyCountMeas bit 42,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_plaus_volt_spread bit 48,1 -m // 0x00: No error, 0x01: Error -Var=String0_Err_plaus_temp_spread bit 49,1 -m // 0x00: No error, 0x01: Error -Var=String0_fuseBlown bit 6,1 /ln:"0x00: fuse okay, 0x01: fuse blown" -Var=String0_Warning_overvoltage_MOL bit 22,1 -Var=String0_Warning_undervoltage_MOL bit 23,1 -Var=String0_Wrng_chargeOverTemp_MOL bit 16,1 -Var=String0_Wrng_dischrgOverTemp_MOL bit 18,1 -Var=String0_Wrng_chargeUnderTemp_MOL bit 17,1 -Var=String0_Wrng_dischrgUnderTmp_MOL bit 19,1 -Var=String0_Wrng_chargeOverCur_MOL bit 20,1 -Var=String0_Wrng_dischargOverCur_MOL bit 21,1 -Var=String0_Wrng_chargeOverTemp_RSL bit 24,1 -Var=String0_Wrng_chargeUnderTemp_RSL bit 25,1 -Var=String0_Wrng_dischrgOverTemp_RSL bit 26,1 -Var=String0_Wrng_dischrgUnderTmp_RSL bit 27,1 -Var=String0_Wrng_chargeOverCur_RSL bit 28,1 -Var=String0_Wrng_dischargOverCur_RSL bit 29,1 -Var=String0_Wrng_overvoltage_RSL bit 30,1 -Var=String0_Wrng_undervoltage_RSL bit 31,1 -Var=String0_Err_negativeContactor bit 33,1 -Var=String0_Err_CS_voltage1Meas bit 46,1 -Var=String0_Err_CS_voltage2Meas bit 47,1 -Var=String0_Err_CS_voltage3Meas bit 48,1 - -[foxBMS_StringState] -DLC=8 -Mux=mux_stateString1 4,4 1 -m -Var=String1_stringConnected bit 3,1 -m // 0x00: String not connected, 0x01: String connected to HV bus -Var=String1_balancing_active bit 2,1 -m // 0x00: No balancing active, 0x01: Balancing in this string active -Var=String1_Err_overtemp_charge bit 15,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 45 degree celsius. -Var=String1_Err_undertemp_charge bit 14,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below 0 degree celsius. -Var=String1_Err_overtemp_discharge bit 13,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 60 degree celsius. -Var=String1_Err_undertemp_discharge bit 12,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below -20 degree celsius. -Var=String1_Err_Overcurrent_charge bit 11,1 -m // 0x00: No error, 0x01: Error: Flag will be set if string charge current is above 30400mA. -Var=String1_Err_Overcurre_discharge bit 10,1 -m // 0x00: No error, 0x01: Error: Flag will be set if discharge current is above maximum string current. -Var=String1_Err_Overvoltage bit 9,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell voltage is above 4200mV. -Var=String1_Err_Undervoltage bit 8,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell voltage is below 3000mV. This equals roughly 4% remaining SOC. Minimum data sheet values if 2500mV. -Var=String1_Err_deep_discharge bit 0,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_CS_currentMeas bit 44,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_positiveContactor bit 39,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_openWire bit 54,1 -m // 0x00: No error, 0x01: Error -Var=String1_openWireNumber unsigned 56,8 -m // Number of first open wire that has been detected in this string -Var=String1_Err_plaus_cell_volt bit 51,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_plaus_cell_temp bit 52,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_plaus_string_volt bit 50,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_slave_hardware bit 37,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_dsyChainPrim_Comm bit 36,1 -m // 0x00: No error, 0x01: Error (i.e. SPI) -Var=String1_Err_dsyChainPrim_CRC bit 34,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_dsyChainRedun_Comm bit 35,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_dsyChainRedun_CRC bit 33,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_dsyPrim_voltMeasOor bit 32,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_dsyRedun_voltMeasOor bit 47,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_dsyPrim_tempMeasOor bit 46,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_dsyRedun_tempMeasOor bit 45,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_CS_coulombCountMeas bit 43,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_CS_energyCountMeas bit 42,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_plaus_volt_spread bit 48,1 -m // 0x00: No error, 0x01: Error -Var=String1_Err_plaus_temp_spread bit 49,1 -m // 0x00: No error, 0x01: Error -Var=String1_fuseBlown bit 6,1 /ln:"0x00: fuse okay, 0x01: fuse blown" -Var=String1_Warning_overvoltage_MOL bit 22,1 -Var=String1_Warning_undervoltage_MOL bit 23,1 -Var=String1_Wrng_chargeOverTemp_MOL bit 16,1 -Var=String1_Wrng_dischrgOverTemp_MOL bit 18,1 -Var=String1_Wrng_chargeUnderTemp_MOL bit 17,1 -Var=String1_Wrng_dischrgUnderTmp_MOL bit 19,1 -Var=String1_Wrng_chargeOverCur_MOL bit 20,1 -Var=String1_Wrng_dischargOverCur_MOL bit 21,1 -Var=String1_Wrng_chargeOverTemp_RSL bit 24,1 -Var=String1_Wrng_chargeUnderTemp_RSL bit 25,1 -Var=String1_Wrng_dischrgOverTemp_RSL bit 26,1 -Var=String1_Wrng_dischrgUnderTmp_RSL bit 27,1 -Var=String1_Wrng_chargeOverCur_RSL bit 28,1 -Var=String1_Wrng_dischargOverCur_RSL bit 29,1 -Var=String1_Wrng_overvoltage_RSL bit 30,1 -Var=String1_Wrng_undervoltage_RSL bit 31,1 -Var=String1_Err_negativeContactor bit 33,1 -Var=String1_Err_CS_voltage1Meas bit 46,1 -Var=String1_Err_CS_voltage2Meas bit 47,1 -Var=String1_Err_CS_voltage3Meas bit 48,1 - -[foxBMS_StringState] -DLC=8 -Mux=mux_stateString2 4,4 2 -m -Var=String2_stringConnected bit 3,1 -m // 0x00: String not connected, 0x01: String connected to HV bus -Var=String2_balancing_active bit 2,1 -m // 0x00: No balancing active, 0x01: Balancing in this string active -Var=String2_Err_overtemp_charge bit 15,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 45 degree celsius. -Var=String2_Err_undertemp_charge bit 14,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below 0 degree celsius. -Var=String2_Err_overtemp_discharge bit 13,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 60 degree celsius. -Var=String2_Err_undertemp_discharge bit 12,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below -20 degree celsius. -Var=String2_Err_Overcurrent_charge bit 11,1 -m // 0x00: No error, 0x01: Error: Flag will be set if string charge current is above 30400mA. -Var=String2_Err_Overcurre_discharge bit 10,1 -m // 0x00: No error, 0x01: Error: Flag will be set if discharge current is above maximum string current. -Var=String2_Err_Overvoltage bit 9,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell voltage is above 4200mV. -Var=String2_Err_Undervoltage bit 8,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell voltage is below 3000mV. This equals roughly 4% remaining SOC. Minimum data sheet values if 2500mV. -Var=String2_Err_deep_discharge bit 0,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_CS_currentMeas bit 44,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_positiveContactor bit 39,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_openWire bit 54,1 -m // 0x00: No error, 0x01: Error -Var=String2_openWireNumber unsigned 56,8 -m // Number of first open wire that has been detected in this string -Var=String2_Err_plaus_cell_volt bit 51,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_plaus_cell_temp bit 52,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_plaus_string_volt bit 50,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_slave_hardware bit 37,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_dsyChainPrim_Comm bit 36,1 -m // 0x00: No error, 0x01: Error (i.e. SPI) -Var=String2_Err_dsyChainPrim_CRC bit 34,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_dsyChainRedun_Comm bit 35,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_dsyChainRedun_CRC bit 33,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_dsyPrim_voltMeasOor bit 32,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_dsyRedun_voltMeasOor bit 47,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_dsyPrim_tempMeasOor bit 46,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_dsyRedun_tempMeasOor bit 45,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_CS_coulombCountMeas bit 43,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_CS_energyCountMeas bit 42,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_plaus_volt_spread bit 48,1 -m // 0x00: No error, 0x01: Error -Var=String2_Err_plaus_temp_spread bit 49,1 -m // 0x00: No error, 0x01: Error -Var=String2_fuseBlown bit 6,1 /ln:"0x00: fuse okay, 0x01: fuse blown" -Var=String2_Warning_overvoltage_MOL bit 22,1 -Var=String2_Warning_undervoltage_MOL bit 23,1 -Var=String2_Wrng_chargeOverTemp_MOL bit 16,1 -Var=String2_Wrng_dischrgOverTemp_MOL bit 18,1 -Var=String2_Wrng_chargeUnderTemp_MOL bit 17,1 -Var=String2_Wrng_dischrgUnderTmp_MOL bit 19,1 -Var=String2_Wrng_chargeOverCur_MOL bit 20,1 -Var=String2_Wrng_dischargOverCur_MOL bit 21,1 -Var=String2_Wrng_chargeOverTemp_RSL bit 24,1 -Var=String2_Wrng_chargeUnderTemp_RSL bit 25,1 -Var=String2_Wrng_dischrgOverTemp_RSL bit 26,1 -Var=String2_Wrng_dischrgUnderTmp_RSL bit 27,1 -Var=String2_Wrng_chargeOverCur_RSL bit 28,1 -Var=String2_Wrng_dischargOverCur_RSL bit 29,1 -Var=String2_Wrng_overvoltage_RSL bit 30,1 -Var=String2_Wrng_undervoltage_RSL bit 31,1 -Var=String2_Err_negativeContactor bit 33,1 -Var=String2_Err_CS_voltage1Meas bit 46,1 -Var=String2_Err_CS_voltage2Meas bit 47,1 -Var=String2_Err_CS_voltage3Meas bit 48,1 - -[foxBMS_StringMinMaxValues] -ID=281h // Message contains minimum and maximum cell temperature and cell voltage values of respective string (in:can_cbs_tx_minmax.c:CAN_TxStringMinimumMaximumValues) -DLC=8 -Mux=mux_minMaxValuesString0 4,4 0 -m -Var=String0_minimumCellVoltage unsigned 21,13 -m /u:mV // Minimum cell voltage in this string -Var=String0_maximumCellVoltage unsigned 8,13 -m /u:mV // Maximum cell voltage in this string -Var=String0_maximumCellTemperature signed 34,9 -m /u:degC /f:0.5 // Maximum cell temperature in this string -Var=String0_minimumCellTemperature signed 43,9 -m /u:degC /f:0.5 // Minium cell temperature in this string +ID=221h // Message contains string related error and warning flags (in:can_cbs_tx_state.c:CANTX_StringState, fv:tx) +Len=8 +CycleTime=100 -p +Mux=mux_stateString0 4,4 0 -m +Var=String0_stringConnected bit 3,1 -m // 0x00: String not connected, 0x01: String connected to HV bus +Var=String0_balancing_active bit 2,1 -m // 0x00: No balancing active, 0x01: Balancing in this string active +Var=String0_Err_overtemp_charge bit 15,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 45 degree celsius. +Var=String0_Err_undertemp_charge bit 14,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below 0 degree celsius. +Var=String0_Err_overtemp_discharge bit 13,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell temperature is above 60 degree celsius. +Var=String0_Err_undertemp_discharge bit 12,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell temperature is below -20 degree celsius. +Var=String0_Err_Overcurrent_charge bit 11,1 -m // 0x00: No error, 0x01: Error: Flag will be set if string charge current is above 30400mA. +Var=String0_Err_Overcurre_discharge bit 10,1 -m // 0x00: No error, 0x01: Error: Flag will be set if discharge current is above maximum string current. +Var=String0_Err_Overvoltage bit 9,1 -m // 0x00: No error, 0x01: Error: Flag will be set if maximum cell voltage is above 4200mV. +Var=String0_Err_Undervoltage bit 8,1 -m // 0x00: No error, 0x01: Error: Flag will be set if minimum cell voltage is below 3000mV. This equals roughly 4% remaining SOC. Minimum data sheet values if 2500mV. +Var=String0_Err_deep_discharge bit 0,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_CS_currentMeas bit 44,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_positiveContactor bit 39,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_openWire bit 54,1 -m // 0x00: No error, 0x01: Error +Var=String0_openWireNumber unsigned 56,8 -m // Number of first open wire that has been detected in this string +Var=String0_Err_plaus_cell_volt bit 51,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_plaus_cell_temp bit 52,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_plaus_string_volt bit 50,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_slave_hardware bit 37,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_dsyChainBase_Comm bit 36,1 -m // 0x00: No error, 0x01: Error (i.e. SPI) +Var=String0_Err_dsyChainPrim_CRC bit 34,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_dsyChainRedun_Comm bit 35,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_dsyChainRedun_CRC bit 33,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_dsyPrim_voltMeasOor bit 32,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_dsyRedun_voltMeasOor bit 47,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_dsyPrim_tempMeasOor bit 46,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_dsyRedun_tempMeasOor bit 45,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_CS_coulombCountMeas bit 43,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_CS_energyCountMeas bit 42,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_plaus_volt_spread bit 48,1 -m // 0x00: No error, 0x01: Error +Var=String0_Err_plaus_temp_spread bit 49,1 -m // 0x00: No error, 0x01: Error +Var=String0_fuseBlown bit 1,1 -m /e:foxBMS_FuseState /ln:"0x00: fuse okay, 0x01: fuse blown" +Var=String0_Warning_overvoltage_MOL bit 17,1 -m +Var=String0_Warning_undervoltage_MOL bit 16,1 -m +Var=String0_Wrng_chargeOverTemp_MOL bit 23,1 -m +Var=String0_Wrng_dischrgOverTemp_MOL bit 21,1 -m +Var=String0_Wrng_chargeUnderTemp_MOL bit 22,1 -m +Var=String0_Wrng_dischrgUnderTmp_MOL bit 20,1 -m +Var=String0_Wrng_chargeOverCur_MOL bit 19,1 -m +Var=String0_Wrng_dischargOverCur_MOL bit 18,1 -m +Var=String0_Wrng_chargeOverTemp_RSL bit 31,1 -m +Var=String0_Wrng_chargeUnderTemp_RSL bit 30,1 -m +Var=String0_Wrng_dischrgOverTemp_RSL bit 29,1 -m +Var=String0_Wrng_dischrgUnderTmp_RSL bit 28,1 -m +Var=String0_Wrng_chargeOverCur_RSL bit 27,1 -m +Var=String0_Wrng_dischargOverCur_RSL bit 26,1 -m +Var=String0_Wrng_overvoltage_RSL bit 25,1 -m +Var=String0_Wrng_undervoltage_RSL bit 24,1 -m +Var=String0_Err_negativeContactor bit 38,1 -m +Var=String0_Err_CS_voltage1Meas bit 41,1 -m +Var=String0_Err_CS_voltage2Meas bit 40,1 -m +Var=String0_Err_CS_voltage3Meas bit 55,1 -m [foxBMS_StringMinMaxValues] -DLC=8 -Mux=mux_minMaxValuesString1 4,4 1 -m -Var=String1_minimumCellVoltage unsigned 21,13 -m /u:mV // Minimum cell voltage in this string -Var=String1_maximumCellVoltage unsigned 8,13 -m /u:mV // Maximum cell voltage in this string -Var=String1_maximumCellTemperature signed 34,9 -m /u:degC /f:0.5 // Maximum cell temperature in this string -Var=String1_minimumCellTemperature signed 43,9 -m /u:degC /f:0.5 // Minium cell temperature in this string - -[foxBMS_StringMinMaxValues] -DLC=8 -Mux=mux_minMaxValuesString2 4,4 2 -m -Var=String2_minimumCellVoltage unsigned 21,13 -m /u:mV // Minimum cell voltage in this string -Var=String2_maximumCellVoltage unsigned 8,13 -m /u:mV // Maximum cell voltage in this string -Var=String2_maximumCellTemperature signed 34,9 -m /u:degC /f:0.5 // Maximum cell temperature in this string -Var=String2_minimumCellTemperature signed 43,9 -m /u:degC /f:0.5 // Minium cell temperature in this string +ID=281h // Message contains minimum and maximum cell temperature and cell voltage values of respective string (in:can_cbs_tx_minimum-maximum-values.c:CANTX_StringMinimumMaximumValues, fv:tx) +Len=8 +CycleTime=100 -p +Mux=mux_minMaxValuesString0 4,4 0 -m +Var=String0_minimumCellVoltage unsigned 21,13 -m /u:mV // Minimum cell voltage in this string +Var=String0_maximumCellVoltage unsigned 8,13 -m /u:mV // Maximum cell voltage in this string +Var=String0_maximumCellTemperature signed 34,9 -m /u:degC /f:0.5 // Maximum cell temperature in this string +Var=String0_minimumCellTemperature signed 43,9 -m /u:degC /f:0.5 // Minium cell temperature in this string [foxBMS_StringStateEstimation] -ID=282h // Message contains SOC, SOE and SOH state estimations (in:can_cbs_tx_state_estimation.c:CAN_TxStringStateEstimation) -DLC=8 -Mux=mux_String0_SOC_SOE 0,4 0 -m -Var=String0_minimumSOC unsigned 4,9 -m /u:% /f:0.25 /d:0 -Var=String0_averageSOC unsigned 13,9 -m /u:% /f:0.25 /max:127.5 /d:0 -Var=String0_maximumSOC unsigned 22,9 -m /u:% /f:0.25 /max:63.75 /d:0 -Var=String0_SOE unsigned 31,9 -m /u:% /f:0.25 /max:127.5 /d:0 // SOE is depending on current direction, if battery system is charging: SOE_max is transmitted, else SOE_min -Var=String0_Energy_kWh unsigned 49,15 -m /u:kWh /f:0.01 // Remaining energy left in this string +ID=282h // Message contains SOC, SOE and SOH state estimations (in:can_cbs_tx_string-state-estimation.c:CANTX_StringStateEstimation, fv:tx) +Len=8 +CycleTime=1000 -p +Mux=mux_String0_SOC_SOE 0,4 0 -m +Var=String0_minimumSOC unsigned 4,9 -m /u:% /f:0.25 +Var=String0_averageSOC unsigned 13,9 -m /u:% /f:0.25 /max:127.5 +Var=String0_maximumSOC unsigned 22,9 -m /u:% /f:0.25 /max:63.75 +Var=String0_SOE unsigned 31,9 -m /u:% /f:0.25 /max:127.5 // SOE is depending on current direction, if battery system is charging: SOE_max is transmitted, else SOE_min +Var=String0_Energy_kWh unsigned 49,15 -m /u:kWh /f:0.01 // Remaining energy left in this string Var=String0_SOH unsigned 40,9 -m /u:% /f:0.25 /max:127.5 -[foxBMS_StringStateEstimation] -DLC=8 -Mux=mux_String1_SOC_SOE 0,4 1 -m -Var=String1_minimumSOC unsigned 4,9 -m /u:% /f:0.25 /d:0 -Var=String1_averageSOC unsigned 13,9 -m /u:% /f:0.25 /max:127.5 /d:0 -Var=String1_maximumSOC unsigned 22,9 -m /u:% /f:0.25 /max:63.75 /d:0 -Var=String1_SOE unsigned 31,9 -m /u:% /f:0.25 /max:127.5 /d:0 // SOE is depending on current direction, if battery system is charging: SOE_max is transmitted, else SOE_min -Var=String1_Energy_kWh unsigned 49,15 -m /u:kWh /f:0.01 // Remaining energy left in this string -Var=String1_SOH unsigned 40,9 -m /u:% /f:0.25 /max:127.5 - -[foxBMS_StringStateEstimation] -DLC=8 -Mux=mux_String2_SOC_SOE 0,4 2 -m -Var=String2_minimumSOC unsigned 4,9 -m /u:% /f:0.25 /d:0 -Var=String2_averageSOC unsigned 13,9 -m /u:% /f:0.25 /max:127.5 /d:0 -Var=String2_maximumSOC unsigned 22,9 -m /u:% /f:0.25 /max:63.75 /d:0 -Var=String2_SOE unsigned 31,9 -m /u:% /f:0.25 /max:127.5 /d:0 // SOE is depending on current direction, if battery system is charging: SOE_max is transmitted, else SOE_min -Var=String2_Energy_kWh unsigned 49,15 -m /u:kWh /f:0.01 // Remaining energy left in this string -Var=String2_SOH unsigned 40,9 -m /u:% /f:0.25 /max:127.5 - [foxBMS_Debug] -ID=200h // Reserved - for debug/development purpose only (in:can_cbs_rx_misc.c:CAN_RxDebug) -DLC=8 +ID=200h // Reserved - for debug/development purpose only (in:can_cbs_rx_misc.c:CANRX_Debug, fv:rx) +Len=8 -[IVT0_Msg_Result_I] -ID=521h // Current sensor string 0: current (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 +[foxBMS_String0Current] +ID=521h // Current sensor string 0: current (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_I +Len=6 Var=IVT0_Result_I_systemError bit 8,1 -m Var=IVT0_Result_I_OCS bit 11,1 -m Var=IVT0_Result_I_overallMeasError bit 9,1 -m @@ -1499,9 +1424,9 @@ Var=IVT0_ID_Result_I unsigned 0,8 -m Var=IVT0_MsgCount_Result_I unsigned 12,4 -m Var=IVT0_Result_I_mA signed 16,32 -m /u:mA -[IVT0_Msg_Result_U1] -ID=522h // Current sensor string 0: voltage 1 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 +[foxBMS_String0Voltage1] +ID=522h // Current sensor string 0: voltage 1 (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_U1 +Len=6 Var=IVT0_Result_U1_systemError bit 8,1 -m Var=IVT0_Result_U1_overallMeasError bit 9,1 -m Var=IVT0_Result_U1_channelMeasError bit 10,1 -m @@ -1510,9 +1435,9 @@ Var=IVT0_ID_Result_U1 unsigned 0,8 -m /min:1 /max:1 /d:1 Var=IVT0_MsgCount_Result_U1 unsigned 12,4 -m Var=IVT0_Result_U1_mV signed 16,32 -m /u:mV -[IVT0_Msg_Result_U2] -ID=523h // Current sensor string 0: voltage 2 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 +[foxBMS_String0Voltage2] +ID=523h // Current sensor string 0: voltage 2 (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_U2 +Len=6 Var=IVT0_Result_U2_systemError bit 8,1 -m Var=IVT0_Result_U2_OCS bit 11,1 -m Var=IVT0_Result_U2_overallMeasError bit 9,1 -m @@ -1521,9 +1446,9 @@ Var=IVT0_ID_Result_U2 unsigned 0,8 -m /min:2 /max:2 /d:2 Var=IVT0_MsgCount_Result_U2 unsigned 12,4 -m Var=IVT0_Result_U2_mV signed 16,32 -m /u:mV -[IVT0_Msg_Result_U3] -ID=524h // Current sensor string 0: voltage 3 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 +[foxBMS_String0Voltage3] +ID=524h // Current sensor string 0: voltage 3 (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_U3 +Len=6 Var=IVT0_Result_U3_systemError bit 8,1 -m Var=IVT0_Result_U3_OCS bit 11,1 -m Var=IVT0_Result_U3_overallMeasError bit 9,1 -m @@ -1532,20 +1457,20 @@ Var=IVT0_ID_Result_U3 unsigned 0,8 -m /min:3 /max:3 /d:3 Var=IVT0_MsgCount_Result_U3 unsigned 12,4 -m Var=IVT0_Result_U3_mV signed 16,32 -m /u:mV -[IVT0_Msg_Result_T] -ID=525h // Current sensor string 0: temperature (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 +[foxBMS_String0Temperature] +ID=525h // Current sensor string 0: temperature (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_T +Len=6 Var=IVT0_Result_T_systemError bit 8,1 -m Var=IVT0_Result_T_OCS bit 11,1 -m Var=IVT0_Result_T_overallMeasError bit 9,1 -m Var=IVT0_Result_T_channelMeasError bit 10,1 -m Var=IVT0_ID_Result_T unsigned 0,8 -m /min:4 /max:4 /d:4 Var=IVT0_MsgCount_Result_T unsigned 12,4 -m -Var=IVT0_Result_T_ddegC signed 16,32 -m /u:ddegC /f:0.1 /d:0 +Var=IVT0_Result_T_ddegC signed 16,32 -m /u:ddegC /f:0.1 -[IVT0_Msg_Result_W] -ID=526h // Current sensor string 0: power (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 +[foxBMS_String0Power] +ID=526h // Current sensor string 0: power (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_W +Len=6 Var=IVT0_Result_W_systemError bit 8,1 -m Var=IVT0_Result_W_OCS bit 11,1 -m Var=IVT0_Result_W_overallMeasError bit 9,1 -m @@ -1554,9 +1479,9 @@ Var=IVT0_Result_W signed 16,32 -m /u:W Var=IVT0_MsgCount_Result_W unsigned 12,4 -m Var=IVT0_ID_Result_W unsigned 0,8 -m /min:5 /max:5 /d:5 -[IVT0_Msg_Result_As] -ID=527h // Current sensor string 0: coulomb counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 +[foxBMS_String0CurrentCounter] +ID=527h // Current sensor string 0: coulomb counting (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_As +Len=6 Var=IVT0_Result_As_systemError bit 8,1 -m Var=IVT0_Result_As_OCS bit 11,1 -m Var=IVT0_Result_As_overallMeasError bit 9,1 -m @@ -1565,9 +1490,9 @@ Var=IVT0_Result_As signed 16,32 -m /u:As Var=IVT0_MsgCount_Result_As unsigned 12,4 -m Var=IVT0_ID_Result_As unsigned 0,8 -m /min:6 /max:6 /d:6 -[IVT0_Msg_Result_Wh] -ID=528h // Current sensor string 0: energy counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 +[foxBMS_String0EnergyCounter] +ID=528h // Current sensor string 0: energy counting (in:can_cbs_rx_current-sensor.c:CANRX_CurrentSensor, fv:rx); Isabellenhuette data sheet name: IVT0_Msg_Result_Wh +Len=6 Var=IVT0_Result_Wh_systemError bit 8,1 -m Var=IVT0_Result_Wh_OCS bit 11,1 -m Var=IVT0_Result_Wh_overallMeasError bit 9,1 -m @@ -1576,212 +1501,37 @@ Var=IVT0_Result_Wh signed 16,32 -m /u:Wh Var=IVT0_MsgCount_Result_Wh unsigned 12,4 -m Var=IVT0_ID_Result_Wh unsigned 0,8 -m /min:7 /max:7 /d:7 -[IVT1_Msg_Result_I] -ID=621h // Current sensor string 1: current (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT1_Result_I_systemError bit 8,1 -m -Var=IVT1_Result_I_OCS bit 11,1 -m -Var=IVT1_Result_I_overallMeasError bit 9,1 -m -Var=IVT1_Result_I_channelMeasError bit 10,1 -m -Var=IVT1_ID_Result_I unsigned 0,8 -m -Var=IVT1_MsgCount_Result_I unsigned 12,4 -m -Var=IVT1_Result_I_mA signed 16,32 -m /u:mA - -[IVT1_Msg_Result_U1] -ID=622h // Current sensor string 1: voltage 1 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT1_Result_U1_systemError bit 8,1 -m -Var=IVT1_Result_U1_overallMeasError bit 9,1 -m -Var=IVT1_Result_U1_channelMeasError bit 10,1 -m -Var=IVT1_Result_U1_OCS bit 11,1 -m -Var=IVT1_ID_Result_U1 unsigned 0,8 -m /min:1 /max:1 /d:1 -Var=IVT1_MsgCount_Result_U1 unsigned 12,4 -m -Var=IVT1_Result_U1_mV signed 16,32 -m /u:mV - -[IVT1_Msg_Result_U2] -ID=623h // Current sensor string 1: voltage 2 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT1_Result_U2_systemError bit 8,1 -m -Var=IVT1_Result_U2_OCS bit 11,1 -m -Var=IVT1_Result_U2_overallMeasError bit 9,1 -m -Var=IVT1_Result_U2_channelMeasError bit 10,1 -m -Var=IVT1_ID_Result_U2 unsigned 0,8 -m /min:2 /max:2 /d:2 -Var=IVT1_MsgCount_Result_U2 unsigned 12,4 -m -Var=IVT1_Result_U2_mV signed 16,32 -m /u:mV - -[IVT1_Msg_Result_U3] -ID=624h // Current sensor string 1: voltage 3 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT1_Result_U3_systemError bit 8,1 -m -Var=IVT1_Result_U3_OCS bit 11,1 -m -Var=IVT1_Result_U3_overallMeasError bit 9,1 -m -Var=IVT1_Result_U3_channelMeasError bit 10,1 -m -Var=IVT1_ID_Result_U3 unsigned 0,8 -m /min:3 /max:3 /d:3 -Var=IVT1_MsgCount_Result_U3 unsigned 12,4 -m -Var=IVT1_Result_U3_mV signed 16,32 -m /u:mV - -[IVT1_Msg_Result_T] -ID=625h // Current sensor string 1: temperature (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT1_Result_T_systemError bit 8,1 -m -Var=IVT1_Result_T_OCS bit 11,1 -m -Var=IVT1_Result_T_overallMeasError bit 9,1 -m -Var=IVT1_Result_T_channelMeasError bit 10,1 -m -Var=IVT1_ID_Result_T unsigned 0,8 -m /min:4 /max:4 /d:4 -Var=IVT1_MsgCount_Result_T unsigned 12,4 -m -Var=IVT1_Result_T_ddegC signed 16,32 -m /u:ddegC /f:0.1 /d:0 - -[IVT1_Msg_Result_W] -ID=626h // Current sensor string 1: power (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT1_Result_W_systemError bit 8,1 -m -Var=IVT1_Result_W_OCS bit 11,1 -m -Var=IVT1_Result_W_overallMeasError bit 9,1 -m -Var=IVT1_Result_W_channelMeasError bit 10,1 -m -Var=IVT1_Result_W signed 16,32 -m /u:W -Var=IVT1_MsgCount_Result_W unsigned 12,4 -m -Var=IVT1_ID_Result_W unsigned 0,8 -m /min:5 /max:5 /d:5 - -[IVT1_Msg_Result_As] -ID=627h // Current sensor string 1: coulomb counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT1_Result_As_systemError bit 8,1 -m -Var=IVT1_Result_As_OCS bit 11,1 -m -Var=IVT1_Result_As_overallMeasError bit 9,1 -m -Var=IVT1_Result_As_channelMeasError bit 10,1 -m -Var=IVT1_Result_As signed 16,32 -m /u:As -Var=IVT1_MsgCount_Result_As unsigned 12,4 -m -Var=IVT1_ID_Result_As unsigned 0,8 -m /min:6 /max:6 /d:6 - -[IVT1_Msg_Result_Wh] -ID=628h // Current sensor string 1: energy counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT1_Result_Wh_systemError bit 8,1 -m -Var=IVT1_Result_Wh_OCS bit 11,1 -m -Var=IVT1_Result_Wh_overallMeasError bit 9,1 -m -Var=IVT1_Result_Wh_channelMeasError bit 10,1 -m -Var=IVT1_Result_Wh signed 16,32 -m /u:Wh -Var=IVT1_MsgCount_Result_Wh unsigned 12,4 -m -Var=IVT1_ID_Result_Wh unsigned 0,8 -m /min:7 /max:7 /d:7 - -[IVT2_Msg_Result_I] -ID=721h // Current sensor string 2: current (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT2_Result_I_systemError bit 8,1 -m -Var=IVT2_Result_I_OCS bit 11,1 -m -Var=IVT2_Result_I_overallMeasError bit 9,1 -m -Var=IVT2_Result_I_channelMeasError bit 10,1 -m -Var=IVT2_ID_Result_I unsigned 0,8 -m -Var=IVT2_MsgCount_Result_I unsigned 12,4 -m -Var=IVT2_Result_I_mA signed 16,32 -m /u:mA - -[IVT2_Msg_Result_U1] -ID=722h // Current sensor string 2: voltage 1 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT2_Result_U1_systemError bit 8,1 -m -Var=IVT2_Result_U1_overallMeasError bit 9,1 -m -Var=IVT2_Result_U1_channelMeasError bit 10,1 -m -Var=IVT2_Result_U1_OCS bit 11,1 -m -Var=IVT2_ID_Result_U1 unsigned 0,8 -m /min:1 /max:1 /d:1 -Var=IVT2_MsgCount_Result_U1 unsigned 12,4 -m -Var=IVT2_Result_U1_mV signed 16,32 -m /u:mV - -[IVT2_Msg_Result_U2] -ID=723h // Current sensor string 2: voltage 2 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT2_Result_U2_systemError bit 8,1 -m -Var=IVT2_Result_U2_OCS bit 11,1 -m -Var=IVT2_Result_U2_overallMeasError bit 9,1 -m -Var=IVT2_Result_U2_channelMeasError bit 10,1 -m -Var=IVT2_ID_Result_U2 unsigned 0,8 -m /min:2 /max:2 /d:2 -Var=IVT2_MsgCount_Result_U2 unsigned 12,4 -m -Var=IVT2_Result_U2_mV signed 16,32 -m /u:mV - -[IVT2_Msg_Result_U3] -ID=724h // Current sensor string 2: voltage 3 (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT2_Result_U3_systemError bit 8,1 -m -Var=IVT2_Result_U3_OCS bit 11,1 -m -Var=IVT2_Result_U3_overallMeasError bit 9,1 -m -Var=IVT2_Result_U3_channelMeasError bit 10,1 -m -Var=IVT2_ID_Result_U3 unsigned 0,8 -m /min:3 /max:3 /d:3 -Var=IVT2_MsgCount_Result_U3 unsigned 12,4 -m -Var=IVT2_Result_U3_mV signed 16,32 -m /u:mV - -[IVT2_Msg_Result_T] -ID=725h // Current sensor string 2: temperature (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT2_Result_T_systemError bit 8,1 -m -Var=IVT2_Result_T_OCS bit 11,1 -m -Var=IVT2_Result_T_overallMeasError bit 9,1 -m -Var=IVT2_Result_T_channelMeasError bit 10,1 -m -Var=IVT2_ID_Result_T unsigned 0,8 -m /min:4 /max:4 /d:4 -Var=IVT2_MsgCount_Result_T unsigned 12,4 -m -Var=IVT2_Result_T_ddegC signed 16,32 -m /u:ddegC /f:0.1 /d:0 - -[IVT2_Msg_Result_W] -ID=726h // Current sensor string 2: power (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT2_Result_W_systemError bit 8,1 -m -Var=IVT2_Result_W_OCS bit 11,1 -m -Var=IVT2_Result_W_overallMeasError bit 9,1 -m -Var=IVT2_Result_W_channelMeasError bit 10,1 -m -Var=IVT2_Result_W signed 16,32 -m /u:W -Var=IVT2_MsgCount_Result_W unsigned 12,4 -m -Var=IVT2_ID_Result_W unsigned 0,8 -m /min:5 /max:5 /d:5 - -[IVT2_Msg_Result_As] -ID=727h // Current sensor string 2: coulomb counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT2_Result_As_systemError bit 8,1 -m -Var=IVT2_Result_As_OCS bit 11,1 -m -Var=IVT2_Result_As_overallMeasError bit 9,1 -m -Var=IVT2_Result_As_channelMeasError bit 10,1 -m -Var=IVT2_Result_As signed 16,32 -m /u:As -Var=IVT2_MsgCount_Result_As unsigned 12,4 -m -Var=IVT2_ID_Result_As unsigned 0,8 -m /min:6 /max:6 /d:6 - -[IVT2_Msg_Result_Wh] -ID=728h // Current sensor string 2: energy counting (in:can_cbs_rx_current_sensor.c:CAN_RxCurrentSensor) -DLC=6 -Var=IVT2_Result_Wh_systemError bit 8,1 -m -Var=IVT2_Result_Wh_OCS bit 11,1 -m -Var=IVT2_Result_Wh_overallMeasError bit 9,1 -m -Var=IVT2_Result_Wh_channelMeasError bit 10,1 -m -Var=IVT2_Result_Wh signed 16,32 -m /u:Wh -Var=IVT2_MsgCount_Result_Wh unsigned 12,4 -m -Var=IVT2_ID_Result_Wh unsigned 0,8 -m /min:7 /max:7 /d:7 - -[foxBMS_Startup] -ID=199h // (in:can.c:CAN_TransmitBootMessage) -DLC=8 +[foxBMS_Boot] +ID=199h // (in:can_cfg_tx_boot-message.c:CANTX_TransmitBootMessage, fv:tx) +Len=8 Var=foxBMS_majorVersionNumber unsigned 0,8 -m Var=foxBMS_minorVersionNumber unsigned 8,8 -m Var=foxBMS_patchVersionNumber unsigned 16,8 -m -Var=foxBMS_uniqueId unsigned 32,32 -m // Content of Device Identification Register (DEVID) -Var=foxBMS_underVersionControl bit 24,1 -Var=foxBMS_dirtyFlag bit 25,1 +Var=foxBMS_uniqueId unsigned 32,32 -m // Content of Device Identification Register (DEVID) +Var=foxBMS_underVersionControl bit 31,1 -m +Var=foxBMS_dirtyFlag bit 30,1 -m Var=foxBMS_releaseDistance unsigned 24,5 -m -Var=foxBMS_releaseDistanceOverflow bit 26,1 - -[foxBMS_DetailState] -ID=226h // Transmits details on flags transmitted by foxBMS_State (in:can_cbs_tx_state.c:CAN_TxDetailState) -DLC=8 -Var=foxBMS_TimingViolationEngine bit 0,1 /ln:"timing violation engine task" // Indicates whether the timing of the engine task has been violated. -Var=foxBMS_TimingViolation1ms bit 1,1 /ln:"timing violation 1ms task" // Indicates whether the timing of the 1ms task has been violated. -Var=foxBMS_TimingViolation10ms bit 2,1 /ln:"timing violation 10ms task" // Indicates whether the timing of the 10ms task has been violated. -Var=foxBMS_TimingViolation100ms bit 3,1 /ln:"timing violation 100ms task" // Indicates whether the timing of the 100ms task has been violated. -Var=foxBMS_TimingViolation100msAlgo bit 4,1 /ln:"timing violation 100ms algorithm task" // Indicates whether the timing of the 100ms algorithm task has been violated. -Var=foxBMS_TimingViolation10msRec bit 10,1 /ln:"timing violation 10ms task recorded" // Indicates whether a violation of the timing of the 10ms task has been recorded. -Var=foxBMS_TimingViolation100msRec bit 11,1 /ln:"timing violation 100ms task recorded" // Indicates whether a violation of the timing of the 100ms task has been recorded. -Var=foxBMS_TimingViolation100msAlgoR bit 12,1 /ln:"timing violation 100ms algorithm task recorded" // Indicates whether a violation of the timing of the 100ms algorithm task has been recorded. -Var=foxBMS_TimingViolationEngineRec bit 8,1 /ln:"timing violation engine task recorded" // Indicates whether a violation of the timing of the engine task has been recorded. -Var=foxBMS_TimingViolation1msRec bit 9,1 /ln:"timing violation 1ms task recorded" // Indicates whether a violation of the timing of the 1ms task has been recorded. +Var=foxBMS_releaseDistanceOverflow bit 29,1 -m + +[foxBMS_BmsStateDetails] +ID=226h // Transmits details on flags transmitted by foxBMS_State (in:can_cbs_tx_state.c:CANTX_BmsStateDetails, fv:tx) +Len=8 +CycleTime=1000 -p +Var=foxBMS_TimingViolationEngine bit 7,1 -m /ln:"timing violation engine task" // Indicates whether the timing of the engine task has been violated. +Var=foxBMS_TimingViolation1ms bit 6,1 -m /ln:"timing violation 1ms task" // Indicates whether the timing of the 1ms task has been violated. +Var=foxBMS_TimingViolation10ms bit 5,1 -m /ln:"timing violation 10ms task" // Indicates whether the timing of the 10ms task has been violated. +Var=foxBMS_TimingViolation100ms bit 4,1 -m /ln:"timing violation 100ms task" // Indicates whether the timing of the 100ms task has been violated. +Var=foxBMS_TimingViolation100msAlgo bit 3,1 -m /ln:"timing violation 100ms algorithm task" // Indicates whether the timing of the 100ms algorithm task has been violated. +Var=foxBMS_TimingViolation10msRec bit 13,1 -m /ln:"timing violation 10ms task recorded" // Indicates whether a violation of the timing of the 10ms task has been recorded. +Var=foxBMS_TimingViolation100msRec bit 12,1 -m /ln:"timing violation 100ms task recorded" // Indicates whether a violation of the timing of the 100ms task has been recorded. +Var=foxBMS_TimingViolation100msAlgoR bit 11,1 -m /ln:"timing violation 100ms algorithm task recorded" // Indicates whether a violation of the timing of the 100ms algorithm task has been recorded. +Var=foxBMS_TimingViolationEngineRec bit 15,1 -m /ln:"timing violation engine task recorded" // Indicates whether a violation of the timing of the engine task has been recorded. +Var=foxBMS_TimingViolation1msRec bit 14,1 -m /ln:"timing violation 1ms task recorded" // Indicates whether a violation of the timing of the 1ms task has been recorded. [foxBMS_DieId] -ID=227h // Transmits the unique die id of the MCU on which foxBMS is currently running (in:can.c:CAN_TransmitDieId) -DLC=8 -Var=MCU_lotNumber unsigned 8,24 -m /max:1 /ln:"lot number of the MCU" // lot number of the MCU (read from DIEIDH register) -Var=MCU_waferNumber unsigned 32,8 -m /max:1 /ln:"wafer number of the MCU" // wafer number of the MCU (read from DIEDL register) -Var=MCU_xWaferCoordinate unsigned 52,12 -m /max:1 /ln:"x wafer coordinate" // x coordinate of the MCU die on the wafer (read from DIEIDL register) -Var=MCU_yWaferCoordinate unsigned 40,12 -m /max:1 /ln:"y wafer coordinate" // y coordinate of the MCU die on the wafer (read from DIEIDL register) +ID=227h // Transmits the unique die id of the MCU on which foxBMS is currently running (in:can_cfg_tx_boot-message.c:CANTX_TransmitDieId, fv:tx) +Len=8 +Var=MCU_lotNumber unsigned 8,24 -m /max:1 /ln:"lot number of the MCU" // lot number of the MCU (read from DIEIDH register) +Var=MCU_waferNumber unsigned 32,8 -m /max:1 /ln:"wafer number of the MCU" // wafer number of the MCU (read from DIEDL register) +Var=MCU_xWaferCoordinate unsigned 52,12 -m /max:1 /ln:"x wafer coordinate" // x coordinate of the MCU die on the wafer (read from DIEIDL register) +Var=MCU_yWaferCoordinate unsigned 40,12 -m /max:1 /ln:"y wafer coordinate" // y coordinate of the MCU die on the wafer (read from DIEIDL register) diff --git a/tools/dbc/symbol_creator.py b/tools/dbc/symbol_creator.py index 67a85139..3f574f5f 100644 --- a/tools/dbc/symbol_creator.py +++ b/tools/dbc/symbol_creator.py @@ -42,6 +42,7 @@ import argparse import logging +import math from pathlib import Path SCRIPT_PATH = Path(__file__).parent.resolve() @@ -97,18 +98,20 @@ def main(): cell_voltages = SCRIPT_PATH / "multiplexed_cell_voltages_for_sym_file.txt" volts = [] name = "cellVoltage" + cycle_time_ms = str(math.ceil(args.number_of_cells / 4) * 100) for i in range(0, args.number_of_cells): volts.append("[foxBMS_CellVoltage]") if not i: volts.append("ID=240h") - volts.append("DLC=8") + volts.append("Len=8") + volts.append(f"CycleTime={cycle_time_ms} -p") volts.append( f"Mux=mux_{name}_{(i * 4):03d}_{((i * 4) + 3):03d} 0,8 {sym_hex(i)} -m" ) - volts.append(f"Var={name}_{(i * 4):03d}_invalidFlag unsigned 11,1 -m") - volts.append(f"Var={name}_{((i * 4) + 1):03d}_invalidFlag unsigned 10,1 -m") - volts.append(f"Var={name}_{((i * 4) + 2):03d}_invalidFlag unsigned 9,1 -m") - volts.append(f"Var={name}_{((i * 4) + 3):03d}_invalidFlag unsigned 8,1 -m") + volts.append(f"Var={name}_{(i * 4):03d}_invalidFlag bit 11,1 -m") + volts.append(f"Var={name}_{((i * 4) + 1):03d}_invalidFlag bit 10,1 -m") + volts.append(f"Var={name}_{((i * 4) + 2):03d}_invalidFlag bit 9,1 -m") + volts.append(f"Var={name}_{((i * 4) + 3):03d}_invalidFlag bit 8,1 -m") volts.append(f"Var={name}_{(i * 4):03d} unsigned 12,13 -m /u:mV") volts.append(f"Var={name}_{((i * 4) + 1):03d} unsigned 25,13 -m /u:mV") volts.append(f"Var={name}_{((i * 4) + 2):03d} unsigned 38,13 -m /u:mV") @@ -119,20 +122,22 @@ def main(): cell_temperatures = SCRIPT_PATH / "multiplexed_cell_temperatures_for_sym_file.txt" temps = [] name = "cellTemperature" + cycle_time_ms = str(math.ceil(args.number_of_cell_temperatures / 6) * 100) for i in range(0, args.number_of_cell_temperatures): temps.append("[foxBMS_CellTemperature]") if not i: temps.append("ID=250h") - temps.append("DLC=8") + temps.append("Len=8") + temps.append(f"CycleTime={cycle_time_ms} -p") temps.append( f"Mux=mux_{name}_{(i * 6):03d}_{((i * 6) + 5):03d} 0,8 {sym_hex(i)} -m" ) - temps.append(f"Var={name}_{(i * 6):03d}_invalidFlag unsigned 15,1 -m") - temps.append(f"Var={name}_{((i * 6) + 1):03d}_invalidFlag unsigned 14,1 -m") - temps.append(f"Var={name}_{((i * 6) + 2):03d}_invalidFlag unsigned 13,1 -m") - temps.append(f"Var={name}_{((i * 6) + 3):03d}_invalidFlag unsigned 12,1 -m") - temps.append(f"Var={name}_{((i * 6) + 4):03d}_invalidFlag unsigned 11,1 -m") - temps.append(f"Var={name}_{((i * 6) + 5):03d}_invalidFlag unsigned 10,1 -m") + temps.append(f"Var={name}_{(i * 6):03d}_invalidFlag bit 15,1 -m") + temps.append(f"Var={name}_{((i * 6) + 1):03d}_invalidFlag bit 14,1 -m") + temps.append(f"Var={name}_{((i * 6) + 2):03d}_invalidFlag bit 13,1 -m") + temps.append(f"Var={name}_{((i * 6) + 3):03d}_invalidFlag bit 12,1 -m") + temps.append(f"Var={name}_{((i * 6) + 4):03d}_invalidFlag bit 11,1 -m") + temps.append(f"Var={name}_{((i * 6) + 5):03d}_invalidFlag bit 10,1 -m") temps.append(f"Var={name}_{(i * 6):03d} signed 16,8 -m /u:degC") temps.append(f"Var={name}_{((i * 6) + 1):03d} signed 24,8 -m /u:degC") temps.append(f"Var={name}_{((i * 6) + 2):03d} signed 32,8 -m /u:degC") diff --git a/tools/gui/fgui/__init__.py b/tools/gui/fgui/__init__.py index 25ee1b26..7c8a9971 100644 --- a/tools/gui/fgui/__init__.py +++ b/tools/gui/fgui/__init__.py @@ -41,7 +41,7 @@ """sets the version package etc.""" import os -__version__ = "1.4.0" +__version__ = "1.4.1" __appname__ = "foxBMS 2" __author__ = "The foxBMS Team" __copyright__ = "(c) 2010 - 2022 foxBMS" diff --git a/tools/ide/vscode/c_cpp_properties.json.jinja2 b/tools/ide/vscode/c_cpp_properties.json.jinja2 index 80a71fc4..a94f6e4a 100644 --- a/tools/ide/vscode/c_cpp_properties.json.jinja2 +++ b/tools/ide/vscode/c_cpp_properties.json.jinja2 @@ -23,6 +23,8 @@ "${workspaceFolder}/src/app/driver/adc", "${workspaceFolder}/src/app/driver/can", "${workspaceFolder}/src/app/driver/can/cbs", + "${workspaceFolder}/src/app/driver/can/cbs/rx", + "${workspaceFolder}/src/app/driver/can/cbs/tx", "${workspaceFolder}/src/app/driver/checksum", "${workspaceFolder}/src/app/driver/config", "${workspaceFolder}/src/app/driver/contactor", @@ -58,6 +60,7 @@ "${workspaceFolder}/src/app/driver/ts/epcos/b57251v5103j060", "${workspaceFolder}/src/app/driver/ts/epcos/b57861s0103f045", "${workspaceFolder}/src/app/driver/ts/fake/none", + "${workspaceFolder}/src/app/driver/ts/murata/ncu15xh103f6sxx", "${workspaceFolder}/src/app/driver/ts/vishay/ntcalug01a103g", "${workspaceFolder}/src/app/driver/ts/vishay/ntcle317e4103sba", "${workspaceFolder}/src/app/driver/ts/{{TEMPERATURE_SENSOR_MANUFACTURER}}/{{TEMPERATURE_SENSOR_MODEL}}/{{TEMPERATURE_SENSOR_METHOD}}", diff --git a/tools/ide/vscode/cspell.json.jinja2 b/tools/ide/vscode/cspell.json.jinja2 index 07090d8b..fb5f9c1d 100644 --- a/tools/ide/vscode/cspell.json.jinja2 +++ b/tools/ide/vscode/cspell.json.jinja2 @@ -4,6 +4,24 @@ "version": "0.2", // language - current active spelling language "language": "en", + "enabledLanguageIds": [ + "bat", + "bibtex", + "c", + "cpp", + "css", + "diff", + "html", + "json", + "jsonc", + "markdown", + "plaintext", + "powershell", + "python", + "shellscript", + "xml", + "yaml" + ], // words - list of words to be always considered correct "words": [ "alphanumericals", @@ -89,9 +107,17 @@ "fgui", // Windows related "USERPROFILE", + "ERRORLEVEL", "LOCALAPPDATA", "APPDATA", + // cmd, batch + "dpfn", + "enabledelayedexpansion", + "enableextensions", "findstr", + "popd", + "pushd", + "setlocal", // file extensions "vsdx", // file names @@ -103,6 +129,8 @@ "AFE", // Analog Front-End "AFES", // Analog Front-Ends "BALS", + "CANRX", // CAN receive + "CANTX", // CAN transmit "HTSEN", "ILCK", "SYSM", @@ -149,6 +177,9 @@ // general software terms "MOSFET", "memcpy", + "realloc", + "calloc", + "mcalloc", "NTFS", "JTAG", "unstaged", @@ -440,6 +471,7 @@ "pcan", "lauterbach", "epcos", + "murata", "vishay", "mram", // Magnetoresistive Random Access Memory "ntcalug", // temperature sensor form vishay @@ -456,6 +488,7 @@ "localbuild", "noauth", "workitem", + "TESTCASE", // asm keywords "endasmfunc", // third party software, tools, configuration files etc. @@ -609,6 +642,7 @@ "hexlify", "startswith", // python packages + "cantools", "jsonschema", "cffconvert", "clib", @@ -673,7 +707,7 @@ "softwareTerms", "misc" ], - "flagWords":[ + "flagWords": [ "endianess", "datasheet" ], @@ -739,6 +773,7 @@ "tests/axivion/rule_config_c.json", "tests/axivion/ci_config.json", "tests/axivion/addon-test/**/test_*.*", + "tests/axivion/qualification-test/qualification-kit/**", "tests/re-names/*.json", "tools/dbc/*.dbc", "tools/dbc/*.sym", diff --git a/tools/ide/vscode/settings.json.jinja2 b/tools/ide/vscode/settings.json.jinja2 index b6fed79b..77c7f204 100644 --- a/tools/ide/vscode/settings.json.jinja2 +++ b/tools/ide/vscode/settings.json.jinja2 @@ -23,7 +23,7 @@ "**/build/**/*.ppm": true, "**/build/**/*.ppr": true, "**/build/**/*.pprs": true, - "**/conf/hcg/include/**":true, + "**/conf/hcg/include/**": true, ".github/**": true, ".gitlab/**": true, ".vscode/**": true, @@ -32,8 +32,10 @@ "build/axivion/**": true, "build/conf_check_*/**": true, "build/predefined_defines/**": true, - "**/.lock-waf_*_build":true, - "**/.wafpickle-*":true + "**/.lock-waf_*_build": true, + "**/.wafpickle-*": true, + "**/*.gcov": true, + "**/*.zip": true }, "files.watcherExclude": { "**/.git/objects/**": true, @@ -44,7 +46,8 @@ "**/build/**/*.pp": true, "**/build/**/*.ppr": true, "**/build/**/*.pprs": true, - "**/conf/hcg/include/**": true + "**/conf/hcg/include/**": true, + "tests/axivion/qualification-kit/**": true }, "search.exclude": { "**/node_modules": true, @@ -55,7 +58,8 @@ "**build/**/*.pp": true, "**build/**/*.ppr": true, "**build/**/*.pprs": true, - "**/conf/hcg/include/**": true + "**/conf/hcg/include/**": true, + "tests/axivion/qualification-kit/**": true }, "css.validate": false, "json.schemas": [ diff --git a/tools/utils/cmd/find_base_conda.bat b/tools/utils/cmd/find_base_conda.bat index 9c2033af..599d7d38 100644 --- a/tools/utils/cmd/find_base_conda.bat +++ b/tools/utils/cmd/find_base_conda.bat @@ -41,7 +41,7 @@ @PUSHD %~dp0 @REM get conda environment name -@CALL :NORMALIZEPATH "%~dp0..\..\..\conf\env\conda_env_win32.yaml" +@CALL :NORMALIZE_PATH "%~dp0..\..\..\conf\env\conda_env_win32.yaml" @SET CONDA_ENV_FILE=%NORMALIZED_PATH% @FOR /f "usebackq tokens=*" %%A IN ("%CONDA_ENV_FILE%") DO @( @FOR /F "tokens=1" %%B IN ("%%A") DO @( @@ -114,6 +114,6 @@ @POPD -:NORMALIZEPATH +:NORMALIZE_PATH @SET NORMALIZED_PATH=%~dpfn1 @EXIT /B diff --git a/tools/utils/conda-update-env.bat b/tools/utils/conda-update-env.bat index 9897c204..458225ed 100644 --- a/tools/utils/conda-update-env.bat +++ b/tools/utils/conda-update-env.bat @@ -56,6 +56,6 @@ conda env create -f %CONDA_DEVELOPMENT_ENVIRONMENT_CONFIGURATION_FILE% @ECHO done... -:NORMALIZEPATH +:NORMALIZE_PATH @SET NORMALIZED_PATH=%~dpfn1 @EXIT /B diff --git a/tools/utils/update_version.py b/tools/utils/update_version.py index de7105a9..f591b4d2 100644 --- a/tools/utils/update_version.py +++ b/tools/utils/update_version.py @@ -41,6 +41,7 @@ """Template for Python scripts""" import sys +import csv import argparse import os import re @@ -51,6 +52,8 @@ from git import Repo +MAGIC_DATE = "xxxx-xx-xx" + def get_git_root(path: str = os.path.realpath(__file__)) -> Path: """helper function to find the repository root @@ -72,47 +75,19 @@ def date_get_today() -> str: return today.strftime("%Y-%m-%d") -def main(): # pylint: disable=too-many-statements - """This script does this and that""" - parser = argparse.ArgumentParser() - parser.add_argument( - "-v", - "--verbosity", - dest="verbosity", - action="count", - default=0, - help="set verbosity level", - ) - parser.add_argument( - "--from", - dest="from_version", - action="store", - default="x.y.z", - help="from version", - ) - parser.add_argument( - "--to", - dest="to_version", - action="store", - default=0, - help="to version", - ) - args = parser.parse_args() - _from = args.from_version - _to = args.to_version - if not _to: - sys.exit("Don't know to version to bump.") - root = Path(get_git_root()) - docs = root / "docs" - iso_date_today = date_get_today() - if args.verbosity == 1: - logging.basicConfig(level=logging.INFO) - elif args.verbosity > 1: - logging.basicConfig(level=logging.DEBUG) - else: - logging.basicConfig(level=logging.ERROR) +def get_previous_release(repo: Path) -> str: + """Return the previous version number""" + path = str(repo / "docs" / "general" / "releases.csv") + with open(path, "r", encoding="utf-8") as f: + reader = csv.DictReader(f, delimiter=";") + for row in reader: + if row["foxBMS 2"] != "vx.y.z": + return row["foxBMS 2"][1:] + return "" - # *.c, *.h files + +def update_c_h_files(root, iso_date_today, _from, _to): + """update .c, and .h files""" all_c_h_files = ( list((root / "conf").rglob("**/*.[c|h]")) + list((root / "docs").rglob("**/*.[c|h]")) @@ -126,10 +101,13 @@ def main(): # pylint: disable=too-many-statements logging.debug(f"from: {old_version}") logging.debug(f"to: {new_version}") for i in all_c_h_files: - txt = i.read_text(encoding="utf-8") + try: + txt = i.read_text(encoding="utf-8") + except: # pylint: disable=bare-except + continue if " * @author foxBMS Team" in txt: # re-read file to ensure ascii encoding on our files - txt = i.read_text(encoding="utf-8") + txt = i.read_text(encoding="ascii") logging.debug(f"Found foxBMS 2 file: {i}") if old_version in txt: logging.debug("...Replacing version") @@ -138,45 +116,139 @@ def main(): # pylint: disable=too-many-statements txt = updated.sub(updated_new, txt) i.write_text(txt, encoding="ascii") + +def update_wscript(root, _from, _to): + """update wscript""" wscript = root / "wscript" txt = wscript.read_text(encoding="utf-8") txt = txt.replace(f'VERSION = "{_from}"', f'VERSION = "{_to}"') wscript.write_text(txt, encoding="utf-8") + +def update_citation(root, iso_date_today, _from, _to): + """Update citation file""" citation = root / "CITATION.cff" txt = citation.read_text(encoding="utf-8") txt = txt.replace(f'version: "{_from}"', f'version: "{_to}"') - txt = re.sub( - r"date-released: \d{4}-\d{2}-\d{2}", f"date-released: {iso_date_today}", txt - ) + if _to == "x.y.z": # back to development, use magic date string + txt = re.sub(r"date-released: .*", f"date-released: {MAGIC_DATE}", txt) + else: + txt = txt.replace( + f"date-released: {MAGIC_DATE}", f"date-released: {iso_date_today}" + ) citation.write_text(txt, encoding="utf-8") - changelog = docs / "general" / "changelog.rst" + +def update_changelog(root, iso_date_today, _from, _to): + """Update changelog""" + changelog = root / "docs" / "general" / "changelog.rst" logging.debug(f"Patching {changelog}") - changelog_regex = re.compile( - rf"\[{_from}\][ ]-[ ]([0-9]{{4}})[-](([0-9]{{2}})|(xx))-(([0-9]{{2}})|(xx))" - ) - logging.debug(f"Using {changelog_regex}") txt = changelog.read_text(encoding="utf-8") - txt = changelog_regex.sub( - f"[{_to}] - {iso_date_today}", - txt, - ) + if _to == "x.y.z": + txt = txt.splitlines() + txt = ( + txt[:42] + + f""" +******************** +[{_to}] - {MAGIC_DATE} +******************** + +Added +===== + +Changed +======= + +Deprecated +========== + +Removed +======= + +Fixed +===== + +""".splitlines() + + txt[43:] + ) + txt = "\n".join(txt) + "\n" + else: + txt = txt.replace(f"[{_from}] - {MAGIC_DATE}", f"[{_to}] - {iso_date_today}") changelog.write_text(txt, encoding="utf-8") - releases = docs / "general" / "releases.csv" + +def update_commit_fragments(root, previous_release, _from, _to): + """Update the next-release commit fragment and create the one for the release""" + if _to == "x.y.z": + change_type = "" + else: + try: + _to_l = [int(i) for i in _to.split(".")] + previous_release_l = [int(i) for i in previous_release.split(".")] + change_type = "Bugfix" + if _to_l[1] > previous_release_l[1]: + change_type = "Minor" + if _to_l[0] > previous_release_l[0]: + change_type = "Major" + except ValueError: + sys.exit("unexpected version identifier") + commit_msg_file = root / "docs" / "general" / "commit-msgs" / "next-release.txt" + logging.debug(f"Patching {commit_msg_file}") + txt = commit_msg_file.read_text(encoding="utf-8") + txt = txt.replace("", change_type) + txt = txt.replace(f"foxBMS 2 (v{_from})", f"foxBMS 2 (v{_to})") + txt = txt.replace( + f"v{_from}/general/changelog.html", + f"v{_to}/general/changelog.html", + ) + if _to != "x.y.z": + (commit_msg_file.parent / f"release-v{_to}.txt").write_text( + txt, encoding="utf-8" + ) + txt = """ release of foxBMS 2 (vx.y.z) + +* + +For a detailed list of changes, please refer to the documentation at +https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/vx.y.z/general/changelog.html. +""" + commit_msg_file.write_text(txt, encoding="utf-8") + + +def update_release_csv(root, iso_date_today, _from, _to): + """Update release.csv""" + releases = root / "docs" / "general" / "releases.csv" txt = releases.read_text(encoding="utf-8") - txt = txt.replace(f"v{_from};", f"v{_to};", 1) - txt = re.sub(r"\d{4}-\d{2}-\d{2}", iso_date_today, txt, 1) - txt = txt.replace(f"/v{_from}/", f"/v{_to}/", 1) + if _to == "x.y.z": + txt = txt.splitlines() + txt = ( + [txt[0]] + + [ + f"v{_to}; {MAGIC_DATE}; https://iisb-foxbms.iisb.fraunhofer.de/foxbms/gen2/docs/html/v{_to}/" # pylint: disable=line-too-long + ] + + txt[1:] + ) + txt = "\n".join(txt) + "\n" + else: + txt = txt.replace(f"v{_from};", f"v{_to};", 1) + txt = txt.replace(f"{MAGIC_DATE};", f"{iso_date_today};", 1) + txt = txt.replace(f"/v{_from}/", f"/v{_to}/", 1) releases.write_text(txt, encoding="utf-8") - software_installation = docs / "getting-started" / "software-installation.rst" + +def update_installation_instructions(root, _from, _to): + """Update software-installation instructions""" + software_installation = ( + root / "docs" / "getting-started" / "software-installation.rst" + ) txt = software_installation.read_text(encoding="utf-8") txt = txt.replace(_from, _to, 4) software_installation.write_text(txt, encoding="utf-8") - macros = docs / "macros.txt" + +def update_doc_macros(root, _from, _to): + """Update the sphinx macro file""" + macros = root / "docs" / "macros.txt" txt = macros.read_text(encoding="utf-8") txt = txt.replace( f".. |version_foxbms| replace:: ``{_from}``", @@ -185,15 +257,71 @@ def main(): # pylint: disable=too-many-statements ) macros.write_text(txt, encoding="utf-8") + +def update_fgui(root, _from, _to): + """Update fgui module""" fgui = root / "tools" / "gui" / "fgui" / "__init__.py" txt = fgui.read_text(encoding="utf-8") - txt = txt.replace( - f'__version__ = "{_from}"', - f'__version__ = "{_to}"', - 1, - ) + txt = txt.replace(f'__version__ = "{_from}"', f'__version__ = "{_to}"', 1) fgui.write_text(txt, encoding="utf-8") +def main(): # pylint: disable=too-many-statements + """Update the version information in all relevant files.""" + parser = argparse.ArgumentParser() + parser.add_argument( + "-v", + "--verbosity", + dest="verbosity", + action="count", + default=0, + help="set verbosity level", + ) + parser.add_argument( + "--from", + dest="from_version", + action="store", + default="x.y.z", + help="from version", + ) + parser.add_argument( + "--to", + dest="to_version", + action="store", + default=0, + help="to version", + ) + args = parser.parse_args() + _from = args.from_version + _to = args.to_version + if not _to: + sys.exit("Don't know to version to bump.") + if _from == _to: + sys.exit("--from and --to cannot be the same value") + + root = Path(get_git_root()) + previous_release = get_previous_release(root) + if not previous_release: + sys.exit("Could not determine previous version.") + + iso_date_today = date_get_today() + if args.verbosity == 1: + logging.basicConfig(level=logging.INFO) + elif args.verbosity > 1: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.ERROR) + + update_c_h_files(root, iso_date_today, _from, _to) + update_wscript(root, _from, _to) + update_citation(root, iso_date_today, _from, _to) + update_changelog(root, iso_date_today, _from, _to) + update_commit_fragments(root, previous_release, _from, _to) + update_release_csv(root, iso_date_today, _from, _to) + update_installation_instructions(root, _from, _to) + update_doc_macros(root, _from, _to) + update_fgui(root, _from, _to) + + if __name__ == "__main__": main() diff --git a/tools/utils/verify_checksums.py b/tools/utils/verify_checksums.py new file mode 100644 index 00000000..20da4fd0 --- /dev/null +++ b/tools/utils/verify_checksums.py @@ -0,0 +1,116 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (c) 2010 - 2022, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. +# All rights reserved. +# +# SPDX-License-Identifier: BSD-3-Clause +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# We kindly request you to use one or more of the following phrases to refer to +# foxBMS in your hardware, software, documentation or advertising materials: +# +# - "This product uses parts of foxBMS®" +# - "This product includes parts of foxBMS®" +# - "This product is derived from foxBMS®" + +"""Calculates the checksum of file or directory and checks it against a known +hash.""" + +import argparse +import hashlib +import logging +import sys +from pathlib import Path + +MAX_READ = 4096 + + +def get_checksum(files: list[Path]): + """returns the combined checksum for a list of files and their names.""" + checksum = hashlib.sha256() + for _file in files: + buf = _file.name.encode("utf-8") + checksum.update(buf) + with open(_file, "rb") as f: + while buf: + buf = f.read(MAX_READ) + checksum.update(buf) + logging.debug(f"{_file} --> {checksum.hexdigest()}") + + return checksum.hexdigest() + + +def main(): + """verifies a checksum""" + parser = argparse.ArgumentParser() + parser.add_argument( + "-v", + "--verbosity", + dest="verbosity", + action="count", + default=0, + help="set verbosity level", + ) + parser.add_argument( + dest="fd_input", + help="FILE or DIRECTORY to be checked", + ) + parser.add_argument( + dest="known_hash", + help="Known hash against which should be tested.", + ) + args = parser.parse_args() + + if args.verbosity == 1: + logging.basicConfig(level=logging.INFO) + elif args.verbosity > 1: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.ERROR) + + files = Path(args.fd_input) + + logging.info(f"Known hash is: {args.known_hash}") + + if files.is_file(): + files = [files] + else: + files = [i for i in files.rglob("*") if i.is_file()] + + calculated_hash = get_checksum(files) + logging.info(f"Calculated hash is: {calculated_hash}") + + if not args.known_hash == calculated_hash: + logging.error("Hashes do not match.") + sys.exit(1) + else: + logging.debug("Hash matches.") + + +if __name__ == "__main__": + main() diff --git a/tools/waf-tools/f_guidelines.py b/tools/waf-tools/f_guidelines.py index ba896e3a..1cd324a5 100644 --- a/tools/waf-tools/f_guidelines.py +++ b/tools/waf-tools/f_guidelines.py @@ -740,7 +740,7 @@ def test(filename, txt, regex, version): def keyword(self): """Displayed keyword for check""" - return f"Checking filelevel doxygen ({self.rule_name})" + return f"Checking file level doxygen ({self.rule_name})" class c_check_define_guard(Task.Task): diff --git a/wscript b/wscript index ae2e63b3..1148c42d 100644 --- a/wscript +++ b/wscript @@ -77,7 +77,7 @@ top = "." # pylint:disable=invalid-name APPNAME = "foxBMS" """name of the application. This is used in various waf functions""" -VERSION = "1.4.0" +VERSION = "1.4.1" """version of the application. This is used in various waf functions. This version must match the version number defined in ``macros.txt``. Otherwise a configuration error is thrown.""" @@ -648,6 +648,7 @@ def build(bld): # pylint: disable=too-many-branches,too-many-statements os.path.join( "docs", "developer-manual", "style-guide", "state-machine-example" ), + os.path.join("docs", "software", "modules", "driver", "can"), os.path.join("docs", "software", "modules", "engine", "database"), os.path.join("docs", "software", "modules", "task", "ftask"), ], @@ -1053,3 +1054,25 @@ def check_test_files(ctx): err_msg += f"Missing test file for: {i} (should be in: {test_file})\n" if diff: ctx.fatal(f"{err_msg}\nTest files are missing.") + + +def get_axivion_files(ctx): + """get all relevant test files. The output is meant to be used in + tests/axivion/qualification-test/run_axivion_qualification_kit_tests.bat""" + as_seen_from = ctx.path.find_node("tests/axivion/qualification-test") + all_test_files = ctx.path.ant_glob( + [ + "tests/axivion/qualification-test/qualification-kit/**/*.c", + "tests/axivion/qualification-test/qualification-kit/**/*.tst", + ], + ) + tests = [] + for i in all_test_files: + real_path = pathlib.Path(i.parent.path_from(as_seen_from)).as_posix().split("/") + g_path = "".join(["*/" for _ in real_path]) + if g_path not in tests: + tests.append(g_path) + resulting_glob = [] + for i in tests: + resulting_glob.extend([f"{i}*.c", f"{i}*.tst"]) + print(" ".join(sorted(resulting_glob)))