rgmii

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

rgmii

3,132 Views
胡峰
Contributor I

HELLO NXP TEAM:

I am currently using the S32K388EVB_Q289 development board and debugging the RGMII communication of GMAC0. Some packets sent out by the TJA1120 can be captured via a network packet analyzer. However, pinging the development board from the debugging laptop yields no response. An oscilloscope shows that the data and clock on the RX pins of the TJA1120 chip are normal, but the S32K388 fails to enter the RX interrupt, while the TX interrupt is entered normally. I would like to ask how to troubleshoot this issue. No hardware modifications have been made, and the software routine is based on the RTD6.0 and TCPIP3.0 library routines, with GMAC1 modified to GMAC0.

Is there any available RGMII routine for the S32K388EVB development board?

Tags (1)
0 Kudos
Reply
6 Replies

3,101 Views
PavelL
NXP Employee
NXP Employee

Hello @胡峰 ,

I'm experiencing the same issue. I've already reported the issue to the apps team.

I'll keep you updated on any progress.

Thank you for your patience.

Best regards,

Pavel

0 Kudos
Reply

3,017 Views
胡峰
Contributor I

Hello, may I ask if there has been any progress?

0 Kudos
Reply

3,008 Views
PavelL
NXP Employee
NXP Employee

Hello @胡峰 ,

unfortunately, the apps are busy with other topics.

Anyway, I found that S32K388_gptp_ds example from S32K3xx gPTP Stack 1.0.0 works, i.e. GMAC0 is receiving and sending data. I didn't have time to look closer on that, maybe this week.

Best regards,

Pavel

0 Kudos
Reply

2,794 Views
PavelL
NXP Employee
NXP Employee

Hello @胡峰 ,

I found the root cause - there were missing IRQs for GMAC0. So, please add them to your Platform configuration:

PavelL_0-1759408932835.png

You probably did those steps:

  • Change settings to GMAC0 for Pins and Clocks
  • Eth_43_GMAC shall have EthConfigSet/EthCtrlIdx = 0; EthGeneral/EthIndex = 0.
  • Also, the very first row in device_init shall be:

/* below is for GMAC0 RGMII */

IP_DCM_GPR->DCMRWF3 |= DCM_GPR_DCMRWF3_MAC_RX_CLK_MUX_BYPASS(1U);

IP_DCM_GPR->DCMRWF1 = (IP_DCM_GPR->DCMRWF1 & ~DCM_GPR_DCMRWF1_MAC_CONF_SEL_MASK) | DCM_GPR_DCMRWF1_MAC_CONF_SEL(1U) | DCM_GPR_DCMRWF1_MAC_TX_RMII_CLK_LPBCK_EN(1U);

/* below is for GMAC1 RGMII */

IP_DCM_GPR->DCMRWF4 = (IP_DCM_GPR->DCMRWF4 & ~DCM_GPR_DCMRWF4_MAC2_CONF_SEL_MASK) | DCM_GPR_DCMRWF4_MAC2_CONF_SEL(1U) | DCM_GPR_DCMRWF4_MAC2_RX_CLK_MUX_BYPASS(1U);

IP_DCM_GPR->DCMRWF2 |= DCM_GPR_DCMRWF2_MAC2_TX_RMII_CLK_LPBCK_EN(1U) | DCM_GPR_DCMRWF2_MAC2_LOOBPACK_CLK_SEL(1U);

 

Best regards,

Pavel

0 Kudos
Reply

2,069 Views
James_Zhang_SE
Contributor I

Hi Pavel,

I'm trying to run the lwip_baremetal_s32k388 example on S32K388EVB-Q289 eval board. I wanted to use GMAC0 with RGMII mode. I have done the steps you suggested, i.e. configured the pins and clock for GMAC0, changed the Idx's to 0, enabled the IRQs and added the lines to device_init. I have also modified the clocks to 125MHz for 1G speed.

James_Zhang_SE_0-1767664066600.png

However, when I run the project, the light for link blinked twice during upload process and then went off and I cannot ping from PC. Kindly suggest what else could have gone wrong.

0 Kudos
Reply

1,984 Views
PavelL
NXP Employee
NXP Employee

Hello @James_Zhang_SE ,

TX_CLK should be doubled - 250MHz. Please review your clocks accordingly to clock picture I shared on this thread:

https://community.nxp.com/t5/S32K/S32K388-RGMII-GMAC0-ethernet-cannot-ping/td-p/2271084

 

Best regards,

Pavel

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2170721%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ergmii%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170721%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHELLO%20NXP%20TEAM%3A%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20am%20currently%20using%20the%20S32K388EVB_Q289%20development%20board%20and%20debugging%20the%20RGMII%20communication%20of%20GMAC0.%20Some%20packets%20sent%20out%20by%20the%20TJA1120%20can%20be%20captured%20via%20a%20network%20packet%20analyzer.%20However%2C%20pinging%20the%20development%20board%20from%20the%20debugging%20laptop%20yields%20no%20response.%20An%20oscilloscope%20shows%20that%20the%20data%20and%20clock%20on%20the%20RX%20pins%20of%20the%20TJA1120%20chip%20are%20normal%2C%20but%20the%20S32K388%20fails%20to%20enter%20the%20RX%20interrupt%2C%20while%20the%20TX%20interrupt%20is%20entered%20normally.%20I%20would%20like%20to%20ask%20how%20to%20troubleshoot%20this%20issue.%20No%20hardware%20modifications%20have%20been%20made%2C%20and%20the%20software%20routine%20is%20based%20on%20the%20RTD6.0%20and%20TCPIP3.0%20library%20routines%2C%20with%20GMAC1%20modified%20to%20GMAC0.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EIs%20there%20any%20available%20RGMII%20routine%20for%20the%20S32K388EVB%20development%20board%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2179341%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20rgmii%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2179341%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%2F254200%22%20target%3D%22_blank%22%3E%40%E8%83%A1%E5%B3%B0%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EI%20found%20the%20root%20cause%20-%20there%20were%20missing%20IRQs%20for%20GMAC0.%20So%2C%20please%20add%20them%20to%20your%20Platform%20configuration%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22PavelL_0-1759408932835.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PavelL_0-1759408932835.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PavelL_0-1759408932835.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22PavelL_0-1759408932835.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F359299i490D282E224BEFFA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22PavelL_0-1759408932835.png%22%20alt%3D%22PavelL_0-1759408932835.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20probably%20did%20those%20steps%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EChange%20settings%20to%20GMAC0%20for%20Pins%20and%20Clocks%3C%2FLI%3E%0A%3CLI%3EEth_43_GMAC%20shall%20have%20EthConfigSet%2FEthCtrlIdx%20%3D%200%3B%20EthGeneral%2FEthIndex%20%3D%200.%3C%2FLI%3E%0A%3CLI%3EAlso%2C%20the%20very%20first%20row%20in%20device_init%20shall%20be%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CDIV%20style%3D%22background-color%3A%20%23ffffff%3B%20padding%3A%200px%200px%200px%202px%3B%22%3E%0A%3CDIV%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23ffffff%3B%20font-family%3A%20'Courier%20New'%3B%20font-size%3A%2010pt%3B%20white-space%3A%20pre%3B%22%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%3CSPAN%3E%2F*%20below%20is%20for%20GMAC0%20RGMII%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%3CSPAN%3E%20IP_DCM_GPR-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EDCMRWF3%3C%2FSPAN%3E%3CSPAN%3E%20%7C%3D%20DCM_GPR_DCMRWF3_MAC_RX_CLK_MUX_BYPASS(1U)%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%3CSPAN%3E%20IP_DCM_GPR-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EDCMRWF1%3C%2FSPAN%3E%3CSPAN%3E%20%3D%20(IP_DCM_GPR-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EDCMRWF1%3C%2FSPAN%3E%3CSPAN%3E%20%26amp%3B%20~DCM_GPR_DCMRWF1_MAC_CONF_SEL_MASK)%20%7C%20DCM_GPR_DCMRWF1_MAC_CONF_SEL(1U)%20%7C%20DCM_GPR_DCMRWF1_MAC_TX_RMII_CLK_LPBCK_EN(1U)%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%3CSPAN%3E%2F*%20below%20is%20for%20GMAC1%20RGMII%20*%2F%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%3CSPAN%3E%20IP_DCM_GPR-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EDCMRWF4%3C%2FSPAN%3E%3CSPAN%3E%20%3D%20(IP_DCM_GPR-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EDCMRWF4%3C%2FSPAN%3E%3CSPAN%3E%20%26amp%3B%20~DCM_GPR_DCMRWF4_MAC2_CONF_SEL_MASK)%20%7C%20DCM_GPR_DCMRWF4_MAC2_CONF_SEL(1U)%20%7C%20DCM_GPR_DCMRWF4_MAC2_RX_CLK_MUX_BYPASS(1U)%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%3CSPAN%3E%20IP_DCM_GPR-%26gt%3B%3C%2FSPAN%3E%3CSPAN%3EDCMRWF2%3C%2FSPAN%3E%3CSPAN%3E%20%7C%3D%20DCM_GPR_DCMRWF2_MAC2_TX_RMII_CLK_LPBCK_EN(1U)%20%7C%20DCM_GPR_DCMRWF2_MAC2_LOOBPACK_CLK_SEL(1U)%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200%3B%22%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%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-2173556%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20rgmii%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173556%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%2F254200%22%20target%3D%22_blank%22%3E%40%E8%83%A1%E5%B3%B0%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3Eunfortunately%2C%20the%20apps%20are%20busy%20with%20other%20topics.%3C%2FP%3E%0A%3CP%3EAnyway%2C%20I%20found%20that%26nbsp%3BS32K388_gptp_ds%20example%20from%26nbsp%3BS32K3xx%20gPTP%20Stack%201.0.0%20works%2C%20i.e.%20GMAC0%20is%20receiving%20and%20sending%20data.%20I%20didn't%20have%20time%20to%20look%20closer%20on%20that%2C%20maybe%20this%20week.%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-2173422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20rgmii%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2173422%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSTRONG%3EHello%2C%20may%20I%20ask%20if%20there%20has%20been%20any%20progress%3F%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2170911%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20rgmii%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2170911%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%2F254200%22%20target%3D%22_blank%22%3E%40%E8%83%A1%E5%B3%B0%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EI'm%20experiencing%20the%20same%20issue.%20I've%20already%20reported%20the%20issue%20to%20the%20apps%20team.%3C%2FP%3E%0A%3CP%3EI'll%20keep%20you%20updated%20on%20any%20progress.%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20your%20patience.%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-2281562%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20rgmii%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281562%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CSPAN%3EPavel%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI'm%20trying%20to%20run%20the%26nbsp%3Blwip_baremetal_s32k388%20example%20on%26nbsp%3BS32K388EVB-Q289%20eval%20board.%20I%20wanted%20to%20use%20GMAC0%20with%20RGMII%20mode.%20I%20have%20done%20the%20steps%20you%20suggested%2C%20i.e.%20configured%20the%20pins%20and%20clock%20for%20GMAC0%2C%20changed%20the%20Idx's%20to%200%2C%20enabled%20the%20IRQs%20and%20added%20the%20lines%20to%20device_init.%20I%20have%20also%20modified%20the%20clocks%20to%20125MHz%20for%201G%20speed.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22James_Zhang_SE_0-1767664066600.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22James_Zhang_SE_0-1767664066600.png%22%20style%3D%22width%3A%20268px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22James_Zhang_SE_0-1767664066600.png%22%20style%3D%22width%3A%20268px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371757i53FE6D2D4118E142%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22James_Zhang_SE_0-1767664066600.png%22%20alt%3D%22James_Zhang_SE_0-1767664066600.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EHowever%2C%20when%20I%20run%20the%20project%2C%20the%20light%20for%20link%20blinked%20twice%20during%20upload%20process%20and%20then%20went%20off%20and%20I%20cannot%20ping%20from%20PC.%20Kindly%20suggest%20what%20else%20could%20have%20gone%20wrong.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2289169%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20rgmii%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2289169%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%2F256069%22%20target%3D%22_blank%22%3E%40James_Zhang_SE%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3ETX_CLK%20should%20be%20doubled%20-%20250MHz.%20Please%20review%20your%20clocks%20accordingly%20to%20clock%20picture%20I%20shared%20on%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%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32K388-RGMII-GMAC0-ethernet-cannot-ping%2Ftd-p%2F2271084%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