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

Parents Reply Children
  • Hi Priyanka.

    Thanks for linking the ticket, compilation is now succesful!

    Are there any guidelines or examples on how to implement the W5500 driver? For example a simple network configuration with pinging, ...

    Thanks in advance,

    Sebastiaan

  • Hi Sebastian,

    Unfortunately there are no examples of this at the moment.

    Regards,

    Priyanka

  • Hi Priyanka, 

    No worries.

    I however came across some issues when flashing the included files to the NRF52840DK.

    I configured the SPI and W5500 according to my needed pinout (i left out the <> due to the code block)

    &spi3 {
    	sck-pin = 47;
    	miso-pin = 46;
    	mosi-pin = 45;
    	cs-gpios = &gpio0 44 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;
    	};
    };

    However, when flashing this I noticed the following output on the terminal:

    11:05:13.235 -> E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
    11:05:13.235 -> E: Current thread: 0x200022f0 (main)
    11:05:13.235 -> E: Resetting system
    I: nRF5 802154 radio initialized
    11:05:13.492 -> ASSERTION FAIL @ WEST_TOPDIR/zephyr/include/drivers/gpio.h:752
    11:05:13.526 -> E: r0/a1:  0x00000004  r1/a2:  0x000002f0  r2/a3:  0x00000000
    11:05:13.526 -> E: r3/a4:  0x2000dc1d r12/ip:  0x00000000 r14/lr:  0x0000bd2b
    11:05:13.526 -> E:  xpsr:  0x61000000
    11:05:13.526 -> E: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
    11:05:13.526 -> E: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    11:05:13.562 -> E: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    11:05:13.562 -> E: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    11:05:13.562 -> E: fpscr:  0x00053388
    11:05:13.562 -> E: Faulting instruction address (r15/pc): 0x000486d2
    

    Do you know what could be the cause of this?

    With kind regards,

    Sebastiaan

  • Hi,

    It seems like the assert _ASSERT(..) is triggered. You could try to set a breakpoint on this assert and try following the pin assignment back to the call stack to see the problem.

    Also, which version of nRF Connect SDK are you using? I would recommend using the latest version. (v1.8.0).

    Regards,

    Priyanka

  • Hello Priyanka,

    The issue is caused by the following line:

    cs-gpios = <&gpio0 44 GPIO_ACTIVE_LOW>;

    My initial thought was that it has to do with the gpio0 being limited to the 0-32 range and the pin number 44, so I changed it to gpio1 but the issue is still there. However, there is no issue with 

    <&gpio0 21 GPIO_ACTIVE_LOW> (no kernel panics), but as mentioned before pin 44 is required
     
    Any ideas?
    Thanks,
    Sebastiaan
Related