S32K388 CANNOT PING ETHERNET RGMII GMAC0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K388 CANNOT PING ETHERNET RGMII GMAC0

Jump to solution
520 Views
vinmotion
Contributor III

Hello engineers,

I'm encountering an issue while testing the RGMII GMAC0 Ethernet interface on the S32K388 evaluation board—I am unable to successfully ping the assigned IP address. Starting from the standard lwIP example (which uses GMAC1), I have modified the PINS multiplexing to route signals to GMAC0, updated the CLOCK  accordingly, adjusted device init function and chang the PLATFORM in Mcal Components tab  . Despite these changes, the link does not establish properly, and ping attempts fail.

Could you please review my modifications or test the GMAC0 interface on your side using the attached zip file (containing the modified project)? Any insights into potential configuration differences between GMAC0 and GMAC1, PHY initialization issues, or known limitations with GMAC0 in the lwIP examples would be greatly appreciated.

Thank you for your assistance

0 Kudos
Reply
1 Solution
458 Views
PavelL
NXP Employee
NXP Employee

Hello @vinmotion ,

As you can see, not all rows in the code snippet are related for GMAC0. This code is used on all my examples - it fixes GMAC0 as well as GMAC1.

Best regards,

Pavel

View solution in original post

3 Replies
465 Views
PavelL
NXP Employee
NXP Employee

Hello @vinmotion ,

I assume that this query is a duplicate of this thread:

Solved: S32K388 RGMII GMAC0 ethernet cannot ping - NXP Community

 

Best regards,

Pavel

461 Views
vinmotion
Contributor III

Thank you Sir , but can you confirm that when using RGMII GMAC0 with S32k388 we modify device init function example become like this right::

 

  • 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,

0 Kudos
Reply
459 Views
PavelL
NXP Employee
NXP Employee

Hello @vinmotion ,

As you can see, not all rows in the code snippet are related for GMAC0. This code is used on all my examples - it fixes GMAC0 as well as GMAC1.

Best regards,

Pavel

%3CLINGO-SUB%20id%3D%22lingo-sub-2289011%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K388%20CANNOT%20PING%20ETHERNET%20RGMII%20GMAC0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289011%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20engineers%2C%3C%2FP%3E%3CP%3EI'm%20encountering%20an%20issue%20while%20testing%20the%20%3CSTRONG%3ERGMII%20GMAC0%3C%2FSTRONG%3E%20Ethernet%20interface%20on%20the%20%3CSTRONG%3ES32K388%3C%2FSTRONG%3E%20evaluation%20board%E2%80%94I%20am%20unable%20to%20successfully%20ping%20the%20assigned%20IP%20address.%20Starting%20from%20the%20standard%20lwIP%20example%20(which%20uses%20GMAC1)%2C%20I%20have%20modified%20the%20%3CSTRONG%3EPINS%26nbsp%3B%3C%2FSTRONG%3Emultiplexing%20to%20route%20signals%20to%20GMAC0%2C%20updated%20the%20%3CSTRONG%3ECLOCK%26nbsp%3B%3C%2FSTRONG%3E%26nbsp%3Baccordingly%2C%20adjusted%20%3CSTRONG%3Edevice%20init%3C%2FSTRONG%3E%20function%20and%20chang%20the%20%3CSTRONG%3EPLATFORM%3C%2FSTRONG%3E%20in%20Mcal%20Components%20tab%26nbsp%3B%20.%20Despite%20these%20changes%2C%20the%20link%20does%20not%20establish%20properly%2C%20and%20ping%20attempts%20fail.%3C%2FP%3E%3CP%3ECould%20you%20please%20review%20my%20modifications%20or%20test%20the%20GMAC0%20interface%20on%20your%20side%20using%20the%20attached%20zip%20file%20(containing%20the%20modified%20project)%3F%20Any%20insights%20into%20potential%20configuration%20differences%20between%20GMAC0%20and%20GMAC1%2C%20PHY%20initialization%20issues%2C%20or%20known%20limitations%20with%20GMAC0%20in%20the%20lwIP%20examples%20would%20be%20greatly%20appreciated.%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20assistance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2289483%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K388%20CANNOT%20PING%20ETHERNET%20RGMII%20GMAC0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289483%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254753%22%20target%3D%22_blank%22%3E%40vinmotion%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EAs%20you%20can%20see%2C%20not%20all%20rows%20in%20the%20code%20snippet%20are%20related%20for%20GMAC0.%20This%20code%20is%20used%20on%20all%20my%20examples%20-%20it%20fixes%20GMAC0%20as%20well%20as%20GMAC1.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2289468%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K388%20CANNOT%20PING%20ETHERNET%20RGMII%20GMAC0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289468%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20you%20Sir%20%2C%20but%20can%20you%20confirm%20that%20when%20using%20RGMII%20GMAC0%20with%20S32k388%20we%20modify%20device%20init%20function%20example%20become%20like%20this%20right%3A%3A%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CLI%3EReplace%20DCMRWF%20settings%20in%26nbsp%3B%3CSPAN%3Edevice_init()%20by%20these%20rows%3A%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%2F*%20Bypass%20MUX_7%20manually%2C%20GMAC0_RX_CLK%20is%20derived%20directly%20from%20input%20pin.%20*%2F%3CBR%20%2F%3EIP_DCM_GPR-%26gt%3BDCMRWF3%20%7C%3D%20DCM_GPR_DCMRWF3_MAC_RX_CLK_MUX_BYPASS(1u)%3B%3C%2FP%3E%3CP%3E%2F*%20Bypass%20MUX_15%20manually%2C%20GMAC1_RX_CLK%20is%20derived%20directly%20from%20input%20pin.%20*%2F%3CBR%20%2F%3EIP_DCM_GPR-%26gt%3BDCMRWF4%20%7C%3D%20DCM_GPR_DCMRWF4_MAC2_RX_CLK_MUX_BYPASS(1u)%3B%3C%2FP%3E%3CP%3E%2F*%20Enable%20GMAC1_TX_RMII_CLK%20loopback%20manually.%20*%2F%3CBR%20%2F%3EIP_DCM_GPR-%26gt%3BDCMRWF2%20%7C%3D%20DCM_GPR_DCMRWF2_MAC2_LOOBPACK_CLK_SEL_MASK%20%7C%20DCM_GPR_DCMRWF2_MAC2_TX_RMII_CLK_LPBCK_EN_MASK%3B%3C%2FP%3E%3CP%3E%2F*%20Configure%20GMAC1%20to%20RGMII%20mode%20manually.%20*%2F%3CBR%20%2F%3EIP_DCM_GPR-%26gt%3BDCMRWF4%20%7C%3D%20DCM_GPR_DCMRWF4_MAC2_CONF_SEL(1u)%3B%3C%2FP%3E%3CUL%3E%3CLI%3EOptionally%2C%20you%20may%20comment%20out%20rows%20622%20to%20642%20in%20test.c%20to%20remove%20limited%20time%20of%20lwIP%20example.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2289435%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20S32K388%20CANNOT%20PING%20ETHERNET%20RGMII%20GMAC0%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289435%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F254753%22%20target%3D%22_blank%22%3E%40vinmotion%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EI%20assume%20that%20this%20query%20is%20a%20duplicate%20of%20this%20thread%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32K388-RGMII-GMAC0-ethernet-cannot-ping%2Ftd-p%2F2271084%22%20target%3D%22_blank%22%3ESolved%3A%20S32K388%20RGMII%20GMAC0%20ethernet%20cannot%20ping%20-%20NXP%20Community%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E