foxBMS - Unit Tests  1.3.0
The foxBMS Unit Tests API Documentation
can_cfg.h File Reference

Headers for the configuration for the CAN module. More...

#include "general.h"
#include "HL_can.h"
#include "database.h"
Include dependency graph for can_cfg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CAN_BUFFERELEMENT_s
 
struct  CAN_SHIM_s
 
struct  CAN_MSG_TX_TYPE_s
 
struct  CAN_MSG_RX_TYPE_s
 

Macros

#define CAN_MAX_11BIT_ID   (2048u)
 
#define CAN_MAX_DLC   (8u)
 
#define CAN_DLC   (8u)
 
#define CAN_ID_BOOT_MESSAGE   (0x199u)
 
#define CAN_ID_DIE_ID   (0x227u)
 
#define CAN_ID_TX_STATE   (0x220u)
 
#define CAN_TX_STATE_PERIOD_MS   (100u)
 
#define CAN_TX_STATE_PHASE_MS   (0u)
 
#define CAN_ID_TX_DETAIL_STATE   (0x226u)
 
#define CAN_TX_DETAIL_STATE_PERIOD_MS   (1000u)
 
#define CAN_TX_DETAIL_STATE_PHASE_MS   (100u)
 
#define CAN_ID_TX_VOLTAGES   (0x240u)
 
#define CAN_TX_VOLTAGES_PERIOD_MS   (100u)
 
#define CAN_TX_VOLTAGES_PHASE_MS   (10u)
 
#define CAN_ID_TX_TEMPERATURES   (0x250u)
 
#define CAN_TX_TEMPERATURES_PERIOD_MS   (200u)
 
#define CAN_TX_TEMPERATURES_PHASE_MS   (20u)
 
#define CAN_ID_TX_LIMIT_VALUES   (0x224u)
 
#define CAN_TX_LIMIT_VALUES_PERIOD_MS   (100u)
 
#define CAN_TX_LIMIT_VALUES_PHASE_MS   (30u)
 
#define CAN_ID_TX_MINIMUM_MAXIMUM_VALUES   (0x223u)
 
#define CAN_TX_MINIMUM_MAXIMUM_VALUES_PERIOD_MS   (100u)
 
#define CAN_TX_MINIMUM_MAXIMUM_VALUES_PHASE_MS   (40u)
 
#define CAN_ID_TX_PACK_STATE_ESTIMATION   (0x225u)
 
#define CAN_TX_PACK_STATE_ESTIMATION_PERIOD_MS   (1000u)
 
#define CAN_TX_PACK_STATE_ESTIMATION_PHASE_MS   (50u)
 
#define CAN_ID_TX_PACK_VALUES   (0x222u)
 
#define CAN_TX_PACK_VALUES_PERIOD_MS   (100u)
 
#define CAN_TX_PACK_VALUES_PHASE_MS   (60u)
 
#define CAN_ID_TX_STRING_STATE   (0x221u)
 
#define CAN_TX_STRING_STATE_PERIOD_MS   (100u)
 
#define CAN_TX_STRING_STATE_PHASE_MS   (70u)
 
#define CAN_ID_TX_STRING_VALUES   (0x280u)
 
#define CAN_TX_STRING_VALUES_PERIOD_MS   (100u)
 
#define CAN_TX_STRING_VALUES_PHASE_MS   (80u)
 
#define CAN_ID_TX_STRING_MINIMUM_MAXIMUM   (0x281u)
 
#define CAN_TX_STRING_MINIMUM_MAXIMUM_PERIOD_MS   (100u)
 
#define CAN_TX_STRING_MINIMUM_MAXIMUM_PHASE_MS   (90u)
 
#define CAN_ID_TX_STRING_STATE_ESTIMATION   (0x282u)
 
#define CAN_TX_STRING_STATE_ESTIMATION_PERIOD_MS   (1000u)
 
#define CAN_TX_STRING_STATE_ESTIMATION_PHASE_MS   (0u)
 
#define CAN_ID_TX_STRING_VALUES_2   (0x283u)
 
#define CAN_TX_STRING_VALUES_2_PERIOD_MS   (100u)
 
#define CAN_TX_STRING_VALUES_2_PHASE_MS   (10u)
 
#define CAN_ID_SOFTWARE_RESET   (0x95u)
 
#define CAN_ID_COMMAND   (0x230u)
 
#define CAN_ID_DEBUG   (0x200u)
 
#define CAN_ID_SW_VERSION   (0x777u)
 
#define CAN_ID_IMD_INFO   (0x37u)
 
#define CAN_ID_IMD_REQUEST   (0x22u)
 
#define CAN_ID_IMD_RESPONSE   (0x23u)
 
#define CAN1_NODE   (canREG1)
 
#define CAN2_NODE   (canREG2)
 
#define CAN1_ENABLE_PIN   (PEX_PIN00)
 
#define CAN1_STANDBY_PIN   (PEX_PIN01)
 
#define CAN2_ENABLE_PIN   (PEX_PIN02)
 
#define CAN2_STANDBY_PIN   (PEX_PIN03)
 
#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)
 
#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)
 
#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)
 

Typedefs

typedef uint32_t(* CAN_TxCallbackFunction_f) (uint32_t ID, uint8_t DLC, CAN_ENDIANNESS_e endianness, uint8_t *candata, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
 
typedef uint32_t(* CAN_RxCallbackFunction_f) (uint32_t ID, uint8_t DLC, CAN_ENDIANNESS_e endianness, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)
 

Enumerations

enum  CAN_ENDIANNESS_e { CAN_LITTLE_ENDIAN , CAN_BIG_ENDIAN }
 

Variables

const CAN_SHIM_s can_kShim
 
const CAN_MSG_TX_TYPE_s can_txMessages []
 
const CAN_MSG_RX_TYPE_s can_rxMessages []
 
const uint8_t can_txLength
 
const uint8_t can_rxLength
 

Detailed Description

Headers for the configuration for the CAN module.

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®″
Author
foxBMS Team
Date
2019-12-04 (date of creation)
Updated
2022-05-30 (date of last update)
Version
v1.3.0
Prefix
CAN

The activation and the length of the message buffers as well as the number of the messages that are received are to be configured here

Definition in file can_cfg.h.

Macro Definition Documentation

◆ CAN1_ENABLE_PIN

#define CAN1_ENABLE_PIN   (PEX_PIN00)

Configuration of CAN transceiver pins to the respective port expander pins.

Definition at line 79 of file can_cfg.h.

◆ CAN1_NODE

#define CAN1_NODE   (canREG1)

register on which the CAN interface is connected

Definition at line 71 of file can_cfg.h.

◆ CAN1_STANDBY_PIN

#define CAN1_STANDBY_PIN   (PEX_PIN01)

Configuration of CAN transceiver pins to the respective port expander pins.

Definition at line 80 of file can_cfg.h.

◆ CAN2_ENABLE_PIN

#define CAN2_ENABLE_PIN   (PEX_PIN02)

Configuration of CAN transceiver pins to the respective port expander pins.

Definition at line 81 of file can_cfg.h.

◆ CAN2_NODE

#define CAN2_NODE   (canREG2)

register on which the CAN interface is connected

Definition at line 72 of file can_cfg.h.

◆ CAN2_STANDBY_PIN

#define CAN2_STANDBY_PIN   (PEX_PIN03)

Configuration of CAN transceiver pins to the respective port expander pins.

Definition at line 82 of file can_cfg.h.

◆ CAN_DLC

#define CAN_DLC   (8u)

Default DLC

Definition at line 91 of file can_cfg.h.

◆ CAN_ID_BOOT_MESSAGE

#define CAN_ID_BOOT_MESSAGE   (0x199u)

TX messages - pack related CAN message ID for boot message

Definition at line 96 of file can_cfg.h.

◆ CAN_ID_COMMAND

#define CAN_ID_COMMAND   (0x230u)

CAN message ID to perform a state request

Definition at line 197 of file can_cfg.h.

◆ CAN_ID_DEBUG

#define CAN_ID_DEBUG   (0x200u)

CAN message ID for debug message

Definition at line 200 of file can_cfg.h.

◆ CAN_ID_DIE_ID

#define CAN_ID_DIE_ID   (0x227u)

CAN message ID for die id message

Definition at line 98 of file can_cfg.h.

◆ CAN_ID_IMD_INFO

#define CAN_ID_IMD_INFO   (0x37u)

----------------------—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

Definition at line 212 of file can_cfg.h.

◆ CAN_ID_IMD_REQUEST

#define CAN_ID_IMD_REQUEST   (0x22u)

CAN message ID for request message to iso165c

Definition at line 214 of file can_cfg.h.

◆ CAN_ID_IMD_RESPONSE

#define CAN_ID_IMD_RESPONSE   (0x23u)

CAN message ID for response message from iso165c

Definition at line 216 of file can_cfg.h.

◆ CAN_ID_SOFTWARE_RESET

#define CAN_ID_SOFTWARE_RESET   (0x95u)

RX messages CAN message ID to perform a software reset

Definition at line 194 of file can_cfg.h.

◆ CAN_ID_STRING0_CURRENT

#define CAN_ID_STRING0_CURRENT   (0x521u)

IDs for the messages from the current sensors String 0

Definition at line 220 of file can_cfg.h.

◆ CAN_ID_STRING0_CURRENT_COUNTER

#define CAN_ID_STRING0_CURRENT_COUNTER   (0x527u)

IDs for the messages from the current sensors String 0

Definition at line 226 of file can_cfg.h.

◆ CAN_ID_STRING0_ENERGY_COUNTER

#define CAN_ID_STRING0_ENERGY_COUNTER   (0x528u)

IDs for the messages from the current sensors String 0

Definition at line 227 of file can_cfg.h.

◆ CAN_ID_STRING0_POWER

#define CAN_ID_STRING0_POWER   (0x526u)

IDs for the messages from the current sensors String 0

Definition at line 225 of file can_cfg.h.

◆ CAN_ID_STRING0_TEMPERATURE

#define CAN_ID_STRING0_TEMPERATURE   (0x525u)

IDs for the messages from the current sensors String 0

Definition at line 224 of file can_cfg.h.

◆ CAN_ID_STRING0_VOLTAGE1

#define CAN_ID_STRING0_VOLTAGE1   (0x522u)

IDs for the messages from the current sensors String 0

Definition at line 221 of file can_cfg.h.

◆ CAN_ID_STRING0_VOLTAGE2

#define CAN_ID_STRING0_VOLTAGE2   (0x523u)

IDs for the messages from the current sensors String 0

Definition at line 222 of file can_cfg.h.

◆ CAN_ID_STRING0_VOLTAGE3

#define CAN_ID_STRING0_VOLTAGE3   (0x524u)

IDs for the messages from the current sensors String 0

Definition at line 223 of file can_cfg.h.

◆ CAN_ID_STRING1_CURRENT

#define CAN_ID_STRING1_CURRENT   (0x621u)

String 1

Definition at line 230 of file can_cfg.h.

◆ CAN_ID_STRING1_CURRENT_COUNTER

#define CAN_ID_STRING1_CURRENT_COUNTER   (0x627u)

String 1

Definition at line 236 of file can_cfg.h.

◆ CAN_ID_STRING1_ENERGY_COUNTER

#define CAN_ID_STRING1_ENERGY_COUNTER   (0x628u)

String 1

Definition at line 237 of file can_cfg.h.

◆ CAN_ID_STRING1_POWER

#define CAN_ID_STRING1_POWER   (0x626u)

String 1

Definition at line 235 of file can_cfg.h.

◆ CAN_ID_STRING1_TEMPERATURE

#define CAN_ID_STRING1_TEMPERATURE   (0x625u)

String 1

Definition at line 234 of file can_cfg.h.

◆ CAN_ID_STRING1_VOLTAGE1

#define CAN_ID_STRING1_VOLTAGE1   (0x622u)

String 1

Definition at line 231 of file can_cfg.h.

◆ CAN_ID_STRING1_VOLTAGE2

#define CAN_ID_STRING1_VOLTAGE2   (0x623u)

String 1

Definition at line 232 of file can_cfg.h.

◆ CAN_ID_STRING1_VOLTAGE3

#define CAN_ID_STRING1_VOLTAGE3   (0x624u)

String 1

Definition at line 233 of file can_cfg.h.

◆ CAN_ID_STRING2_CURRENT

#define CAN_ID_STRING2_CURRENT   (0x721u)

String 2

Definition at line 240 of file can_cfg.h.

◆ CAN_ID_STRING2_CURRENT_COUNTER

#define CAN_ID_STRING2_CURRENT_COUNTER   (0x727u)

String 2

Definition at line 246 of file can_cfg.h.

◆ CAN_ID_STRING2_ENERGY_COUNTER

#define CAN_ID_STRING2_ENERGY_COUNTER   (0x728u)

String 2

Definition at line 247 of file can_cfg.h.

◆ CAN_ID_STRING2_POWER

#define CAN_ID_STRING2_POWER   (0x726u)

String 2

Definition at line 245 of file can_cfg.h.

◆ CAN_ID_STRING2_TEMPERATURE

#define CAN_ID_STRING2_TEMPERATURE   (0x725u)

String 2

Definition at line 244 of file can_cfg.h.

◆ CAN_ID_STRING2_VOLTAGE1

#define CAN_ID_STRING2_VOLTAGE1   (0x722u)

String 2

Definition at line 241 of file can_cfg.h.

◆ CAN_ID_STRING2_VOLTAGE2

#define CAN_ID_STRING2_VOLTAGE2   (0x723u)

String 2

Definition at line 242 of file can_cfg.h.

◆ CAN_ID_STRING2_VOLTAGE3

#define CAN_ID_STRING2_VOLTAGE3   (0x724u)

String 2

Definition at line 243 of file can_cfg.h.

◆ CAN_ID_SW_VERSION

#define CAN_ID_SW_VERSION   (0x777u)

CAN message ID to get software version

Definition at line 203 of file can_cfg.h.

◆ CAN_ID_TX_DETAIL_STATE

#define CAN_ID_TX_DETAIL_STATE   (0x226u)

CAN message ID to send detail state

Definition at line 106 of file can_cfg.h.

◆ CAN_ID_TX_LIMIT_VALUES

#define CAN_ID_TX_LIMIT_VALUES   (0x224u)

CAN message ID to send limit values

Definition at line 127 of file can_cfg.h.

◆ CAN_ID_TX_MINIMUM_MAXIMUM_VALUES

#define CAN_ID_TX_MINIMUM_MAXIMUM_VALUES   (0x223u)

CAN message ID to send minimum and maximum values

Definition at line 134 of file can_cfg.h.

◆ CAN_ID_TX_PACK_STATE_ESTIMATION

#define CAN_ID_TX_PACK_STATE_ESTIMATION   (0x225u)

CAN message ID to send pack state estimation values

Definition at line 141 of file can_cfg.h.

◆ CAN_ID_TX_PACK_VALUES

#define CAN_ID_TX_PACK_VALUES   (0x222u)

CAN message ID to send pack values

Definition at line 148 of file can_cfg.h.

◆ CAN_ID_TX_STATE

#define CAN_ID_TX_STATE   (0x220u)

CAN message ID to send state

Definition at line 100 of file can_cfg.h.

◆ CAN_ID_TX_STRING_MINIMUM_MAXIMUM

#define CAN_ID_TX_STRING_MINIMUM_MAXIMUM   (0x281u)

CAN message ID to send string minimum and maximum values

Definition at line 171 of file can_cfg.h.

◆ CAN_ID_TX_STRING_STATE

#define CAN_ID_TX_STRING_STATE   (0x221u)

TX messages - string related CAN message ID to send string state

Definition at line 157 of file can_cfg.h.

◆ CAN_ID_TX_STRING_STATE_ESTIMATION

#define CAN_ID_TX_STRING_STATE_ESTIMATION   (0x282u)

CAN message ID to send string minimum and maximum values

Definition at line 178 of file can_cfg.h.

◆ CAN_ID_TX_STRING_VALUES

#define CAN_ID_TX_STRING_VALUES   (0x280u)

CAN message ID to send string values

Definition at line 164 of file can_cfg.h.

◆ CAN_ID_TX_STRING_VALUES_2

#define CAN_ID_TX_STRING_VALUES_2   (0x283u)

CAN message ID to send string values 2

Definition at line 185 of file can_cfg.h.

◆ CAN_ID_TX_TEMPERATURES

#define CAN_ID_TX_TEMPERATURES   (0x250u)

CAN message ID to send temperatures

Definition at line 120 of file can_cfg.h.

◆ CAN_ID_TX_VOLTAGES

#define CAN_ID_TX_VOLTAGES   (0x240u)

CAN message ID to send voltages

Definition at line 113 of file can_cfg.h.

◆ CAN_MAX_11BIT_ID

#define CAN_MAX_11BIT_ID   (2048u)

Maximum ID if 11 bits are used

Definition at line 86 of file can_cfg.h.

◆ CAN_MAX_DLC

#define CAN_MAX_DLC   (8u)

Maximum length of Data Length Code

Definition at line 88 of file can_cfg.h.

◆ CAN_TX_DETAIL_STATE_PERIOD_MS

#define CAN_TX_DETAIL_STATE_PERIOD_MS   (1000u)

Periodicity of CAN detail state messages in ms

Definition at line 108 of file can_cfg.h.

◆ CAN_TX_DETAIL_STATE_PHASE_MS

#define CAN_TX_DETAIL_STATE_PHASE_MS   (100u)

Phase of CAN detail state messages in ms

Definition at line 110 of file can_cfg.h.

◆ CAN_TX_LIMIT_VALUES_PERIOD_MS

#define CAN_TX_LIMIT_VALUES_PERIOD_MS   (100u)

Periodicity of CAN limit messages in ms

Definition at line 129 of file can_cfg.h.

◆ CAN_TX_LIMIT_VALUES_PHASE_MS

#define CAN_TX_LIMIT_VALUES_PHASE_MS   (30u)

Phase of CAN limit messages in ms

Definition at line 131 of file can_cfg.h.

◆ CAN_TX_MINIMUM_MAXIMUM_VALUES_PERIOD_MS

#define CAN_TX_MINIMUM_MAXIMUM_VALUES_PERIOD_MS   (100u)

Periodicity of CAN minimum and maximum value messages in ms

Definition at line 136 of file can_cfg.h.

◆ CAN_TX_MINIMUM_MAXIMUM_VALUES_PHASE_MS

#define CAN_TX_MINIMUM_MAXIMUM_VALUES_PHASE_MS   (40u)

Phase of CAN minimum and maximum value messages in ms

Definition at line 138 of file can_cfg.h.

◆ CAN_TX_PACK_STATE_ESTIMATION_PERIOD_MS

#define CAN_TX_PACK_STATE_ESTIMATION_PERIOD_MS   (1000u)

Periodicity of CAN pack state estimation messages in ms

Definition at line 143 of file can_cfg.h.

◆ CAN_TX_PACK_STATE_ESTIMATION_PHASE_MS

#define CAN_TX_PACK_STATE_ESTIMATION_PHASE_MS   (50u)

Phase of CAN pack state estimation messages in ms

Definition at line 145 of file can_cfg.h.

◆ CAN_TX_PACK_VALUES_PERIOD_MS

#define CAN_TX_PACK_VALUES_PERIOD_MS   (100u)

Periodicity of CAN pack values messages in ms

Definition at line 150 of file can_cfg.h.

◆ CAN_TX_PACK_VALUES_PHASE_MS

#define CAN_TX_PACK_VALUES_PHASE_MS   (60u)

Phase of CAN pack values messages in ms

Definition at line 152 of file can_cfg.h.

◆ CAN_TX_STATE_PERIOD_MS

#define CAN_TX_STATE_PERIOD_MS   (100u)

Periodicity of CAN state messages in ms

Definition at line 102 of file can_cfg.h.

◆ CAN_TX_STATE_PHASE_MS

#define CAN_TX_STATE_PHASE_MS   (0u)

Phase of CAN state messages in ms

Definition at line 104 of file can_cfg.h.

◆ CAN_TX_STRING_MINIMUM_MAXIMUM_PERIOD_MS

#define CAN_TX_STRING_MINIMUM_MAXIMUM_PERIOD_MS   (100u)

Periodicity of CAN string state messages in ms

Definition at line 173 of file can_cfg.h.

◆ CAN_TX_STRING_MINIMUM_MAXIMUM_PHASE_MS

#define CAN_TX_STRING_MINIMUM_MAXIMUM_PHASE_MS   (90u)

Phase of CAN string state messages in ms

Definition at line 175 of file can_cfg.h.

◆ CAN_TX_STRING_STATE_ESTIMATION_PERIOD_MS

#define CAN_TX_STRING_STATE_ESTIMATION_PERIOD_MS   (1000u)

Periodicity of CAN string state messages in ms

Definition at line 180 of file can_cfg.h.

◆ CAN_TX_STRING_STATE_ESTIMATION_PHASE_MS

#define CAN_TX_STRING_STATE_ESTIMATION_PHASE_MS   (0u)

Phase of CAN string state messages in ms

Definition at line 182 of file can_cfg.h.

◆ CAN_TX_STRING_STATE_PERIOD_MS

#define CAN_TX_STRING_STATE_PERIOD_MS   (100u)

Periodicity of CAN string state messages in ms

Definition at line 159 of file can_cfg.h.

◆ CAN_TX_STRING_STATE_PHASE_MS

#define CAN_TX_STRING_STATE_PHASE_MS   (70u)

Phase of CAN string state messages in ms

Definition at line 161 of file can_cfg.h.

◆ CAN_TX_STRING_VALUES_2_PERIOD_MS

#define CAN_TX_STRING_VALUES_2_PERIOD_MS   (100u)

Periodicity of CAN string state messages in ms

Definition at line 187 of file can_cfg.h.

◆ CAN_TX_STRING_VALUES_2_PHASE_MS

#define CAN_TX_STRING_VALUES_2_PHASE_MS   (10u)

Phase of CAN string state messages in ms

Definition at line 189 of file can_cfg.h.

◆ CAN_TX_STRING_VALUES_PERIOD_MS

#define CAN_TX_STRING_VALUES_PERIOD_MS   (100u)

Periodicity of CAN string state messages in ms

Definition at line 166 of file can_cfg.h.

◆ CAN_TX_STRING_VALUES_PHASE_MS

#define CAN_TX_STRING_VALUES_PHASE_MS   (80u)

Phase of CAN string state messages in ms

Definition at line 168 of file can_cfg.h.

◆ CAN_TX_TEMPERATURES_PERIOD_MS

#define CAN_TX_TEMPERATURES_PERIOD_MS   (200u)

Periodicity of CAN temperature messages in ms

Definition at line 122 of file can_cfg.h.

◆ CAN_TX_TEMPERATURES_PHASE_MS

#define CAN_TX_TEMPERATURES_PHASE_MS   (20u)

Phase of CAN temperature messages in ms

Definition at line 124 of file can_cfg.h.

◆ CAN_TX_VOLTAGES_PERIOD_MS

#define CAN_TX_VOLTAGES_PERIOD_MS   (100u)

Periodicity of CAN voltage messages in ms

Definition at line 115 of file can_cfg.h.

◆ CAN_TX_VOLTAGES_PHASE_MS

#define CAN_TX_VOLTAGES_PHASE_MS   (10u)

Phase of CAN voltage messages in ms

Definition at line 117 of file can_cfg.h.

Typedef Documentation

◆ CAN_RxCallbackFunction_f

typedef uint32_t(* CAN_RxCallbackFunction_f) (uint32_t ID, uint8_t DLC, CAN_ENDIANNESS_e endianness, const uint8_t *const kpkCanData, const CAN_SHIM_s *const kpkCanShim)

type definition for rx callback functions used in CAN messages

Definition at line 339 of file can_cfg.h.

◆ CAN_TxCallbackFunction_f

typedef uint32_t(* CAN_TxCallbackFunction_f) (uint32_t ID, uint8_t DLC, CAN_ENDIANNESS_e endianness, uint8_t *candata, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)

type definition for tx callback functions used in CAN messages

Definition at line 330 of file can_cfg.h.

Enumeration Type Documentation

◆ CAN_ENDIANNESS_e

Enum for byte order (endianness)

* CAN data example:
*
* LittleEndian
* bitStart = 27; bitLength = 19
* DataLE: 45-44-43-42-41-40-39-38-37-36-35-34-33-32-31-30-29-28-27
*         MSB                                                   LSB
*
* BigEndian
* bitStart = 21; bitLength = 19
* DataBE: 21-20-19-18-17-16-31-30-29-28-27-26-25-24-39-38-37-36-35
*         MSB                                                   LSB
*                                             |||
*                                   Receive data on CAN bus
*                                             |||
*                                             |||
*                                             \_/
*                  LE                          |                  BE
* CAN Data Byte 0  07 06 05 04 03 02 01 00     | CAN Data Byte 0  07 06 05 04 03 02 01 00
* CAN Data Byte 1  15 14 13 12 11 10 09 08     | CAN Data Byte 1  15 14 13 12 11 10 09 08
* CAN Data Byte 2  23 22 21 20 19 18 17 16     | CAN Data Byte 2  23 22 21-20-19-18-17-16 MSB
* CAN Data Byte 3  31-30-29-28-27 26 25 24 LSB | CAN Data Byte 3  31-30-29-28-27-26-25-24
* CAN Data Byte 4  39-38-37-36-35-34-33-32     | CAN Data Byte 4  39-38-37-36-35 34 33 32 LSB
* CAN Data Byte 5  47 46 45-44-43-42-41-40 MSB | CAN Data Byte 5  47 46 45 44 43 42 41 40
* CAN Data Byte 6  55 54 53 52 51 50 49 48     | CAN Data Byte 6  55 54 53 52 51 50 49 48
* CAN Data Byte 7  63 62 61 60 59 58 57 56     | CAN Data Byte 7  63 62 61 60 59 58 57 56
*                                             |||
*                                  Store received data in RAM
*                                             |||
*                                             |||
*                                             \_/
*                  LE                          |                  BE
* CAN Data Byte 7  63 62 61 60 59 58 57 56     | CAN Data Byte 0  07 06 05 04 03 02 01 00     | RAM data[7]
* CAN Data Byte 6  55 54 53 52 51 50 49 48     | CAN Data Byte 1  15 14 13 12 11 10 09 08     | RAM data[6]
* CAN Data Byte 5  47 46 45-44-43-42-41-40 MSB | CAN Data Byte 2  23 22 21-20-19-18-17-16 MSB | RAM data[5]
* CAN Data Byte 4  39-38-37-36-35-34-33-32     | CAN Data Byte 3  31-30-29-28-27-26-25-24     | RAM data[4]
* CAN Data Byte 3  31-30-29-28-27 26 25 24 LSB | CAN Data Byte 4  39-38-37-36-35 34 33 32 LSB | RAM data[3]
* CAN Data Byte 2  23 22 21 20 19 18 17 16     | CAN Data Byte 5  47 46 45 44 43 42 41 40     | RAM data[2]
* CAN Data Byte 1  15 14 13 12 11 10 09 08     | CAN Data Byte 6  55 54 53 52 51 50 49 48     | RAM data[1]
* CAN Data Byte 0  07 06 05 04 03 02 01 00     | CAN Data Byte 7  63 62 61 60 59 58 57 56     | RAM data[0]
*                                      DataLE  =  DataBE
* 
Enumerator
CAN_LITTLE_ENDIAN 
CAN_BIG_ENDIAN 

Definition at line 298 of file can_cfg.h.

Variable Documentation

◆ can_kShim

const CAN_SHIM_s can_kShim
extern

variable for storing and passing on the local database table handles

Definition at line 369 of file can_cfg.c.

◆ can_rxLength

const uint8_t can_rxLength
extern

array length for transmission CAN0 message definition

length of CAN message arrays

Definition at line 347 of file can_cfg.c.

◆ can_rxMessages

const CAN_MSG_RX_TYPE_s can_rxMessages[]
extern

registry of CAN RX messages

Definition at line 202 of file can_cfg.c.

◆ can_txLength

const uint8_t can_txLength
extern

array length for transmission CAN0 message definition

length of CAN message arrays

Definition at line 346 of file can_cfg.c.

◆ can_txMessages

const CAN_MSG_TX_TYPE_s can_txMessages[]
extern

registry of CAN TX messages

Definition at line 89 of file can_cfg.c.