S32K358 GMAC sends abnormal data

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

S32K358 GMAC sends abnormal data

Jump to solution
2,261 Views

Hello everyone,

I am bringing up Ethernet using S32K3X8EVB-Q289 Evaluation Board and TJA1103A transceiver working in MII mode. I used example from S32K3(Gmac_Ip_InternalLoopback_S32K358) to bring-up, with some modification to adapt with MII interface. So far, it managed to establish link-up, but it sent abnormal data throughout communication.

sathishkumar_sunmugavel_0-1744883373206.png


I also removed D_CACHE_ENABLE and I_CACHE_ENABLE in pre-processor setting. But it didn't in this case.

I attached the zipped project code, and above captured packet logs. Hope you guy can check it and help me.

Hardware details:
S32K3X8EVB-Q289 Evaluation Board
TJA1103SDB SABRE development board(170-47757 REV C)

Software details:
SW32K3_S32DS_3.5.8_D2311.zip
SW32K3_S32M27x_RTD_R21-11_4.0.0_D2311_DS_updatesite.zip
SW32K3_FreeRTOS_10.6.0_CD_4.0.0_DS_updatesite_D2312.zip
SW32K3_TCPIP_STACK_1_0_4_D2401_DS_updatesite.zip

Thank you in advance.

0 Kudos
Reply
1 Solution
2,237 Views
PavelL
NXP Employee
NXP Employee

Hello @sathishkumar_sunmugavel ,

there's an issue with the clock in your project.

1. Add this before Clock_Ip_Init:

/* Set RMII configuration for EMAC in DCM module */
IP_DCM_GPR->DCMRWF1 = (IP_DCM_GPR->DCMRWF1 & ~DCM_GPR_DCMRWF1_MAC_CONF_SEL_MASK) | DCM_GPR_DCMRWF1_MAC_CONF_SEL(2U);

2. Your clock shall look like that (it's picture for EMAC, but also valid for GMAC, in this case):

- RX shall be disabled

- I usually used doble frequency on TS clock

image.png

3. TJA1103-SDBR needs to be in rev-RMII mode to generate clock on TXC -> check your jumpers:

image.png

You might also consider to start your project from another example, like lwip_FreeRTOS_S32k358.

FYI, there are Easter holidays on Friday and on Monday, my response will be delayed. Thank you for your understanding.

Best regards,

Pavel

 

View solution in original post

2 Replies
2,238 Views
PavelL
NXP Employee
NXP Employee

Hello @sathishkumar_sunmugavel ,

there's an issue with the clock in your project.

1. Add this before Clock_Ip_Init:

/* Set RMII configuration for EMAC in DCM module */
IP_DCM_GPR->DCMRWF1 = (IP_DCM_GPR->DCMRWF1 & ~DCM_GPR_DCMRWF1_MAC_CONF_SEL_MASK) | DCM_GPR_DCMRWF1_MAC_CONF_SEL(2U);

2. Your clock shall look like that (it's picture for EMAC, but also valid for GMAC, in this case):

- RX shall be disabled

- I usually used doble frequency on TS clock

image.png

3. TJA1103-SDBR needs to be in rev-RMII mode to generate clock on TXC -> check your jumpers:

image.png

You might also consider to start your project from another example, like lwip_FreeRTOS_S32k358.

FYI, there are Easter holidays on Friday and on Monday, my response will be delayed. Thank you for your understanding.

Best regards,

Pavel

 

2,220 Views

Hello @PavelL 

Thank you for your valuable guidance.

I followed the steps you suggested, and I'm happy to share that the issue has been resolved.

Thanks again,
Sathish.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2082487%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K358%20GMAC%20sends%20abnormal%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082487%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20everyone%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20bringing%20up%20Ethernet%20using%20S32K3X8EVB-Q289%20Evaluation%20Board%20and%20TJA1103A%20transceiver%20working%20in%20MII%20mode.%20I%20used%20example%20from%20S32K3(Gmac_Ip_InternalLoopback_S32K358)%20to%20bring-up%2C%20with%20some%20modification%20to%20adapt%20with%20MII%20interface.%20So%20far%2C%20it%20managed%20to%20establish%20link-up%2C%20but%20it%20sent%20abnormal%20data%20throughout%20communication.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sathishkumar_sunmugavel_0-1744883373206.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22sathishkumar_sunmugavel_0-1744883373206.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F333668i2D6A018AD3D87ABB%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22sathishkumar_sunmugavel_0-1744883373206.png%22%20alt%3D%22sathishkumar_sunmugavel_0-1744883373206.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20also%20removed%20D_CACHE_ENABLE%20and%20I_CACHE_ENABLE%20in%20pre-processor%20setting.%20But%20it%20didn't%20in%20this%20case.%3C%2FP%3E%3CP%3EI%20attached%20the%20zipped%20project%20code%2C%20and%20above%20captured%20packet%20logs.%20Hope%20you%20guy%20can%20check%20it%20and%20help%20me.%3C%2FP%3E%3CP%3EHardware%20details%3A%3CBR%20%2F%3ES32K3X8EVB-Q289%20Evaluation%20Board%3CBR%20%2F%3ETJA1103SDB%20SABRE%20development%20board(170-47757%20REV%20C)%3C%2FP%3E%3CP%3ESoftware%20details%3A%3CBR%20%2F%3ESW32K3_S32DS_3.5.8_D2311.zip%3CBR%20%2F%3ESW32K3_S32M27x_RTD_R21-11_4.0.0_D2311_DS_updatesite.zip%3CBR%20%2F%3ESW32K3_FreeRTOS_10.6.0_CD_4.0.0_DS_updatesite_D2312.zip%3CBR%20%2F%3ESW32K3_TCPIP_STACK_1_0_4_D2401_DS_updatesite.zip%3C%2FP%3E%3CP%3EThank%20you%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2083039%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K358%20GMAC%20sends%20abnormal%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2083039%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F233505%22%20target%3D%22_blank%22%3E%40PavelL%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%20class%3D%22%22%3EThank%20you%20for%20your%20valuable%20guidance.%3CSTRONG%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CBR%20%2F%3EI%20followed%20the%20steps%20you%20suggested%2C%20and%20I'm%20happy%20to%20share%20that%20the%20issue%20has%20been%20resolved.%3C%2FP%3E%3CP%20class%3D%22%22%3EThanks%20again%2C%3CBR%20%2F%3ESathish.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2082627%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K358%20GMAC%20sends%20abnormal%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2082627%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%2F248322%22%20target%3D%22_blank%22%3E%40sathishkumar_sunmugavel%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3Ethere's%20an%20issue%20with%20the%20clock%20in%20your%20project.%3C%2FP%3E%0A%3CP%3E1.%20Add%20this%20before%20Clock_Ip_Init%3A%3C%2FP%3E%0A%3CP%3E%2F*%20Set%20RMII%20configuration%20for%20EMAC%20in%20DCM%20module%20*%2F%3CBR%20%2F%3EIP_DCM_GPR-%26gt%3BDCMRWF1%20%3D%20(IP_DCM_GPR-%26gt%3BDCMRWF1%20%26amp%3B%20~DCM_GPR_DCMRWF1_MAC_CONF_SEL_MASK)%20%7C%20DCM_GPR_DCMRWF1_MAC_CONF_SEL(2U)%3B%3C%2FP%3E%0A%3CP%3E2.%20Your%20clock%20shall%20look%20like%20that%20(it's%20picture%20for%20EMAC%2C%20but%20also%20valid%20for%20GMAC%2C%20in%20this%20case)%3A%3C%2FP%3E%0A%3CP%3E-%20RX%20shall%20be%20disabled%3C%2FP%3E%0A%3CP%3E-%20I%20usually%20used%20doble%20frequency%20on%20TS%20clock%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F333704i252E721CD84E2CFA%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E3.%26nbsp%3BTJA1103-SDBR%20needs%20to%20be%20in%20rev-RMII%20mode%20to%20generate%20clock%20on%20TXC%20-%26gt%3B%20check%20your%20jumpers%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20414px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20414px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F333703i768BB9F8AD2AC0C8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20might%20also%20consider%20to%20start%20your%20project%20from%20another%20example%2C%20like%20lwip_FreeRTOS_S32k358.%3C%2FP%3E%0A%3CP%3EFYI%2C%20there%20are%20Easter%20holidays%20on%20Friday%20and%20on%20Monday%2C%20my%20response%20will%20be%20delayed.%20Thank%20you%20for%20your%20understanding.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E