Skip to content

Configuration options for STM_EMAC buffer counts #9307

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 1 commit into from
Feb 19, 2019
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
13 changes: 13 additions & 0 deletions features/netsocket/emac-drivers/TARGET_STM_EMAC/mbed_lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "stm32-emac",
"config": {
"eth-rxbufnb": 4,
"eth-txbufnb": 4
},
"target_overrides": {
"NUCLEO_F207ZG": {
"eth-rxbufnb": 1,
"eth-txbufnb": 4
}
}
}
10 changes: 8 additions & 2 deletions targets/TARGET_STM/TARGET_STM32F1/device/stm32f1xx_hal_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,14 @@ extern "C" {
/* Definition of the Ethernet driver buffers size and count */
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
#define ETH_RXBUFNB 8U /* 8 Rx buffers of size ETH_RX_BUF_SIZE */
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */

#ifdef MBED_CONF_STM32_EMAC_ETH_RXBUFNB
#define ETH_RXBUFNB MBED_CONF_STM32_EMAC_ETH_RXBUFNB /* Rx buffers of size ETH_RX_BUF_SIZE */
#endif

#ifdef MBED_CONF_STM32_EMAC_ETH_TXBUFNB
#define ETH_TXBUFNB MBED_CONF_STM32_EMAC_ETH_TXBUFNB /* Tx buffers of size ETH_TX_BUF_SIZE */
#endif

/* Section 2: PHY configuration section */

Expand Down
10 changes: 8 additions & 2 deletions targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,14 @@
/* Definition of the Ethernet driver buffers size and count */
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */

#ifdef MBED_CONF_STM32_EMAC_ETH_RXBUFNB
#define ETH_RXBUFNB MBED_CONF_STM32_EMAC_ETH_RXBUFNB /* Rx buffers of size ETH_RX_BUF_SIZE */
#endif

#ifdef MBED_CONF_STM32_EMAC_ETH_TXBUFNB
#define ETH_TXBUFNB MBED_CONF_STM32_EMAC_ETH_TXBUFNB /* Tx buffers of size ETH_TX_BUF_SIZE */
#endif

/* Section 2: PHY configuration section */

Expand Down
10 changes: 8 additions & 2 deletions targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,14 @@
/* Definition of the Ethernet driver buffers size and count */
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */

#ifdef MBED_CONF_STM32_EMAC_ETH_RXBUFNB
#define ETH_RXBUFNB MBED_CONF_STM32_EMAC_ETH_RXBUFNB /* Rx buffers of size ETH_RX_BUF_SIZE */
#endif

#ifdef MBED_CONF_STM32_EMAC_ETH_TXBUFNB
#define ETH_TXBUFNB MBED_CONF_STM32_EMAC_ETH_TXBUFNB /* Tx buffers of size ETH_TX_BUF_SIZE */
#endif

/* Section 2: PHY configuration section */

Expand Down
9 changes: 7 additions & 2 deletions targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,14 @@
/* Definition of the Ethernet driver buffers size and count */
#define ETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for receive */
#define ETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE /* buffer size for transmit */
#define ETH_RXBUFNB 4U /* 4 Rx buffers of size ETH_RX_BUF_SIZE */
#define ETH_TXBUFNB 4U /* 4 Tx buffers of size ETH_TX_BUF_SIZE */

#ifdef MBED_CONF_STM32_EMAC_ETH_RXBUFNB
#define ETH_RXBUFNB MBED_CONF_STM32_EMAC_ETH_RXBUFNB /* Rx buffers of size ETH_RX_BUF_SIZE */
#endif

#ifdef MBED_CONF_STM32_EMAC_ETH_TXBUFNB
#define ETH_TXBUFNB MBED_CONF_STM32_EMAC_ETH_TXBUFNB /* Tx buffers of size ETH_TX_BUF_SIZE */
#endif
/* Section 2: PHY configuration section */

/* DP83848 PHY Address*/
Expand Down