AnsweredAssumed Answered

MPC5748g Ethernet: RF interrupts triggered for empty buffers

Question asked by Daniel Näslund on May 18, 2017

I previously had problems with interrupts not being generated, see I only get one ENET receive interrupt . That problem has been solved.



I'm running my code on a  MPC574XG-MB Evaluation board


I have a local network where the only traffic is ARP packets sent using the Linux arping utitility program from my computer. For each ARP packet I send, one interrupt is generated.


The problem

For the first NUM_RXBDS arping invocations, the packets are written to bd->data. After that, an interrupt is still triggered for each received ARP packet, but the empty flag of bd->status0 is set and bd->length is zero and bd->data contains old ARP packets. Any suggestions why that is so?


What I've tried

I increased NUM_RXBDS from 2 to 5. As before, the first NUM_RXBDS packets were received and the buffer contained the expected ARP packet. But after that, 4/5 sent ARP packets generated an interrupt where the bd->status0 had the empty flag set.


I tried returning early in the ISR if bd->status0 & RX_BD_S0_E but then the interrupt was just triggered immediately again. The led in my main loop stopped blinking.


Tried acknowledging the interrupt when bd->status0 & RX_BD_S0_E. Then my main loop was executed once again, but I didn't get any more data.


Does anyone have suggestions on why I'm receiving RF interrupts when the DMA buffer is empty?


Attaching my WIP EthernetInterface.cpp file which includes the gpio init, intc init, eNBUF init and

Original Attachment has been moved to: