[riot-notifications] [RIOT] drivers: add driver for encx24j600 ethernet chips (#2800)
notifications at github.com
Wed Jun 17 00:33:08 CEST 2015
> + /* read frame header */
> + sram_op(dev, RRXDATA, dev->rx_next_ptr, (char*)&hdr, sizeof(hdr));
> + /* read packet */
> + sram_op(dev, RRXDATA, 0xFFFF, buf, hdr.frame_len);
> + /* decrement available packet count */
> + cmd(dev, SETPKTDEC);
> +// DEBUG("encx24j600: Received packet. frame_len=%u next=0x%x, newnext=0x%x ERXTAIL=0x%x\n", (unsigned int)hdr.frame_len, (unsigned int) dev->rx_next_ptr, (unsigned int)hdr.rx_next_ptr, (unsigned int)reg_get(dev, ERXTAIL));
> + dev->rx_next_ptr = hdr.rx_next_ptr;
> + reg_set(dev, ERXTAIL, dev->rx_next_ptr - 2);
You should not just go out of the function here.
It can be even more packets in the FIFO. The interrupt is configured for falling edge and will remain low as long as packets are available. If more than 1 packet arrives at a time then nothing works more. So I understood it. I have tested it with trafgen(netsniff-ng) and it has been confirmed.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications