[riot-notifications] [RIOT] drivers: add driver for encx24j600 ethernet chips (#2800)

Johann Fischer notifications at github.com
Wed Jun 17 23:12:26 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);
> +

``` 
trafgen --dev eth0 --conf trafgen.cfg -n 5

2015-06-17 23:09:04,331 - INFO # encx24j600: starting initialization...
2015-06-17 23:09:04,536 - INFO # encx24j600: initialization complete.
2015-06-17 23:09:04,539 - INFO # dev_eth: mac:  0:1e:c0:e3:73:b4
2015-06-17 23:09:04,542 - INFO # dev_eth: dev=0x1fffd0b0 link DOWN
2015-06-17 23:09:06,164 - INFO # main: woke up
2015-06-17 23:09:06,166 - INFO # dev_eth: dev=0x1fffd0b0 link UP
2015-06-17 23:09:19,478 - INFO # main: woke up
2015-06-17 23:09:19,482 - INFO # encx24j600: erxhead=0x5388 PKTCNT=1
2015-06-17 23:09:19,484 - INFO # dev_eth_rx_handler dev=0x1fffd0b0
2015-06-17 23:09:19,489 - INFO # encx24j600: ERXTAIL=0x5ffe frame_len=64 newnext=0x5388
2015-06-17 23:09:19,493 - INFO # handle_incoming: received 60 bytes
2015-06-17 23:09:19,497 - INFO # encx24j600: erxhead=0x5388 PKTCNT=0
2015-06-17 23:09:35,198 - INFO # main: woke up
2015-06-17 23:09:35,202 - INFO # encx24j600: erxhead=0x54f0 PKTCNT=5
2015-06-17 23:09:35,205 - INFO # dev_eth_rx_handler dev=0x1fffd0b0
2015-06-17 23:09:35,209 - INFO # encx24j600: ERXTAIL=0x5386 frame_len=64 newnext=0x53d0
2015-06-17 23:09:35,213 - INFO # handle_incoming: received 60 bytes
2015-06-17 23:09:35,217 - INFO # encx24j600: erxhead=0x54f0 PKTCNT=4
2015-06-17 23:09:35,220 - INFO # dev_eth_rx_handler dev=0x1fffd0b0
2015-06-17 23:09:35,225 - INFO # encx24j600: ERXTAIL=0x53ce frame_len=64 newnext=0x5418
2015-06-17 23:09:35,228 - INFO # handle_incoming: received 60 bytes
2015-06-17 23:09:35,232 - INFO # encx24j600: erxhead=0x54f0 PKTCNT=3
2015-06-17 23:09:35,235 - INFO # dev_eth_rx_handler dev=0x1fffd0b0
2015-06-17 23:09:35,240 - INFO # encx24j600: ERXTAIL=0x5416 frame_len=64 newnext=0x5460
2015-06-17 23:09:35,244 - INFO # handle_incoming: received 60 bytes
2015-06-17 23:09:35,248 - INFO # encx24j600: erxhead=0x54f0 PKTCNT=2
2015-06-17 23:09:35,251 - INFO # dev_eth_rx_handler dev=0x1fffd0b0
2015-06-17 23:09:35,255 - INFO # encx24j600: ERXTAIL=0x545e frame_len=64 newnext=0x54a8
2015-06-17 23:09:35,259 - INFO # handle_incoming: received 60 bytes
2015-06-17 23:09:35,263 - INFO # encx24j600: erxhead=0x54f0 PKTCNT=1
2015-06-17 23:09:35,266 - INFO # dev_eth_rx_handler dev=0x1fffd0b0
2015-06-17 23:09:35,271 - INFO # encx24j600: ERXTAIL=0x54a6 frame_len=64 newnext=0x54f0
2015-06-17 23:09:35,274 - INFO # handle_incoming: received 60 bytes
2015-06-17 23:09:35,278 - INFO # encx24j600: erxhead=0x54f0 PKTCNT=0
```

looks better

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/2800/files#r32675546
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150617/8b39323e/attachment.html>


More information about the notifications mailing list