added piggyback PCB for ACU-DCDC, calibrated VSense
This commit is contained in:
@ -44,7 +44,7 @@ void ChannelControl_UpdateGPIOs(enable_gpios UpdatePorts){
|
||||
}
|
||||
}
|
||||
if ((prev_epsc_state == 1 && UpdatePorts.porta.epsc == 0) || (prev_epsc_state == UpdatePorts.porta.epsc)){
|
||||
HAL_GPIO_WritePin(PC_EN_GPIO_Port, PC_EN_Pin, 0); // ensure precharge is disabled, when not needed or stopped
|
||||
HAL_GPIO_WritePin(PC_EN_GPIO_Port, PC_EN_Pin, 0); // ensure precharge is disabled, when not needed or stopped before completion
|
||||
HAL_GPIO_WritePin(IN5_GPIO_Port, IN5_Pin, (GPIO_PinState)UpdatePorts.porta.epsc);
|
||||
prev_epsc_state = UpdatePorts.porta.epsc;
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ extern volatile uint8_t canmsg_received;
|
||||
|
||||
volatile enable_gpios update_ports;
|
||||
uint32_t lastheartbeat;
|
||||
int inhibit_SDC; // wenn =1 ist es unmoeglich den SDC zu schliessen
|
||||
int inhibit_SDC; // prevents closing of SDC when =1
|
||||
/* USER CODE END 0 */
|
||||
|
||||
/**
|
||||
@ -120,6 +120,10 @@ int main(void)
|
||||
MX_TIM6_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
||||
ChannelControl_init();
|
||||
can_init(&hcan);
|
||||
current_monitor_init(&hadc1, &hadc2, &htim6);
|
||||
|
||||
// begin start-up animation
|
||||
HAL_GPIO_WritePin(LED1_GPIO_Port, LED1_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(100);
|
||||
@ -146,13 +150,9 @@ int main(void)
|
||||
|
||||
HAL_GPIO_WritePin(LED4_GPIO_Port, LED4_Pin, GPIO_PIN_SET); // indicates running STM
|
||||
|
||||
ChannelControl_init();
|
||||
can_init(&hcan);
|
||||
current_monitor_init(&hadc1, &hadc2, &htim6);
|
||||
uint32_t lasttick = HAL_GetTick(); // time in ms since start
|
||||
|
||||
uint32_t lasttick = HAL_GetTick(); // Zeit in ms seit Start
|
||||
|
||||
inhibit_SDC = 0;
|
||||
inhibit_SDC = 0; // allow SDC to be closed
|
||||
|
||||
/* USER CODE END 2 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user