Hi all
I am using LPC2378 processor and trying to initialize the ethernet ...i got the ethernet code from the net for MCB2300 board.
my LPC2378 is running on 16MHz crystal. and i am using DM9161 PHY layer which is different from the dev board of DP83848 chip.
I am using keil compiler for debugging the code but when i am trying to initialize the LPC internal register for ethernet .
MAC1 = 0xCF00 ; /*soft resets all MAC internal modules*/ then after some delay MAC_MAC1 = 0x0; /* deassert all of the above soft resets in MAC1 */
the problem occures when i de assert the MAC1 register the debug stops and indicates an error saying "debug cannot stop the ARM module " agter which i am unable to debug the code .
if the ethernet init function is blocked and debugged ,its working fine .
The thing i am unable to understand is the same code is working for me on the dev board MCB2300 boad without any problem.....so wt might be problem with my LPC board .
has any one came accross this problem ....plz provode me with the solution ..
Regards Suresh
Hi All, I runed Easyweb samples code on MCB2300 Eval board and my target board, MCB2300 is ok, but my target board always occurs error when executes to MAC_MAC1 = MAC1_PASS_ALL; very similar to your problom, any progress in you solving Regards
======================================= void Init_EMAC(void) { // Keil: function modified to access the EMAC // Initializes the EMAC ethernet controller unsigned int regv,tout,id1,id2;
/* Enable P1 Ethernet Pins. */ PINSEL2 = 0x55555555; PINSEL3 = (PINSEL3 & ~0x0000000F) | 0x00000005;
/* Power Up the EMAC controller. */ PCONP |= 0x40000000;
/* Reset all EMAC internal modules. */ MAC_MAC1 = MAC1_RES_TX | MAC1_RES_MCS_TX | MAC1_RES_RX | MAC1_RES_MCS_RX | MAC1_SIM_RES | MAC1_SOFT_RES; MAC_COMMAND = CR_REG_RES | CR_TX_RES | CR_RX_RES;
/* A short delay after reset. */ for (tout = 100; tout; tout--);
/* Initialize MAC control registers. */ MAC_MAC1 = MAC1_PASS_ALL;