µTasker Forum

µTasker Forum => NXPTM LPC2XXX and LPC17XX => Topic started by: aaronlawrence on January 06, 2010, 04:53:17 AM

Title: Hang assigning EMAC_RxStatus
Post by: aaronlawrence on January 06, 2010, 04:53:17 AM
I have an intermittent hang in the second call to uMallocLAN_Align in fnConfigEthernet for LPC23xx.
Interestingly, when this hang happens CrossWorks cannot break into it (cannot stop target).

Sometimes when running the app, the startup works fine and the stack goes on to work fine (as far as I can tell, only have Ping so far). Other times it hangs as noted.

Code: [Select]
   EMAC_RxStatus = (unsigned long)uMallocLAN_Align((unsigned short)(sizeof(LPC23XX_RX_STATUS)*i), 8);    // create a smaller pool of buffer descriptors

Because it's intermittent and unstoppable once hung, I have to do this by trial and error so it's slow to find ...
Tips?
Title: Re: Hard hang in uMallocLAN_Align
Post by: aaronlawrence on January 06, 2010, 05:30:42 AM
OK Now I have work out it's not in uMallocLAN_Align
Rather the chip is hanging when EMAC_RxStatus is assigned :(
The address is always the same 0x7fe01800.
which is 8-byte aligned as it's supposed to be (though the datasheet seems slightly confused here, 4 or 8 byte aligned?).

This would seem like a CPU hardware fault to me ...
Title: Re: Hang assigning EMAC_RxStatus
Post by: aaronlawrence on January 11, 2010, 11:28:01 PM
It's probably our fault in the hardware somewhere, but we don't know what to look for.
Theres a possibility the 2368 works but the 2366 doesn't, so we'll try the 2368.
We're trying to get help from NXP but their support seems to be non-existent ...
Title: Re: Hang assigning EMAC_RxStatus
Post by: mark on January 12, 2010, 12:49:23 AM
Hi Aaron

I remember a similar problem but it was quite a long time ago but happened on a new board design. Unfortunately a search for related emails on two PCs didn't find any reference with any details. A possible difference is that the hang was much earlier on in the routine, when MAC register writes started. Your hang seems to be later and so possibly not the same.

I wish I could remember more details but I just remember it being solved by changing a pin state or something - it may also have been a tip from NXP at the time. Hope you solve it quickly.

Regards

Mark
Title: Re: Hang assigning EMAC_RxStatus
Post by: aaronlawrence on January 26, 2010, 01:18:36 AM
It appears to happen only when debugging (should have checked that before!) and I suspect something to do with resetting ...
Title: Re: Hang assigning EMAC_RxStatus
Post by: aaronlawrence on February 19, 2010, 01:37:39 PM
Still have not had any definitive result here, but the workaround delay fixes debug mode and have never seen it under release. So I'm going to consider it closed. ...