Can2Eth/Eth2Can Sample Project

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

Can2Eth/Eth2Can Sample Project

Jump to solution
3,319 Views
Siyan
Contributor III

Hi, NXP Experts,

We're developing Can2Eth and Eth2Can function on S32G399a.

As we designed, PFE and Ethernet driver deployed on A53, LLCE and Can driver deployed on M7.

Currently, PFE and Ethernet communication could work well on A53 and LLCE and Can communication could work well on M7. Then, we configured the function of Can2Eth on M7 Llce_Af MCAL module. But it reports some compile errors which indicate the Can_43_Llce requires many functions in Eth_43_PFE module. We're not sure how to handle this situation, as we not plan to deploy Eth_43_PFE module on M7.

1.On the design of Can_43_Llce module, Eth_43_PFE module must deploy on the same core with Can_43_Llce?

2.Does NXP could provide Sample Project like we want to implement.

 

0 Kudos
Reply
1 Solution
3,132 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

There is a bug on the LLCE provided CAN2ETH application. The following thread gives the provided bug fix:

Solved: S32G2 LLCE-1.0.4 can2eth - NXP Community

There is also some notes provided on the following Application Note regarding ETH2CAN project:

AN13423: Using CAN2CAN, CAN2ETH and ETH2CAN Features of LLCE on S32G Application Note (nxp.com)

Please, let us know if this information was helpful or not.

View solution in original post

0 Kudos
Reply
8 Replies
3,303 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Given that S32G3 is still under control of distribution, the information is confidential. We could recommend sending this inquiry to your local NXP representative/FAE for them channel it through the correct medium.

The specifics of how the implementation should be done, might be better to see it on the provided example (more information below). Going logically with the idea of LLCE and PFE, the deployment should be done on the same core. Still, we recommend looking into the provided example to clear this question. 

As for examples for CAN2ETH, S32G2 had an example provided on the LLCE Firmware that works with TRESOS, this should be available under the following address:

"C:\nxp\S32G_LLCE_1_0_4\sample_app_llce\llce_sample_app_pfe"

Given that the LLCE Firmware works with both G2 and G3, there should be a project for both G2 and G3.

Please, let us know.

0 Kudos
Reply
3,265 Views
Siyan
Contributor III

I still can't understand why the PFE and ETH driver must deploy on the same core with LLCE.

I have go through the sample project "llce_sample_app_pfe", Can_Llce_Init_PfeIf(PFE_PHY_IF_ID_HIF3); is used to trigger LLCE to initialize the PFE minidrv in LLCE. Could you tell me which point the LLCE required ETH driver must on the host core, even though the host core don't need ethernet communication.

0 Kudos
Reply
3,254 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Given that the LLCE and the PFE are internal modules, there is a need of the HOST to initialize them or at least have the references needed. 

The LLCE module itself is provided with precompiled binaries, then the application itself is loaded to the HOST (not the LLCE) and it needs to create the link to the used functions and structures by adding the components, even though the HOST itself may not interface with the module directly.

If not, then the compiler will issue different errors to non-referenced functions, due to the application itself not having the needed peripherals/modules.

In summary, the HOST needs the references of the functions to be used on the application. If the function is being compiled in the HOST, the compiler will look into the HOST application to find the reference to this function.

Please, let us know if this information was helpful or not.

0 Kudos
Reply
3,216 Views
Siyan
Contributor III

Why LLCE Slave always failed?

Siyan_0-1678689809895.pngSiyan_1-1678689845218.png

 

0 Kudos
Reply
3,209 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

Could you elaborate more on your question?

Are you referring to LLCE CAN? If so, there is no slave configuration regarding CAN.

We apologize for our misunderstanding, let us know.

0 Kudos
Reply
3,144 Views
Siyan
Contributor III

Hi,

Update for latest statue:

Reference to S32G_LLCE_1_0_4\sample_app_llce\llce_sample_app_pfe\ projcet to test CAN2ETH and ETH2CAN on our ECU.

The CAN2ETH could work normally, but ETH2CAN couldn't work.

I have look into the EMAC1 registers Rx_Packets_Count_Good_Bad、Rx_Octet_Count_Good and Rx_Unicast_Packets_Good, they all increase when PC send AVTP ethernet frame to ECU. But the register of HIF3, HIF_RX_PKT_CN0_Ch3(0x460984dc) and HIF_RX_PKT_CN1_Ch3(0x460984e0) always keep 0.

EMAC1 could receive the ethernet frames, but not transfer to HIF3. What do you think about this phenomenon.

Attached is our project. Could you have a try on S32G3.

 

0 Kudos
Reply
3,133 Views
Daniel-Aguirre
NXP TechSupport
NXP TechSupport

Hi,

There is a bug on the LLCE provided CAN2ETH application. The following thread gives the provided bug fix:

Solved: S32G2 LLCE-1.0.4 can2eth - NXP Community

There is also some notes provided on the following Application Note regarding ETH2CAN project:

AN13423: Using CAN2CAN, CAN2ETH and ETH2CAN Features of LLCE on S32G Application Note (nxp.com)

Please, let us know if this information was helpful or not.

0 Kudos
Reply
3,127 Views
Siyan
Contributor III

The issue sloved by changing "Llce_Af > Eth2Can > Number of Eth2Can Buffer (72 -> 255)" to 73.

0 Kudos
Reply