Ethernet PFE Transmission and Reception

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

Ethernet PFE Transmission and Reception

1,136 Views
Imsiya
Contributor I
I am trying to transmit ethernet frame from driver by using following sequence of function call as mentioned in S32G demo. Eth_43_PFE_ProvideTxBuffer(srcCtrlIndex, Priority, &BufferIndex, &bufPtr, &LengthInBytes); /* Write frame data */ tempRet = Eth_43_PFE_Transmit(srcCtrlIndex, BufferIndex, TST_FRM_TYPE, TRUE, LengthInBytes, dstMacAddr); Eth_43_PFE_TxConfirmation(CtrlIndex); We are sending frame using polling mode. We are facing issues in the Eth_43_PFE_Txconfirmation. Software is stuck in the "while loop" inside the function Eth_PFE_LLD_ReportTransmission(const uint8 u8CtrlIdx, const uint8 u8FifoIdx) I am not understanding the implementation here. What is the criteria for exit the while loop.
0 Kudos
9 Replies

1,094 Views
Imsiya
Contributor I

Can anyone support on this issue?

We are getting one frame from the Ethernet PFE firmware. After that it stucked in the while loop and the transmission is not happening.

Please kindly support.

0 Kudos

1,083 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @Imsiya,

Thank you for reaching out to us.

We have received your query and we are working on it. We will get back to this soon.

Thank you for your patience.

 

Thanks,

Mayank s Patel

0 Kudos

1,067 Views
Imsiya
Contributor I

Hello Team,

The issue that mentioned in the top has been resolved. It was the issue with the configuration of Ethernet buffer in the tresos.

Now it is exiting from the loop and transmission is happening continuously. But we are still able to see only single frame in the wireshark. 

Can any one support , how we can test loop back method for ethernet.

I noted one configuration in the tresos Loopback enabled. That I enabled it. What will be the next step for test the ethernet in the loop back method?

Kindly support.

0 Kudos

1,050 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @Imsiya,

Can you please share the steps to enable the PFE and ethernet and start the transmission of the frame over ethernet?

I think that might be the issue in the steps.

 

Thanks,

Mayank s Patel

0 Kudos

1,042 Views
Imsiya
Contributor I

Hello Patel,

Thanks for your fast reply!!!

Yeah sure.

Steps of Eth_43_PFE Initialization:- 

1. Eth_43_PFE_PreInit();

2. Mcu_Init();

3. Mcu_SetMode();

4. SerDes_Init();

5. Eth_43_PFE_Init();

6.  Std_ReturnType retStatus = Eth_43_PFE_SetControllerMode(0, ETH_MODE_ACTIVE);

7.  Mcu_InitClock(McuClockSettingConfig_0);
while ( MCU_PLL_LOCKED != Mcu_GetPllStatus() )
{

}
Mcu_DistributePllClock();

Steps for transmissiion of the frame:-

1. Invoked test application function created for the transmission of the frame from one of the software component runnables.

2. Eth_43_PFE_ProvideTxBuffer() -> Returns Buffer E_OK;

3. assigned the frame to the buffer pointer .

/* ARP packet */
uint8 tst_frm2_data[] =
{
0x00U, 0x01U, /* HW type */
0x08U, 0x00U, /* Protocol type */
0x06U, /* HW size */
0x04U, /* Protocol size */
0x00U, 0x01U, /* Opcode: ARP request */
0xd8U, 0xcbU, 0x8aU, 0xa3U, 0x7dU, 0xcfU, /* Sender MAC */
0x00U, 0x00U, 0x00U, 0x00U, /* Sender IP */
0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, /* Target MAC */
0x00U, 0x00U, 0x00U, 0x00U, /* Target IP */
};

4. Eth_43_PFE_Transmit() --> it trigger the Eth_43_PFE_LLD_Transmit()--> Returns E_OK from the both function.

5. Called Eth_43_PFE_TxConfirmation soon. 

We are getting first frame in the wireshark. 

From next cycle onwards frames are not getting in the wireshark.

With these information , I believe you can guide me.

Looking forward your guidance.

 

 

0 Kudos

1,008 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @Imsiya,

I think there is a timing gap here.

Eth_43_PFE_TxConfirmation(u8CtrlIndex); is a blocking function that will block until you didn't get the transmission confirmation.

This TxConfirmation function will block an approved buffer until it doesn't get the confirmation and you are supposed to access these buffers. You have to introduce a delay in the while loop.

 

Hope this helps you.

 

Thanks,

Mayank s Patel

0 Kudos

971 Views
Imsiya
Contributor I

Hello Patel,

Sorry for the late reply. We tried to add delay for tx confirmation. The issue was not resolved. We verified tx confirmation is happening every cycle by adding some stubs inside the Ethif_Txconfirmation. It is occuring.

What I observed,  it is related to MAC address that we configured in the both Tresos and test application.

When We keep default Mac address in the both tresos and in the tst_ frame, we are getting the continuous frame.

But for project specific MAC addresss, we are getting only one frame.

We are not understanding the reason behhind this. Could you please answer this?

 

 

0 Kudos

870 Views
MayanksPatel
NXP Employee
NXP Employee

Hi @Imsiya,

Can you please share the screenshot or more information about where you are changing the default MAC Address?

 

0 Kudos

1,128 Views
viswa_kondapall
Contributor IV

I am also having same issue and i stuck at the same situation...ETH functions are stopped in while loop. as we waiting packet transmission status.  small doubt, are you doing this PFE-ETH programming on M7 or A53 ?? 

In my case PFE firmware/Driver is not loading properly for M7. is my understanding while debugging.

ETH functions will work only when PFE firmware is loaded properly.

0 Kudos