This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ENC28J60 ethernet module with nrf52840dongle on Zephyr version 2.4.0

I have encountered some problems when trying to use ENC28j60 ethernet module with nrf52840dongle and hope to get some help from here.
Problems:

  1. No internet access on Ipv4, no network access on Ipv6 shown in Control Panel>Network and Internet>Network Connections> Ethernet Status
  2. zephyr\samples\net\ipv4_autoconf does not assign a random IPv4 address in the 169.254.0.0/16 range.
  3. zephyr\samples\net\sockets\dumb_http_server unable to load http://192.0.2.1:8080/ page as stated in the README file.
  4. wasn't able to open serial terminal after combining the sample net applications with cdc_acm codes from zephyr/samples/subsys/usb

CONFIGS used:

#config needed to print out floats
CONFIG_NEWLIB_LIBC=y
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y

#usb-cdc-acm
CONFIG_STDOUT_CONSOLE=y
CONFIG_USB=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM sample"
CONFIG_LOG=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
CONFIG_USB_CDC_ACM=y
CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y

CONFIG_GPIO=y
CONFIG_SPI=y
CONFIG_ETH_ENC28J60=y
CONFIG_ETH_ENC28J60_0=y

CONFIG_NET_MAX_CONTEXTS=4
CONFIG_NET_L2_ETHERNET=y
CONFIG_NET_L2_DUMMY=y
CONFIG_NETWORKING=y
CONFIG_NET_IPV6=n
CONFIG_NET_IPV4=y
CONFIG_NET_ARP=y
CONFIG_NET_UDP=y
CONFIG_NET_IPV4_AUTO=y

CONFIG_NET_PKT_RX_COUNT=10
CONFIG_NET_PKT_TX_COUNT=10
CONFIG_NET_BUF_RX_COUNT=20
CONFIG_NET_BUF_TX_COUNT=20
CONFIG_NET_BUF_POOL_USAGE=y

CONFIG_TEST_RANDOM_GENERATOR=y

CONFIG_INIT_STACKS=y

CONFIG_NET_MGMT=y
CONFIG_NET_MGMT_EVENT=y

CONFIG_NET_LOG=y
CONFIG_LOG=y

CONFIG_NET_SHELL=y


nrf52840dongle_nrf52840.overlay file

&spi1 {
    compatible = "nordic,nrf-spi";
    /* Cannot be used together with i2c0. */
    /* status = "okay"; */
    sck-pin = <13>;
    mosi-pin = <29>;
    miso-pin = <31>;
    }


enc28j60 shield overlay

&spi1 {
    compatible = "nordic,nrf-spi";
    /* Cannot be used together with i2c0. */
    /* status = "okay"; */
    sck-pin = <13>;
    mosi-pin = <29>;
    miso-pin = <31>;
    
    enc28j60: ethernet@0 {
        compatible = "microchip,enc28j60";
        label = "ENC28J60";
        reg = <15>;
        int-gpios = <&gpio0 17 0>;
        spi-max-frequency = <10000000>;
        local-mac-address = [54 55 58 10 00 24];
    };
};

Parents Reply Children
Related