Ethernet initialisation issues in AVTP project

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

Ethernet initialisation issues in AVTP project

968 Views
ssattva1
Contributor III

I am working on AVTP implementation using AVB stack provided by NXP

ssattva1_0-1754643186207.png

I am specifically working on s32k358_baremetal_acf_example project and I am facing issues after flashing the elf. I did not face any issues with building the project (make sure RTD version is 4.0 , not 5.0). My ethernet module initialisation is not getting done after flashing.

Issues:

  • Program goes to HW fault immediately after flashing , reason being " MemManage: The processor attempted an instruction fetch from a location that does not permit execution. HardFault: A fault has been escalated to a hard fault." After clicking reset button in the debug window then it enters into main.c

ssattva1_1-1754643620648.png

  • In the function EMACLLD_ClockInit_HwSwitch() , the clock switch is not happening and upon observing the registers  I come to know that the clock switch request fails and FIRC is the source instead of EMAC_EXTERNAL_TX_RMII. "010b - Switch after the request failed because of an inactive target clock and the current clock is FIRC."

ssattva1_0-1754643881076.png

 

  • Upon further digging , I decide to compare it with LWIP baremetal project . The above registers show success after Clock_Ip_Init () in device_init(), not so the case with AVTP project.  I am using the same board and PHY , yet I dont know why it shows target clock inactive when it comes to AVTP project.
  • Even if I comment out the EMACLLD_ClockInit_HwSwitch() function and make appropriate clock configs in the peripheral tool , it again gets stuck at DMA init

ssattva1_1-1754644217547.png

 

  • Please help me resolve this blocker.
    HW USED: S32K358 eval board
    PHY : ADTJA1101-RMII
Tags (3)
0 Kudos
Reply
3 Replies

961 Views
PavelL
NXP Employee
NXP Employee

Hello @ssattva1 ,

I have successfully run RGMII with the TJA1103-SDBR on the S32K3X8EVB-Q289.

However, RMII requires some hardware modifications to the board. For details, please refer to section 13.2 of the S32K3X8EVB-Q289 Hardware User Manual (S32K3X8EVB-Q289HWUM.pdf).

Best regards,

Pavel

0 Kudos
Reply

933 Views
ssattva1
Contributor III
Hi @PavelL , Lwip example works without making those changes in HW for RMII.
I found this thing recently, when I probe into resistor 65 in ADTJA1101, which is the resistor along REFCLK, the voltage level is around 2V for LWIP project , but it drops down to 1V as soon as I run AVTP project. Could you help me with this?
0 Kudos
Reply

886 Views
PavelL
NXP Employee
NXP Employee

Hello @ssattva1 ,

I apologize for the delayed response — I was on vacation.

It's great to hear that the LWIP example works for you.

Regarding the voltage drop on REFCLK, this seems like a hardware conflict. Please verify that the RMII pin configuration matches between the LWIP example and your AVTP project. Specifically, the emac_mii_rmii_tx_clk pin should be configured as input.

In other words, since one example works, I recommend comparing its configuration with the other project to identify any discrepancies.

Best regards,

Pavel

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2149081%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EEthernet%20initialisation%20issues%20in%20AVTP%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2149081%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20working%20on%20AVTP%20implementation%20using%20AVB%20stack%20provided%20by%20NXP%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ssattva1_0-1754643186207.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ssattva1_0-1754643186207.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F351549i200946C26275D1AD%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ssattva1_0-1754643186207.png%22%20alt%3D%22ssattva1_0-1754643186207.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20am%20specifically%20working%20on%20s32k358_baremetal_acf_example%20project%20and%20I%20am%20facing%20issues%20after%20flashing%20the%20elf.%20I%20did%20not%20face%20any%20issues%20with%20building%20the%20project%20(make%20sure%20RTD%20version%20is%204.0%20%2C%20not%205.0).%20My%20ethernet%20module%20initialisation%20is%20not%20getting%20done%20after%20flashing.%3CBR%20%2F%3E%3CBR%20%2F%3EIssues%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CUL%3E%3CLI%3EProgram%20goes%20to%20HW%20fault%20immediately%20after%20flashing%20%2C%20reason%20being%20%22%26nbsp%3BMemManage%3A%20The%20processor%20attempted%20an%20instruction%20fetch%20from%20a%20location%20that%20does%20not%20permit%20execution.%20HardFault%3A%20A%20fault%20has%20been%20escalated%20to%20a%20hard%20fault.%22%20After%20clicking%20reset%20button%20in%20the%20debug%20window%20then%20it%20enters%20into%20main.c%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ssattva1_1-1754643620648.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ssattva1_1-1754643620648.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F351551i3122D9204BA0430B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ssattva1_1-1754643620648.png%22%20alt%3D%22ssattva1_1-1754643620648.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3EIn%20the%20function%26nbsp%3BEMACLLD_ClockInit_HwSwitch()%20%2C%20the%20clock%20switch%20is%20not%20happening%20and%20upon%20observing%20the%20registers%26nbsp%3B%20I%20come%20to%20know%20that%20the%20clock%20switch%20request%20fails%20and%20FIRC%20is%20the%20source%20instead%20of%20EMAC_EXTERNAL_TX_RMII.%20%22%3CSPAN%3E010b%20-%20Switch%20after%20the%20request%20failed%20because%20of%20an%20inactive%20target%20clock%20and%20the%20current%20clock%20is%20FIRC.%22%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ssattva1_0-1754643881076.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ssattva1_0-1754643881076.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F351553i31C9733BFBC2795D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ssattva1_0-1754643881076.png%22%20alt%3D%22ssattva1_0-1754643881076.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CLI%3EUpon%20further%20digging%20%2C%20I%20decide%20to%20compare%20it%20with%20LWIP%20baremetal%20project%20.%20The%20above%20registers%20show%20success%20after%20Clock_Ip_Init%20()%20in%20device_init()%2C%20not%20so%20the%20case%20with%20AVTP%20project.%26nbsp%3B%20I%20am%20using%20the%20same%20board%20and%20PHY%20%2C%20yet%20I%20dont%20know%20why%20it%20shows%20target%20clock%20inactive%20when%20it%20comes%20to%20AVTP%20project.%3C%2FLI%3E%3CLI%3EEven%20if%20I%20comment%20out%20the%26nbsp%3BEMACLLD_ClockInit_HwSwitch()%20function%20and%20make%20appropriate%20clock%20configs%20in%20the%20peripheral%20tool%20%2C%20it%20again%20gets%20stuck%20at%20DMA%20init%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ssattva1_1-1754644217547.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22ssattva1_1-1754644217547.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F351554i8C43CFA6C5ED2697%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ssattva1_1-1754644217547.png%22%20alt%3D%22ssattva1_1-1754644217547.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CLI%3EPlease%20help%20me%20resolve%20this%20blocker.%3CBR%20%2F%3EHW%20USED%3A%20S32K358%20eval%20board%3CBR%20%2F%3EPHY%20%3A%20ADTJA1101-RMII%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2152101%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Ethernet%20initialisation%20issues%20in%20AVTP%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2152101%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%2F243530%22%20target%3D%22_blank%22%3E%40ssattva1%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EI%20apologize%20for%20the%20delayed%20response%20%E2%80%94%20I%20was%20on%20vacation.%3C%2FP%3E%0A%3CP%3EIt's%20great%20to%20hear%20that%20the%20LWIP%20example%20works%20for%20you.%3C%2FP%3E%0A%3CP%3ERegarding%20the%20voltage%20drop%20on%20REFCLK%2C%20this%20seems%20like%20a%20hardware%20conflict.%20Please%20verify%20that%20the%20RMII%20pin%20configuration%20matches%20between%20the%20LWIP%20example%20and%20your%20AVTP%20project.%20Specifically%2C%20the%20emac_mii_rmii_tx_clk%20pin%20should%20be%20configured%20as%20input.%3C%2FP%3E%0A%3CP%3EIn%20other%20words%2C%20since%20one%20example%20works%2C%20I%20recommend%20comparing%20its%20configuration%20with%20the%20other%20project%20to%20identify%20any%20discrepancies.%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-2149790%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Ethernet%20initialisation%20issues%20in%20AVTP%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2149790%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHi%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%20%2C%20Lwip%20example%20works%20without%20making%20those%20changes%20in%20HW%20for%20RMII.%3CBR%20%2F%3EI%20found%20this%20thing%20recently%2C%20when%20I%20probe%20into%20resistor%2065%20in%20ADTJA1101%2C%20which%20is%20the%20resistor%20along%20REFCLK%2C%20the%20voltage%20level%20is%20around%202V%20for%20LWIP%20project%20%2C%20but%20it%20drops%20down%20to%201V%20as%20soon%20as%20I%20run%20AVTP%20project.%20Could%20you%20help%20me%20with%20this%3F%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2149182%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Ethernet%20initialisation%20issues%20in%20AVTP%20project%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2149182%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%2F243530%22%20target%3D%22_blank%22%3E%40ssattva1%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%0A%3CP%3EI%20have%20successfully%20run%20RGMII%20with%20the%20TJA1103-SDBR%20on%20the%20S32K3X8EVB-Q289.%3C%2FP%3E%0A%3CP%3EHowever%2C%20RMII%20requires%20some%20hardware%20modifications%20to%20the%20board.%20For%20details%2C%20please%20refer%20to%20section%2013.2%20of%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CEM%3ES32K3X8EVB-Q289%20Hardware%20User%20Manual%3C%2FEM%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E(S32K3X8EVB-Q289HWUM.pdf).%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPavel%3C%2FP%3E%3C%2FLINGO-BODY%3E