Merge pull request #12804 from wosym/nucleo-f207zg_ethernet

boards/nucleo-f207zg: add ethernet configuration
This commit is contained in:
Alexandre Abadie 2019-11-26 12:44:19 +01:00 committed by GitHub
commit 743d7170e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 2 deletions

View File

@ -1 +1,5 @@
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
USEMODULE += stm32_eth
endif
include $(RIOTBOARD)/common/nucleo/Makefile.dep include $(RIOTBOARD)/common/nucleo/Makefile.dep

View File

@ -3,6 +3,7 @@ CPU_MODEL = stm32f207zg
# Put defined MCU peripherals here (in alphabetical order) # Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_dma FEATURES_PROVIDED += periph_dma
FEATURES_PROVIDED += periph_eth
FEATURES_PROVIDED += periph_i2c FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc FEATURES_PROVIDED += periph_rtc

View File

@ -41,6 +41,7 @@ static const dma_conf_t dma_config[] = {
{ .stream = 4 }, /* DMA1 Stream 4 - SPI2_TX */ { .stream = 4 }, /* DMA1 Stream 4 - SPI2_TX */
{ .stream = 14 }, /* DMA2 Stream 6 - USART6_TX */ { .stream = 14 }, /* DMA2 Stream 6 - USART6_TX */
{ .stream = 6 }, /* DMA1 Stream 6 - USART2_TX */ { .stream = 6 }, /* DMA1 Stream 6 - USART2_TX */
{ .stream = 8 }, /* DMA2 Stream 0 - ETH_TX */
}; };
#define DMA_0_ISR isr_dma2_stream2 #define DMA_0_ISR isr_dma2_stream2
@ -49,6 +50,7 @@ static const dma_conf_t dma_config[] = {
#define DMA_3_ISR isr_dma1_stream4 #define DMA_3_ISR isr_dma1_stream4
#define DMA_4_ISR isr_dma2_stream6 #define DMA_4_ISR isr_dma2_stream6
#define DMA_5_ISR isr_dma1_stream6 #define DMA_5_ISR isr_dma1_stream6
#define DMA_6_ISR isr_dma2_stream0
#define DMA_NUMOF ARRAY_SIZE(dma_config) #define DMA_NUMOF ARRAY_SIZE(dma_config)
#endif #endif
@ -249,6 +251,40 @@ static const spi_conf_t spi_config[] = {
#define ADC_NUMOF (2) #define ADC_NUMOF (2)
/** @} */ /** @} */
/**
* @name ETH configuration
* @{
*/
static const eth_conf_t eth_config = {
.mode = RMII,
.mac = { 0 },
.speed = ETH_SPEED_100TX_FD,
.dma = 6,
.dma_chan = 8,
.phy_addr = 0x01,
.pins = {
GPIO_PIN(PORT_G, 13),
GPIO_PIN(PORT_B, 13),
GPIO_PIN(PORT_G, 11),
GPIO_PIN(PORT_C, 4),
GPIO_PIN(PORT_C, 5),
GPIO_PIN(PORT_A, 7),
GPIO_PIN(PORT_C, 1),
GPIO_PIN(PORT_A, 2),
GPIO_PIN(PORT_A, 1),
}
};
#define ETH_RX_BUFFER_COUNT (4)
#define ETH_TX_BUFFER_COUNT (4)
#define ETH_RX_BUFFER_SIZE (1524)
#define ETH_TX_BUFFER_SIZE (1524)
#define ETH_DMA_ISR isr_dma2_stream0
/** @} */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -37,8 +37,8 @@ USEMODULE += saul_default
BOARD_PROVIDES_NETIF := acd52832 airfy-beacon atmega256rfr2-xpro avr-rss2 b-l072z-lrwan1 cc2538dk fox \ BOARD_PROVIDES_NETIF := acd52832 airfy-beacon atmega256rfr2-xpro avr-rss2 b-l072z-lrwan1 cc2538dk fox \
hamilton iotlab-m3 iotlab-a8-m3 lobaro-lorabox lsn50 mulle microbit msba2 \ hamilton iotlab-m3 iotlab-a8-m3 lobaro-lorabox lsn50 mulle microbit msba2 \
microduino-corerf native nrf51dk nrf51dongle nrf52dk nrf52840dk nrf52840-mdk nrf6310 \ microduino-corerf native nrf51dk nrf51dongle nrf52dk nrf52840dk nrf52840-mdk nrf6310 \
nucleo-f767zi openmote-b openmote-cc2538 pba-d-01-kw2x remote-pa remote-reva \ nucleo-f207zg nucleo-f767zi openmote-b openmote-cc2538 pba-d-01-kw2x remote-pa \
ruuvitag samr21-xpro samr30-xpro spark-core telosb thingy52 yunjia-nrf51822 z1 remote-reva ruuvitag samr21-xpro samr30-xpro spark-core telosb thingy52 yunjia-nrf51822 z1
ifneq (,$(filter $(BOARD),$(BOARD_PROVIDES_NETIF))) ifneq (,$(filter $(BOARD),$(BOARD_PROVIDES_NETIF)))
# Use modules for networking # Use modules for networking