http_client sample BUS FAULT

Hi,

I'm trying to get the http_client sample working on nrf9160dk_nrf9160ns. The code compiled successfully, but there was a runtime error. And the printed messages are like this:

*** Booting Zephyr OS build v2.7.99-ncs1-1 ***
Flash regions Domain Permissions
00 01 0x00000 0x10000 Secure rwxl
02 31 0x10000 0x100000 Non-Secure rwxl

Non-secure callable region 0 placed in flash region 1 with size 32.

SRAM region Domain Permissions
00 03 0x00000 0x08000 Secure rwxl
04 31 0x08000 0x40000 Non-Secure rwxl

Peripheral Domain Status
00 NRF_P0 Non-Secure OK
01 NRF_CLOCK Non-Secure OK
02 NRF_RTC0 Non-Secure OK
03 NRF_RTC1 Non-Secure OK
04 NRF_NVMC Non-Secure OK
05 NRF_UARTE1 Non-Secure OK
06 NRF_UARTE2 Secure SKIP
07 NRF_TWIM2 Non-Secure OK
08 NRF_SPIM3 Non-Secure OK
09 NRF_TIMER0 Non-Secure OK
10 NRF_TIMER1 Non-Secure OK
11 NRF_TIMER2 Non-Secure OK
12 NRF_SAADC Non-Secure OK
13 NRF_PWM0 Non-Secure OK
14 NRF_PWM1 Non-Secure OK
15 NRF_PWM2 Non-Secure OK
16 NRF_PWM3 Non-Secure OK
17 NRF_WDT Non-Secure OK
18 NRF_IPC Non-Secure OK
19 NRF_VMC Non-Secure OK
20 NRF_FPU Non-Secure OK
21 NRF_EGU0 Non-Secure OK
22 NRF_EGU1 Non-Secure OK
23 NRF_EGU2 Non-Secure OK
24 NRF_EGU3 Non-Secure OK
25 NRF_EGU4 Non-Secure OK
26 NRF_EGU5 Non-Secure OK
27 NRF_DPPIC Non-Secure OK
28 NRF_REGULATORS Non-Secure OK
29 NRF_PDM Non-Secure OK
30 NRF_I2S Non-Secure OK
31 NRF_GPIOTE1 Non-Secure OK

SPM: NS image at 0x10000
SPM: NS MSP at 0x20011158
SPM: NS reset vector at 0x153a9
SPM: prepare to jump to Non-Secure image.


uart:~$ *** Booting Zephyr OS build v2.7.99-ncs1-1 ***
[00:00:00.501,708] <inf> net_config: Initializing network
[00:00:00.509,857] <inf> net_config: IPv4 address: 192.0.2.1
[00:00:00.518,463] <err> os: Exception occurred in Secure State
[00:00:00.527,313] <err> os: ***** HARD FAULT *****
[00:00:00.535,125] <err> os: Fault escalation (see below)
[00:00:00.543,640] <err> os: ***** BUS FAULT *****
[00:00:00.551,361] <err> os: Precise data bus error
[00:00:00.559,356] <err> os: BFAR Address: 0x50008158
[00:00:00.567,504] <err> os: r0/a1: 0x00000000 r1/a2: 0x20012774 r2/a3: 0x00000040
[00:00:00.578,491] <err> os: r3/a4: 0x00000000 r12/ip: 0x20010fe0 r14/lr: 0x00017355
[00:00:00.589,447] <err> os: xpsr: 0x01020000
[00:00:00.596,923] <err> os: Faulting instruction address (r15/pc): 0x00017356
[00:00:00.607,086] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
[00:00:00.617,187] <err> os: Current thread: 0x2000d4b8 (main)
[00:00:00.625,946] <err> fatal_error: Resetting system

Can I get some help with this bus fault please?

  • Hi Yi,

    Are you able to test this sample with NCS2.0.0?

    Best regards,

    Charlie

  • Hi Charlie,

    I just updated to NCS2.0.0 and tested the sample, but this time I couldn't even get it to compile...

    This error messge is like this:

    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: D:/nRF_SDK/applications/http_client
    -- Found Python3: D:/nRF_SDK/toolchains/v2.0.0/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Cache files will be written to: D:/nRF_SDK/v2.0.0/zephyr/.cache
    -- Zephyr version: 3.0.99 (D:/nRF_SDK/v2.0.0/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf9160dk_nrf9160_ns, Revision: 0.7.0
    -- Found host-tools: zephyr 0.14.1 (D:/nRF_SDK/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found dtc: D:/nRF_SDK/toolchains/v2.0.0/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (D:/nRF_SDK/toolchains/v2.0.0/opt/zephyr-sdk)
    -- Found BOARD.dts: D:/nRF_SDK/v2.0.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns.dts
    -- Generated zephyr.dts: D:/nRF_SDK/applications/http_client/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: D:/nRF_SDK/applications/http_client/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: D:/nRF_SDK/applications/http_client/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: D:/nRF_SDK/applications/http_client/build/zephyr/dts.cmake

    warning: TEST_RANDOM_GENERATOR (defined at d:\nRF_SDK\applications\http_client\build\subsys\random\Kconfig:8) was assigned the value 'y' but
    got the value 'n'. Check these unsatisfied dependencies: (!ENTROPY_HAS_DRIVER) (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up
    TEST_RANDOM_GENERATOR in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.


    warning: Experimental symbol HTTP_CLIENT is enabled.


    warning: Experimental symbol NET_SOCKETS_OFFLOAD is enabled.


    warning: MBEDTLS_MAC_MD5_ENABLED (defined at D:\nRF_SDK\v2.0.0\zephyr\modules\mbedtls\Kconfig.tls-generic:302, d:\nRF_SDK\applications\http_client\build\modules\mbedtls\Kconfig.tls-generic:302) has direct dependencies (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-generic.h" && MBEDTLS) || (!(NRF_SECURITY || NORDIC_SECURITY_BACKEND) && MBEDTLS_BUILTIN && MBEDTLS_CFG_FILE = "config-tls-Parsing D:/nRF_SDK/applications/http_client/Kconfig
    Loaded configuration 'D:/nRF_SDK/v2.0.0/zephyr/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_ns_defconfig'
    Merged configuration 'd:/nRF_SDK/applications/http_client/prj.conf'
    generic.h" && MBEDTLS && 0) with value n, but is currently being y-selected by the following symbols:
    - NET_TCP_ISN_RFC6528 (defined at d:\nRF_SDK\applications\http_client\build\subsys\net\ip\Kconfig:470), with value y, direct dependencies NET_TCP && !NET_RAW_MODE && NETWORKING (value: y), and select condition NET_TCP && !NET_RAW_MODE && NETWORKING (value: y)

    error: Aborting due to Kconfig warnings

    CMake Error at D:\nRF_SDK\v2.0.0\zephyr\cmake\modules\kconfig.cmake:290 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    D:\nRF_SDK\v2.0.0\zephyr\cmake\modules\zephyr_default.cmake:121 (include)
    D:\nRF_SDK\v2.0.0\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:51 (include)
    D:\nRF_SDK\v2.0.0\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:76 (include_boilerplate)
    d:\nRF_SDK\applications\http_client\build\CMakeLists.txt:4 (find_package)


    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'd:\nRF_SDK\toolchains\v2.0.0\opt\bin\cmake.EXE' '-DWEST_PYTHON=d:\nRF_SDK\toolchains\v2.0.0\opt\bin\python.exe' '-Bd:\nRF_SDK\applications\http_client\build' '-Sd:\nRF_SDK\applications\http_client' -GNinja -DBOARD=nrf9160dk_nrf9160_ns -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONF_FILE:STRING=d:/nRF_SDK/applications/http_client/prj.conf

  • Hi Yi,

    Please use the https_client sample under nrf\samples\nrf9160\https_client from Nordic.

    The general Zephyer http_client sample is not fully tested on nRF9160DK.

    Best regards,

    Charlie

  • Hi Charlie,

    The nrf sample works fine. Thanks for your help!

    Best regards,

    Yi

Related