Parents
  • Hi,

    As you can see in the error, the configuration option DT_HAS_WIZNET_W5500_ENABLED is not user-configurable. This means that you cannot set this configuration yourself. It can only be configured internally, for example, by other configuration options or devicetree. In this case, it is set by W5500 being enabled in devicetree. Remove this from prj.conf, and the error will disappear.

    For pin control, you need to set SCK, MISO, and MOSI pins in the pin control node instead of directly in the device. Then in devicetree, you need to set pinctrl-0 and pinctrl-1 instead of sck-pin, miso-pin, and mosi-pin. Here is an example:

    &pinctrl {
        spi3_default: spi3_default {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 1, 8)>,
                        <NRF_PSEL(SPIM_MISO, 1, 10)>,
                        <NRF_PSEL(SPIM_MOSI, 1, 9)>;
            };
        };
    
        spi3_sleep: spi3_sleep {
            group1 {
                psels = <NRF_PSEL(SPIM_SCK, 1, 8)>,
                        <NRF_PSEL(SPIM_MISO, 1, 10)>,
                        <NRF_PSEL(SPIM_MOSI, 1, 9)>;
                low-power-enable;
            };
        };
    };
    
    &spi3 {
    	compatible = "nordic,nrf-spim";
        status = "okay";
        cs-gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
    	pinctrl-0 = <&spi3_default>;
    	pinctrl-1 = <&spi3_sleep>;
        pinctrl-names = "default", "sleep";
    	w5500: w5500@0 {
    					compatible = "wiznet,w5500";
    					reg = <0>;
    					spi-max-frequency = <8000000>;
    					int-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
    	};
    };

    I have not tested this configuration with W5500, so please test it with your application.

    Best regards,
    Marte

  • Hi,

    The example you link to is a good one, but as you have probably seen it is a few years old. Another colleague of mine has made an SPI sample based on v2.1.0 of the nRF Connect SDK, so this is more recent. See https://github.com/too1/ncs-spi-master-slave-example.

    Best regards,
    Marte

Reply Children
No Data
Related