This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Including Wiznet5500 files on the NRF52840DK using VSCode

Hello,

I am currently integrating the Wiznet5500 drivers into a VSCode project, but I am stuck on where to include these custom modules.

In the previous version in SES (Segger Embedded Studio) these files could be included in the Options --> Preprocesssor --> include paths

Thanks in advance,

Sebastiaan

  • Hi Sebastian,

    Kindly take a look at this ticket.

    Regards,

    Priyanka

  • Hi Priyanka,

    As far as I understood from the ticket, the W5500 is a Zephyr driver (and not an external one, so no extra CMakeList arguments are required). So as I have already done I need to set the configurations in my prj.conf file as the following:

    CONFIG_SPI=y
    CONFIG_NETWORKING=y
    CONFIG_NET_L2_ETHERNET=y
    CONFIG_ETH_W5500=y

    And add an overlay in nrf52840dk_nrf52840.overlay for the spi3 driver matching the pins as following:

    &spi3 {
    	sck-pin = 47;
    	miso-pin = 46;
    	mosi-pin = 45;
    	cs-gpios = &gpio1 12 GPIO_ACTIVE_LOW;
    	status = "okay";
    	w5500: w5500@0 {
    					compatible = "wiznet,w5500";
    					label = "w5500";
    					reg = 0;
    					spi-max-frequency = 1000000;
    					int-gpios = &gpio0 20 GPIO_ACTIVE_LOW;
    	};
    };

    I can see in the compilation that the w5500 driver is being built.

    [190/223] Building C object zephyr/drivers/ethernet/CMakeFiles/drivers__ethernet.dir/eth_w5500.c.obj

    The ticket mentioned does however not describe on how to access the driver functions itself.

    Thanks in advance,

    Sebastiaan

  • Hi Sebastian,

    You could try including CONFIG_ETH_W5500=y in your prj.conf. This will include the source file. And you will also have to add the header in your main.c file.

    Regards,

    Priyanka

Related