Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] STM32 interfacing with magjacks ?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Visit site
Activity points
9,442
How can I connect MagJacks to STM32F107 ?
Guys,

How can I connect MagJacks to STM32F107 ?

I saw from STM32F107 code :
Code:
01./* ETHERNET pins configuration */
02.  /* AF Output Push Pull:
03.  - ETH_MII_MDIO / ETH_RMII_MDIO: PA2
04.  - ETH_MII_MDC / ETH_RMII_MDC: PC1
05.  - ETH_MII_TXD2: PC2
06.  - ETH_MII_TX_EN / ETH_RMII_TX_EN: PB11
07.  - ETH_MII_TXD0 / ETH_RMII_TXD0: PB12
08.  - ETH_MII_TXD1 / ETH_RMII_TXD1: PB13
09.  - ETH_MII_PPS_OUT / ETH_RMII_PPS_OUT: PB5
10.  - ETH_MII_TXD3: PB8 */
11. 
12.  /* Configure PA2 as alternate function push-pull */
13.  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
14.  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
15.  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
16.  GPIO_Init(GPIOA, &GPIO_InitStructure);
17. 
18.  /* Configure PC1, PC2 and PC3 as alternate function push-pull */
19.  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_1 | GPIO_Pin_2;
20.  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
21.  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
22.  GPIO_Init(GPIOC, &GPIO_InitStructure);
23. 
24.  /* Configure PB5, PB8, PB11, PB12 and PB13 as alternate function push-pull */
25.  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5 | GPIO_Pin_8 | GPIO_Pin_11 |
26.                                GPIO_Pin_12 | GPIO_Pin_13;
27.  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
28.  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
29.  GPIO_Init(GPIOB, &GPIO_InitStructure);
30. 
31.  /**************************************************************/
32.  /*               For Remapped Ethernet pins                   */
33.  /*************************************************************/
34.  /* Input (Reset Value):
35.  - ETH_MII_CRS CRS: PA0
36.  - ETH_MII_RX_CLK / ETH_RMII_REF_CLK: PA1
37.  - ETH_MII_COL: PA3
38.  - ETH_MII_RX_DV / ETH_RMII_CRS_DV: PD8
39.  - ETH_MII_TX_CLK: PC3
40.  - ETH_MII_RXD0 / ETH_RMII_RXD0: PD9
41.  - ETH_MII_RXD1 / ETH_RMII_RXD1: PD10
42.  - ETH_MII_RXD2: PD11
43.  - ETH_MII_RXD3: PD12
44.  - ETH_MII_RX_ER: PB10 */
45. 
46.  /* ETHERNET pins remapp in STM3210C-EVAL board: RX_DV and RxD[3:0] */
47.  GPIO_PinRemapConfig(GPIO_Remap_ETH, ENABLE);
Thanks
 

As explained in the reference manual and datasheet, STM32 connects to ethernet trhough an extern PHY chip.

3592517800_1395742544.gif
 

E.g. SMSC LAN8720

A few ARM processors from TI have an integrated PHY, but none from ST as far as I'm aware of.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top