nrf 52833 mesh zephyr chat + SPI errors

Hello im trying to implement SPI connection to my mesh project. I tried to add Spi but when i add this line to my prj.conf:

CONFIG_SPI=y


this error imidietly appears after programing the device (standard evaluation board nrf52833):

E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
E: Current thread: 0x20002e98 (main)
ASSERTION FAIL @ WEST_TOPDIR/zephyr/include/zephyr/drivers/gpio.h:730
E: r0/a1: 0x00000004 r1/a2: 0x000002da r2/a3: 0x00000001
E: r3/a4: 0x0002dcb9 r12/ip: 0x00000000 r14/lr: 0x0002ec75
E: xpsr: 0x41000000
E: Faulting instruction address (r15/pc): 0x00036dfa


when i delete this line from prj.conf the program runs normaly, can you help me get this working, thanks.

my versions :
v3.12.0 - nrf Connect
v1.2.4 - Toolchain
v2.1.2 - nrf Connect SDK

the rest of prj.conf:
#
# Copyright (c) 2020 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_NCS_SAMPLES_DEFAULTS=y

# General configuration
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_FLASH_MAP=y
CONFIG_NVS=y
CONFIG_SETTINGS=y
CONFIG_HWINFO=y
CONFIG_DK_LIBRARY=y
CONFIG_PARTITION_MANAGER_ENABLED=y
CONFIG_PM_SINGLE_IMAGE=y
CONFIG_PM_PARTITION_SIZE_SETTINGS_STORAGE=0x8000

# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_COMPANY_ID=0x0059
CONFIG_BT_DEVICE_NAME="Mesh Chat"
CONFIG_BT_L2CAP_TX_MTU=69
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
CONFIG_BT_OBSERVER=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_SETTINGS=y

# Disable unused Bluetooth features
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
CONFIG_BT_CTLR_LE_ENC=n
CONFIG_BT_DATA_LEN_UPDATE=n
CONFIG_BT_PHY_UPDATE=n
CONFIG_BT_CTLR_CHAN_SEL_2=n
CONFIG_BT_CTLR_MIN_USED_CHAN=n
CONFIG_BT_CTLR_PRIVACY=n

# Bluetooth Mesh configuration
CONFIG_BT_MESH=y
CONFIG_BT_MESH_RELAY=y
CONFIG_BT_MESH_FRIEND=y
CONFIG_BT_MESH_ADV_BUF_COUNT=13
CONFIG_BT_MESH_RX_SEG_MAX=10
CONFIG_BT_MESH_TX_SEG_MAX=10
CONFIG_BT_MESH_PB_GATT=y
CONFIG_BT_MESH_GATT_PROXY=y
CONFIG_BT_MESH_DK_PROV=y

# Enable Bluetooth mesh models debug logs
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_MESH_DEBUG=y
CONFIG_BT_MESH_DEBUG_MODEL=y

# Enable Shell module and use UART as a backend
CONFIG_SHELL=y
CONFIG_SHELL_BACKEND_SERIAL=y


Parents
  • Update i found what caused the error. the .dts file had this line :

    &pinctrl {
    	spibb0: spibb0 {
    		compatible = "zephyr,spi-bitbang";
    		status="okay";
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clk-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
    		mosi-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
    		miso-gpios = <&gpio1 13 0>;
    		cs-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
    	};
    };


    after i deleted it code "works", but spi does not. so yea

Reply
  • Update i found what caused the error. the .dts file had this line :

    &pinctrl {
    	spibb0: spibb0 {
    		compatible = "zephyr,spi-bitbang";
    		status="okay";
    		#address-cells = <1>;
    		#size-cells = <0>;
    		clk-gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
    		mosi-gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
    		miso-gpios = <&gpio1 13 0>;
    		cs-gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
    	};
    };


    after i deleted it code "works", but spi does not. so yea

Children
Related