57 #ifndef FOXBMS__CAN_CFG_H_
58 #define FOXBMS__CAN_CFG_H_
68 #define CAN_MAX_11BIT_ID (2048u)
70 #define CAN_MAX_DLC (8u)
80 #define CAN_ID_TX_STATE (0x220U)
82 #define CAN_TX_STATE_PERIOD_MS (100U)
84 #define CAN_TX_STATE_PHASE_MS (0U)
86 #define CAN_ID_TX_VOLTAGES (0x240U)
88 #define CAN_TX_VOLTAGES_PERIOD_MS (100U)
90 #define CAN_TX_VOLTAGES_PHASE_MS (10U)
93 #define CAN_ID_TX_TEMPERATURES (0x250U)
95 #define CAN_TX_TEMPERATURES_PERIOD_MS (200U)
97 #define CAN_TX_TEMPERATURES_PHASE_MS (20U)
100 #define CAN_ID_TX_LIMIT_VALUES (0x224U)
102 #define CAN_TX_LIMIT_VALUES_PERIOD_MS (100U)
104 #define CAN_TX_LIMIT_VALUES_PHASE_MS (30U)
107 #define CAN_ID_TX_MINIMUM_MAXIMUM_VALUES (0x223U)
109 #define CAN_TX_MINIMUM_MAXIMUM_VALUES_PERIOD_MS (100U)
111 #define CAN_TX_MINIMUM_MAXIMUM_VALUES_PHASE_MS (40U)
114 #define CAN_ID_TX_PACK_STATE_ESTIMATION (0x225U)
116 #define CAN_TX_PACK_STATE_ESTIMATION_PERIOD_MS (1000U)
118 #define CAN_TX_PACK_STATE_ESTIMATION_PHASE_MS (50U)
121 #define CAN_ID_TX_PACK_VALUES (0x222U)
123 #define CAN_TX_PACK_VALUES_PERIOD_MS (100U)
125 #define CAN_TX_PACK_VALUES_PHASE_MS (60U)
130 #define CAN_ID_TX_STRING_STATE (0x221U)
132 #define CAN_TX_STRING_STATE_PERIOD_MS (100U)
134 #define CAN_TX_STRING_STATE_PHASE_MS (70U)
137 #define CAN_ID_TX_STRING_VALUES (0x280U)
139 #define CAN_TX_STRING_VALUES_PERIOD_MS (100U)
141 #define CAN_TX_STRING_VALUES_PHASE_MS (80U)
144 #define CAN_ID_TX_STRING_MINIMUM_MAXIMUM (0x281U)
146 #define CAN_TX_STRING_MINIMUM_MAXIMUM_PERIOD_MS (100U)
148 #define CAN_TX_STRING_MINIMUM_MAXIMUM_PHASE_MS (90U)
151 #define CAN_ID_TX_STRING_STATE_ESTIMATION (0x282U)
153 #define CAN_TX_STRING_STATE_ESTIMATION_PERIOD_MS (1000U)
155 #define CAN_TX_STRING_STATE_ESTIMATION_PHASE_MS (0U)
158 #define CAN_ID_TX_STRING_VALUES_2 (0x283U)
160 #define CAN_TX_STRING_VALUES_2_PERIOD_MS (100U)
162 #define CAN_TX_STRING_VALUES_2_PHASE_MS (10U)
167 #define CAN_ID_BOOT_MESSAGE (0x199u)
170 #define CAN_ID_SOFTWARE_RESET (0x95U)
173 #define CAN_ID_COMMAND (0x230U)
176 #define CAN_ID_DEBUG (0x200U)
179 #define CAN_ID_SW_VERSION (0x777U)
188 #define CAN_ID_IMD_INFO (0x37U)
190 #define CAN_ID_IMD_REQUEST (0x22U)
192 #define CAN_ID_IMD_RESPONSE (0x23U)
196 #define CAN_ID_STRING0_CURRENT (0x521u)
197 #define CAN_ID_STRING0_VOLTAGE1 (0x522u)
198 #define CAN_ID_STRING0_VOLTAGE2 (0x523u)
199 #define CAN_ID_STRING0_VOLTAGE3 (0x524u)
200 #define CAN_ID_STRING0_TEMPERATURE (0x525u)
201 #define CAN_ID_STRING0_POWER (0x526u)
202 #define CAN_ID_STRING0_CURRENT_COUNTER (0x527u)
203 #define CAN_ID_STRING0_ENERGY_COUNTER (0x528u)
205 #define CAN_ID_STRING1_CURRENT (0x621u)
206 #define CAN_ID_STRING1_VOLTAGE1 (0x622u)
207 #define CAN_ID_STRING1_VOLTAGE2 (0x623u)
208 #define CAN_ID_STRING1_VOLTAGE3 (0x624u)
209 #define CAN_ID_STRING1_TEMPERATURE (0x625u)
210 #define CAN_ID_STRING1_POWER (0x626u)
211 #define CAN_ID_STRING1_CURRENT_COUNTER (0x627u)
212 #define CAN_ID_STRING1_ENERGY_COUNTER (0x628u)
214 #define CAN_ID_STRING2_CURRENT (0x721u)
215 #define CAN_ID_STRING2_VOLTAGE1 (0x722u)
216 #define CAN_ID_STRING2_VOLTAGE2 (0x723u)
217 #define CAN_ID_STRING2_VOLTAGE3 (0x724u)
218 #define CAN_ID_STRING2_TEMPERATURE (0x725u)
219 #define CAN_ID_STRING2_POWER (0x726u)
220 #define CAN_ID_STRING2_CURRENT_COUNTER (0x727u)
221 #define CAN_ID_STRING2_ENERGY_COUNTER (0x728u)
224 #define CAN_HET1_GIO (hetREG1)
227 #define CAN_HET1_EN_PIN (14U)
229 #define CAN_HET1_STB_PIN (16U)
242 #define CAN_PIN_TOGGLE_DELAY_US (5u)
const CAN_MSG_RX_TYPE_s can_rxMessages[]
struct CAN_SHIM CAN_SHIM_s
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)
struct CAN_MSG_RX_TYPE CAN_MSG_RX_TYPE_s
const uint8_t can_txLength
enum CAN_ENDIANNESS CAN_ENDIANNESS_e
const CAN_MSG_TX_TYPE_s can_txMessages[]
const CAN_SHIM_s can_kShim
const uint8_t can_rxLength
struct CAN_MSG_TX_TYPE CAN_MSG_TX_TYPE_s
struct CAN_BUFFERELEMENT CAN_BUFFERELEMENT_s
General macros and definitions for the whole platform.
uint8_t data[CAN_MAX_DLC]
CAN_ENDIANNESS_e endianness
can_callback_funcPtr callbackFunction
CAN_ENDIANNESS_e endianness
can_callback_funcPtr callbackFunction
DATA_BLOCK_MOL_FLAG_s * pTableMol
QueueHandle_t * pQueueImd
DATA_BLOCK_STATEREQUEST_s * pTableStateRequest
DATA_BLOCK_INSULATION_MONITORING_s * pTableInsulation
DATA_BLOCK_SOX_s * pTableSox
DATA_BLOCK_RSL_FLAG_s * pTableRsl
DATA_BLOCK_MSL_FLAG_s * pTableMsl
DATA_BLOCK_MIN_MAX_s * pTableMinMax
DATA_BLOCK_OPEN_WIRE_s * pTableOpenWire
DATA_BLOCK_CURRENT_SENSOR_s * pTableCurrentSensor
DATA_BLOCK_CELL_TEMPERATURE_s * pTableCellTemperature
DATA_BLOCK_CELL_VOLTAGE_s * pTableCellVoltage
DATA_BLOCK_ERRORSTATE_s * pTableErrorState
DATA_BLOCK_PACK_VALUES_s * pTablePackValues
DATA_BLOCK_SOF_s * pTableSof