Roman Gassmann

MCF52259 & DP83640

Discussion created by Roman Gassmann on Sep 23, 2011
Latest reply on Nov 2, 2011 by Butcher

Hi everyone,

 

i've got a DP83640 connected to my MCF52259. Now i've just want to ping my Device over the Ethernet. So I don't need any buffers. So I wrote the following code to initialize the FEC:

void Driver_TCP_IP_Init(){ MCF_GPIO_PTIPAR = 0xff;  //Enable all pins to Ethernet function MCF_GPIO_PTJPAR = 0xff;  //Enable all pins to Ethernet function   MCF_FEC_ECR = MCF_FEC_ECR_RESET;   while (MCF_FEC_ECR & MCF_FEC_ECR_RESET)   {      /* null */ ;   }/* Disable all FEC interrupts by clearing the EIMR Iterrupt Mask register */MCF_FEC_EIMR = 0x00000000; //no inerrupts needed! just to ping the dev/* Clear any interrupts by setting all bits in the EIR register */MCF_FEC_EIR = 0xFFFFFFFF;//TFWR (optional)/* Set the source mac address for the controller */MCF_FEC_PALR = (0  | (0x11 <<24)  | (0x22 <<16)  | (0x33 <<8)  | (0x44 <<0));MCF_FEC_PAUR = (0  | (0x55 <<24)  | (0x66 <<16)  | MCF_FEC_PAUR_TYPE(0x00008808));/* Initialize the hash table registers */MCF_FEC_IAUR = 0;MCF_FEC_IALR = 0;MCF_FEC_GALR=0xFFFFFFFF;MCF_FEC_GAUR=0xFFFFFFFF; //MII SPEEC 2.5MHz at maxMCF_FEC_MSCR=MCF_FEC_MSCR_MII_SPEED(16); // SYSCLK = 80MHz => 16 is this possible? According to the gudie 15 is the maximum!MCF_FEC_MIBC&=~MCF_FEC_MIBC_MIB_DISABLE;MCF_FEC_ECR |= MCF_FEC_ECR_ETHER_EN;MCF_FEC_RDAR=MCF_FEC_RDAR_R_DES_ACTIVE;MCF_FEC_TDAR=MCF_FEC_TDAR_X_DES_ACTIVE;}

Now the MCF stops working at line MCF_FEC_ECR |= MCF_FEC_ECR_ETHER_EN;

Does anyone know why? Further The MII Speed should be below 2.5MHz now since i've got 80MHz i need to set the MCF_FEC_MSCR_MII_SPEED to 16 but in the Gudie it is stated that it only supports values lower than 16! what do I have to do, to be able work with 80MHz?

 

thanks in advance!

regards

the mnemonic

Outcomes