diff --git a/a__box_2can_2can__parse_8h_source.html b/a__box_2can_2can__parse_8h_source.html index 271669de..f3129808 100644 --- a/a__box_2can_2can__parse_8h_source.html +++ b/a__box_2can_2can__parse_8h_source.html @@ -920,14 +920,14 @@
q_rx_can_a
q_handle_t * q_rx_can_a
Definition can_parse.c:17
canRxUpdate
void canRxUpdate()
Pull message off of rx buffer, update can_data struct, check for stale messages.
Definition can_parse.c:26
initCANParse
void initCANParse(q_handle_t *q_rx_can_a)
Setup queue and message filtering.
Definition can_parse.c:20
-
daq_command_A_BOX_CALLBACK
void daq_command_A_BOX_CALLBACK(CanMsgTypeDef_t *msg_header_a)
Definition daq.c:45
+
daq_command_A_BOX_CALLBACK
void daq_command_A_BOX_CALLBACK(CanMsgTypeDef_t *msg_header_a)
Definition daq.c:55
return_fault_control
void return_fault_control(uint16_t id)
set_fault_daq
void set_fault_daq(uint16_t id, bool value)
last_can_rx_time_ms
volatile uint32_t last_can_rx_time_ms
Definition can_parse.c:18
canProcessRxIRQs
void canProcessRxIRQs(CanMsgTypeDef_t *rx)
Process any rx message callbacks from the CAN Rx IRQ.
Definition can_parse.c:373
handleCallbacks
void handleCallbacks(uint16_t id, bool latched)
can_data
can_data_t can_data
Definition can_parse.c:16
-
precharge_bl_cmd_CALLBACK
void precharge_bl_cmd_CALLBACK(CanParsedData_t *msg_data_a)
Definition main.c:433
+
precharge_bl_cmd_CALLBACK
void precharge_bl_cmd_CALLBACK(CanParsedData_t *msg_data_a)
Definition main.c:442
send_fault
void send_fault(uint16_t id, bool latched)
__attribute__
struct eeprom __attribute__
Definition can.c:171
charge_enable
uint8_t charge_enable
Definition main.c:102
diff --git a/a__box_2daq_2daq_8c.html b/a__box_2daq_2daq_8c.html index 23ca9700..36edefe1 100644 --- a/a__box_2daq_2daq_8c.html +++ b/a__box_2daq_2daq_8c.html @@ -85,6 +85,8 @@ #include "common/daq/daq_base.h"
#include "common/phal_F4_F7/can/can.h"
#include "orion.h"
+#include "tmu.h"
+#include "main.h"
@@ -173,10 +175,23 @@

{.is_read_only=0, .bit_length=1, .read_var_a=&charge_request_user, .write_var_a=&charge_request_user, },
{.is_read_only=0, .bit_length=16, .read_var_a=&user_charge_current_request, .write_var_a=&user_charge_current_request, },
{.is_read_only=0, .bit_length=16, .read_var_a=&user_charge_voltage_request, .write_var_a=&user_charge_voltage_request, },
+
{.is_read_only=0, .bit_length=1, .read_var_a=&tmu_daq_override, .write_var_a=&tmu_daq_override, },
+
{.is_read_only=0, .bit_length=4, .read_var_a=&tmu_daq_therm, .write_var_a=&tmu_daq_therm, },
+
{.is_read_only=1, .bit_length=12, .read_var_a=&adc_readings.tmu_1, .write_var_a=NULL, },
+
{.is_read_only=1, .bit_length=12, .read_var_a=&adc_readings.tmu_2, .write_var_a=NULL, },
+
{.is_read_only=1, .bit_length=12, .read_var_a=&adc_readings.tmu_3, .write_var_a=NULL, },
+
{.is_read_only=1, .bit_length=12, .read_var_a=&adc_readings.tmu_4, .write_var_a=NULL, },
+
{.is_read_only=0, .bit_length=1, .read_var_a=&bms_daq_override, .write_var_a=&bms_daq_override, },
+
{.is_read_only=0, .bit_length=1, .read_var_a=&bms_daq_stat, .write_var_a=&bms_daq_stat, },
}
+
volatile ADCReadings_t adc_readings
Definition main.c:120
+
bool bms_daq_override
Definition main.c:91
+
bool bms_daq_stat
Definition main.c:92
uint8_t charge_request_user
Definition orion.c:12
uint16_t user_charge_voltage_request
Definition orion.c:14
uint16_t user_charge_current_request
Definition orion.c:13
+
uint8_t tmu_daq_therm
Definition tmu.c:14
+
bool tmu_daq_override
Definition tmu.c:13
diff --git a/a__box_2daq_2daq_8h.html b/a__box_2daq_2daq_8h.html index 4339bfc4..bc039cfe 100644 --- a/a__box_2daq_2daq_8h.html +++ b/a__box_2daq_2daq_8h.html @@ -94,7 +94,7 @@

- + @@ -102,6 +102,22 @@ + + + + + + + + + + + + + + + +

Functions

 
#define DAQ_UPDATE_PERIOD   15
 
#define NUM_VARS   3
#define NUM_VARS   11
 
#define DAQ_ID_CHARGE_REQUEST_USER   0
 
 
#define DAQ_ID_USER_CHARGE_VOLTAGE_REQUEST   2
 
#define DAQ_ID_TMU_DAQ_OVERRIDE   3
 
#define DAQ_ID_TMU_DAQ_THERM   4
 
#define DAQ_ID_TMU_1   5
 
#define DAQ_ID_TMU_2   6
 
#define DAQ_ID_TMU_3   7
 
#define DAQ_ID_TMU_4   8
 
#define DAQ_ID_BMS_DAQ_OVERRIDE   9
 
#define DAQ_ID_BMS_DAQ_STAT   10
 
@@ -117,6 +133,34 @@
Date
2021-10-06

Macro Definition Documentation

+ +

◆ DAQ_ID_BMS_DAQ_OVERRIDE

+ +
+
+

Functions

+ + + +
#define DAQ_ID_BMS_DAQ_OVERRIDE   9
+
+ +
+ + +

◆ DAQ_ID_BMS_DAQ_STAT

+ +
+
+ + + + +
#define DAQ_ID_BMS_DAQ_STAT   10
+
+ +
+

◆ DAQ_ID_CHARGE_REQUEST_USER

@@ -129,6 +173,90 @@

+ + + +

◆ DAQ_ID_TMU_1

+ +
+
+ + + + +
#define DAQ_ID_TMU_1   5
+
+ +
+
+ +

◆ DAQ_ID_TMU_2

+ +
+
+ + + + +
#define DAQ_ID_TMU_2   6
+
+ +
+
+ +

◆ DAQ_ID_TMU_3

+ +
+
+ + + + +
#define DAQ_ID_TMU_3   7
+
+ +
+
+ +

◆ DAQ_ID_TMU_4

+ +
+
+ + + + +
#define DAQ_ID_TMU_4   8
+
+ +
+
+ +

◆ DAQ_ID_TMU_DAQ_OVERRIDE

+ +
+
+ + + + +
#define DAQ_ID_TMU_DAQ_OVERRIDE   3
+
+ +
+
+ +

◆ DAQ_ID_TMU_DAQ_THERM

+ +
+
+ + + + +
#define DAQ_ID_TMU_DAQ_THERM   4
+
+
@@ -194,7 +322,7 @@

- +
#define NUM_VARS   3#define NUM_VARS   11
diff --git a/a__box_2daq_2daq_8h_source.html b/a__box_2daq_2daq_8h_source.html index 7cd86f18..bc7e2d50 100644 --- a/a__box_2daq_2daq_8h_source.html +++ b/a__box_2daq_2daq_8h_source.html @@ -95,24 +95,32 @@
19#define DAQ_UPDATE_PERIOD 15 // ms
20
21// BEGIN AUTO VAR COUNT
-
22#define NUM_VARS 3
+
22#define NUM_VARS 11
23// END AUTO VAR COUNT
24
25// BEGIN AUTO VAR IDs
26#define DAQ_ID_CHARGE_REQUEST_USER 0
27#define DAQ_ID_USER_CHARGE_CURRENT_REQUEST 1
28#define DAQ_ID_USER_CHARGE_VOLTAGE_REQUEST 2
-
29// END AUTO VAR IDs
-
30
-
31// BEGIN AUTO FILE STRUCTS
-
32// END AUTO FILE STRUCTS
-
33
-
34bool daqInit(q_handle_t* tx_a);
-
35void daqPeriodic();
-
36
-
37#endif
-
void daqPeriodic()
Definition daq.c:39
-
bool daqInit(q_handle_t *tx_a)
Definition daq.c:31
+
29#define DAQ_ID_TMU_DAQ_OVERRIDE 3
+
30#define DAQ_ID_TMU_DAQ_THERM 4
+
31#define DAQ_ID_TMU_1 5
+
32#define DAQ_ID_TMU_2 6
+
33#define DAQ_ID_TMU_3 7
+
34#define DAQ_ID_TMU_4 8
+
35#define DAQ_ID_BMS_DAQ_OVERRIDE 9
+
36#define DAQ_ID_BMS_DAQ_STAT 10
+
37// END AUTO VAR IDs
+
38
+
39// BEGIN AUTO FILE STRUCTS
+
40// END AUTO FILE STRUCTS
+
41
+
42bool daqInit(q_handle_t* tx_a);
+
43void daqPeriodic();
+
44
+
45#endif
+
void daqPeriodic()
Definition daq.c:49
+
bool daqInit(q_handle_t *tx_a)
Definition daq.c:41
Definition queue.h:25
diff --git a/a__box_2main_8c.html b/a__box_2main_8c.html index e69d54a2..6f63cd75 100644 --- a/a__box_2main_8c.html +++ b/a__box_2main_8c.html @@ -154,6 +154,10 @@   q_handle_t q_rx_can   +bool bms_daq_override = false +  +bool bms_daq_stat = falsetmu_handle_t tmu   ADCInitConfig_t adc_config @@ -462,10 +466,10 @@

{.channel=TMU_3_ADC_CHANNEL, .rank=3, .sampling_time=ADC_CHN_SMP_CYCLES_480},
{.channel=TMU_4_ADC_CHANNEL, .rank=4, .sampling_time=ADC_CHN_SMP_CYCLES_480},
}
-
#define TMU_2_ADC_CHANNEL
Definition main.h:92
-
#define TMU_4_ADC_CHANNEL
Definition main.h:94
-
#define TMU_3_ADC_CHANNEL
Definition main.h:93
-
#define TMU_1_ADC_CHANNEL
Definition main.h:91
+
#define TMU_2_ADC_CHANNEL
Definition main.h:80
+
#define TMU_4_ADC_CHANNEL
Definition main.h:82
+
#define TMU_3_ADC_CHANNEL
Definition main.h:81
+
#define TMU_1_ADC_CHANNEL
Definition main.h:79
@ ADC_CHN_SMP_CYCLES_480
Definition adc.h:66
@@ -509,7 +513,7 @@

Initial value:
sizeof(adc_readings) / sizeof(adc_readings.tmu_1), 0b01)
-
volatile ADCReadings_t adc_readings
Definition main.c:117
+
volatile ADCReadings_t adc_readings
Definition main.c:120
#define ADC1_DMA_CONT_CONFIG(mem_addr_, tx_size_, priority_)
Definition adc.h:92
@@ -592,6 +596,34 @@

+ + + +

◆ bms_daq_override

+ +
+
+ + + + +
bool bms_daq_override = false
+
+ +
+
+ +

◆ bms_daq_stat

+ +
+
+ + + + +
bool bms_daq_stat = false
+
+
diff --git a/a__box_2main_8h.html b/a__box_2main_8h.html index 648f4eae..dba90a07 100644 --- a/a__box_2main_8h.html +++ b/a__box_2main_8h.html @@ -95,38 +95,18 @@ Macros

#define FAULT_NODE_NAME   NODE_A_BOX   -#define SPI_SCLK_GPIO_Port   (GPIOA) -  -#define SPI_SCLK_Pin   (5) -  -#define SPI_MISO_GPIO_Port   (GPIOA) -  -#define SPI_MISO_Pin   (6) -  -#define SPI_MOSI_GPIO_Port   (GPIOA) -  -#define SPI_MOSI_Pin   (7) -  -#define SPI_CS_ACEL_GPIO_Port   (GPIOA) -  -#define SPI_CS_ACEL_Pin   (3) -  -#define SPI_CS_GYRO_GPIO_Port   (GPIOA) -  -#define SPI_CS_GYRO_Pin   (2) -  -#define SPI_CS_TMU_GPIO_Port   (GPIOD) -  -#define SPI_CS_TMU_GPIO_Pin   (15) -  #define I_SENSE_CH1_GPIO_Port   (GPIOA)   #define I_SENSE_CH1_Pin   (0)   +#define I_SENSE_CH1_ADC_CHNL   (0) +  #define I_SENSE_CH2_GPIO_Port   (GPIOA)   #define I_SENSE_CH2_Pin   (1)   +#define I_SENSE_CH2_ADC_CHNL   (1) +  #define BMS_STATUS_GPIO_Port   (GPIOD)   #define BMS_STATUS_Pin   (1) @@ -145,11 +125,11 @@   #define IMD_HS_PWM_GPIO_Port   (GPIOB)   -#define IMD_HS_PWM_Pin   (6) +#define IMD_HS_PWM_Pin   (3)   -#define IMD_LS_PWM_GPIO_Port   (GPIOB) +#define IMD_LS_PWM_GPIO_Port   (GPIOA)   -#define IMD_LS_PWM_Pin   (7) +#define IMD_LS_PWM_Pin   (15)   #define IMD_STATUS_GPIO_Port   (GPIOB)   @@ -183,22 +163,22 @@   #define MUX_D_Pin   (6)   -#define MUX_1_OUT_Port   (GPIOC) -  -#define MUX_1_OUT_Pin   (0) -  -#define MUX_2_OUT_Port   (GPIOC) -  -#define MUX_2_OUT_Pin   (1) -  -#define MUX_3_OUT_Port   (GPIOC) -  -#define MUX_3_OUT_Pin   (2) -  -#define MUX_4_OUT_Port   (GPIOC) -  -#define MUX_4_OUT_Pin   (3) -  +#define TMU_1_Port   (GPIOC) +  +#define TMU_1_Pin   (0) +  +#define TMU_2_Port   (GPIOC) +  +#define TMU_2_Pin   (1) +  +#define TMU_3_Port   (GPIOC) +  +#define TMU_3_Pin   (2) +  +#define TMU_4_Port   (GPIOC) +  +#define TMU_4_Pin   (3) +  #define BOARD_TEMP_Port   (GPIOB)   #define BOARD_TEMP_Pin   (0) @@ -207,6 +187,8 @@   #define VSENSE_5V_Pin   (7)   +#define VSENSE_5V_ADC_CHNL   (7) +  #define TMU_1_ADC_CHANNEL   (10)   #define TMU_2_ADC_CHANNEL   (11) @@ -220,6 +202,10 @@ Variables

volatile ADCReadings_t adc_readings   +bool bms_daq_override +  +bool bms_daq_stat

Macro Definition Documentation

@@ -458,6 +444,20 @@

+ + + +

◆ I_SENSE_CH1_ADC_CHNL

+ +
+
+ + + + +
#define I_SENSE_CH1_ADC_CHNL   (0)
+
+
@@ -486,6 +486,20 @@

+ + + +

◆ I_SENSE_CH2_ADC_CHNL

+ +
+
+ + + + +
#define I_SENSE_CH2_ADC_CHNL   (1)
+
+
@@ -537,7 +551,7 @@

- +
#define IMD_HS_PWM_Pin   (6)#define IMD_HS_PWM_Pin   (3)
- - -

◆ MUX_1_OUT_Pin

- -
-
- - - - -
#define MUX_1_OUT_Pin   (0)
-
- -
-
- -

◆ MUX_1_OUT_Port

- -
-
- - - - -
#define MUX_1_OUT_Port   (GPIOC)
-
- -
-
- -

◆ MUX_2_OUT_Pin

- -
-
- - - - -
#define MUX_2_OUT_Pin   (1)
-
- -
-
- -

◆ MUX_2_OUT_Port

- -
-
- - - - -
#define MUX_2_OUT_Port   (GPIOC)
-
- -
-
- -

◆ MUX_3_OUT_Pin

- -
-
- - - - -
#define MUX_3_OUT_Pin   (2)
-
- -
-
- -

◆ MUX_3_OUT_Port

- -
-
- - - - -
#define MUX_3_OUT_Port   (GPIOC)
-
- -
-
- -

◆ MUX_4_OUT_Pin

- -
-
- - - - -
#define MUX_4_OUT_Pin   (3)
-
- -
-
- -

◆ MUX_4_OUT_Port

- -
-
- - - - -
#define MUX_4_OUT_Port   (GPIOC)
-
-
@@ -824,261 +726,263 @@

-

◆ SPI_CS_ACEL_GPIO_Port

- -
-
- - - - -
#define SPI_CS_ACEL_GPIO_Port   (GPIOA)
-
- -
-
- -

◆ SPI_CS_ACEL_Pin

+ +

◆ TMU_1_ADC_CHANNEL

- +
#define SPI_CS_ACEL_Pin   (3)#define TMU_1_ADC_CHANNEL   (10)
- -

◆ SPI_CS_GYRO_GPIO_Port

+ +

◆ TMU_1_Pin

- +
#define SPI_CS_GYRO_GPIO_Port   (GPIOA)#define TMU_1_Pin   (0)
- -

◆ SPI_CS_GYRO_Pin

+ +

◆ TMU_1_Port

- +
#define SPI_CS_GYRO_Pin   (2)#define TMU_1_Port   (GPIOC)
- -

◆ SPI_CS_TMU_GPIO_Pin

+ +

◆ TMU_2_ADC_CHANNEL

- +
#define SPI_CS_TMU_GPIO_Pin   (15)#define TMU_2_ADC_CHANNEL   (11)
- -

◆ SPI_CS_TMU_GPIO_Port

+ +

◆ TMU_2_Pin

- +
#define SPI_CS_TMU_GPIO_Port   (GPIOD)#define TMU_2_Pin   (1)
- -

◆ SPI_MISO_GPIO_Port

+ +

◆ TMU_2_Port

- +
#define SPI_MISO_GPIO_Port   (GPIOA)#define TMU_2_Port   (GPIOC)
- -

◆ SPI_MISO_Pin

+ +

◆ TMU_3_ADC_CHANNEL

- +
#define SPI_MISO_Pin   (6)#define TMU_3_ADC_CHANNEL   (12)
- -

◆ SPI_MOSI_GPIO_Port

+ +

◆ TMU_3_Pin

- +
#define SPI_MOSI_GPIO_Port   (GPIOA)#define TMU_3_Pin   (2)
- -

◆ SPI_MOSI_Pin

+ +

◆ TMU_3_Port

- +
#define SPI_MOSI_Pin   (7)#define TMU_3_Port   (GPIOC)
- -

◆ SPI_SCLK_GPIO_Port

+ +

◆ TMU_4_ADC_CHANNEL

- +
#define SPI_SCLK_GPIO_Port   (GPIOA)#define TMU_4_ADC_CHANNEL   (13)
- -

◆ SPI_SCLK_Pin

+ +

◆ TMU_4_Pin

- +
#define SPI_SCLK_Pin   (5)#define TMU_4_Pin   (3)
- -

◆ TMU_1_ADC_CHANNEL

+ +

◆ TMU_4_Port

- +
#define TMU_1_ADC_CHANNEL   (10)#define TMU_4_Port   (GPIOC)
- -

◆ TMU_2_ADC_CHANNEL

+ +

◆ VSENSE_5V_ADC_CHNL

- +
#define TMU_2_ADC_CHANNEL   (11)#define VSENSE_5V_ADC_CHNL   (7)
- -

◆ TMU_3_ADC_CHANNEL

+ +

◆ VSENSE_5V_Pin

- +
#define TMU_3_ADC_CHANNEL   (12)#define VSENSE_5V_Pin   (7)
- -

◆ TMU_4_ADC_CHANNEL

+ +

◆ VSENSE_5V_Port

- +
#define TMU_4_ADC_CHANNEL   (13)#define VSENSE_5V_Port   (GPIOA)
- -

◆ VSENSE_5V_Pin

+

Variable Documentation

+ +

◆ adc_readings

+ + + + + +
- +
#define VSENSE_5V_Pin   (7)volatile ADCReadings_t adc_readings
+
+extern
- -

◆ VSENSE_5V_Port

+ +

◆ bms_daq_override

+ + + + + +
- +
#define VSENSE_5V_Port   (GPIOA)bool bms_daq_override
+
+extern
-

Variable Documentation

- -

◆ adc_readings

+ +

◆ bms_daq_stat

@@ -1087,7 +991,7 @@

- +
volatile ADCReadings_t adc_readingsbool bms_daq_stat
diff --git a/a__box_2main_8h_source.html b/a__box_2main_8h_source.html index fce9d4d9..933d604d 100644 --- a/a__box_2main_8h_source.html +++ b/a__box_2main_8h_source.html @@ -93,110 +93,103 @@
8#define FAULT_NODE_NAME NODE_A_BOX
9
10
-
11// SPI Accel
-
12#define SPI_SCLK_GPIO_Port (GPIOA)
-
13#define SPI_SCLK_Pin (5)
-
14#define SPI_MISO_GPIO_Port (GPIOA)
-
15#define SPI_MISO_Pin (6)
-
16#define SPI_MOSI_GPIO_Port (GPIOA)
-
17#define SPI_MOSI_Pin (7)
-
18#define SPI_CS_ACEL_GPIO_Port (GPIOA)
-
19#define SPI_CS_ACEL_Pin (3)
-
20#define SPI_CS_GYRO_GPIO_Port (GPIOA)
-
21#define SPI_CS_GYRO_Pin (2)
-
22#define SPI_CS_TMU_GPIO_Port (GPIOD)
-
23#define SPI_CS_TMU_GPIO_Pin (15)
-
24
-
25
-
26// Current Sense
-
27#define I_SENSE_CH1_GPIO_Port (GPIOA) // ADC12_IN5
-
28#define I_SENSE_CH1_Pin (0)
-
29#define I_SENSE_CH2_GPIO_Port (GPIOA) // ADC12_IN6
-
30#define I_SENSE_CH2_Pin (1)
-
31
-
32
-
33// BMS Status
-
34#define BMS_STATUS_GPIO_Port (GPIOD)
-
35#define BMS_STATUS_Pin (1)
-
36#define BMS_DISCHARGE_ENABLE_Port (GPIOD)
-
37#define BMS_DISCHARGE_ENABLE_Pin (0)
-
38#define BMS_CHARGE_ENABLE_Port (GPIOD)
-
39#define BMS_CHARGE_ENABLE_Pin (3)
-
40#define BMS_CHARGER_SAFETY_Port (GPIOD)
-
41#define BMS_CHARGER_SAFETY_Pin (2)
-
42
-
43
-
44// IMD Data
-
45#define IMD_HS_PWM_GPIO_Port (GPIOB)
-
46#define IMD_HS_PWM_Pin (6)
-
47#define IMD_LS_PWM_GPIO_Port (GPIOB)
-
48#define IMD_LS_PWM_Pin (7)
-
49#define IMD_STATUS_GPIO_Port (GPIOB)
-
50#define IMD_STATUS_Pin (5)
-
51
-
52
-
53// Status LEDs
-
54#define HEARTBEAT_LED_GPIO_Port (GPIOE)
-
55#define HEARTBEAT_LED_Pin (13)
-
56#define CONN_LED_GPIO_Port (GPIOE)
-
57#define CONN_LED_Pin (14)
-
58#define ERROR_LED_GPIO_Port (GPIOE)
-
59#define ERROR_LED_Pin (15)
-
60
-
61
-
62//TMU Mux Input Pins
-
63#define MUX_A_Port (GPIOC)
-
64#define MUX_A_Pin (9)
-
65#define MUX_B_Port (GPIOC)
-
66#define MUX_B_Pin (8)
-
67#define MUX_C_Port (GPIOC)
-
68#define MUX_C_Pin (7)
-
69#define MUX_D_Port (GPIOC)
-
70#define MUX_D_Pin (6)
-
71
-
72//TMU Mux Output Pins
-
73#define MUX_1_OUT_Port (GPIOC)
-
74#define MUX_1_OUT_Pin (0)
-
75#define MUX_2_OUT_Port (GPIOC)
-
76#define MUX_2_OUT_Pin (1)
-
77#define MUX_3_OUT_Port (GPIOC)
-
78#define MUX_3_OUT_Pin (2)
-
79#define MUX_4_OUT_Port (GPIOC)
-
80#define MUX_4_OUT_Pin (3)
-
81
-
82// Board Temp
-
83#define BOARD_TEMP_Port (GPIOB)
-
84#define BOARD_TEMP_Pin (0)
-
85
-
86// 5V Monitoring
-
87#define VSENSE_5V_Port (GPIOA)
-
88#define VSENSE_5V_Pin (7)
-
89
-
90// ADC Channels
-
91#define TMU_1_ADC_CHANNEL (10)
-
92#define TMU_2_ADC_CHANNEL (11)
-
93#define TMU_3_ADC_CHANNEL (12)
-
94#define TMU_4_ADC_CHANNEL (13)
+
11// Current Sense
+
12#define I_SENSE_CH1_GPIO_Port (GPIOA)
+
13#define I_SENSE_CH1_Pin (0)
+
14#define I_SENSE_CH1_ADC_CHNL (0)
+
15#define I_SENSE_CH2_GPIO_Port (GPIOA)
+
16#define I_SENSE_CH2_Pin (1)
+
17#define I_SENSE_CH2_ADC_CHNL (1)
+
18
+
19
+
20// BMS Status
+
21#define BMS_STATUS_GPIO_Port (GPIOD)
+
22#define BMS_STATUS_Pin (1)
+
23#define BMS_DISCHARGE_ENABLE_Port (GPIOD)
+
24#define BMS_DISCHARGE_ENABLE_Pin (0)
+
25#define BMS_CHARGE_ENABLE_Port (GPIOD)
+
26#define BMS_CHARGE_ENABLE_Pin (3)
+
27#define BMS_CHARGER_SAFETY_Port (GPIOD)
+
28#define BMS_CHARGER_SAFETY_Pin (2)
+
29
+
30
+
31// IMD Data
+
32#define IMD_HS_PWM_GPIO_Port (GPIOB)
+
33#define IMD_HS_PWM_Pin (3)
+
34#define IMD_LS_PWM_GPIO_Port (GPIOA)
+
35#define IMD_LS_PWM_Pin (15)
+
36#define IMD_STATUS_GPIO_Port (GPIOB)
+
37#define IMD_STATUS_Pin (5)
+
38
+
39
+
40// Status LEDs
+
41#define HEARTBEAT_LED_GPIO_Port (GPIOE)
+
42#define HEARTBEAT_LED_Pin (13)
+
43#define CONN_LED_GPIO_Port (GPIOE)
+
44#define CONN_LED_Pin (14)
+
45#define ERROR_LED_GPIO_Port (GPIOE)
+
46#define ERROR_LED_Pin (15)
+
47
+
48
+
49//TMU Mux Input Pins
+
50#define MUX_A_Port (GPIOC)
+
51#define MUX_A_Pin (9)
+
52#define MUX_B_Port (GPIOC)
+
53#define MUX_B_Pin (8)
+
54#define MUX_C_Port (GPIOC)
+
55#define MUX_C_Pin (7)
+
56#define MUX_D_Port (GPIOC)
+
57#define MUX_D_Pin (6)
+
58
+
59//TMU Mux Output Pins
+
60#define TMU_1_Port (GPIOC)
+
61#define TMU_1_Pin (0)
+
62#define TMU_2_Port (GPIOC)
+
63#define TMU_2_Pin (1)
+
64#define TMU_3_Port (GPIOC)
+
65#define TMU_3_Pin (2)
+
66#define TMU_4_Port (GPIOC)
+
67#define TMU_4_Pin (3)
+
68
+
69// Board Temp
+
70#define BOARD_TEMP_Port (GPIOB)
+
71#define BOARD_TEMP_Pin (0)
+
72
+
73// 5V Monitoring
+
74#define VSENSE_5V_Port (GPIOA)
+
75#define VSENSE_5V_Pin (7)
+
76#define VSENSE_5V_ADC_CHNL (7)
+
77
+
78// ADC Channels
+
79#define TMU_1_ADC_CHANNEL (10)
+
80#define TMU_2_ADC_CHANNEL (11)
+
81#define TMU_3_ADC_CHANNEL (12)
+
82#define TMU_4_ADC_CHANNEL (13)
+
83
+
84typedef struct
+
85{
+
86 // Do not modify this struct unless
+
87 // you modify the ADC DMA config
+
88 // in main.c to match
+
89 uint16_t tmu_1;
+
90 uint16_t tmu_2;
+
91 uint16_t tmu_3;
+
92 uint16_t tmu_4;
+
93}__attribute__((packed)) ADCReadings_t;
+
94volatile extern ADCReadings_t adc_readings;
95
-
96typedef struct
-
97{
-
98 // Do not modify this struct unless
-
99 // you modify the ADC DMA config
-
100 // in main.c to match
-
101 uint16_t tmu_1;
-
102 uint16_t tmu_2;
-
103 uint16_t tmu_3;
-
104 uint16_t tmu_4;
-
105}__attribute__((packed)) ADCReadings_t;
-
106volatile extern ADCReadings_t adc_readings;
-
107
-
108#endif
-
volatile ADCReadings_t adc_readings
Definition main.c:117
+
96extern bool bms_daq_override;
+
97extern bool bms_daq_stat;
+
98
+
99#endif
+
volatile ADCReadings_t adc_readings
Definition main.c:120
+
bool bms_daq_override
Definition main.c:91
+
bool bms_daq_stat
Definition main.c:92
struct eeprom __attribute__
Definition can.c:171
-
uint16_t tmu_2
Definition main.h:102
-
uint16_t tmu_1
Definition main.h:101
-
uint16_t tmu_3
Definition main.h:103
-
uint16_t tmu_4
Definition main.h:104
+
uint16_t tmu_2
Definition main.h:90
+
uint16_t tmu_1
Definition main.h:89
+
uint16_t tmu_3
Definition main.h:91
+
uint16_t tmu_4
Definition main.h:92