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
  • Though this seems right, it might result in an error. If you wish to disable the flow control pins, then it should be better to configure a normal UART and not LPUART since the main feature of LPUART is the usage of the flow control pins which allows in low power operation. You could try using the normal UART and then try disabling the hw-flow-control

    Try referring to this sample by Simon where he modified the lpuart sample to use the normal UART driver and without flow control.

    Regards,

    Priyanka

Children
Related