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

Parents
  • This issue has been resolved. The issue stems from CONFIG_NET_SOCKETS_OFFLOAD not only offloading the TCP/IP stack to hardware, but also setting the TCP/IP hardware as the default net interface. The Wifi scan sample code then uses net_if_get_default(), which actually returns the offloaded TCP/IP hardware instead of the Wifi interface, which causes a crash when trying to utilize wifi functions from net_mgmt. I was able to resolve this by using net_if_get_first_wifi() instead. I would suggest that Nordic revises their sample as using net_if_get_default() is not a deterministic implementation and other users may likely face the same issue.

Reply
  • This issue has been resolved. The issue stems from CONFIG_NET_SOCKETS_OFFLOAD not only offloading the TCP/IP stack to hardware, but also setting the TCP/IP hardware as the default net interface. The Wifi scan sample code then uses net_if_get_default(), which actually returns the offloaded TCP/IP hardware instead of the Wifi interface, which causes a crash when trying to utilize wifi functions from net_mgmt. I was able to resolve this by using net_if_get_first_wifi() instead. I would suggest that Nordic revises their sample as using net_if_get_default() is not a deterministic implementation and other users may likely face the same issue.

Children
No Data
Related