foxBMS  1.1.1
The foxBMS Battery Management System API Documentation
can_cfg.h File Reference

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

#include "general.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
 
struct  CAN_SHIM
 
struct  CAN_MSG_TX_TYPE
 
struct  CAN_MSG_RX_TYPE
 

Macros

#define CAN_MAX_11BIT_ID   (2048u)
 
#define CAN_MAX_DLC   (8u)
 
#define CAN_DLC   (8u)
 
#define CAN_ID_TX_STATE   (0x220U)
 
#define CAN_TX_STATE_PERIOD_MS   (100U)
 
#define CAN_TX_STATE_PHASE_MS   (0U)
 
#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_BOOT_MESSAGE   (0x199u)
 
#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 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)
 
#define CAN_HET1_GIO   (hetREG1)
 
#define CAN_HET1_EN_PIN   (14U)
 
#define CAN_HET1_STB_PIN   (16U)
 
#define CAN_PIN_TOGGLE_DELAY_US   (5u)
 

Typedefs

typedef struct CAN_BUFFERELEMENT CAN_BUFFERELEMENT_s
 
typedef enum CAN_ENDIANNESS CAN_ENDIANNESS_e
 
typedef struct CAN_SHIM CAN_SHIM_s
 
typedef uint32_t(* can_callback_funcPtr) (uint32_t ID, uint8_t DLC, CAN_ENDIANNESS_e endianness, uint8_t *candata, uint8_t *pMuxId, const CAN_SHIM_s *const kpkCanShim)
 
typedef struct CAN_MSG_TX_TYPE CAN_MSG_TX_TYPE_s
 
typedef struct CAN_MSG_RX_TYPE CAN_MSG_RX_TYPE_s
 

Enumerations

enum  CAN_ENDIANNESS { 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
2021-07-29 (date of last update)
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

◆ CAN_DLC

#define CAN_DLC   (8u)

Default DLC

Definition at line 73 of file can_cfg.h.

◆ CAN_HET1_EN_PIN

#define CAN_HET1_EN_PIN   (14U)

register pin that handles enable

Definition at line 227 of file can_cfg.h.

◆ CAN_HET1_GIO

#define CAN_HET1_GIO   (hetREG1)

macro for the register that handles the CAN-interface

Definition at line 224 of file can_cfg.h.

◆ CAN_HET1_STB_PIN

#define CAN_HET1_STB_PIN   (16U)

register pin that handles standby

Definition at line 229 of file can_cfg.h.

◆ CAN_ID_BOOT_MESSAGE

#define CAN_ID_BOOT_MESSAGE   (0x199u)

RX messages CAN message ID for boot message

Definition at line 167 of file can_cfg.h.

◆ CAN_ID_COMMAND

#define CAN_ID_COMMAND   (0x230U)

CAN message ID to perform a state request

Definition at line 173 of file can_cfg.h.

◆ CAN_ID_DEBUG

#define CAN_ID_DEBUG   (0x200U)

CAN message ID for debug message

Definition at line 176 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 188 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 190 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 192 of file can_cfg.h.

◆ CAN_ID_SOFTWARE_RESET

#define CAN_ID_SOFTWARE_RESET   (0x95U)

CAN message ID to perform a software reset

Definition at line 170 of file can_cfg.h.

◆ CAN_ID_STRING0_CURRENT

#define CAN_ID_STRING0_CURRENT   (0x521u)

Definition at line 196 of file can_cfg.h.

◆ CAN_ID_STRING0_CURRENT_COUNTER

#define CAN_ID_STRING0_CURRENT_COUNTER   (0x527u)

Definition at line 202 of file can_cfg.h.

◆ CAN_ID_STRING0_ENERGY_COUNTER

#define CAN_ID_STRING0_ENERGY_COUNTER   (0x528u)

Definition at line 203 of file can_cfg.h.

◆ CAN_ID_STRING0_POWER

#define CAN_ID_STRING0_POWER   (0x526u)

Definition at line 201 of file can_cfg.h.

◆ CAN_ID_STRING0_TEMPERATURE

#define CAN_ID_STRING0_TEMPERATURE   (0x525u)

Definition at line 200 of file can_cfg.h.

◆ CAN_ID_STRING0_VOLTAGE1

#define CAN_ID_STRING0_VOLTAGE1   (0x522u)

Definition at line 197 of file can_cfg.h.

◆ CAN_ID_STRING0_VOLTAGE2

#define CAN_ID_STRING0_VOLTAGE2   (0x523u)

Definition at line 198 of file can_cfg.h.

◆ CAN_ID_STRING0_VOLTAGE3

#define CAN_ID_STRING0_VOLTAGE3   (0x524u)

Definition at line 199 of file can_cfg.h.

◆ CAN_ID_STRING1_CURRENT

#define CAN_ID_STRING1_CURRENT   (0x621u)

Definition at line 205 of file can_cfg.h.

◆ CAN_ID_STRING1_CURRENT_COUNTER

#define CAN_ID_STRING1_CURRENT_COUNTER   (0x627u)

Definition at line 211 of file can_cfg.h.

◆ CAN_ID_STRING1_ENERGY_COUNTER

#define CAN_ID_STRING1_ENERGY_COUNTER   (0x628u)

Definition at line 212 of file can_cfg.h.

◆ CAN_ID_STRING1_POWER

#define CAN_ID_STRING1_POWER   (0x626u)

Definition at line 210 of file can_cfg.h.

◆ CAN_ID_STRING1_TEMPERATURE

#define CAN_ID_STRING1_TEMPERATURE   (0x625u)

Definition at line 209 of file can_cfg.h.

◆ CAN_ID_STRING1_VOLTAGE1

#define CAN_ID_STRING1_VOLTAGE1   (0x622u)

Definition at line 206 of file can_cfg.h.

◆ CAN_ID_STRING1_VOLTAGE2

#define CAN_ID_STRING1_VOLTAGE2   (0x623u)

Definition at line 207 of file can_cfg.h.

◆ CAN_ID_STRING1_VOLTAGE3

#define CAN_ID_STRING1_VOLTAGE3   (0x624u)

Definition at line 208 of file can_cfg.h.

◆ CAN_ID_STRING2_CURRENT

#define CAN_ID_STRING2_CURRENT   (0x721u)

Definition at line 214 of file can_cfg.h.

◆ CAN_ID_STRING2_CURRENT_COUNTER

#define CAN_ID_STRING2_CURRENT_COUNTER   (0x727u)

Definition at line 220 of file can_cfg.h.

◆ CAN_ID_STRING2_ENERGY_COUNTER

#define CAN_ID_STRING2_ENERGY_COUNTER   (0x728u)

Definition at line 221 of file can_cfg.h.

◆ CAN_ID_STRING2_POWER

#define CAN_ID_STRING2_POWER   (0x726u)

Definition at line 219 of file can_cfg.h.

◆ CAN_ID_STRING2_TEMPERATURE

#define CAN_ID_STRING2_TEMPERATURE   (0x725u)

Definition at line 218 of file can_cfg.h.

◆ CAN_ID_STRING2_VOLTAGE1

#define CAN_ID_STRING2_VOLTAGE1   (0x722u)

Definition at line 215 of file can_cfg.h.

◆ CAN_ID_STRING2_VOLTAGE2

#define CAN_ID_STRING2_VOLTAGE2   (0x723u)

Definition at line 216 of file can_cfg.h.

◆ CAN_ID_STRING2_VOLTAGE3

#define CAN_ID_STRING2_VOLTAGE3   (0x724u)

Definition at line 217 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 179 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 100 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 107 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 114 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 121 of file can_cfg.h.

◆ CAN_ID_TX_STATE

#define CAN_ID_TX_STATE   (0x220U)

TX messages - pack related CAN message ID to send voltages CAN message ID to send state

Definition at line 80 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 144 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 130 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 151 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 137 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 158 of file can_cfg.h.

◆ CAN_ID_TX_TEMPERATURES

#define CAN_ID_TX_TEMPERATURES   (0x250U)

CAN message ID to send temperatures

Definition at line 93 of file can_cfg.h.

◆ CAN_ID_TX_VOLTAGES

#define CAN_ID_TX_VOLTAGES   (0x240U)

Definition at line 86 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 68 of file can_cfg.h.

◆ CAN_MAX_DLC

#define CAN_MAX_DLC   (8u)

Maximum length of Data Length Code

Definition at line 70 of file can_cfg.h.

◆ CAN_PIN_TOGGLE_DELAY_US

#define CAN_PIN_TOGGLE_DELAY_US   (5u)

delay in µs used in CAN_InitializeTransceiver for pin-toggling

Definition at line 242 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 102 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 104 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 109 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 111 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 116 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 118 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 123 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 125 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 82 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 84 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 146 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 148 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 153 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 155 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 132 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 134 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 160 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 162 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 139 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 141 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 95 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 97 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 88 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 90 of file can_cfg.h.

Typedef Documentation

◆ CAN_BUFFERELEMENT_s

Buffer element used to store the ID and data of a CAN RX message

◆ can_callback_funcPtr

typedef uint32_t(* can_callback_funcPtr) (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 callback functions used in CAN messages

Definition at line 313 of file can_cfg.h.

◆ 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
* 

◆ CAN_MSG_RX_TYPE_s

type definition for structure of an RX CAN message

◆ CAN_MSG_TX_TYPE_s

type definition for structure of a TX CAN message

◆ CAN_SHIM_s

typedef struct CAN_SHIM CAN_SHIM_s

composite type for storing and passing on the local database table handles

Enumeration Type Documentation

◆ CAN_ENDIANNESS

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 288 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 274 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 252 of file can_cfg.c.

◆ can_rxMessages

const CAN_MSG_RX_TYPE_s can_rxMessages[]
extern

registry of CAN RX messages

Definition at line 180 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 251 of file can_cfg.c.

◆ can_txMessages

const CAN_MSG_TX_TYPE_s can_txMessages[]
extern

registry of CAN TX messages

Definition at line 87 of file can_cfg.c.