mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/nucleo-f429zi: add support for ethernet
This commit is contained in:
parent
7501098a8a
commit
1de688c352
@ -17,6 +17,7 @@ config BOARD_NUCLEO_F429ZI
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
select HAS_PERIPH_ADC
|
select HAS_PERIPH_ADC
|
||||||
select HAS_PERIPH_DMA
|
select HAS_PERIPH_DMA
|
||||||
|
select HAS_PERIPH_ETH
|
||||||
select HAS_PERIPH_I2C
|
select HAS_PERIPH_I2C
|
||||||
select HAS_PERIPH_PWM
|
select HAS_PERIPH_PWM
|
||||||
select HAS_PERIPH_RTC
|
select HAS_PERIPH_RTC
|
||||||
|
@ -1 +1,5 @@
|
|||||||
|
ifneq (,$(filter netdev_default,$(USEMODULE)))
|
||||||
|
USEMODULE += stm32_eth
|
||||||
|
endif
|
||||||
|
|
||||||
include $(RIOTBOARD)/common/nucleo/Makefile.dep
|
include $(RIOTBOARD)/common/nucleo/Makefile.dep
|
||||||
|
@ -4,6 +4,7 @@ CPU_MODEL = stm32f429zi
|
|||||||
# Put defined MCU peripherals here (in alphabetical order)
|
# Put defined MCU peripherals here (in alphabetical order)
|
||||||
FEATURES_PROVIDED += periph_adc
|
FEATURES_PROVIDED += periph_adc
|
||||||
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
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include "cfg_i2c1_pb8_pb9.h"
|
#include "cfg_i2c1_pb8_pb9.h"
|
||||||
#include "cfg_timer_tim5.h"
|
#include "cfg_timer_tim5.h"
|
||||||
#include "cfg_usb_otg_fs.h"
|
#include "cfg_usb_otg_fs.h"
|
||||||
|
#include "mii.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -46,10 +47,12 @@ extern "C" {
|
|||||||
static const dma_conf_t dma_config[] = {
|
static const dma_conf_t dma_config[] = {
|
||||||
{ .stream = 11 }, /* DMA2 Stream 3 - SPI1_TX */
|
{ .stream = 11 }, /* DMA2 Stream 3 - SPI1_TX */
|
||||||
{ .stream = 10 }, /* DMA2 Stream 2 - SPI1_RX */
|
{ .stream = 10 }, /* DMA2 Stream 2 - SPI1_RX */
|
||||||
|
{ .stream = 8 }, /* DMA2 Stream 0 - ETH_TX */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DMA_0_ISR isr_dma2_stream3
|
#define DMA_0_ISR isr_dma2_stream3
|
||||||
#define DMA_1_ISR isr_dma2_stream2
|
#define DMA_1_ISR isr_dma2_stream2
|
||||||
|
#define DMA_2_ISR isr_dma2_stream0
|
||||||
|
|
||||||
#define DMA_NUMOF ARRAY_SIZE(dma_config)
|
#define DMA_NUMOF ARRAY_SIZE(dma_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
@ -193,6 +196,32 @@ static const adc_conf_t adc_config[] = {
|
|||||||
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
#define ADC_NUMOF ARRAY_SIZE(adc_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @name ETH configuration
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
static const eth_conf_t eth_config = {
|
||||||
|
.mode = RMII,
|
||||||
|
.speed = MII_BMCR_SPEED_100 | MII_BMCR_FULL_DPLX,
|
||||||
|
.dma = 2,
|
||||||
|
.dma_chan = 8,
|
||||||
|
.phy_addr = 0x00,
|
||||||
|
.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_DMA_ISR isr_dma2_stream0
|
||||||
|
/** @} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,6 +32,7 @@ BOARD_PROVIDES_NETIF := \
|
|||||||
nrf52dk \
|
nrf52dk \
|
||||||
nrf6310 \
|
nrf6310 \
|
||||||
nucleo-f207zg \
|
nucleo-f207zg \
|
||||||
|
nucleo-f429zi \
|
||||||
nucleo-f767zi \
|
nucleo-f767zi \
|
||||||
openlabs-kw41z-mini \
|
openlabs-kw41z-mini \
|
||||||
openlabs-kw41z-mini-256kib \
|
openlabs-kw41z-mini-256kib \
|
||||||
|
Loading…
Reference in New Issue
Block a user