Announcements

Equip yourself to optimize AURIX™ MCUs for Evs at the EV Webinar. Click here to register.

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AURIX™ Forum Discussions

toratora_th
Level 1
Level 1
First like received 5 replies posted 10 sign-ins

I am trying to run "GethBasicDemo" in "iLLD_1_0_1_15_0_TC3xx_Drivers_And_Demos_Release" on TriBoard (TC397X).
Channel 0 is working fine, but the receive interrupt for channel 1 does not occur, so the process does not proceed from the "<--- stop" line below.
Can you please tell me what the problem is?
I have not changed the demo source code at all.
As a point of information, when I try to skip channel 1 and run channel 2, the receive interrupt for channel 2 does not occur as it does for channel 1.
Any guidance highly appreciated.
Thanks in advance.

------ GethBasicDemo.c excerpt -------------------------
/* send frame */
IfxGeth_Eth_sendFrame(&g_GethBasic.drivers.geth, &frameConfig);
switch (channelIndex) {
case 0:
while (chn0TxInterrupt != (packet + 1)) ;
while (chn0RxInterrupt != (packet + 1)) ;
break;
case 1:
while (chn1TxInterrupt != (packet + 1)) ;
while (chn1RxInterrupt != (packet + 1)) ; <--- stop
break;
case 2:
while (chn2TxInterrupt != (packet + 1)) ;
while (chn2RxInterrupt != (packet + 1)) ;
break;
case 3:
while (chn3TxInterrupt != (packet + 1)) ;
while (chn3RxInterrupt != (packet + 1)) ;
break;
default:
break;
}
--------------------------------------------------------------

0 Likes
1 Solution
go2sh
Employee
Employee
First like received First solution authored 5 replies posted

Hi toratora_th san,

after some investigation, it seams that it is a compiler issue with the demo, depending on which compiler you are using.

From our team:

"Found to be Tasking compiler issue.
Issue is in application line g_GethBasic.drivers.geth.gethSFR->MAC_RXQ_CTRL1.B.UPQ = channelIndex;
In Tasking, value is not getting updated when written using .B, works when tried using .U access.

Since we are using untagged packets, the value in UPQ configured in the loop, routes the packets from MAC to different MTL Queues which are mapped to corresponding DMA Channels. Now in Tasking due to this value not getting configured it always goes to DMA Rx Ch0.

Solution is to change to .U access in the demo."

Can you change the access to "g_GethBasic.drivers.geth.gethSFR->MAC_RXQ_CTRL1.U = (channelIndex << 12);"?

BR

View solution in original post

10 Replies
KInagaki
Employee
Employee
5 sign-ins First reply posted Welcome!

Hello, in order to distinguish this is compiler dependent or not, can you try running this with another compiler?

0 Likes

Hello, thanks for the advice.
I will consider if I can use another compiler.

0 Likes
go2sh
Employee
Employee
First like received First solution authored 5 replies posted

Hi toratora_th,

can you check the values of the chnXTxInterrupt and chnXRXIntterupt and post them here to see if the packet is lost or capured at a different queue. Did you change the code or did you just compile and run it?

BR,

Christoph

0 Likes

Hi,Christoph san.

Thanks for the information.
I have not changed the source code.
I am using the "TASKING" compiler, but I have been informed that the "Hitech" compiler may work properly.
I am trying to find out if I can get the Hitech compiler.

0 Likes
go2sh
Employee
Employee
First like received First solution authored 5 replies posted

Hi toratora_th,

I'm not 100% if it's a compiler problem. Please check the values of the variables first to see if the packet is dropped due to the PHY loopback or if it is received in a wrong queue.

0 Likes

Hi go2sh san.

Thanks for the advice.
I checked the variable values and found the following
chn0TxInterrupt <- 8
chn1TxInterrupt <- 1
chn0RxInterrupt <- 9
chn1RxInterrupt <- 0

This makes it appear that what should be received on CH1 is being received on CH0.
However, the source code seems to be doing the same processing on all channels, just changing the channel number.
If you have any other points to check, please let us know.

0 Likes
go2sh
Employee
Employee
First like received First solution authored 5 replies posted

Hi toratora_th san,

can you check the MAC_RXQ_CTRL1 register value when the error happens and see if the UPQ value is still 0 or if it has changed?

I'll try the code today on my triboard and see if I can reproduce it.

BR

0 Likes

Hi go2sh san.
Thanks for the reply.
The code changes the value to the channel value as shown below.
I actually saw the register value "MAC_RXQ_CTRL1.B.UPQ" was set to "1".
-----------------------------------------------
for(channelIndex=0;channelIndex<IFXGETH_NUM_OF_CHANNELS;channelIndex++)
{
g_GethBasic.drivers.geth.gethSFR->MAC_RXQ_CTRL1.B.UPQ = channelIndex;
for (packet = 0; packet < IFXGETH_NUM_PACKETS; ++packet)
{
payloadLength = IFXGETH_MAX_BUFFER_SIZE - IFXGETH_HEADER_LENGTH;
packetLength = IFXGETH_MAX_BUFFER_SIZE;
frameConfig.packetLength = IFXGETH_MAX_BUFFER_SIZE;
・・・・・

0 Likes
go2sh
Employee
Employee
First like received First solution authored 5 replies posted

Hi toratora_th san,

after some investigation, it seams that it is a compiler issue with the demo, depending on which compiler you are using.

From our team:

"Found to be Tasking compiler issue.
Issue is in application line g_GethBasic.drivers.geth.gethSFR->MAC_RXQ_CTRL1.B.UPQ = channelIndex;
In Tasking, value is not getting updated when written using .B, works when tried using .U access.

Since we are using untagged packets, the value in UPQ configured in the loop, routes the packets from MAC to different MTL Queues which are mapped to corresponding DMA Channels. Now in Tasking due to this value not getting configured it always goes to DMA Rx Ch0.

Solution is to change to .U access in the demo."

Can you change the access to "g_GethBasic.drivers.geth.gethSFR->MAC_RXQ_CTRL1.U = (channelIndex << 12);"?

BR

Hi go2sh san.

Thank you very much.
The fix you gave me solved the problem.
I appreciate it.