 |
Midnight Sun Firmware
|
Loading...
Searching...
No Matches
30 { .port = GPIO_PORT_B, .pin = 8 }
34 { .port = GPIO_PORT_B, .pin = 9 }
41#define CURRENT_SENSE_I2C_PORT I2C_PORT_1
44#define CURRENT_SENSE_I2C_SDA_GPIO \
45 { .port = GPIO_PORT_B, .pin = 11 }
48#define CURRENT_SENSE_I2C_SCL_GPIO \
49 { .port = GPIO_PORT_B, .pin = 10 }
52#define CURRENT_SENSE_MAX17261_I2C_ADDR (0x36U)
59#define LTC_AFE_SPI_PORT SPI_PORT_2
62#define LTC_AFE_SPI_BAUDRATE SPI_BAUDRATE_1_25MHZ
65#define LTC_AFE_SPI_SDO_GPIO \
66 { .port = GPIO_PORT_B, .pin = 15 }
69#define LTC_AFE_SPI_SDI_GPIO \
70 { .port = GPIO_PORT_B, .pin = 14 }
73#define LTC_AFE_SPI_SCK_GPIO \
74 { .port = GPIO_PORT_B, .pin = 13 }
77#define LTC_AFE_SPI_CS_GPIO \
78 { .port = GPIO_PORT_B, .pin = 12 }
85#define MCP2515_SPI_PORT SPI_PORT_3
88#define MCP2515_SPI_SDO_GPIO \
89 { .port = GPIO_PORT_B, .pin = 5 }
92#define MCP2515_SPI_SDI_GPIO \
93 { .port = GPIO_PORT_B, .pin = 4 }
96#define MCP2515_SPI_SCK_GPIO \
97 { .port = GPIO_PORT_B, .pin = 3 }
100#define MCP2515_SPI_CS_GPIO \
101 { .port = GPIO_PORT_A, .pin = 15 }
108#define BMS_PRECHARGE_STATUS_GPIO \
109 { .port = GPIO_PORT_A, .pin = 3 }
112#define BMS_PRECHARGE_RELAY_ENABLE_GPIO \
113 { .port = GPIO_PORT_A, .pin = 9 }
116#define BMS_PRECHARGE_RELAY_SENSE_GPIO \
117 { .port = GPIO_PORT_A, .pin = 10 }
120#define BMS_POS_RELAY_ENABLE_GPIO \
121 { .port = GPIO_PORT_A, .pin = 4 }
124#define BMS_POS_RELAY_SENSE_GPIO \
125 { .port = GPIO_PORT_A, .pin = 15 }
128#define BMS_NEG_RELAY_ENABLE_GPIO \
129 { .port = GPIO_PORT_A, .pin = 13 }
132#define BMS_NEG_RELAY_SENSE_GPIO \
133 { .port = GPIO_PORT_A, .pin = 12 }
136#define BMS_SOLAR_RELAY_ENABLE_GPIO \
137 { .port = GPIO_PORT_C, .pin = 13 }
140#define BMS_SOLAR_RELAY_SENSE_GPIO \
141 { .port = GPIO_PORT_A, .pin = 6 }
148#define BMS_KILLSWITCH_SENSE_GPIO \
149 { .port = GPIO_PORT_A, .pin = 11 }
156#define BMS_AUX_BATT_VOLTAGE_ADC \
157 { .port = GPIO_PORT_A, .pin = 5 }
164#define BMS_FAN_SENSE_1_GPIO \
165 { .port = GPIO_PORT_B, .pin = 0 }
168#define BMS_FAN_SENSE_2_GPIO \
169 { .port = GPIO_PORT_B, .pin = 1 }
172#define BMS_FAN_PWM_GPIO \
173 { .port = GPIO_PORT_A, .pin = 8 }
180#define NUM_SERIES_MODULES 9U
183#define NUM_SERIES_CELLS_IN_MODULE 4U
186#define NUM_SERIES_CELLS (NUM_SERIES_CELLS_IN_MODULE * NUM_SERIES_MODULES)
189#define NUM_PARALLEL_CELLS 8U
192#define CELL_CAPACITY_MAH 4850U
195#define PACK_CAPACITY_MAH (CELL_CAPACITY_MAH * NUM_PARALLEL_CELLS)