57 #ifndef FOXBMS__CAN_CFG_H_
58 #define FOXBMS__CAN_CFG_H_
70 #define CAN1_NODE (canREG1)
71 #define CAN2_NODE (canREG2)
78 #define CAN1_ENABLE_PIN (PEX_PIN00)
79 #define CAN1_STANDBY_PIN (PEX_PIN01)
80 #define CAN2_ENABLE_PIN (PEX_PIN02)
81 #define CAN2_STANDBY_PIN (PEX_PIN03)
85 #define CAN_MAX_11BIT_ID (2048u)
87 #define CAN_MAX_DLC (8u)
95 #define CAN_ID_TX_STATE (0x220U)
97 #define CAN_TX_STATE_PERIOD_MS (100U)
99 #define CAN_TX_STATE_PHASE_MS (0U)
102 #define CAN_ID_TX_VOLTAGES (0x240U)
104 #define CAN_TX_VOLTAGES_PERIOD_MS (100U)
106 #define CAN_TX_VOLTAGES_PHASE_MS (10U)
109 #define CAN_ID_TX_TEMPERATURES (0x250U)
111 #define CAN_TX_TEMPERATURES_PERIOD_MS (200U)
113 #define CAN_TX_TEMPERATURES_PHASE_MS (20U)
116 #define CAN_ID_TX_LIMIT_VALUES (0x224U)
118 #define CAN_TX_LIMIT_VALUES_PERIOD_MS (100U)
120 #define CAN_TX_LIMIT_VALUES_PHASE_MS (30U)
123 #define CAN_ID_TX_MINIMUM_MAXIMUM_VALUES (0x223U)
125 #define CAN_TX_MINIMUM_MAXIMUM_VALUES_PERIOD_MS (100U)
127 #define CAN_TX_MINIMUM_MAXIMUM_VALUES_PHASE_MS (40U)
130 #define CAN_ID_TX_PACK_STATE_ESTIMATION (0x225U)
132 #define CAN_TX_PACK_STATE_ESTIMATION_PERIOD_MS (1000U)
134 #define CAN_TX_PACK_STATE_ESTIMATION_PHASE_MS (50U)
137 #define CAN_ID_TX_PACK_VALUES (0x222U)
139 #define CAN_TX_PACK_VALUES_PERIOD_MS (100U)
141 #define CAN_TX_PACK_VALUES_PHASE_MS (60U)
146 #define CAN_ID_TX_STRING_STATE (0x221U)
148 #define CAN_TX_STRING_STATE_PERIOD_MS (100U)
150 #define CAN_TX_STRING_STATE_PHASE_MS (70U)
153 #define CAN_ID_TX_STRING_VALUES (0x280U)
155 #define CAN_TX_STRING_VALUES_PERIOD_MS (100U)
157 #define CAN_TX_STRING_VALUES_PHASE_MS (80U)
160 #define CAN_ID_TX_STRING_MINIMUM_MAXIMUM (0x281U)
162 #define CAN_TX_STRING_MINIMUM_MAXIMUM_PERIOD_MS (100U)
164 #define CAN_TX_STRING_MINIMUM_MAXIMUM_PHASE_MS (90U)
167 #define CAN_ID_TX_STRING_STATE_ESTIMATION (0x282U)
169 #define CAN_TX_STRING_STATE_ESTIMATION_PERIOD_MS (1000U)
171 #define CAN_TX_STRING_STATE_ESTIMATION_PHASE_MS (0U)
174 #define CAN_ID_TX_STRING_VALUES_2 (0x283U)
176 #define CAN_TX_STRING_VALUES_2_PERIOD_MS (100U)
178 #define CAN_TX_STRING_VALUES_2_PHASE_MS (10U)
183 #define CAN_ID_BOOT_MESSAGE (0x199u)
186 #define CAN_ID_SOFTWARE_RESET (0x95U)
189 #define CAN_ID_COMMAND (0x230U)
192 #define CAN_ID_DEBUG (0x200U)
195 #define CAN_ID_SW_VERSION (0x777U)
204 #define CAN_ID_IMD_INFO (0x37U)
206 #define CAN_ID_IMD_REQUEST (0x22U)
208 #define CAN_ID_IMD_RESPONSE (0x23U)
212 #define CAN_ID_STRING0_CURRENT (0x521u)
213 #define CAN_ID_STRING0_VOLTAGE1 (0x522u)
214 #define CAN_ID_STRING0_VOLTAGE2 (0x523u)
215 #define CAN_ID_STRING0_VOLTAGE3 (0x524u)
216 #define CAN_ID_STRING0_TEMPERATURE (0x525u)
217 #define CAN_ID_STRING0_POWER (0x526u)
218 #define CAN_ID_STRING0_CURRENT_COUNTER (0x527u)
219 #define CAN_ID_STRING0_ENERGY_COUNTER (0x528u)
222 #define CAN_ID_STRING1_CURRENT (0x621u)
223 #define CAN_ID_STRING1_VOLTAGE1 (0x622u)
224 #define CAN_ID_STRING1_VOLTAGE2 (0x623u)
225 #define CAN_ID_STRING1_VOLTAGE3 (0x624u)
226 #define CAN_ID_STRING1_TEMPERATURE (0x625u)
227 #define CAN_ID_STRING1_POWER (0x626u)
228 #define CAN_ID_STRING1_CURRENT_COUNTER (0x627u)
229 #define CAN_ID_STRING1_ENERGY_COUNTER (0x628u)
232 #define CAN_ID_STRING2_CURRENT (0x721u)
233 #define CAN_ID_STRING2_VOLTAGE1 (0x722u)
234 #define CAN_ID_STRING2_VOLTAGE2 (0x723u)
235 #define CAN_ID_STRING2_VOLTAGE3 (0x724u)
236 #define CAN_ID_STRING2_TEMPERATURE (0x725u)
237 #define CAN_ID_STRING2_POWER (0x726u)
238 #define CAN_ID_STRING2_CURRENT_COUNTER (0x727u)
239 #define CAN_ID_STRING2_ENERGY_COUNTER (0x728u)
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
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