BFAR Address: 0xb4; Zephyr Fatal Error 25

Hi,

I am currently working on NUS sample code with one nRF5340 as central board and ISP2053 module as the Peripheral to send data with 264kbps. The peripheral is flashed with NUS+PMIC integrated code.

I have configured Peripheral's config file to the below settings:

APP Core:-

Enable the UART driver
CONFIG_UART_ASYNC_API=y
CONFIG_NRFX_UARTE0=y
CONFIG_SERIAL=y

CONFIG_GPIO=y

# Make sure printk is printing to the UART console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=y

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_GATT_DM=y

# Enable the NUS service
CONFIG_BT_NUS=y

# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y

# Enable DK LED and Buttons library
CONFIG_DK_LIBRARY=y
CONFIG_DK_LIBRARY_DYNAMIC_BUTTON_HANDLERS=y

# This example requires more stack
# CONFIG_MAIN_STACK_SIZE=8192
# CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192

# Config logger
CONFIG_LOG=y
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_PRINTK=y

CONFIG_ASSERT=y

CONFIG_USB_CDC_ACM=y
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_CDC_ACM_LOG_LEVEL_OFF=y

# BT Transmission Buffer

CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_ATT_TX_COUNT=10
CONFIG_BT_L2CAP_TX_MTU=498
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
CONFIG_BT_CONN_TX_MAX=10
CONFIG_BT_BUF_ACL_TX_COUNT=10
CONFIG_BT_BUF_ACL_TX_SIZE=251

CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_CTLR_PHY_2M=y
CONFIG_BT_CTLR_PHY_CODED=y
CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000

CONFIG_BT_BUF_ACL_RX_COUNT=40

CONFIG_UART_00_NRF_HW_ASYNC=y

# nPM1300
CONFIG_GPIO=y
CONFIG_REGULATOR=y
CONFIG_SENSOR=y
CONFIG_I2C=y
CONFIG_LED=y
CONFIG_NRF_FUEL_GAUGE=y
CONFIG_REQUIRES_FLOAT_PRINTF=y

# Enable the nPM1300 charger
CONFIG_NPM1300_CHARGER=y
CONFIG_REGULATOR_NPM1300=y

# Input buttons
CONFIG_PM_DEVICE=y
CONFIG_INPUT=y

# Watchdog
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_LOG_LEVEL_INF=y
CONFIG_WATCHDOG_APPLICATION_TIMEOUT_SEC=5
CONFIG_REBOOT=y



Network Core:- 

CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_LOG=n

CONFIG_HEAP_MEM_POOL_SIZE=8192
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192

CONFIG_MBOX=y
CONFIG_IPC_SERVICE=y

CONFIG_BT=y
CONFIG_BT_HCI_RAW=y
CONFIG_BT_CTLR_ASSERT_HANDLER=y
#CONFIG_BT_MAX_CONN=16

# Enable and adjust the below value as necessary
# CONFIG_BT_BUF_EVT_RX_COUNT=16
# CONFIG_BT_BUF_EVT_RX_SIZE=255
# CONFIG_BT_BUF_ACL_RX_SIZE=255
# CONFIG_BT_BUF_ACL_TX_SIZE=251
# CONFIG_BT_BUF_CMD_TX_SIZE=255

CONFIG_BT_CTLR_SDC_MAX_CONN_EVENT_LEN_DEFAULT=4000000
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_BUF_ACL_TX_SIZE=502
# CONFIG_BT_L2CAP_TX_MTU=247
# CONFIG_BT_BUF_ACL_TX_COUNT=40
# CONFIG_BT_BUF_ACL_RX_COUNT=40

CONFIG_BT_MAX_CONN=2

CONFIG_ASSERT=y
CONFIG_DEBUG_INFO=y
CONFIG_EXCEPTION_STACK_TRACE=y

CONFIG_IPC_RADIO_BT=y
CONFIG_IPC_RADIO_BT_HCI_IPC=y

CONFIG_WATCHDOG=y
I have observed that BLE stream stops in  between after connecting to the central and throws the following error in the RTT Viewer---->

00> [01:05:01.980,072] <err> os: ***** BUS FAULT *****
00> [01:05:01.980,072] <err> os: Precise data bus error
00> [01:05:01.980,072] <err> os: BFAR Address: 0xb4
00> [01:05:01.980,102] <err> os: r0/a1: 0x200044b8 r1/a2: 0x200079ac r2/a3: 0x00000000
00> [01:05:01.980,102] <err> os: r3/a4: 0x00009745 r12/ip: 0xe7b65e25 r14/lr: 0x00028d0d
00> [01:05:01.980,133] <err> os: xpsr: 0x81000018
00> [01:05:01.980,133] <err> os: Faulting instruction address (r15/pc): 0x00002e0a
00> [01:05:01.980,163] <err> os: >>> ZEPHYR FATAL ERROR 25: Unknown error on CPU 0
00> [01:05:01.980,194] <err> os: Fault during interrupt handling
00>
00> [01:05:01.980,224] <err> os: Current thread: 0x200025a8 (unknown)
00> [01:05:02.331,573] <err> os: Halting system

Any idea on why this happening? I am trying to figure the issue, but any guidance will be of great help.
Also my UART_BUF_SIZE=180.


Thanks and Regards
Pallavi 

Parents Reply
  • Sorry, not able to understand this one. I would consider looking at the original nus_uart code again and check if you may be missing or changed "something" that can affect this. You may try to split up the buf->len += evt->data.rx.len; into several intermediate values, print the values also if possible, and then try to add them together to check if you are able to find if any of them are wrong or cause the issue in specific (e.g. is it reading the evt value or writing the buf value that cause the issue).

    Kenneth

Children
Related