Issue for GMAC internal loopback example on S32K344

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

Issue for GMAC internal loopback example on S32K344

536 Views
malove
Contributor IV

Hello

 

I have a question while porting GMAC Loopback mode code.

The structure of my project is as follows:

- PIT increments the counter variable every 1 ms.

- When the counter variable reaches 10, the GMAC_Test function is called.

 

When the GMAC_Test function is called, the output information is as follows:

Tx buffer: 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66) 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66)

Rx buffer: 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00)

Tx buffer: 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66) 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66)

Rx buffer: 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66) 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66)

Tx buffer: 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66) 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66)

Rx buffer: 99 (0x63) 191 (0xbf) 193 (0xc1) 247 (0xf7) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00)

Tx buffer: 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66) 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66)

Rx buffer: 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66) 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66)

Tx buffer: 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66) 17 (0x11) 34 (0x22) 51 (0x33) 68 (0x44) 85 (0x55) 102 (0x66)

Rx buffer: 99 (0x63) 191 (0xbf) 193 (0xc1) 247 (0xf7) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00)

 

After this, the GMAC status variable remains stuck in the GMAC_STATUS_RX_QUEUE_EMPTY state.

In other words, the message sent from TX does not appear to be properly reflected in the RX buffer, and after sending and receiving the message 5 times, the GMAC_STATUS_RX_QUEUE_EMPTY state cannot be exited.

How can I resolve this issue?

Tags (3)
0 Kudos
Reply
1 Reply

529 Views
malove
Contributor IV

Apologies, I have resolved the issue.

I had not added DstAddr, SrcAddr, EtherType/Length, and FCS to the data, and I had not called the Gmac_Ip_ProvideRxBuff(INST_GMAC_0, 0U, &rx_buffer) function.

After adding this code, the issue was resolved.