Skip to content

EthernetInterface fix detecting change of connection status on ARCH_MAX #12405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion features/netsocket/emac-drivers/TARGET_STM/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@
"name": "stm32-emac",
"config": {
"eth-rxbufnb": 4,
"eth-txbufnb": 4
"eth-txbufnb": 4,
"eth-phyaddr": {
"help" : "Configures actual PHY address according to pullup/down status of PHYAD pin(s)",
"value" : 0
}
},
"target_overrides": {
"NUCLEO_F207ZG": {
"eth-rxbufnb": 2,
"eth-txbufnb": 4
},
"ARCH_MAX": {
"eth-phyaddr": 1
}
}
}
4 changes: 2 additions & 2 deletions features/netsocket/emac-drivers/TARGET_STM/stm32xx_emac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#define THREAD_PRIORITY (osPriorityHigh)

#define PHY_TASK_PERIOD_MS 200
#define ETH_ARCH_PHY_ADDRESS (0x00)
#define ETH_PHY_ADDRESS MBED_CONF_STM32_EMAC_ETH_PHYADDR

#define STM_HWADDR_SIZE (6)
#define STM_ETH_MTU_SIZE 1500
Expand Down Expand Up @@ -282,7 +282,7 @@ bool STM32_EMAC::low_level_init_successful()
EthHandle.Init.AutoNegotiation = ETH_AUTONEGOTIATION_ENABLE;
EthHandle.Init.Speed = ETH_SPEED_100M;
EthHandle.Init.DuplexMode = ETH_MODE_FULLDUPLEX;
EthHandle.Init.PhyAddress = ETH_ARCH_PHY_ADDRESS;
EthHandle.Init.PhyAddress = ETH_PHY_ADDRESS;
#if (MBED_MAC_ADDRESS_SUM != MBED_MAC_ADDR_INTERFACE)
MACAddr[0] = MBED_MAC_ADDR_0;
MACAddr[1] = MBED_MAC_ADDR_1;
Expand Down