S32K358 gmac example not working (no loopback)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K358 gmac example not working (no loopback)

1,448件の閲覧回数
rgujjari
Contributor II
I am trying to follow the 'Gmac_Ip_InternalLoopback_S32K358' example on our board. The loopback example works. Now, I am trying to send the packet out of the board through (no loopback) and I don't see any data. Looking through the example code, I see a couple of issues, could you please confirm I am mistaken or the example code is wrong. A. in src/main.c /* Payload = Frame - (DstAddr + SrcAddr + EtherType/Length + FCS) */ *((uint32 *)(TxBuffer.Data + 13U)) = 64U - (6U + 6U + 2U + 4U); question1: The above line is setting the length of the ethernet frame. Shouldn't it start at offset 12 and not 13? question2:The length is only 16bits, why is it setting 32bits? question3:Length field should have most significant byte at offset 12 and least significant byte at offset 13. The above line sets the fields in little endian order (per my understanding) and looking at the design studio watch window. B. I replaced the Destination mac address in the example code with the mac address of the partner host on the other side. Example code uses TxOptions with the following line. Gmac_Ip_TxOptionsType TxOptions = {TRUE, GMAC_CRC_AND_PAD_INSERTION, GMAC_CHECKSUM_INSERTION_DISABLE}; question4: What should I choose for the TxOptions, if I want to send the packet out of the line? question5: Any other change I need to make in the peripherals tool to get this working? thank you for your help in advance, Raj #s32k358 #s32k328 #gmac #ethernet #loopback
0 件の賞賛
返信
5 返答(返信)

1,423件の閲覧回数
rgujjari
Contributor II

A follow up question..

In the above example, in the pins tool, gmac0_mii_rmii_rgmii_tx_clk is defined as input.

Shouldn't this be output?

 

thank you

-Raj

0 件の賞賛
返信

1,418件の閲覧回数
rgujjari
Contributor II

gmac-src-main.png

0 件の賞賛
返信

1,421件の閲覧回数
rgujjari
Contributor II

gmac-clock.png

0 件の賞賛
返信

1,383件の閲覧回数
Daniel_Wax
NXP Employee
NXP Employee

Raj

 

The schematic you have provided off line does nto show the connection to the MAC of the other device.

Typically it looks like this. 

Daniel_Wax_0-1728321781572.png

Please provide your connection

 

0 件の賞賛
返信

1,377件の閲覧回数
rgujjari
Contributor II

Dan,

I shared the mcu-switch connections on our board through email.

 

thanks

Raj

0 件の賞賛
返信