nrf52840 going into fault continously

Hi, I am trying to run DHCP Client example using ethernet w5500 and my nrf is continously going into fault. sometimes it gets the ip correctly and goes into fault and other times when it starts immediately goes into fault. 

I have ran same code on nrf52832 and it works fine, even tries it on nrf9160 and works fine, the issue occur on this one 

any insights on this ?

This pictures shows it got the IP from router and went into fault 

This picture shows it went into fault in the start

I tried running mqtt with ethernet and was going into fault as well and mqtt with ethernet works fine on nrf52832 

Also I tried increasing stack size and also given alot of heap but same issue, so it is definitly not related to that.

  • nrf52840 dts

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /*
    * Copyright (c) 2017 Linaro Limited
    *
    * SPDX-License-Identifier: Apache-2.0
    */
    /dts-v1/;
    #include <nordic/nrf52840_qiaa.dtsi>
    #include "nrf52840dk_nrf52840-pinctrl.dtsi"
    #include <zephyr/dt-bindings/input/input-event-codes.h>
    / {
    model = "Nordic nRF52840 DK NRF52840";
    compatible = "nordic,nrf52840-dk-nrf52840";
    chosen {
    zephyr,console = &uart0;
    zephyr,shell-uart = &uart0;
    zephyr,uart-mcumgr = &uart0;
    zephyr,bt-mon-uart = &uart0;
    zephyr,bt-c2h-uart = &uart0;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    And here is my overlay for W5500

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    /* Copyright (c) 2022 Linumiz
    * SPDX-License-Identifier: Apache-2.0
    */
    &arduino_spi {
    status = "okay";
    /*Custom added by me */
    cs-gpios = <&arduino_header 16 GPIO_ACTIVE_LOW>; /* D10 */
    eth_w5500_arceli_eth_w5500: eth_w5500@0 {
    compatible = "wiznet,w5500";
    reg = <0x0>;
    spi-max-frequency = <80000000>;
    int-gpios = <&arduino_header 15 GPIO_ACTIVE_LOW>; /* D9 */
    reset-gpios = <&arduino_header 14 GPIO_ACTIVE_LOW>; /* D8 */
    /*Custom added by me */
    local-mac-address = [ 02 08 dc 86 07 e2 ];
    };
    };
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I know you can get all the info from .dts file but incase I am attaching this as well.

  • Hi,

     

    Thank you for sharing this.

    Can you try to lower the SPI frequency to 4 MHz, for testing purposes? That is the line: "spi-max-frequency = <4000000>;"

     

    Kind regards,

    Håkon

  • Hi can you explain a little bit how do you find addresses in .map file ?

  • Hi,

     

    Do you have a logic analyser available?

    I would recommend that you scope your SPI pins, including cs-gpios/int-gpios/reset-gpios, to see if there is something out of the ordinary on the bus there. If you are not that experienced with SPI, feel free to share the trace here.

     

    Haseeb Zaib said:
    Hi can you explain a little bit how do you find addresses in .map file ?

    RAM is mapped from address 0x2000_0000 and upwards. Each RAM location is tagged with a starting address and a size. Since the thread that the fault is pointing to is a part of the w5500 structure, it will not find it directly, so we have to find the nearest RAM address location to see what object is using that area.

     

    Kind regards,

    Håkon

« 3 4 5 6 7