S32K388 RGMII GMAC0 ethernet cannot ping

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K388 RGMII GMAC0 ethernet cannot ping

ソリューションへジャンプ
849件の閲覧回数
vinmotion
Contributor III

Hello engineers,

I’m facing an issue while bringing up GMAC0 on the S32K388.

I have already configured and enabled the 14 required GMAC0 pins, but I’m still unable to ping the device from my laptop, im new to NXP so dont know the flow or any else where to config to use rgmii GMAC0 on S32K388

Could you guys please help review my test project and advise what might be missing or incorrectly configured?

Any guidance would be greatly appreciated.

 

 

0 件の賞賛
返信
1 解決策
690件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @vinmotion ,

I successfully brought up example lwip_FreeRTOS_s32K388, baremetal shall be about the same.

It's not clear from the description, but I assume that you use S32K388EVB-Q289.

I check your last project:

  • Pins look correct. Only MDIO shall be set as Input/Output, but this is not important for now.
  • Clocks looks correct.
  • Platform - IRQ's handlers should be defined (I didn't notice before that handlers were undefined):

PavelL_0-1767775451438.png

 

  • Eth_43_GMAC - need to be set to RGMII 1G, Eth indexes should be 0 ( = GMAC0)

PavelL_1-1767775525416.pngPavelL_2-1767775558500.png

 

  • S32K388EVB-Q289 - Jumper J361 shall be closed

PavelL_3-1767775689644.png

 

Best regards,

Pavel

 

元の投稿で解決策を見る

7 返答(返信)
812件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @vinmotion ,

I reviewed your project and here are my findings:

  • Pins look correct
  • Clocks are not correct. Please fix it based on picture below. If you require 100Mbps just change dividers and/or manual setting of yellow numbers: 125MHz -> 25MHz and 250MHz -> 50MHz. Also set PLL AUX accordingly to the picture.

PavelL_0-1767624067350.png

  • Replace DCMRWF settings in device_init() by these rows:

/* Bypass MUX_7 manually, GMAC0_RX_CLK is derived directly from input pin. */
IP_DCM_GPR->DCMRWF3 |= DCM_GPR_DCMRWF3_MAC_RX_CLK_MUX_BYPASS(1u);

/* Bypass MUX_15 manually, GMAC1_RX_CLK is derived directly from input pin. */
IP_DCM_GPR->DCMRWF4 |= DCM_GPR_DCMRWF4_MAC2_RX_CLK_MUX_BYPASS(1u);

/* Enable GMAC1_TX_RMII_CLK loopback manually. */
IP_DCM_GPR->DCMRWF2 |= DCM_GPR_DCMRWF2_MAC2_LOOBPACK_CLK_SEL_MASK | DCM_GPR_DCMRWF2_MAC2_TX_RMII_CLK_LPBCK_EN_MASK;

/* Configure GMAC1 to RGMII mode manually. */
IP_DCM_GPR->DCMRWF4 |= DCM_GPR_DCMRWF4_MAC2_CONF_SEL(1u);

  • Optionally, you may comment out rows 622 to 642 in test.c to remove limited time of lwIP example.

Best regards,

Pavel

786件の閲覧回数
vinmotion
Contributor III

Thank you Sir 

im trying to use the lwIP example on the S32K388 , but im running into build/compile errors and i'm not sure why i'm unable to get GMAC0 Ethernet (RGMII) working

 

Would it be possible for you to share a working zip project for GMAC0 RGMII on S32K388.. That would really help me debug my setup, now im waiting to order adapter ethernet for S32k388

 

Thanks a lot for your support

0 件の賞賛
返信
709件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @vinmotion ,

If you have build error, sharing the project will not help.

Please check your installation setup - here's my setup:

S32 Design Studio 3.6.1

S32 Configuration Tools R1.8.0 NPI data package for S32K388

S32K3_S32M27x Real-Time Drivers AUTOSAR R21-11 Version 6.0.0

FreeRTOS Update-site for S32K3 version 6.0.0 CD1

TCPIP_STACK for S32K3XX version 3.0.0

 

Best regards,

Pavel

705件の閲覧回数
vinmotion
Contributor III

Thank you Sir , i use all your config with clock but still cannot ping test with GMAC0 Rgmii for s32k388, hopefully anyone can please test ping because i got the board but not have the adapter ethernet yet

 

 

0 件の賞賛
返信
691件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @vinmotion ,

I successfully brought up example lwip_FreeRTOS_s32K388, baremetal shall be about the same.

It's not clear from the description, but I assume that you use S32K388EVB-Q289.

I check your last project:

  • Pins look correct. Only MDIO shall be set as Input/Output, but this is not important for now.
  • Clocks looks correct.
  • Platform - IRQ's handlers should be defined (I didn't notice before that handlers were undefined):

PavelL_0-1767775451438.png

 

  • Eth_43_GMAC - need to be set to RGMII 1G, Eth indexes should be 0 ( = GMAC0)

PavelL_1-1767775525416.pngPavelL_2-1767775558500.png

 

  • S32K388EVB-Q289 - Jumper J361 shall be closed

PavelL_3-1767775689644.png

 

Best regards,

Pavel

 

339件の閲覧回数
James_Zhang_SE
Contributor I

Hi Pavel,

I have adjusted the project as you have mentioned in the other posts and this thread. However, I'm still not able to ping from PC after making all these changes. I'm using a RAD-MOON2 as the media converter. Can you kindly check if I'm missing anything in my project or what else do I need for the setup?

0 件の賞賛
返信
303件の閲覧回数
PavelL
NXP Employee
NXP Employee

Hello @James_Zhang_SE ,

Please note: Once an answer is marked as a solution, the original query is no longer actively tracked in our system. I only receive subscription emails for updates, and those can occasionally be missed.
If you need further assistance, the best approach is to create a new query.

 

I checked your latest project and TX_CLK should be set to output - after the change, your example works on my board well.

Please check on RAD MOON2:

  • Slave mode is set (S32K388 EVB: U97 - bit 7 in middle position -> CONFIG 6 open -> Master)
  • MacSec is disabled
  • Correct speed 1000Mbps is set

 

Best regards,

Pavel

0 件の賞賛
返信