Browse Source

【遗留问题】老版本bootloader的HAL库与新版本不匹配上电IO有波动暂时改回不使用。OUT0~5改为默认高电平

main
Lizongdi 1 week ago
parent
commit
7f65d773c3
  1. 12
      Core/Src/gpio.c
  2. 2
      Core/Src/system_stm32h7xx.c
  3. 2
      STM32H743XG_FLASH.ld
  4. 18
      robot_old.ioc

12
Core/Src/gpio.c

@ -52,12 +52,16 @@ void MX_GPIO_Init(void)
__HAL_RCC_GPIOD_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOC, S0_RESET_Pin|OUT_0_Pin|OUT_1_Pin|RS485_3_DIR_Pin
|RS485_4_DIR_Pin|E22_RST_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOC, S0_RESET_Pin|RS485_3_DIR_Pin|RS485_4_DIR_Pin|E22_RST_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, OUT_2_Pin|OUT_3_Pin|OUT_4_Pin|OUT_5_Pin
|ETH_RST_Pin, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOC, OUT_0_Pin|OUT_1_Pin, GPIO_PIN_SET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOA, OUT_2_Pin|OUT_3_Pin|OUT_4_Pin|OUT_5_Pin, GPIO_PIN_SET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(ETH_RST_GPIO_Port, ETH_RST_Pin, GPIO_PIN_RESET);
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(GPIOE, EEPROM_WP_Pin|EEPROM_SCL_Pin|E22_M0_Pin, GPIO_PIN_RESET);

2
Core/Src/system_stm32h7xx.c

@ -90,7 +90,7 @@
/*!< Uncomment the following line if you need to relocate the vector table
anywhere in FLASH BANK1 or AXI SRAM, else the vector table is kept at the automatic
remap of boot address selected */
#define USER_VECT_TAB_ADDRESS
//#define USER_VECT_TAB_ADDRESS
#if defined(USER_VECT_TAB_ADDRESS)
#if defined(DUAL_CORE) && defined(CORE_CM4)

2
STM32H743XG_FLASH.ld

@ -60,7 +60,7 @@ RAM (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K
FLASH2 (rx) : ORIGIN = 0x8100000, LENGTH = 512K
}

18
robot_old.ioc

@ -396,10 +396,11 @@ NVIC.USART2_IRQn=true\:4\:0\:true\:false\:true\:true\:true\:true
NVIC.USART3_IRQn=true\:4\:0\:true\:false\:true\:true\:true\:true
NVIC.USART6_IRQn=true\:4\:0\:true\:false\:true\:true\:true\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
PA0.GPIOParameters=GPIO_Label,PinAttribute
PA0.GPIOParameters=PinState,GPIO_Label,PinAttribute
PA0.GPIO_Label=OUT_2
PA0.Locked=true
PA0.PinAttribute=Free
PA0.PinState=GPIO_PIN_SET
PA0.Signal=GPIO_Output
PA1.GPIOParameters=GPIO_Speed,PinAttribute
PA1.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
@ -439,20 +440,23 @@ PA2.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
PA2.Mode=RMII
PA2.PinAttribute=Free
PA2.Signal=ETH_MDIO
PA3.GPIOParameters=GPIO_Label,PinAttribute
PA3.GPIOParameters=PinState,GPIO_Label,PinAttribute
PA3.GPIO_Label=OUT_3
PA3.Locked=true
PA3.PinAttribute=Free
PA3.PinState=GPIO_PIN_SET
PA3.Signal=GPIO_Output
PA4.GPIOParameters=GPIO_Label,PinAttribute
PA4.GPIOParameters=PinState,GPIO_Label,PinAttribute
PA4.GPIO_Label=OUT_4
PA4.Locked=true
PA4.PinAttribute=Free
PA4.PinState=GPIO_PIN_SET
PA4.Signal=GPIO_Output
PA5.GPIOParameters=GPIO_Label,PinAttribute
PA5.GPIOParameters=PinState,GPIO_Label,PinAttribute
PA5.GPIO_Label=OUT_5
PA5.Locked=true
PA5.PinAttribute=Free
PA5.PinState=GPIO_PIN_SET
PA5.Signal=GPIO_Output
PA6.GPIOParameters=GPIO_Label,PinAttribute
PA6.GPIO_Label=ETH_RST
@ -558,15 +562,17 @@ PC13.GPIOParameters=GPIO_Label
PC13.GPIO_Label=IN_5
PC13.Locked=true
PC13.Signal=GPIO_Input
PC2_C.GPIOParameters=GPIO_Label,PinAttribute
PC2_C.GPIOParameters=PinState,GPIO_Label,PinAttribute
PC2_C.GPIO_Label=OUT_0
PC2_C.Locked=true
PC2_C.PinAttribute=Free
PC2_C.PinState=GPIO_PIN_SET
PC2_C.Signal=GPIO_Output
PC3_C.GPIOParameters=GPIO_Label,PinAttribute
PC3_C.GPIOParameters=PinState,GPIO_Label,PinAttribute
PC3_C.GPIO_Label=OUT_1
PC3_C.Locked=true
PC3_C.PinAttribute=Free
PC3_C.PinState=GPIO_PIN_SET
PC3_C.Signal=GPIO_Output
PC4.GPIOParameters=GPIO_Speed,PinAttribute
PC4.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH

Loading…
Cancel
Save