This commit is contained in:
hathach
2023-01-30 17:04:39 +07:00
parent 6257123157
commit b464f91a6e
11 changed files with 72 additions and 28 deletions

View File

@@ -3,8 +3,13 @@ CFLAGS += -DSTM32H750xx -DCORE_CM7 -DHSE_VALUE=16000000
# Default is FulSpeed port
PORT ?= 0
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h750xx.s
LD_FILE = $(BOARD_PATH)/stm32h750ibkx_flash.ld
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h750xx.s
GCC_LD_FILE = $(BOARD_PATH)/stm32h750ibkx_flash.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32h750xx.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32h750xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32h750ibk6_m7

View File

@@ -3,8 +3,13 @@ CFLAGS += -DSTM32H723xx -DHSE_VALUE=8000000
# Default is FulSpeed port
PORT ?= 0
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h723xx.s
LD_FILE = $(BOARD_PATH)/stm32h723xx_flash.ld
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h723xx.s
GCC_LD_FILE = $(BOARD_PATH)/stm32h723xx_flash.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32h723xx.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32h723xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32h723zg

View File

@@ -4,8 +4,13 @@ CFLAGS += -DSTM32H743xx -DHSE_VALUE=25000000
PORT ?= 1
SPEED ?= high
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s
LD_FILE = $(BOARD_PATH)/stm32h743xx_flash.ld
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s
GCC_LD_FILE = $(BOARD_PATH)/stm32h743xx_flash.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32h743xx.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32h743xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32h743xi

View File

@@ -3,8 +3,13 @@ CFLAGS += -DSTM32H743xx -DHSE_VALUE=8000000
# Default is FulSpeed port
PORT ?= 0
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s
LD_FILE = $(BOARD_PATH)/stm32h743xx_flash.ld
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s
GCC_LD_FILE = $(BOARD_PATH)/stm32h743xx_flash.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32h743xx.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32h743xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32h743zi

View File

@@ -6,8 +6,13 @@ CFLAGS += -DSTM32H745xx -DCORE_CM7 -DHSE_VALUE=25000000
# Default is FulSpeed port
PORT ?= 0
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h745xx.s
LD_FILE = $(ST_CMSIS)/Source/Templates/gcc/linker/stm32h745xx_flash_CM7.ld
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h745xx.s
GCC_LD_FILE = $(ST_CMSIS)/Source/Templates/gcc/linker/stm32h745xx_flash_CM7.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32h745xx.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32h745xx_flash_CM7.icf
# For flash-jlink target
JLINK_DEVICE = stm32h745xi_m7

View File

@@ -212,9 +212,9 @@ static inline void board_stm32h7_post_init(void)
// Reset PHY, change the delays as you see fit
timer_board_delay(&tim2Handle, 5U);
HAL_GPIO_WritePin(ULPI_RST_PORT, ULPI_RST_PIN, 1U);
HAL_GPIO_WritePin(ULPI_RST_PORT, ULPI_RST_PIN, GPIO_PIN_SET);
timer_board_delay(&tim2Handle, 20U);
HAL_GPIO_WritePin(ULPI_RST_PORT, ULPI_RST_PIN, 0U);
HAL_GPIO_WritePin(ULPI_RST_PORT, ULPI_RST_PIN, GPIO_PIN_RESET);
timer_board_delay(&tim2Handle, 20U);
//Disable the timer used for delays

View File

@@ -3,15 +3,20 @@ CFLAGS += -DSTM32H743xx -DHSE_VALUE=8000000
# Default is HS port
PORT ?= 1
SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s
LD_FILE = $(BOARD_PATH)/STM32H743IITX_FLASH.ld
# Use Timer module for ULPI PHY reset
CFLAGS += -DHAL_TIM_MODULE_ENABLED
SRC_C += \
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_tim.c \
$(ST_HAL_DRIVER)/Src/stm32$(ST_FAMILY)xx_hal_tim_ex.c
# GCC
GCC_SRC_S += $(ST_CMSIS)/Source/Templates/gcc/startup_stm32h743xx.s
GCC_LD_FILE = $(BOARD_PATH)/STM32H743IITX_FLASH.ld
# IAR
IAR_SRC_S += $(ST_CMSIS)/Source/Templates/iar/startup_stm32h743xx.s
IAR_LD_FILE = $(ST_CMSIS)/Source/Templates/iar/linker/stm32h743xx_flash.icf
# For flash-jlink target
JLINK_DEVICE = stm32h743ii