Skip to content

Commit e9b1df6

Browse files
authored
Merge pull request #13143 from jeromecoutant/PR_H7_BARE
STM32H7: correct Ethernet issue in baremetal
2 parents eebd773 + b4d31ae commit e9b1df6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

targets/TARGET_STM/TARGET_STM32H7/STM32Cube_FW/stm32h7xx_hal_conf.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,16 @@
215215
#define USE_HAL_WWDG_REGISTER_CALLBACKS 0U /* WWDG register callback disabled */
216216

217217
/* ########################### Ethernet Configuration ######################### */
218+
#ifdef MBED_CONF_STM32_EMAC_ETH_RXBUFNB
219+
/* default value in features/netsocket/emac-drivers/TARGET_STM/mbed_lib.json */
218220
#define ETH_TX_DESC_CNT MBED_CONF_STM32_EMAC_ETH_TXBUFNB /* number of Ethernet Tx DMA descriptors */
219221
#define ETH_RX_DESC_CNT MBED_CONF_STM32_EMAC_ETH_RXBUFNB /* number of Ethernet Rx DMA descriptors */
222+
#else
223+
/* ex: bare metal profile */
224+
#define ETH_TX_DESC_CNT 0 /* Tx buffers of size ETH_TX_BUF_SIZE */
225+
#define ETH_RX_DESC_CNT 0 /* Rx buffers of size ETH_RX_BUF_SIZE */
226+
#endif
227+
220228

221229
#define ETH_MAC_ADDR0 ((uint8_t)0x02)
222230
#define ETH_MAC_ADDR1 ((uint8_t)0x00)

0 commit comments

Comments
 (0)