#define LV_3V3_V_SENSE_ADC_CHNL
Definition main.h:144
#define LV_5V_V_SENSE_ADC_CHNL
Definition main.h:141
#define INTERNAL_THERM_ADC_CHNL
Definition main.h:145
-#define AUX_HP_IMON_ADC_CHNL
Definition main.h:125
-#define MAIN_CS_ADC_CHNL
Definition main.h:158
-#define PUMP_2_IMON_ADC_CHNL
Definition main.h:118
-#define SDC_IMON_ADC_CHNL
Definition main.h:132
-#define EXTERNAL_THERM_ADC_CHNL
Definition main.h:237
-#define DASH_CS_ADC_CHNL
Definition main.h:167
-#define ABOX_CS_ADC_CHNL
Definition main.h:176
-#define PUMP_1_IMON_ADC_CHNL
Definition main.h:112
-#define FAN_2_CS_ADC_CHNL
Definition main.h:149
-#define LV_5V_I_SENSE_ADC_CHNL
Definition main.h:229
-#define LV_24V_V_SENSE_ADC_CHNL
Definition main.h:219
-#define FAN_1_CS_ADC_CHNL
Definition main.h:141
-#define LV_24V_I_SENSE_ADC_CHNL
Definition main.h:222
+#define AUX_HP_IMON_ADC_CHNL
Definition main.h:122
+#define MAIN_CS_ADC_CHNL
Definition main.h:155
+#define PUMP_2_IMON_ADC_CHNL
Definition main.h:115
+#define SDC_IMON_ADC_CHNL
Definition main.h:129
+#define EXTERNAL_THERM_ADC_CHNL
Definition main.h:234
+#define DASH_CS_ADC_CHNL
Definition main.h:164
+#define ABOX_CS_ADC_CHNL
Definition main.h:173
+#define PUMP_1_IMON_ADC_CHNL
Definition main.h:109
+#define FAN_2_CS_ADC_CHNL
Definition main.h:146
+#define LV_5V_I_SENSE_ADC_CHNL
Definition main.h:226
+#define LV_24V_V_SENSE_ADC_CHNL
Definition main.h:216
+#define FAN_1_CS_ADC_CHNL
Definition main.h:138
+#define LV_24V_I_SENSE_ADC_CHNL
Definition main.h:219
@ ADC_CHN_SMP_CYCLES_480
Definition adc.h:66
@@ -577,6 +584,58 @@
+
+
+
+◆ spi_config
+
+
+
+
Initial value:= {
+
.data_len = 8,
+
.nss_sw = false,
+
+
+
+
}
+
dma_init_t spi_rx_dma_config
Definition main.c:47
+
dma_init_t spi_tx_dma_config
Definition main.c:48
+
DMA_TypeDef * periph
Definition dma.h:45
+
+
+
+
+◆ spi_rx_dma_config
+
+
+
+◆ spi_tx_dma_config
+
+
diff --git a/pdu_2main_8h_source.html b/pdu_2main_8h_source.html
index f51961d7..df9b905f 100644
--- a/pdu_2main_8h_source.html
+++ b/pdu_2main_8h_source.html
@@ -133,226 +133,223 @@
58#define LED_CTRL_BLANK_GPIO_Port (GPIOB)
59#define LED_CTRL_BLANK_Pin (6)
-
-
-
-
-
-
-
-
-
- 70#define FLOW_RATE_1_TIM (TIM3)
- 71#define FLOW_RATE_1_TIM_CH (1)
- 72#define FLOW_RATE_1_GPIO_Port (GPIOC)
- 73#define FLOW_RATE_1_Pin (6)
- 74#define FLOW_RATE_1_AF (2)
-
- 76#define FLOW_RATE_2_TIM (TIM8)
- 77#define FLOW_RATE_2_TIM_CH (2)
- 78#define FLOW_RATE_2_GPIO_Port (GPIOC)
- 79#define FLOW_RATE_2_Pin (7)
- 80#define FLOW_RATE_2_AF (3)
-
-
- 83#define FAN_1_PWM_TIM (TIM1)
- 84#define FAN_1_PWM_TIM_CH (1)
- 85#define FAN_1_PWM_GPIO_Port (GPIOE)
- 86#define FAN_1_PWM_Pin (9)
- 87#define FAN_1_PWM_AF (1)
-
- 89#define FAN_2_PWM_TIM (TIM1)
- 90#define FAN_2_PWM_TIM_CH (2)
- 91#define FAN_2_PWM_GPIO_Port (GPIOE)
- 92#define FAN_2_PWM_Pin (11)
- 93#define FAN_2_PWM_AF (1)
-
- 95#define FAN_1_TACH_TIM (TIM4)
- 96#define FAN_1_TACH_TIM_CH (2)
- 97#define FAN_1_TACH_GPIO_Port (GPIOB)
- 98#define FAN_1_TACH_Pin (7)
- 99#define FAN_1_TACH_AF (2)
-
- 101#define FAN_2_TACH_TIM (TIM10)
- 102#define FAN_2_TACH_TIM_CH (1)
- 103#define FAN_2_TACH_GPIO_Port (GPIOB)
- 104#define FAN_2_TACH_Pin (8)
- 105#define FAN_2_TACH_AF (3)
-
-
- 108#define PUMP_1_CTRL_GPIO_Port (GPIOB)
- 109#define PUMP_1_CTRL_Pin (10)
- 110#define PUMP_1_IMON_GPIO_Port (GPIOA)
- 111#define PUMP_1_IMON_Pin (6)
- 112#define PUMP_1_IMON_ADC_CHNL (6)
-
- 114#define PUMP_2_CTRL_GPIO_Port (GPIOE)
- 115#define PUMP_2_CTRL_Pin (15)
- 116#define PUMP_2_IMON_GPIO_Port (GPIOA)
- 117#define PUMP_2_IMON_Pin (5)
- 118#define PUMP_2_IMON_ADC_CHNL (5)
-
-
- 121#define AUX_HP_CTRL_GPIO_Port (GPIOD)
- 122#define AUX_HP_CTRL_Pin (12)
- 123#define AUX_HP_IMON_GPIO_Port (GPIOC)
- 124#define AUX_HP_IMON_Pin (3)
- 125#define AUX_HP_IMON_ADC_CHNL (13)
-
-
- 128#define SDC_CTRL_GPIO_Port (GPIOD)
- 129#define SDC_CTRL_Pin (13)
- 130#define SDC_IMON_GPIO_Port (GPIOA)
- 131#define SDC_IMON_Pin (0)
- 132#define SDC_IMON_ADC_CHNL (0)
-
-
- 135#define FAN_1_CTRL_GPIO_Port (GPIOD)
- 136#define FAN_1_CTRL_Pin (9)
- 137#define FAN_1_NFLT_GPIO_Port (GPIOD)
- 138#define FAN_1_NFLT_Pin (8)
- 139#define FAN_1_CS_GPIO_Port (GPIOA)
- 140#define FAN_1_CS_Pin (2)
- 141#define FAN_1_CS_ADC_CHNL (2)
-
- 143#define FAN_2_CTRL_GPIO_Port (GPIOD)
- 144#define FAN_2_CTRL_Pin (11)
- 145#define FAN_2_NFLT_GPIO_Port (GPIOD)
- 146#define FAN_2_NFLT_Pin (10)
- 147#define FAN_2_CS_GPIO_Port (GPIOA)
- 148#define FAN_2_CS_Pin (3)
- 149#define FAN_2_CS_ADC_CHNL (3)
-
-
- 152#define MAIN_CTRL_GPIO_Port (GPIOD)
- 153#define MAIN_CTRL_Pin (15)
- 154#define MAIN_NFLT_GPIO_Port (GPIOD)
- 155#define MAIN_NFLT_Pin (14)
- 156#define MAIN_CS_GPIO_Port (GPIOC)
- 157#define MAIN_CS_Pin (2)
- 158#define MAIN_CS_ADC_CHNL (12)
-
-
- 161#define DASH_CTRL_GPIO_Port (GPIOA)
- 162#define DASH_CTRL_Pin (9)
- 163#define DASH_NFLT_GPIO_Port (GPIOA)
- 164#define DASH_NFLT_Pin (8)
- 165#define DASH_CS_GPIO_Port (GPIOC)
- 166#define DASH_CS_Pin (1)
- 167#define DASH_CS_ADC_CHNL (11)
-
-
- 170#define ABOX_CTRL_GPIO_Port (GPIOA)
- 171#define ABOX_CTRL_Pin (11)
- 172#define ABOX_NFLT_GPIO_Port (GPIOA)
- 173#define ABOX_NFLT_Pin (10)
- 174#define ABOX_CS_GPIO_Port (GPIOC)
- 175#define ABOX_CS_Pin (0)
- 176#define ABOX_CS_ADC_CHNL (10)
-
-
- 179#define BLT_CTRL_GPIO_Port (GPIOE)
- 180#define BLT_CTRL_Pin (13)
- 181#define BLT_NFLT_GPIO_Port (GPIOE)
- 182#define BLT_NFLT_Pin (14)
-
-
- 185#define CRIT_5V_CTRL_GPIO_Port (GPIOE)
- 186#define CRIT_5V_CTRL_Pin (2)
- 187#define CRIT_5V_NFLT_GPIO_Port (GPIOE)
- 188#define CRIT_5V_NFLT_Pin (1)
-
-
- 191#define NCRIT_5V_CTRL_GPIO_Port (GPIOE)
- 192#define NCRIT_5V_CTRL_Pin (6)
- 193#define NCRIT_5V_NFLT_GPIO_Port (GPIOE)
- 194#define NCRIT_5V_NFLT_Pin (5)
-
-
- 197#define DAQ_CTRL_GPIO_Port (GPIOE)
- 198#define DAQ_CTRL_Pin (4)
- 199#define DAQ_NFLT_GPIO_Port (GPIOE)
- 200#define DAQ_NFLT_Pin (3)
-
-
- 203#define FAN_5V_CTRL_GPIO_Port (GPIOE)
- 204#define FAN_5V_CTRL_Pin (8)
- 205#define FAN_5V_NFLT_GPIO_Port (GPIOE)
- 206#define FAN_5V_NFLT_Pin (7)
-
-
- 209#define LV_BMS_STAT_GPIO_Port (GPIOA)
- 210#define LV_BMS_STAT_Pin (15)
- 211#define LV_BMS_TX_GPIO_Port (GPIOC)
- 212#define LV_BMS_TX_Pin (10)
- 213#define LV_BMS_RX_GPIO_Port (GPIOC)
- 214#define LV_BMS_RX_Pin (11)
-
-
- 217#define LV_24V_V_SENSE_GPIO_Port (GPIOB)
- 218#define LV_24V_V_SENSE_Pin (0)
- 219#define LV_24V_V_SENSE_ADC_CHNL (8)
- 220#define LV_24V_I_SENSE_GPIO_Port (GPIOA)
- 221#define LV_24V_I_SENSE_Pin (4)
- 222#define LV_24V_I_SENSE_ADC_CHNL (4)
-
- 224#define LV_5V_V_SENSE_GPIO_Port (GPIOC)
- 225#define LV_5V_V_SENSE_Pin (5)
- 226#define LV_5V_V_SENSE_ADC_CHNL (15)
- 227#define LV_5V_I_SENSE_GPIO_Port (GPIOA)
- 228#define LV_5V_I_SENSE_Pin (1)
- 229#define LV_5V_I_SENSE_ADC_CHNL (1)
-
- 231#define LV_3V3_V_SENSE_GPIO_Port (GPIOC)
- 232#define LV_3V3_V_SENSE_Pin (4)
- 233#define LV_3V3_V_SENSE_ADC_CHNL (14)
-
- 235#define EXTERNAL_THERM_GPIO_Port (GPIOA)
- 236#define EXTERNAL_THERM_Pin (7)
- 237#define EXTERNAL_THERM_ADC_CHNL (7)
-
- 239#define INTERNAL_THERM_ADC_CHNL (17)
-
-
- 242#define ADC_REF_mV (3300UL)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 257 uint16_t lv_24_v_sense;
- 258 uint16_t lv_24_i_sense;
- 259 uint16_t lv_5_v_sense;
- 260 uint16_t lv_5_i_sense;
- 261 uint16_t lv_3v3_v_sense;
-
-
-
-
-
-
+
+
+
+
+
+
+ 67#define FLOW_RATE_1_TIM (TIM3)
+ 68#define FLOW_RATE_1_TIM_CH (1)
+ 69#define FLOW_RATE_1_GPIO_Port (GPIOC)
+ 70#define FLOW_RATE_1_Pin (6)
+ 71#define FLOW_RATE_1_AF (2)
+
+ 73#define FLOW_RATE_2_TIM (TIM8)
+ 74#define FLOW_RATE_2_TIM_CH (2)
+ 75#define FLOW_RATE_2_GPIO_Port (GPIOC)
+ 76#define FLOW_RATE_2_Pin (7)
+ 77#define FLOW_RATE_2_AF (3)
+
+
+ 80#define FAN_1_PWM_TIM (TIM1)
+ 81#define FAN_1_PWM_TIM_CH (1)
+ 82#define FAN_1_PWM_GPIO_Port (GPIOE)
+ 83#define FAN_1_PWM_Pin (9)
+ 84#define FAN_1_PWM_AF (1)
+
+ 86#define FAN_2_PWM_TIM (TIM1)
+ 87#define FAN_2_PWM_TIM_CH (2)
+ 88#define FAN_2_PWM_GPIO_Port (GPIOE)
+ 89#define FAN_2_PWM_Pin (11)
+ 90#define FAN_2_PWM_AF (1)
+
+ 92#define FAN_1_TACH_TIM (TIM4)
+ 93#define FAN_1_TACH_TIM_CH (2)
+ 94#define FAN_1_TACH_GPIO_Port (GPIOB)
+ 95#define FAN_1_TACH_Pin (7)
+ 96#define FAN_1_TACH_AF (2)
+
+ 98#define FAN_2_TACH_TIM (TIM10)
+ 99#define FAN_2_TACH_TIM_CH (1)
+ 100#define FAN_2_TACH_GPIO_Port (GPIOB)
+ 101#define FAN_2_TACH_Pin (8)
+ 102#define FAN_2_TACH_AF (3)
+
+
+ 105#define PUMP_1_CTRL_GPIO_Port (GPIOB)
+ 106#define PUMP_1_CTRL_Pin (10)
+ 107#define PUMP_1_IMON_GPIO_Port (GPIOA)
+ 108#define PUMP_1_IMON_Pin (6)
+ 109#define PUMP_1_IMON_ADC_CHNL (6)
+
+ 111#define PUMP_2_CTRL_GPIO_Port (GPIOE)
+ 112#define PUMP_2_CTRL_Pin (15)
+ 113#define PUMP_2_IMON_GPIO_Port (GPIOA)
+ 114#define PUMP_2_IMON_Pin (5)
+ 115#define PUMP_2_IMON_ADC_CHNL (5)
+
+
+ 118#define AUX_HP_CTRL_GPIO_Port (GPIOD)
+ 119#define AUX_HP_CTRL_Pin (12)
+ 120#define AUX_HP_IMON_GPIO_Port (GPIOC)
+ 121#define AUX_HP_IMON_Pin (3)
+ 122#define AUX_HP_IMON_ADC_CHNL (13)
+
+
+ 125#define SDC_CTRL_GPIO_Port (GPIOD)
+ 126#define SDC_CTRL_Pin (13)
+ 127#define SDC_IMON_GPIO_Port (GPIOA)
+ 128#define SDC_IMON_Pin (0)
+ 129#define SDC_IMON_ADC_CHNL (0)
+
+
+ 132#define FAN_1_CTRL_GPIO_Port (GPIOD)
+ 133#define FAN_1_CTRL_Pin (9)
+ 134#define FAN_1_NFLT_GPIO_Port (GPIOD)
+ 135#define FAN_1_NFLT_Pin (8)
+ 136#define FAN_1_CS_GPIO_Port (GPIOA)
+ 137#define FAN_1_CS_Pin (2)
+ 138#define FAN_1_CS_ADC_CHNL (2)
+
+ 140#define FAN_2_CTRL_GPIO_Port (GPIOD)
+ 141#define FAN_2_CTRL_Pin (11)
+ 142#define FAN_2_NFLT_GPIO_Port (GPIOD)
+ 143#define FAN_2_NFLT_Pin (10)
+ 144#define FAN_2_CS_GPIO_Port (GPIOA)
+ 145#define FAN_2_CS_Pin (3)
+ 146#define FAN_2_CS_ADC_CHNL (3)
+
+
+ 149#define MAIN_CTRL_GPIO_Port (GPIOD)
+ 150#define MAIN_CTRL_Pin (15)
+ 151#define MAIN_NFLT_GPIO_Port (GPIOD)
+ 152#define MAIN_NFLT_Pin (14)
+ 153#define MAIN_CS_GPIO_Port (GPIOC)
+ 154#define MAIN_CS_Pin (2)
+ 155#define MAIN_CS_ADC_CHNL (12)
+
+
+ 158#define DASH_CTRL_GPIO_Port (GPIOA)
+ 159#define DASH_CTRL_Pin (9)
+ 160#define DASH_NFLT_GPIO_Port (GPIOA)
+ 161#define DASH_NFLT_Pin (8)
+ 162#define DASH_CS_GPIO_Port (GPIOC)
+ 163#define DASH_CS_Pin (1)
+ 164#define DASH_CS_ADC_CHNL (11)
+
+
+ 167#define ABOX_CTRL_GPIO_Port (GPIOA)
+ 168#define ABOX_CTRL_Pin (11)
+ 169#define ABOX_NFLT_GPIO_Port (GPIOA)
+ 170#define ABOX_NFLT_Pin (10)
+ 171#define ABOX_CS_GPIO_Port (GPIOC)
+ 172#define ABOX_CS_Pin (0)
+ 173#define ABOX_CS_ADC_CHNL (10)
+
+
+ 176#define BLT_CTRL_GPIO_Port (GPIOE)
+ 177#define BLT_CTRL_Pin (13)
+ 178#define BLT_NFLT_GPIO_Port (GPIOE)
+ 179#define BLT_NFLT_Pin (14)
+
+
+ 182#define CRIT_5V_CTRL_GPIO_Port (GPIOE)
+ 183#define CRIT_5V_CTRL_Pin (2)
+ 184#define CRIT_5V_NFLT_GPIO_Port (GPIOE)
+ 185#define CRIT_5V_NFLT_Pin (1)
+
+
+ 188#define NCRIT_5V_CTRL_GPIO_Port (GPIOE)
+ 189#define NCRIT_5V_CTRL_Pin (6)
+ 190#define NCRIT_5V_NFLT_GPIO_Port (GPIOE)
+ 191#define NCRIT_5V_NFLT_Pin (5)
+
+
+ 194#define DAQ_CTRL_GPIO_Port (GPIOE)
+ 195#define DAQ_CTRL_Pin (4)
+ 196#define DAQ_NFLT_GPIO_Port (GPIOE)
+ 197#define DAQ_NFLT_Pin (3)
+
+
+ 200#define FAN_5V_CTRL_GPIO_Port (GPIOE)
+ 201#define FAN_5V_CTRL_Pin (8)
+ 202#define FAN_5V_NFLT_GPIO_Port (GPIOE)
+ 203#define FAN_5V_NFLT_Pin (7)
+
+
+ 206#define LV_BMS_STAT_GPIO_Port (GPIOA)
+ 207#define LV_BMS_STAT_Pin (15)
+ 208#define LV_BMS_TX_GPIO_Port (GPIOC)
+ 209#define LV_BMS_TX_Pin (10)
+ 210#define LV_BMS_RX_GPIO_Port (GPIOC)
+ 211#define LV_BMS_RX_Pin (11)
+
+
+ 214#define LV_24V_V_SENSE_GPIO_Port (GPIOB)
+ 215#define LV_24V_V_SENSE_Pin (0)
+ 216#define LV_24V_V_SENSE_ADC_CHNL (8)
+ 217#define LV_24V_I_SENSE_GPIO_Port (GPIOA)
+ 218#define LV_24V_I_SENSE_Pin (4)
+ 219#define LV_24V_I_SENSE_ADC_CHNL (4)
+
+ 221#define LV_5V_V_SENSE_GPIO_Port (GPIOC)
+ 222#define LV_5V_V_SENSE_Pin (5)
+ 223#define LV_5V_V_SENSE_ADC_CHNL (15)
+ 224#define LV_5V_I_SENSE_GPIO_Port (GPIOA)
+ 225#define LV_5V_I_SENSE_Pin (1)
+ 226#define LV_5V_I_SENSE_ADC_CHNL (1)
+
+ 228#define LV_3V3_V_SENSE_GPIO_Port (GPIOC)
+ 229#define LV_3V3_V_SENSE_Pin (4)
+ 230#define LV_3V3_V_SENSE_ADC_CHNL (14)
+
+ 232#define EXTERNAL_THERM_GPIO_Port (GPIOA)
+ 233#define EXTERNAL_THERM_Pin (7)
+ 234#define EXTERNAL_THERM_ADC_CHNL (7)
+
+ 236#define INTERNAL_THERM_ADC_CHNL (17)
+
+
+ 239#define ADC_REF_mV (3300UL)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 254 uint16_t lv_24_v_sense;
+ 255 uint16_t lv_24_i_sense;
+ 256 uint16_t lv_5_v_sense;
+ 257 uint16_t lv_5_i_sense;
+ 258 uint16_t lv_3v3_v_sense;
+
+
+
+
+
+
volatile ADCReadings_t adc_readings
Definition main.c:120
struct eeprom __attribute__
Definition can.c:171
-uint16_t sdc_imon
Definition main.h:251
-uint16_t fan_1_cs
Definition main.h:252
-uint16_t abox_cs
Definition main.h:256
-uint16_t dash_cs
Definition main.h:255
-uint16_t external_therm
Definition main.h:262
-uint16_t pump_1_imon
Definition main.h:248
-uint16_t main_cs
Definition main.h:254
-uint16_t fan_2_cs
Definition main.h:253
-uint16_t internal_therm
Definition main.h:263
-uint16_t pump_2_imon
Definition main.h:249
-uint16_t aux_hp_imon
Definition main.h:250
+uint16_t sdc_imon
Definition main.h:248
+uint16_t fan_1_cs
Definition main.h:249
+uint16_t abox_cs
Definition main.h:253
+uint16_t dash_cs
Definition main.h:252
+uint16_t external_therm
Definition main.h:259
+uint16_t pump_1_imon
Definition main.h:245
+uint16_t main_cs
Definition main.h:251
+uint16_t fan_2_cs
Definition main.h:250
+uint16_t internal_therm
Definition main.h:260
+uint16_t pump_2_imon
Definition main.h:246
+uint16_t aux_hp_imon
Definition main.h:247