Announcements

Help us improve the Power & Sensing Selection Guide. Share feedback

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

cross mob
Not applicable
Hi,

I just bought a brand new TriCore Starter Kit (Infineon TriCore TC275TF). I am interested in Ethernet, is there any example code for Ethernet to begin with or Ethernet loopback? Thank you
0 Likes
2 Replies
Not applicable
Hi,

I also work with the Ethernet communication on a Application Kit with the TC275 Microcontroller. I'm trying currently to configure the interface as follows. But it does not really work. I can only receive messages but can not send messages . Does anyone see the bug in the configuration?

Thanks in Advance!


//Port configuration
portConfiguration();

ETH_CLC.B.DISR = 0;

ETH_GPCTL.B.EPR = 1;

ETH_BUS_MODE.B.SWR = 1;
while(ETH_BUS_MODE.B.SWR == 1);

/* ETH_BUS_MODE */
ETH_BUS_MODE.B.PBL = 0x2;
ETH_BUS_MODE.B.DSL = 0x2;

/* ETH_MAC_CONFIGURATION */
ETH_MAC_CONFIGURATION.B.PRELEN = 0x2;
ETH_MAC_CONFIGURATION.B.FES = 1;
ETH_MAC_CONFIGURATION.B.WD = 0;
ETH_MAC_CONFIGURATION.B.JD = 0;
ETH_MAC_CONFIGURATION.B.BE = 1;
ETH_MAC_CONFIGURATION.B.DO = 0;
ETH_MAC_CONFIGURATION.B.LM = 0;
ETH_MAC_CONFIGURATION.B.DM = 1;
ETH_MAC_CONFIGURATION.B.DR = 0;
ETH_MAC_CONFIGURATION.B.ACS = 0;
ETH_MAC_CONFIGURATION.B.BL = 0;
ETH_MAC_CONFIGURATION.B.DC = 0;
ETH_MAC_CONFIGURATION.B.TE = 1;
ETH_MAC_CONFIGURATION.B.RE = 1;

/* ETH_FRAME_FILTER */
ETH_MAC_FRAME_FILTER.B.RA = 1;

/* ETH_FLOW_CONTROL */
ETH_FLOW_CONTROL.B.TFE = 1;
ETH_FLOW_CONTROL.B.RFE = 1;

ETH_GMII_ADDRESS.B.CR = 0x01;

/* Initialize DMA Descriptors */
initDmaDesc();

/* ETH_INTERRUPT_ENABLE */
ETH_INTERRUPT_ENABLE.B.TIE = 1;
ETH_INTERRUPT_ENABLE.B.RIE = 1;
ETH_INTERRUPT_ENABLE.B.NIE = 1;

/* ETH_Operation_Mode */
ETH_OPERATION_MODE.B.TSF = 1;
ETH_OPERATION_MODE.B.RSF = 1;
ETH_OPERATION_MODE.B.ST = 1;
ETH_OPERATION_MODE.B.SR = 1;
0 Likes
User16330
Level 2
Level 2
Infinity wrote:
Hi,

I also work with the Ethernet communication on a Application Kit with the TC275 Microcontroller. I'm trying currently to configure the interface as follows. But it does not really work. I can only receive messages but can not send messages . Does anyone see the bug in the configuration?

Thanks in Advance!


//Port configuration
portConfiguration();

ETH_CLC.B.DISR = 0;

ETH_GPCTL.B.EPR = 1;

ETH_BUS_MODE.B.SWR = 1;
while(ETH_BUS_MODE.B.SWR == 1);

/* ETH_BUS_MODE */
ETH_BUS_MODE.B.PBL = 0x2;
ETH_BUS_MODE.B.DSL = 0x2;

/* ETH_MAC_CONFIGURATION */
ETH_MAC_CONFIGURATION.B.PRELEN = 0x2;
ETH_MAC_CONFIGURATION.B.FES = 1;
ETH_MAC_CONFIGURATION.B.WD = 0;
ETH_MAC_CONFIGURATION.B.JD = 0;
ETH_MAC_CONFIGURATION.B.BE = 1;
ETH_MAC_CONFIGURATION.B.DO = 0;
ETH_MAC_CONFIGURATION.B.LM = 0;
ETH_MAC_CONFIGURATION.B.DM = 1;
ETH_MAC_CONFIGURATION.B.DR = 0;
ETH_MAC_CONFIGURATION.B.ACS = 0;
ETH_MAC_CONFIGURATION.B.BL = 0;
ETH_MAC_CONFIGURATION.B.DC = 0;
ETH_MAC_CONFIGURATION.B.TE = 1;
ETH_MAC_CONFIGURATION.B.RE = 1;

/* ETH_FRAME_FILTER */
ETH_MAC_FRAME_FILTER.B.RA = 1;

/* ETH_FLOW_CONTROL */
ETH_FLOW_CONTROL.B.TFE = 1;
ETH_FLOW_CONTROL.B.RFE = 1;

ETH_GMII_ADDRESS.B.CR = 0x01;

/* Initialize DMA Descriptors */
initDmaDesc();

/* ETH_INTERRUPT_ENABLE */
ETH_INTERRUPT_ENABLE.B.TIE = 1;
ETH_INTERRUPT_ENABLE.B.RIE = 1;
ETH_INTERRUPT_ENABLE.B.NIE = 1;

/* ETH_Operation_Mode */
ETH_OPERATION_MODE.B.TSF = 1;
ETH_OPERATION_MODE.B.RSF = 1;
ETH_OPERATION_MODE.B.ST = 1;
ETH_OPERATION_MODE.B.SR = 1;




good to here that you had success with ethernet on AURIX, but can you please help me out, i cannot run the demo code of ethernet from iLLD, it gets stuck in
/** Insert DEBUG instruction
*/
IFX_INLINE void __debug(void)
{
__asm__ volatile ("debug" : : : "memory");
}


before just this the ethernet demo code was in

void IfxEth_enableModule(void)
{
{
uint16 l_TempVar = IfxScuWdt_getCpuWatchdogPassword();
IfxScuWdt_clearCpuEndinit(l_TempVar);
ETH_CLC.U = 0;
IfxScuWdt_setCpuEndinit(l_TempVar);
}
}

then it went in " __asm__ volatile ("debug" : : : "memory");" and got stuck
0 Likes