NRF7002 w/ NRF9160 project crash

Hello,

We have a project with an nrf7002 and a nrf9160 as the host MCU on a custom board. However we find whenever we include CONFIG_NET_SOCKETS=y into project.conf we see a crash on wifi initialization. Any idea why this could be?

We are using NCS v2.5.2. This is the log from the crash after wifi initialization:


Modem init

Using MAC: F6:CE:36:00:00:01
[00:00:18.830,963] <inf> WiFi: OTP not programmed, proceeding with local MAC: <unknown>
[00:00:18.831,420] <err> os: ***** USAGE FAULT *****
[00:00:18.831,787] <err> os: Unaligned memory access
[00:00:18.832,183] <err> os: r0/a1: 0xffffffff r1/a2: 0x2003c71c r2/a3: 0x00000000
[00:00:18.832,763] <err> os: r3/a4: 0x00000000 r12/ip: 0x000006bb r14/lr: 0x00072779
[00:00:18.833,282] <err> os: xpsr: 0x61000000
[00:00:18.833,679] <err> os: Faulting instruction address (r15/pc): 0x0004eb74
[00:00:18.834,167] <err> os: >>> ZEPHYR FATAL ERROR 31: Unknown error on CPU 0
[00:00:18.834,686] <err> os: Current thread: 0x2000ce98 (main)
[00:00:18.845,184] <err> fatal_error: Resetting system

Thanks,

RJ

  • Hi RJ

    From the log here it seems like the nRF7002 isn't prepared with OTP memory being readied/programmed on your end. Can you confirm that you've enabled OTP memory access with the steps described here: https://infocenter.nordicsemi.com/topic/nan_043/APP/nan_043/otp_programming.html 

    Best regards,

    Simon

  • If OTP is programmed, scan still dies if CONFIG_NET_SOCKETS=y is enabled. 

    ifi_radio_ficr_prog otp_write_params 0x100 0x50FA50FA.
    reboot
    wifi_radio_ficr_prog otp_write_params 0x120 0xFF36CEF0 0x4A00
    wifi_radio_ficr_prog otp_write_params 0x128 0xFF36CEF0 0x4B00
    wifi_radio_ficr_prog otp_write_params 0x100 0x00000000
    

    Reading parameters show the MAC is set:

    rtt:~$ wifi_radio_ficr_prog otp_read_params
    OTP Region is locked!!!
    
    PRODTEST.FT.PROGVERSION = 0xff0300ff
    
    PRODTEST.TRIM0 = 0x00090410
    PRODTEST.TRIM1 = 0x0009d40b
    PRODTEST.TRIM2 = 0x0009d80b
    PRODTEST.TRIM3 = 0x000f040c
    PRODTEST.TRIM4 = 0x000fd408
    PRODTEST.TRIM5 = 0x000fd808
    PRODTEST.TRIM6 = 0xffffffff
    PRODTEST.TRIM7 = 0xffffffff
    PRODTEST.TRIM8 = 0xffffffff
    PRODTEST.TRIM9 = 0xffffffff
    PRODTEST.TRIM10 = 0xffffffff
    PRODTEST.TRIM11 = 0xffffffff
    PRODTEST.TRIM12 = 0xffffffff
    PRODTEST.TRIM13 = 0xffffffff
    PRODTEST.TRIM14 = 0xffffffff
    
    INFO.PART = 0x00007002
    INFO.VARIANT = 0x00423030
    
    INFO.UUID0 = 0x56029f54
    INFO.UUID1 = 0x11eddc0b
    INFO.UUID2 = 0x306c04cc
    INFO.UUID3 = 0x3d75ea4e
    
    REGION.PROTECT0 = 0x00000000
    REGION.PROTECT1 = 0x00000000
    REGION.PROTECT2 = 0x00000000
    REGION.PROTECT3 = 0x00000000
    
    MAC0.ADDRESS0 = 0xff36cef0
    MAC0.ADDRESS1 = 0x00004a00
    MAC0.ADDRESS = f0:ce:36:ff:00:4a
    
    MAC1.ADDRESS0 = 0xff36cef0
    MAC1.ADDRESS1 = 0x00004b00
    MAC1.ADDRESS = f0:ce:36:ff:00:4b
    
    CALIB.XO = 0xff
    REGION_DEFAULTS = 0xfffffff9
    

    Is there another step that is missing?

  • Using the MAC 00-00-00-00-00-04 doesn't work when used on another board either.

  • Hi

    I think this is because 00-00-00-00-00-04 is not a valid MAC address. Is there a reason you're setting this address specifically? 

    If you make up your own MAC address, you're supposed to set the 2's place bit (the "locally administered" bit) in the first byte, to differentiate it from a guaranteed globally unique MAC address. Usually the first three bytes a unicast MAC address is an "Organizationally Unique Identifier" (OUI) that the IEEE assigned to the manufacturer of your Ethernet device. Manufacturers are required to make sure they keep the last 3 bytes unique

    Best regards,

    Simon

  • That is not what we chose, somehow it came out that way. But it’s not working with the first MAC address either. What two MAC addresses would you like us to test with?

Related