AMS_ERROR pin is actually inverted
This commit is contained in:
parent
1e87137cc4
commit
0b2010797e
|
@ -97,8 +97,8 @@ void Error_Handler(void);
|
||||||
#define STATUS3_GPIO_Port GPIOB
|
#define STATUS3_GPIO_Port GPIOB
|
||||||
#define STATUS4_Pin GPIO_PIN_7
|
#define STATUS4_Pin GPIO_PIN_7
|
||||||
#define STATUS4_GPIO_Port GPIOB
|
#define STATUS4_GPIO_Port GPIOB
|
||||||
#define AMS_ERROR_Pin GPIO_PIN_8
|
#define AMS_NERROR_Pin GPIO_PIN_8
|
||||||
#define AMS_ERROR_GPIO_Port GPIOB
|
#define AMS_NERROR_GPIO_Port GPIOB
|
||||||
|
|
||||||
/* USER CODE BEGIN Private defines */
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ int main(void) {
|
||||||
shunt_init();
|
shunt_init();
|
||||||
ts_sm_init();
|
ts_sm_init();
|
||||||
soc_init();
|
soc_init();
|
||||||
|
HAL_GPIO_WritePin(AMS_NERROR_GPIO_Port, AMS_NERROR_Pin, GPIO_PIN_SET);
|
||||||
/* USER CODE END 2 */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
|
@ -315,7 +316,8 @@ static void MX_GPIO_Init(void) {
|
||||||
SLAVE_POWER_1_Pin | SLAVE_POWER_DSEL_Pin |
|
SLAVE_POWER_1_Pin | SLAVE_POWER_DSEL_Pin |
|
||||||
SLAVE_POWER_DEN_Pin | SLAVE_POWER_0_Pin |
|
SLAVE_POWER_DEN_Pin | SLAVE_POWER_0_Pin |
|
||||||
POS_AIR_CTRL_Pin | NEG_AIR_CTRL_Pin | STATUS1_Pin |
|
POS_AIR_CTRL_Pin | NEG_AIR_CTRL_Pin | STATUS1_Pin |
|
||||||
STATUS2_Pin | STATUS3_Pin | STATUS4_Pin | AMS_ERROR_Pin,
|
STATUS2_Pin | STATUS3_Pin | STATUS4_Pin |
|
||||||
|
AMS_NERROR_Pin,
|
||||||
GPIO_PIN_RESET);
|
GPIO_PIN_RESET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
|
@ -340,11 +342,11 @@ static void MX_GPIO_Init(void) {
|
||||||
|
|
||||||
/*Configure GPIO pins : SLAVE_POWER_1_Pin SLAVE_POWER_DSEL_Pin
|
/*Configure GPIO pins : SLAVE_POWER_1_Pin SLAVE_POWER_DSEL_Pin
|
||||||
SLAVE_POWER_DEN_Pin SLAVE_POWER_0_Pin POS_AIR_CTRL_Pin NEG_AIR_CTRL_Pin
|
SLAVE_POWER_DEN_Pin SLAVE_POWER_0_Pin POS_AIR_CTRL_Pin NEG_AIR_CTRL_Pin
|
||||||
STATUS1_Pin STATUS2_Pin STATUS3_Pin STATUS4_Pin AMS_ERROR_Pin */
|
STATUS1_Pin STATUS2_Pin STATUS3_Pin STATUS4_Pin AMS_NERROR_Pin */
|
||||||
GPIO_InitStruct.Pin = SLAVE_POWER_1_Pin | SLAVE_POWER_DSEL_Pin |
|
GPIO_InitStruct.Pin =
|
||||||
SLAVE_POWER_DEN_Pin | SLAVE_POWER_0_Pin |
|
SLAVE_POWER_1_Pin | SLAVE_POWER_DSEL_Pin | SLAVE_POWER_DEN_Pin |
|
||||||
POS_AIR_CTRL_Pin | NEG_AIR_CTRL_Pin | STATUS1_Pin |
|
SLAVE_POWER_0_Pin | POS_AIR_CTRL_Pin | NEG_AIR_CTRL_Pin | STATUS1_Pin |
|
||||||
STATUS2_Pin | STATUS3_Pin | STATUS4_Pin | AMS_ERROR_Pin;
|
STATUS2_Pin | STATUS3_Pin | STATUS4_Pin | AMS_NERROR_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
# File automatically-generated by tool: [projectgenerator] version: [3.19.2] date: [Sun Mar 12 19:36:18 CET 2023]
|
# File automatically-generated by tool: [projectgenerator] version: [3.19.2] date: [Sun Apr 02 01:03:50 CEST 2023]
|
||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
|
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
|
|
@ -199,8 +199,14 @@ vpath %.cpp $(sort $(dir $(CPP_SOURCES)))
|
||||||
# list of C objects
|
# list of C objects
|
||||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
|
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(C_SOURCES:.c=.o)))
|
||||||
vpath %.c $(sort $(dir $(C_SOURCES)))
|
vpath %.c $(sort $(dir $(C_SOURCES)))
|
||||||
|
|
||||||
# list of ASM program objects
|
# list of ASM program objects
|
||||||
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(ASM_SOURCES:.s=.o)))
|
# list of ASM program objects
|
||||||
|
UPPER_CASE_ASM_SOURCES = $(filter %.S,$(ASM_SOURCES))
|
||||||
|
LOWER_CASE_ASM_SOURCES = $(filter %.s,$(ASM_SOURCES))
|
||||||
|
|
||||||
|
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(UPPER_CASE_ASM_SOURCES:.S=.o)))
|
||||||
|
OBJECTS += $(addprefix $(BUILD_DIR)/,$(notdir $(LOWER_CASE_ASM_SOURCES:.s=.o)))
|
||||||
vpath %.s $(sort $(dir $(ASM_SOURCES)))
|
vpath %.s $(sort $(dir $(ASM_SOURCES)))
|
||||||
|
|
||||||
$(BUILD_DIR)/%.o: %.cpp STM32Make.make | $(BUILD_DIR)
|
$(BUILD_DIR)/%.o: %.cpp STM32Make.make | $(BUILD_DIR)
|
||||||
|
@ -215,6 +221,9 @@ $(BUILD_DIR)/%.o: %.c STM32Make.make | $(BUILD_DIR)
|
||||||
$(BUILD_DIR)/%.o: %.s STM32Make.make | $(BUILD_DIR)
|
$(BUILD_DIR)/%.o: %.s STM32Make.make | $(BUILD_DIR)
|
||||||
$(AS) -c $(CFLAGS) $< -o $@
|
$(AS) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
|
$(BUILD_DIR)/%.o: %.S STM32Make.make | $(BUILD_DIR)
|
||||||
|
$(AS) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) STM32Make.make
|
$(BUILD_DIR)/$(TARGET).elf: $(OBJECTS) STM32Make.make
|
||||||
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
|
$(CC) $(OBJECTS) $(LDFLAGS) -o $@
|
||||||
$(SZ) $@
|
$(SZ) $@
|
||||||
|
|
|
@ -185,7 +185,7 @@ PB7.GPIO_Label=STATUS4
|
||||||
PB7.Locked=true
|
PB7.Locked=true
|
||||||
PB7.Signal=GPIO_Output
|
PB7.Signal=GPIO_Output
|
||||||
PB8.GPIOParameters=GPIO_Label
|
PB8.GPIOParameters=GPIO_Label
|
||||||
PB8.GPIO_Label=AMS_ERROR
|
PB8.GPIO_Label=AMS_NERROR
|
||||||
PB8.Locked=true
|
PB8.Locked=true
|
||||||
PB8.Signal=GPIO_Output
|
PB8.Signal=GPIO_Output
|
||||||
PF0-OSC_IN.Mode=HSE-External-Oscillator
|
PF0-OSC_IN.Mode=HSE-External-Oscillator
|
||||||
|
|
Loading…
Reference in New Issue