correct AMS_NERROR logic
This commit is contained in:
parent
6fe46bc756
commit
2680da3c4f
@ -454,12 +454,14 @@ static void MX_GPIO_Init(void)
|
||||
|NEG_AIR_CTRL_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOB, SLAVE_POWER_1_Pin|SLAVE_POWER_DSEL_Pin|SLAVE_POWER_DEN_Pin|SLAVE_POWER_0_Pin
|
||||
|AMS_NERROR_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOB, SLAVE_POWER_1_Pin|SLAVE_POWER_DSEL_Pin|SLAVE_POWER_DEN_Pin|SLAVE_POWER_0_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(PRECHARGE_CTRL_GPIO_Port, PRECHARGE_CTRL_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(AMS_NERROR_GPIO_Port, AMS_NERROR_Pin, GPIO_PIN_SET);
|
||||
|
||||
/*Configure GPIO pins : STATUS_LED_R_Pin STATUS_LED_G_Pin STATUS_LED_B_Pin POS_AIR_CTRL_Pin
|
||||
NEG_AIR_CTRL_Pin */
|
||||
GPIO_InitStruct.Pin = STATUS_LED_R_Pin|STATUS_LED_G_Pin|STATUS_LED_B_Pin|POS_AIR_CTRL_Pin
|
||||
|
@ -116,12 +116,12 @@ TSState ts_sm_update_error() {
|
||||
no_error_since = now;
|
||||
} else if (now - no_error_since > NO_ERROR_TIME) {
|
||||
no_error_since = 0;
|
||||
HAL_GPIO_WritePin(AMS_NERROR_GPIO_Port, AMS_NERROR_Pin, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(AMS_NERROR_GPIO_Port, AMS_NERROR_Pin, GPIO_PIN_RESET);
|
||||
return TS_INACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
HAL_GPIO_WritePin(AMS_NERROR_GPIO_Port, AMS_NERROR_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(AMS_NERROR_GPIO_Port, AMS_NERROR_Pin, GPIO_PIN_SET);
|
||||
return TS_ERROR;
|
||||
}
|
||||
|
||||
|
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
||||
##########################################################################################################################
|
||||
# File automatically-generated by tool: [projectgenerator] version: [4.2.0-B44] date: [Thu May 02 19:45:04 CEST 2024]
|
||||
# File automatically-generated by tool: [projectgenerator] version: [4.2.0-B44] date: [Mon May 06 18:18:37 CEST 2024]
|
||||
##########################################################################################################################
|
||||
|
||||
# ------------------------------------------------
|
||||
|
@ -147,9 +147,11 @@ PB6.Mode=I2C
|
||||
PB6.Signal=I2C1_SCL
|
||||
PB7.Mode=I2C
|
||||
PB7.Signal=I2C1_SDA
|
||||
PB8.GPIOParameters=GPIO_Label
|
||||
PB8.GPIOParameters=PinState,GPIO_PuPd,GPIO_Label
|
||||
PB8.GPIO_Label=AMS_NERROR
|
||||
PB8.GPIO_PuPd=GPIO_NOPULL
|
||||
PB8.Locked=true
|
||||
PB8.PinState=GPIO_PIN_SET
|
||||
PB8.Signal=GPIO_Output
|
||||
PC0.GPIOParameters=GPIO_Label
|
||||
PC0.GPIO_Label=STATUS_LED_R
|
||||
|
Loading…
x
Reference in New Issue
Block a user