NRF54 BLE UART PERIPHERAL works only when the debugger is connected

Hi,

We are currently working on a new product based on NRF54L15.

Goal :
We are trying to set up the "Bluetooth LE UART service" example in order to transmit and receive data via BLE (nrf connect for mobile) and display the data in a serial monitor.

Configuration
1) This is the schematic


2) This is the "nrf54l15dk_nrf54l15_cpuapp.overlay"
 

/ {
	chosen {
		nordic,nus-uart = &uart20;
	};
};


&spi00 {
	status = "disabled";
};

&uart20_default {
	group1 {
		psels = <NRF_PSEL(UART_TX, 2, 2)>, <NRF_PSEL(UART_RTS, 2, 4)>;
	};

	group2 {
		psels = <NRF_PSEL(UART_RX, 2, 0)>, <NRF_PSEL(UART_CTS, 2, 5)>;
	};
};


&lfxo {
	status = "disabled";
};

&uart20_sleep {
	group1 {
		psels = <NRF_PSEL(UART_TX, 2, 2)>,
				<NRF_PSEL(UART_RX, 2, 0)>,
				<NRF_PSEL(UART_RTS, 2, 4)>,
				<NRF_PSEL(UART_CTS, 2, 5)>;
	};
};


3) This is the "prj.conf"
# 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=2048

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Nordic_UART_Service"
CONFIG_BT_MAX_CONN=1
CONFIG_BT_MAX_PAIRED=1

# 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

# This example requires more stack
CONFIG_MAIN_STACK_SIZE=1152
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048

# Config logger
CONFIG_LOG=n
CONFIG_USE_SEGGER_RTT=n
CONFIG_LOG_BACKEND_RTT=n
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=n

CONFIG_ASSERT=y

CONFIG_SPI_NOR=n
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_FIXED_RATE_CLOCK=y


4) We are using nrf v2.9.1 sdk, v2.9.1 toolchain with nrf connect vs code extension.

5) The debugger is a j-link.

6) Chip reference nRF54L15-QFBB

Behaviour :
1) When the program starts we observe the following message :

** Booting My Application v2.9.1-e9d3107cba3d ***
*** Using nRF Connect SDK v2.9.1-60d0d6c8d42d ***
*** Using Zephyr OS v3.799-ca954a6216c9 ***
Starting Nordic UART service example

2) When we transmit via RX characteristic "hello\nworld\n" here is the message displayed : 

3) When we transmit "test\n" via the serial monitor, the TX characteristic doesn't display anything.

4) After connecting the debugger (*). We then transmit via RX characteristic "nordic\nsemi\n". Here is the message displayed : 


4) While the the debugger is still connected (*). We then transmit "nrf\n" via the serial monitor the TX characteristic. Here is the message displayed :
"nnrf"

(*): The debugger has to be plugged and connected. The debugger uses SWD.

Questions
:

  1. Debugger Dependency Issue:
    The application only runs when the debugger is attached. How can we ensure it functions properly in standalone mode ?

  2. Character Rendering Problem:
    Some characters appear missing or corrupted. What steps can we take to diagnose and resolve this issue ?



Thank you for your help.

Parents Reply Children
  • Hi,
     
    - We kept the default value of 128 for CONFIG_BT_NUS_UART_BUFFER_SIZE, as it is sufficient for our current data transmission needs.

    - The baud rate is set to 115200. Below is the full configuration output from stty -F /dev/ttyLP2 -a

    speed 115200 baud;stty: /dev/ttyLP2
     line = 0;
    intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q;
    stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
    -parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts
    -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel -iutf8
    opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
    isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc

Related