S32G-VNP-GLDBOX PFE_Driver run failed on M7

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

S32G-VNP-GLDBOX PFE_Driver run failed on M7

Jump to solution
1,454 Views
longtengqiufeng1
Contributor III

Hi,

I want to enable PFE_MAC2 ethernet interface with LWIP and FreeRTOS on M7 core, so I download:

---SW32G_RTD_4.4_3.0.2_HF01_D2204.exe

--PFE-DRV_S32G_M7_MCAL_BETA_0.9.8.zip

--EB tresos 27.1.0

I refer to "Guide to enable PFE with LWIP based on RTD" document, follow it steps to modify the example demo lwip_s32g274a , but it run failed.

1. when I “suspend” the program ,it always stuck in a line  which is show as below picture:

longtengqiufeng1_0-1670219332530.png

How to solve it?

2. In oder to compile the program,I modify linker_ram.ld

longtengqiufeng1_3-1670220053375.png

longtengqiufeng1_1-1670219852086.png

Is that correct?

Thanks!!

0 Kudos
Reply
1 Solution
1,359 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @longtengqiufeng1,

Hope you are doing well.

Have you tried to enable only XPCS1? as attached code shows that you are trying to enable XPCS0 and XPCS1.

Please change the .xpcs_mode to SGMII_XPCS1 if you want to enable serdes using that.

 

Hope this helps.

 

Thanks,

Mayank s Patel

View solution in original post

0 Kudos
Reply
6 Replies
1,380 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @longtengqiufeng1,

I have a few questions to understand the issue properly.

Problem-1:

Can you try again with steps 10 to 12 again carefully of "GUIDE TO ENABLE PFE WITH LWIP BASED ON RTD"? It seems that the linker file is not modified properly.

Problem 2:

1. Have you referred to the serdes_example_doc.txt document? This document mentioned manual changes for clock frequency, source, and XPCS. (Available along with PFE MCAL Package)

2. Can you confirm that you have called serdes_init() after MCU_Init() and before MCU_init() function? as MCU_init() would be called twice here. 

 

Thanks,

Mayank s Patel

0 Kudos
Reply
1,369 Views
longtengqiufeng1
Contributor III

Hi,

Thank you for your suggestion!

problem1:

I solved the problem, I modified this value ,

longtengqiufeng1_0-1672971476775.png

and modified the " .pfe_bmu_mem" align size .

longtengqiufeng1_1-1672971653737.png

problem2:

I don't use AUTOSAR to run PFE_Driver, I run it with FreeRTOS and lwIP.

So, my project doesn't have the function MCU_Init() .

I use this SerDes Driver program from herehttps://www.nxp.com.cn/design/designs/s32g2-vehicle-networking-reference-design:S32G-VNP-RDB2 

longtengqiufeng1_0-1673248150229.png

And I use the program communicate with PFE_EMAC0 successfully.

But when I change the mode to "SGMII_XPCS0_XPCS1", it always has this error.

longtengqiufeng1_2-1673248805045.png

 

longtengqiufeng1_1-1673248598880.png

 So how to modify this driver(in attachment)?

Thank you!

 

 

0 Kudos
Reply
1,360 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @longtengqiufeng1,

Hope you are doing well.

Have you tried to enable only XPCS1? as attached code shows that you are trying to enable XPCS0 and XPCS1.

Please change the .xpcs_mode to SGMII_XPCS1 if you want to enable serdes using that.

 

Hope this helps.

 

Thanks,

Mayank s Patel

0 Kudos
Reply
1,350 Views
longtengqiufeng1
Contributor III

Hi,

Thank you very much !!

First , I change the .xpcs_mode to SGMII_XPCS1, it can be initialized successfully.But the EMAC1 still can't communicate with my PC.

And then , I remembered you mention it,

longtengqiufeng1_0-1673505177761.png

So I replace the function with this fuction ,

longtengqiufeng1_1-1673505282349.png

The EMAC1 driver is running successfully!

Thank you again for your help!

0 Kudos
Reply
1,416 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @longtengqiufeng1,

Thank you for reaching out to us.

We are working on that to provide you with the solution. We will reply on this as soon as possible.

0 Kudos
Reply
1,393 Views
longtengqiufeng1
Contributor III

Hi,

Thank you for your reply!

In addition to the above problems,  I have other problems associated with "PFE_MAC1".

I have finished configuration, such as pins, clock and PFE driver of PFE_MAC1,  and I add serdes document which from PFE_DEMO to my project directory.

In order to enable PFE_MAC1's sgmii mode, I modify the code like this:

longtengqiufeng1_0-1672823297996.png

But I still cannot communicate with PFE_MAC1, what steps am I missing?

0 Kudos
Reply