How to config device tree to enable UART?

Hello,

Im using custom board carring nrf52820,and i want enable UART to contact with another mcu,this is the Schematic.

NCS V2.6.0.I take Peripherial_uart to Peripherial_hid_keyboard,and it can work in nrf52833DK,but can't in my custom board.

it contants RX,TX,CTS and RTS,and i think my configuration is matched.But cannot rec data sent from UART via PC like this.

and my prj.conf is here.I am not sure where the question is.Can u help pls?

#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_NCS_SAMPLES_DEFAULTS=y

CONFIG_BT=y
CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1
CONFIG_BT_SMP=y
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="iDPRT_SCANNER"
CONFIG_BT_DEVICE_APPEARANCE=961

CONFIG_BT_BAS=y
CONFIG_BT_HIDS=y
CONFIG_BT_HIDS_MAX_CLIENT_COUNT=1
CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y
CONFIG_BT_GATT_UUID16_POOL_SIZE=40
CONFIG_BT_GATT_CHRC_POOL_SIZE=20

CONFIG_BT_CONN_CTX=y

CONFIG_BT_DIS=y
CONFIG_BT_DIS_PNP=y
CONFIG_BT_DIS_MANUF="NordicSemiconductor"
CONFIG_BT_DIS_PNP_VID_SRC=2
CONFIG_BT_DIS_PNP_VID=0x1915
CONFIG_BT_DIS_PNP_PID=0xEEEF
CONFIG_BT_DIS_PNP_VER=0x0100

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
#CONFIG_NVS=y
CONFIG_SETTINGS=y

# Enable DK LED and Buttons library
#CONFIG_DK_LIBRARY=y

# Enable the UART driver
CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_0_ASYNC=y
CONFIG_UART_0_INTERRUPT_DRIVEN=n
CONFIG_NRFX_UARTE0=y


CONFIG_GPIO=y
CONFIG_PINCTRL=y
#CONFIG_NET_SHELL=n

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

CONFIG_HEAP_MEM_POOL_SIZE=2048

# This example requires more stack
CONFIG_MAIN_STACK_SIZE=2048

# Config logger
CONFIG_LOG=y

CONFIG_USE_SEGGER_RTT=n
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=n
# CONFIG_LOG_MODE_IMMEDIATE=y
#CONFIG_ASSERT=y

# CONFIG_BT_DEVICE_NAME_DYNAMIC
CONFIG_BT_DEVICE_NAME_DYNAMIC=y

#param lock
#CONFIG_PRIORITY_CEILING=y

#=========start===================#
#不包括外部 32k 晶振,则可以通过添加以下内容来改用内部 32k RC 振荡器:
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
#设计不包括DC-DC组件(下图红色框选部分),则可以通过添加以下内容来设置禁用 DCDC:
CONFIG_BOARD_ENABLE_DCDC=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n

#=====end======#
#=================FAE=== decrease RAM usage======================#
#CONFIG FROM 
# Disable Bluetooth features not needed
CONFIG_BT_DEBUG_NONE=n
CONFIG_BT_ASSERT=n
CONFIG_BT_DATA_LEN_UPDATE=n
CONFIG_BT_PHY_UPDATE=n
CONFIG_BT_GATT_CACHING=n
CONFIG_BT_GAP_PERIPHERAL_PREF_PARAMS=n
CONFIG_BT_SETTINGS_CCC_LAZY_LOADING=n
CONFIG_BT_HCI_VS_EXT=y
# Disable Bluetooth controller features not needed
CONFIG_BT_CTLR_PRIVACY=n
CONFIG_BT_CTLR_PHY_2M=n

# Disable features not needed
CONFIG_TIMESLICING=n
CONFIG_COMMON_LIBC_MALLOC=n
#CONFIG_ASSERT=n

# ARM
CONFIG_ARM_MPU=n


# Memory protection
CONFIG_THREAD_STACK_INFO=y
CONFIG_THREAD_CUSTOM_DATA=n
CONFIG_FPU=n

# Interrupts
CONFIG_DYNAMIC_INTERRUPTS=n
CONFIG_IRQ_OFFLOAD=n

# Drivers and peripherals
CONFIG_I2C=n
CONFIG_WATCHDOG=n
CONFIG_SPI=n

Best regards.

Parents Reply Children
  • I don't know what the issue is, and it is very difficult to analyze unless being able to replicate it. Is it:

    1: Possible to replicate on any of our DKs?

    2: possible to upload the application that you are using to reproduce this?

    My guess is that there is some data being written outside a valid buffer somewhere, that typically causes these BFAR errors.

    Best regards,

    Edvin

Related