diff --git a/bsp/stm32/stm32f767-st-nucleo/README.md b/bsp/stm32/stm32f767-st-nucleo/README.md index b5c74c87f6259b5487c9eea6a826caca2d1f0dac..45ccf66f70dabb901fb44437c79bca12d6917082 100644 --- a/bsp/stm32/stm32f767-st-nucleo/README.md +++ b/bsp/stm32/stm32f767-st-nucleo/README.md @@ -38,7 +38,7 @@ NUCLEO-F767ZI 是st推出的一款基于 ARM Cortex-M7 内核的开发板,最 | **板载外设** | **支持情况** | **备注** | | :-----------------| :----------: | :-------------------------------------| | USB 转串口3 | 支持 | | -| 以太网 | 暂不支持 | 即将支持 | +| 以太网 | 支持 | PHY 选项 LAN8720A(兼容 LAN8742A) | | **片上外设** | **支持情况** | **备注** | | GPIO | 支持 | PA0, PA1... PK15 ---> PIN: 0, 1...144 | | UART | 支持 | UART3 | diff --git a/bsp/stm32/stm32f767-st-nucleo/board/Kconfig b/bsp/stm32/stm32f767-st-nucleo/board/Kconfig index 0e62854a4420a0928da28a426bae157f1e7c65f4..920138393f15c0da23e6b53625062d00e2d90177 100644 --- a/bsp/stm32/stm32f767-st-nucleo/board/Kconfig +++ b/bsp/stm32/stm32f767-st-nucleo/board/Kconfig @@ -7,11 +7,29 @@ config SOC_STM32F767ZI menu "Onboard Peripheral Drivers" - config BSP_USING_USB_TO_USART + config BSP_USING_USB_TO_USART bool "Enable USB TO USART (uart3)" select BSP_USING_UART3 default y + config BSP_USING_ETH + bool "Enable Ethernet" + select RT_USING_LWIP + default n + + if BSP_USING_ETH + choice + prompt "On-board PHY chip" + default PHY_USING_LAN8720A + + config PHY_USING_LAN8720A + bool "LAN8720A" + + config PHY_USING_DM9161CEP + bool "DM9161CEP" + + endchoice + endif endmenu diff --git a/bsp/stm32/stm32f767-st-nucleo/board/SConscript b/bsp/stm32/stm32f767-st-nucleo/board/SConscript index 12ea0a24ccf83896f6ace1a8027c57be6250bc59..a49a0955b1ae27509bece9acc66e61ea461a8a5c 100644 --- a/bsp/stm32/stm32f767-st-nucleo/board/SConscript +++ b/bsp/stm32/stm32f767-st-nucleo/board/SConscript @@ -7,8 +7,12 @@ cwd = GetCurrentDir() src = Glob('board.c') src += Glob('CubeMX_Config/Src/stm32f7xx_hal_msp.c') +if GetDepend(['BSP_USING_ETH']): + src += Glob('ports/phy_reset.c') + path = [cwd] path += [cwd + '/CubeMX_Config/Inc'] +path += [cwd + '/ports'] if rtconfig.CROSS_TOOL == 'gcc': src += [cwd + '/../../libraries/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f767xx.s'] diff --git a/bsp/stm32/stm32f767-st-nucleo/board/ports/phy_reset.c b/bsp/stm32/stm32f767-st-nucleo/board/ports/phy_reset.c new file mode 100644 index 0000000000000000000000000000000000000000..012d5a81ebc59a6435a70e91f8dc2bbcdf814690 --- /dev/null +++ b/bsp/stm32/stm32f767-st-nucleo/board/ports/phy_reset.c @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2006-2019, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2019-06-27 luhuadong first version + */ + +#include + +void phy_reset(void) +{ + /* + * The PHY reset pin of NUCLEO-F767ZI is connected to the MCU reset pin, + * so no additional reset is required. + */ + + return ; +}