LPC2468 Ethernet MAC - strange behaviour

OP #2000782
I'm working on a LPC2468 board equipped with the Micrel KSZ8001L phy. I 
am trying to implement a simple network stack (no TCP or IP, I invented 
my own simple protocol).
I am running uC/OS-II on this board. What I'm trying to do is the 
following:
I installed an ISR which is called every time an Ethernet frame is 
received. In this ISR, I allocate a 1500 byte buffer using uC/OS' 
OSMemGet. The problem is: every time when I call OSMemGet inside this 
Ethernet-ISR, my LPC2468 crashes (in fact, it branches to the data abort 
handler). But why? I cannot understand this behaviour; OSMemGet works 
just fine in normal tasks or in an other ISR.
It is even not possible to use OSQPost in this strange Ethernet-ISR.
What I want to do is the following:
every time when a frame is received, allocate a buffer in the memory and 
copy the just received frame into this buffer. Then post the buffer's 
base address on a queue so that the Rx-Task can pend on this queue.
Any ideas?

Reply

A question of your own? This thread is over 15 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.