This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TI DM642 NDK web server question

TI give a  demo of  creating a web server :

//
// Main Thread
//
// We changed our CDB file to point call this private init
// function. Here we initialize our board and read in our
// MAC address.
//
void dm642_init()
{

    // Init cache mode manually
    CSL_init(); 
    CACHE_clean(CACHE_L2ALL, 0, 0);
    CACHE_setL2Mode(CACHE_128KCACHE);
    CACHE_enableCaching(CACHE_EMIFA_CE00);
    CACHE_enableCaching(CACHE_EMIFA_CE01);

 
 bMacAddr[0]='D'; bMacAddr[1]=4;
 bMacAddr[2]='A'; bMacAddr[3]=1;
 bMacAddr[4]='Z'; bMacAddr[5]=1;

 memcpy(IP_MAC,bMacAddr,6);

}

every time start the system, the code run.

TI gives DM642 a MAC adress of "D:4:A:1:Z:1",can  we  change  this  MAC address?

if  we can , how  we  can  change this?

 

  • Hi Stephenier,

    Moving your post to BIOS forum as it is about NDK.

     

    Regards,

    Shankari. 

  • Which version of the NDK are you using?

    You should be able to change the MAC address to one that matches your board and rebuild (assuming that the above code is in your application).

    Steve

  • I use NDK 2.20.

    but I think it doesn't  matter with  the version of NDK.

    I tried to change the MAC address D-4-A-1-Z-2,and  it works.

    the MAC address is stored by an array called bMacAddr, as I mentioned above.

    but if I change it to any other MAC address, the DM642 web server can't connect to the net.

    why?

  • It looks like the MAC address is flashed into ROM.  I took a quick look at the standard NDK client example for the DM642 and see this:

        // Read in EMAC MAC Address
        EVMDM642_EEPROM_read(0x00007F00, (Uint32)bMacAddr, 8);

    So I'm not sure that just assigning bMacAddr[] to have a different address will work.  The EMAC h/w most likely does filtering that compares the address in ROM with the destination address of incoming frames and drops any frames that don't match.

    Have you been able to get the client example to work without changing the MAC address as you described?

    Steve