We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am working on LPC2378 ( the board was designed with the help of MCB2300 schematics taken from KEIL website)and currently testing the Ethernet MAC and the PHY used is DP83848. wheni try to initialize the MAC the microcontroller hangs and JTAG debugger communication halts with the message 'Target processor in reset' .The code is taken from the KEIL website and is as follows
MAC1 = 0xCF00 ; /*soft resets all MAC internal modules*/ /*a delay routine*/ MAC_MAC1 = 0x0; /* deassert all of the above soft resets in MAC1 */
The minute the above line of code is executed the debugger loses control and the LPC2378 hangs. Please help.
Vinaya
Did you correctly set the Ethernet Pins?
/* Enable P1 Ethernet Pins. */ if (MAC_MODULEID == OLD_EMAC_MODULE_ID) { /* For the first silicon rev.'-' ID P1.6 should be set. */ PINSEL2 = 0x50151105; } else { /* on rev. 'A' and later, P1.6 should NOT be set. */ PINSEL2 = 0x50150105; }
Yes Franc i have taken care of this.My LPC2378 is rev '-' chip, but the module id read is 0x39022100( i thought it should be 0x39022000) and i have put PINSEL2 = 0x50151105.I guess this should be OK. Kindly help.Thank you for responding.
I have solved the problem.looks like this is a new bug!! though my LPC2378 top-side marking says rev '-', the module id that i read through the module id register is 0x39022100 which is meant for the newer chips(rev A).So i changed my PINSEL2 init to 0x50150105 After this the problem got solved.Thanx to the forum amf thanx to Franc too. rgds, Vinaya