Lpuart example throws error

Hi Everyone,

I tried to build lpUart example from samples available. I was trying to debug then I got the breakpoint on 

"__ASSERT(lpuart, "Failed to get the device");"
I will add .conf files and the overlay I got from the example.
please let me know, what did i do wrong?

/********* nrf52840dk_nrf52840.conf file **********/
# Copyright (c) 2020 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_UART_1_ASYNC=y

CONFIG_UART_1_INTERRUPT_DRIVEN=y
CONFIG_UART_1_NRF_HW_ASYNC=y
CONFIG_UART_1_NRF_HW_ASYNC_TIMER=2
CONFIG_NRFX_TIMER2=y

/******** prj.conf **********/

CONFIG_NRF_SW_LPUART=y

CONFIG_USE_SEGGER_RTT=n
CONFIG_LOG=y
CONFIG_NO_OPTIMIZATIONS=y
CONFIG_ASSERT=y

# Comment this section for debugging
# CONFIG_CONSOLE=n
# CONFIG_UART_CONSOLE=n

# Uncomment to use lpuart using interrupt driven API
CONFIG_NRF_SW_LPUART_INT_DRIVEN=y
/**********.Overlay file **********/

&uart1 {
	rx-pin = <44>;
	tx-pin = <45>;
	/delete-property/ rts-pin;
	/delete-property/ cts-pin;

	lpuart: nrf-sw-lpuart {
		compatible = "nordic,nrf-sw-lpuart";
		status = "okay";
		label = "LPUART";
		req-pin = <46>;
		rdy-pin = <47>;
	};
};

// &uart0 {
// 	status = "disabled";
// };

&gpiote {
	interrupts = <6 NRF_DEFAULT_IRQ_PRIORITY>;
};

Parents Reply
  • So interrupt driven lpUart code should work with only tx and Rx lines then. But i couldn't see any data on terminal when I did that. I will get data only when i connect req and rdy lines.

    Basically I want to use only two pins for uart, we have hw limitation where we can't spare any more pins for nordic chip.

    Now... how to configure uart? and is there any example code with simple interrupt driven uart?

Children
Related