diff --git a/projects/lvcontroller/include/bindings.hpp b/projects/lvcontroller/include/bindings.hpp index d4b496e5a..858d7f5f3 100644 --- a/projects/lvcontroller/include/bindings.hpp +++ b/projects/lvcontroller/include/bindings.hpp @@ -38,12 +38,10 @@ extern macfe::periph::DigitalOutput& front_controller_en; extern macfe::periph::DigitalOutput& imu_gps_en; extern macfe::periph::DigitalOutput& shutdown_circuit_en; -// DCDC System & Measurement +// DCDC System & Measurementj extern macfe::periph::DigitalOutput& dcdc_en; -extern macfe::periph::DigitalOutput& dcdc_sense_select; extern macfe::periph::AnalogInput& dcdc_sense; extern macfe::periph::DigitalOutput& vicor_en; -// extern macfe::periph::DigitalOutput& dcdc_sense_select; // Rev 4. extern macfe::periph::AnalogInput& lv_battery; diff --git a/projects/lvcontroller/src/platforms/cli/bindings.cc b/projects/lvcontroller/src/platforms/cli/bindings.cc index ad9eed5f1..afea57015 100644 --- a/projects/lvcontroller/src/platforms/cli/bindings.cc +++ b/projects/lvcontroller/src/platforms/cli/bindings.cc @@ -46,9 +46,8 @@ DigitalOutput front_controller_en{"FRONT_CONTROLLER_EN"}; DigitalOutput imu_gps_en{"IMU_GPS_EN"}; DigitalOutput shutdown_circuit_en{"SHUTDOWN_CIRCUIT_EN"}; -// DCDC System Measurement; +// DCDC System Measurement; DigitalOutput dcdc_en{"DCDC_EN"}; -DigitalOutput dcdc_sense_select{"DCDC_SENSE_SELECT"}; AnalogInput dcdc_sense{"DCDC_SENSE"}; // HSD Sensing @@ -126,7 +125,6 @@ DigitalOutput& shutdown_circuit_en = mcal::shutdown_circuit_en; // DCDC System & Measurement = mcal::Measurement DigitalOutput& dcdc_en = mcal::dcdc_en; -DigitalOutput& dcdc_sense_select = mcal::dcdc_sense_select; AnalogInput& dcdc_sense = mcal::dcdc_sense; DigitalOutput& vicor_en = mcal::vicor_en; diff --git a/projects/lvcontroller/src/platforms/linux/bindings.cc b/projects/lvcontroller/src/platforms/linux/bindings.cc index 4fc1dce32..3a57ff695 100644 --- a/projects/lvcontroller/src/platforms/linux/bindings.cc +++ b/projects/lvcontroller/src/platforms/linux/bindings.cc @@ -35,7 +35,6 @@ DigitalOutput shutdown_circuit_en{"SHUTDOWN_CIRCUIT_EN"}; // DCDC System & Measurement DigitalOutput dcdc_en{"DCDC_EN"}; -DigitalOutput dcdc_sense_select{"DCDC_SENSE_SELECT"}; AnalogInput dcdc_sense{"DCDC_SENSE"}; // Other IO @@ -76,7 +75,6 @@ macfe::periph::DigitalOutput& shutdown_circuit_en = mcal::shutdown_circuit_en; // DCDC System & Measurement macfe::periph::DigitalOutput& dcdc_en = mcal::dcdc_en; -macfe::periph::DigitalOutput& dcdc_sense_select = mcal::dcdc_sense_select; macfe::periph::AnalogInput& dcdc_sense = mcal::dcdc_sense; // Other IO diff --git a/projects/lvcontroller/src/platforms/sil/bindings.cc b/projects/lvcontroller/src/platforms/sil/bindings.cc index bcc11b194..1cd84953f 100644 --- a/projects/lvcontroller/src/platforms/sil/bindings.cc +++ b/projects/lvcontroller/src/platforms/sil/bindings.cc @@ -52,7 +52,6 @@ DigitalOutput shutdown_circuit_en{&outputs.shutdown_circuit_en}; // DCDC System Measurement; DigitalOutput dcdc_en{&outputs.dcdc_en}; -DigitalOutput dcdc_sense_select{&outputs.dcdc_sense_select}; AnalogInput dcdc_sense{&inputs.dcdc_sense}; DigitalOutput vicor_en{&outputs.vicor_en}; AnalogInput lv_battery{&inputs.lv_battery}; @@ -189,7 +188,6 @@ DigitalOutput& shutdown_circuit_en = mcal::shutdown_circuit_en; // DCDC System DigitalOutput& dcdc_en = mcal::dcdc_en; -DigitalOutput& dcdc_sense_select = mcal::dcdc_sense_select; AnalogInput& dcdc_sense = mcal::dcdc_sense; DigitalOutput& vicor_en = mcal::vicor_en; AnalogInput& lv_battery = mcal::lv_battery; diff --git a/projects/lvcontroller/src/platforms/sil/proto/lvcontroller.proto b/projects/lvcontroller/src/platforms/sil/proto/lvcontroller.proto index b593576a8..bd56ee2c5 100644 --- a/projects/lvcontroller/src/platforms/sil/proto/lvcontroller.proto +++ b/projects/lvcontroller/src/platforms/sil/proto/lvcontroller.proto @@ -34,7 +34,6 @@ message Output { // DCDC System & measurement bool dcdc_en = 16; - bool dcdc_sense_select = 17; bool vicor_en = 32; // HSD sensing diff --git a/projects/lvcontroller/src/platforms/stm32-ev6/Inc/main.h b/projects/lvcontroller/src/platforms/stm32-ev6/Inc/main.h index 9eeb3031c..d72252157 100644 --- a/projects/lvcontroller/src/platforms/stm32-ev6/Inc/main.h +++ b/projects/lvcontroller/src/platforms/stm32-ev6/Inc/main.h @@ -143,8 +143,6 @@ void Error_Handler(void); #define VICOR_EN_GPIO_Port GPIOG #define MOTOR_CONTROLLER_SWITCH_EN_Pin GPIO_PIN_12 #define MOTOR_CONTROLLER_SWITCH_EN_GPIO_Port GPIOG -#define DCDC_SNS_SEL_Pin GPIO_PIN_14 -#define DCDC_SNS_SEL_GPIO_Port GPIOG /* USER CODE BEGIN Private defines */ diff --git a/projects/lvcontroller/src/platforms/stm32-ev6/Src/gpio.c b/projects/lvcontroller/src/platforms/stm32-ev6/Src/gpio.c index 26077d9c5..1da798203 100644 --- a/projects/lvcontroller/src/platforms/stm32-ev6/Src/gpio.c +++ b/projects/lvcontroller/src/platforms/stm32-ev6/Src/gpio.c @@ -76,7 +76,7 @@ void MX_GPIO_Init(void) { MOTOR_CONTROLLER_EN_Pin | POWERTRAIN_FAN2_EN_Pin | TSSI_EN_Pin | SHUTDOWN_CIRCUIT_EN_Pin | MOTOR_CONTROLLER_PRECHARGE_EN_Pin | ACCUMULATOR_EN_Pin | BRAKE_LIGHT_EN_Pin | VICOR_EN_Pin | - MOTOR_CONTROLLER_SWITCH_EN_Pin | DCDC_SNS_SEL_Pin, + MOTOR_CONTROLLER_SWITCH_EN_Pin, GPIO_PIN_RESET); /*Configure GPIO pin Output Level */ @@ -116,13 +116,13 @@ void MX_GPIO_Init(void) { FRONT_CONTROLLER_EN_Pin MOTOR_CONTROLLER_EN_Pin POWERTRAIN_FAN2_EN_Pin TSSI_EN_Pin SHUTDOWN_CIRCUIT_EN_Pin MOTOR_CONTROLLER_PRECHARGE_EN_Pin ACCUMULATOR_EN_Pin BRAKE_LIGHT_EN_Pin VICOR_EN_Pin - MOTOR_CONTROLLER_SWITCH_EN_Pin DCDC_SNS_SEL_Pin */ + MOTOR_CONTROLLER_SWITCH_EN_Pin */ GPIO_InitStruct.Pin = POWERTRAIN_FAN1_EN_Pin | IMU_GPS_EN_Pin | FRONT_CONTROLLER_EN_Pin | MOTOR_CONTROLLER_EN_Pin | POWERTRAIN_FAN2_EN_Pin | TSSI_EN_Pin | SHUTDOWN_CIRCUIT_EN_Pin | MOTOR_CONTROLLER_PRECHARGE_EN_Pin | ACCUMULATOR_EN_Pin | BRAKE_LIGHT_EN_Pin | VICOR_EN_Pin | - MOTOR_CONTROLLER_SWITCH_EN_Pin | DCDC_SNS_SEL_Pin; + MOTOR_CONTROLLER_SWITCH_EN_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; diff --git a/projects/lvcontroller/src/platforms/stm32-ev6/bindings.cc b/projects/lvcontroller/src/platforms/stm32-ev6/bindings.cc index b0d9cb801..3adb5d8bc 100644 --- a/projects/lvcontroller/src/platforms/stm32-ev6/bindings.cc +++ b/projects/lvcontroller/src/platforms/stm32-ev6/bindings.cc @@ -76,7 +76,6 @@ DigitalOutput shutdown_circuit_en{SHUTDOWN_CIRCUIT_EN_GPIO_Port, // DCDC System Measurement DigitalOutput vicor_en{VICOR_EN_GPIO_Port, VICOR_EN_Pin}; -DigitalOutput dcdc_sense_select{DCDC_SNS_SEL_GPIO_Port, DCDC_SNS_SEL_Pin}; // Analog Sensing (Rev 4) AnalogInput lv_battery{&hadc3, ADC_CHANNEL_15}; AnalogInput bus_voltage{&hadc3, ADC_CHANNEL_14}; @@ -153,7 +152,6 @@ DigitalOutput& imu_gps_en = mcal::imu_gps_en; DigitalOutput& shutdown_circuit_en = mcal::shutdown_circuit_en; DigitalOutput& dcdc_en = mcal::vicor_en; -DigitalOutput& dcdc_sense_select = mcal::dcdc_sense_select; AnalogInput& dcdc_sense = mcal::bus_current; DigitalOutput& vicor_en = mcal::vicor_en; // Analog Sensing Rev 4 diff --git a/projects/lvcontroller/src/platforms/stm32-ev6/lvcontroller.ioc b/projects/lvcontroller/src/platforms/stm32-ev6/lvcontroller.ioc index 5616cbece..d4f750028 100644 --- a/projects/lvcontroller/src/platforms/stm32-ev6/lvcontroller.ioc +++ b/projects/lvcontroller/src/platforms/stm32-ev6/lvcontroller.ioc @@ -81,18 +81,17 @@ Mcu.Pin43=PG9 Mcu.Pin44=PG10 Mcu.Pin45=PG11 Mcu.Pin46=PG12 -Mcu.Pin47=PG14 -Mcu.Pin48=PB3 -Mcu.Pin49=PB4 +Mcu.Pin47=PB3 +Mcu.Pin48=PB4 +Mcu.Pin49=PB5 Mcu.Pin5=PF4 -Mcu.Pin50=PB5 -Mcu.Pin51=VP_SYS_VS_Systick -Mcu.Pin52=VP_TIM2_VS_ClockSourceINT +Mcu.Pin50=VP_SYS_VS_Systick +Mcu.Pin51=VP_TIM2_VS_ClockSourceINT Mcu.Pin6=PF5 Mcu.Pin7=PF7 Mcu.Pin8=PF8 Mcu.Pin9=PF9 -Mcu.PinsNb=53 +Mcu.PinsNb=52 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F767ZITx @@ -288,10 +287,6 @@ PG12.GPIOParameters=GPIO_Label PG12.GPIO_Label=MOTOR_CONTROLLER_SWITCH_EN PG12.Locked=true PG12.Signal=GPIO_Output -PG14.GPIOParameters=GPIO_Label -PG14.GPIO_Label=DCDC_SNS_SEL -PG14.Locked=true -PG14.Signal=GPIO_Output PG2.GPIOParameters=GPIO_Label PG2.GPIO_Label=FRONT_CONTROLLER_EN PG2.Locked=true