Author Topic: Hang assigning EMAC_RxStatus  (Read 4913 times)

Offline aaronlawrence

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Hang assigning EMAC_RxStatus
« 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?
« Last Edit: January 06, 2010, 05:31:09 AM by aaronlawrence »

Offline aaronlawrence

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Hard hang in uMallocLAN_Align
« Reply #1 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 ...

Offline aaronlawrence

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Hang assigning EMAC_RxStatus
« Reply #2 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 ...

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3068
    • View Profile
    • uTasker
Re: Hang assigning EMAC_RxStatus
« Reply #3 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

Offline aaronlawrence

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Hang assigning EMAC_RxStatus
« Reply #4 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 ...

Offline aaronlawrence

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Hang assigning EMAC_RxStatus
« Reply #5 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. ...