Can't Initialise the MAC on SAM7-EX256

tsdolgoon wrote on Friday, December 12, 2008:

I’m using FreeRTOS 5.1.1

Here my problem is:

The following loop begins by do, couldn’t initialize the MAC. Means this loop doesn’t end. Here xEMACInit function is driver specific, and it uses MII interface not RMII.

void vuIP_Task( void *pvParameters ){
    …
    /* Initialise the MAC. */
    do{
        RSC_Call("    xEMACSemaphore is NULL\n\r");
        vTaskDelay( uipINIT_WAIT );
        xEMACSemaphore = xEMACInit();
    } while( xEMACSemaphore == NULL );
    …
}

I would appreciate any idea on my problem.
Please help me !!!

rtel wrote on Friday, December 12, 2008:

You will have to step into the xEMACInit() function to see where and what is failing.  Do you have a cable plugged in?

Regards.

tsdolgoon wrote on Friday, December 12, 2008:

Yes, I have a cable plugged in.
For me problem seems like xEMACInit() function does not access network controller properly.
Network controller chip was Micrel KS8721BL. Is this xEMACInit() function suit for it?

And actually, I can’t figure out the ports defined in AT91SAM… .h related to the network controller chip.

davedoors wrote on Friday, December 12, 2008:

The demo is setup to use whichever PHY is on the AT91SAM7X-EK board, which I don’t think is a Micrel part but I could be wrong.

tsdolgoon wrote on Friday, December 12, 2008:

Thanks Davedoors.
Is there any source for SAM7EX-256 accessing Micrel KS8721BL controller?

mikaelo wrote on Friday, December 12, 2008:

I believe I ran into the same issue (seem my thread a few threads back).
I tracked it down to the code tries to identify the PHY,  the ID’s returned are 0x000FFFF.
It may be earlier in the process, that initialization lacks something.

I have just gotten another non-preemptive OS to run on this board and gotten the Ethernet working. So for now, I’ll use that to learn ARM coding, and if it falls short of my needs, I’ll look at how the PHY is initialized there and try to take some hints from there how the PHY is initialized and perhaps try to fix the demo code, but for now I believe I will try to learn the ARM programming under uTasker, a simple co-op scheduler with IP stack and a few other goodies and it’s free for non commercial/ educational use.

I have their sample up and running and will try add support for a scrolling buffer on the  LCD and SD/Fatfs card next.