Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcc913eb

Browse files
author
fpr
committed
Enables HAL Ethernet module.
Changes PHY configuration to match with the good one.Signed-off-by: fpr <fabien.perroquin@wi6labs.com>
1 parent1414e47 commitcc913eb

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

‎variants/NUCLEO_F429ZI/stm32f4xx_hal_conf.h‎

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
// #define HAL_DCMI_MODULE_ENABLED
6363
#defineHAL_DMA_MODULE_ENABLED
6464
// #define HAL_DMA2D_MODULE_ENABLED
65-
//#define HAL_ETH_MODULE_ENABLED
65+
#defineHAL_ETH_MODULE_ENABLED
6666
#defineHAL_FLASH_MODULE_ENABLED
6767
// #define HAL_NAND_MODULE_ENABLED
6868
// #define HAL_NOR_MODULE_ENABLED
@@ -186,13 +186,12 @@
186186
/* Definition of the Ethernet driver buffers size and count */
187187
#defineETH_RX_BUF_SIZE ETH_MAX_PACKET_SIZE/* buffer size for receive */
188188
#defineETH_TX_BUF_SIZE ETH_MAX_PACKET_SIZE/* buffer size for transmit */
189-
#defineETH_RXBUFNB4U/*4 Rx buffers of size ETH_RX_BUF_SIZE */
190-
#defineETH_TXBUFNB4U/*4 Tx buffers of size ETH_TX_BUF_SIZE */
189+
#defineETH_RXBUFNB(5U)/*5 Rx buffers of size ETH_RX_BUF_SIZE */
190+
#defineETH_TXBUFNB(5U)/*5 Tx buffers of size ETH_TX_BUF_SIZE */
191191

192192
/* Section 2: PHY configuration section */
193-
194-
/* DP83848 PHY Address*/
195-
#defineDP83848_PHY_ADDRESS 0x01U
193+
/* LAN8742A PHY Address*/
194+
#defineLAN8742A_PHY_ADDRESS 0x00U
196195
/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
197196
#definePHY_RESET_DELAY 0x000000FFU
198197
/* PHY Configuration delay */
@@ -223,19 +222,15 @@
223222

224223
/* Section 4: Extended PHY Registers */
225224

226-
#definePHY_SR ((uint16_t)0x0010)/*!< PHY status register Offset */
227-
#definePHY_MICR ((uint16_t)0x0011)/*!< MII Interrupt Control Register */
228-
#definePHY_MISR ((uint16_t)0x0012)/*!< MII Interrupt Status and Misc. Control Register */
225+
#definePHY_SR ((uint16_t)0x1F)/*!< PHY special control/ status register Offset */
229226

230-
#definePHY_LINK_STATUS ((uint16_t)0x0001)/*!< PHY Link mask */
231-
#definePHY_SPEED_STATUS ((uint16_t)0x0002)/*!< PHY Speed mask */
232-
#definePHY_DUPLEX_STATUS ((uint16_t)0x0004)/*!< PHY Duplex mask */
227+
#definePHY_SPEED_STATUS ((uint16_t)0x0004)/*!< PHY Speed mask */
228+
#definePHY_DUPLEX_STATUS ((uint16_t)0x0010)/*!< PHY Duplex mask */
233229

234-
#definePHY_MICR_INT_EN ((uint16_t)0x0002)/*!< PHY Enable interrupts */
235-
#definePHY_MICR_INT_OE ((uint16_t)0x0001)/*!< PHY Enable output interrupt events */
236230

237-
#definePHY_MISR_LINK_INT_EN ((uint16_t)0x0020)/*!< Enable Interrupt on change of link status */
238-
#definePHY_LINK_INTERRUPT ((uint16_t)0x2000)/*!< PHY link status interrupt mask */
231+
#definePHY_ISFR ((uint16_t)0x1D)/*!< PHY Interrupt Source Flag register Offset */
232+
#definePHY_IMR ((uint16_t)0x1E)/*!< PHY Interrupt Mask register Offset */
233+
#definePHY_ISFR_INT4 ((uint16_t)0x0010)/*!< PHY Link down inturrupt */
239234

240235
/* ################## SPI peripheral configuration ########################## */
241236

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp