Eth GMAC0 controller on M - core - S32G3

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

Eth GMAC0 controller on M - core - S32G3

529 Views
winstonlewis
Contributor I

Hello,

 

I'm trying to enable Gmac0 controller on M - core and using EB stack, the driver is integrated with the stack, I have not given the reference of eth controller to ethif layer, just for testing purpose I'm calling following API's to test the loopback,

Eth_SetControllerMode(EthConf_EthCtrlConfig_EthCtrlConfig_GMAC0, ETH_MODE_ACTIVE);
Eth_ProvideTxBuffer(EthConf_EthCtrlConfig_EthCtrlConfig_GMAC0, 0U, &BufferIndex, &PayloadBuffer, &PayloadLength);
Eth_GetPhysAddr(EthConf_EthCtrlConfig_EthCtrlConfig_GMAC0, MacAddr);
Eth_Transmit(EthConf_EthCtrlConfig_EthCtrlConfig_GMAC0, BufferIndex, (Eth_FrameType)46U, TRUE, 46U, MacAddr);
Eth_TxConfirmation(EthConf_EthCtrlConfig_EthCtrlConfig_GMAC0);
/* Wait for frames to be received. */
do
{
Eth_GetRxStats(EthConf_EthCtrlConfig_EthCtrlConfig_GMAC0, &RxStatus);
} while (RxStatus.RxStatsPkts < 1U);

Eth_Receive(EthConf_EthCtrlConfig_EthCtrlConfig_GMAC0, 0U, &Status);
if (ETH_RECEIVED != Status)
{
Pass = FALSE;
}
}
if(Pass == TRUE)
{
Eth_SetControllerMode(EthConf_EthCtrlConfig_EthCtrlConfig_GMAC0, ETH_MODE_DOWN);
}

But the control won't come out of the while loop as transmission is not happening properly and whenever I check TxConfirmation I'm getting error which says GMAC_STATUS_BUSY.

winstonlewis_0-1727085385141.png

Here Bd->Des3 has some value always and GMAC_TDES3_OWN_MASK is has defined as 0x80000000U so this condition is always true and will always get GMAC_STATUS_BUSY.

I have captured the snips of the EB configuration and prepared a document and attached the same with this ticket. 

Please help me resolve this query.

 

Regards,

Winston Lewis

0 Kudos
Reply
0 Replies