UART API not catching RX data

Hello, 

I am having some trouble with the UART API (Async and interrupt). I am connecting the development board (nrf9151 DK) to a 3rd party device (keypad / prox reader) and I cannot seem to "catch" the inbound data. To give a little more context on the sequence of events..

The reader initiates the communication with the development kit through an interrupt line. 

The development kit then sends a data packet to the reader (less than 48 bytes)

The reader then responds with the relevant data (less than 48 bytes). 

Communication is over. to send more data you must repeat the process.

I have tried this with two different readers, along with a development board and a custom board that I am making. All result in the same issue UART_RX_RDY is never triggered. If it is, only 1 byte comes through. All of this is happening over UART 2. This is leading me to think I my set up is incorrect. I have looked at both the lpuart example and the dev academy lesson as well as set the pins on the DK to both 1.8 v and 3.3 v.

Information about the reader:

There is no CTS or RTS line, only RX and TX. 

Baud is 9600

Uses OSDP for communication protocol. 

Quick note about the OSDP communication - The data for the tx line is formatted correctly (I've had this working in the past but needed to rework a few parts of the application). A valid response should return 43 bytes starting with a 0x53 and invalid should return with about 12 bytes starting with a 0x53 as well. 

Any guidance or suggestions would be appreciated. 

Thank you, 

Jack

Device Tree overlay: 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
&uart2 {
compatible = "nordic,nrf-uarte";
current-speed = <9600>;
parity = "none";
stop-bits = "1";
data-bits = <8>;
pinctrl-0 = <&uart2_default>;
pinctrl-1 = <&uart2_sleep>;
pinctrl-names = "default","sleep";
status = "okay";
};
&pinctrl {
uart2_default: uart2_default {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 22)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 0, 23)>;
bias-pull-up;
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Project Config File:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CONFIG_GPIO=y
CONFIG_LOG=y
CONFIG_NRF_MODEM_LIB=y
CONFIG_UART_CONSOLE=y
CONFIG_CONSOLE=y
# General config
CONFIG_EVENTS=y
CONFIG_PICOLIBC_IO_FLOAT=y
CONFIG_RESET_ON_FATAL_ERROR=y
CONFIG_NCS_SAMPLES_DEFAULTS=y
CONFIG_DK_LIBRARY=y
# LED indication
CONFIG_LED=y
CONFIG_RING_BUFFER=y
# AT commands interface
CONFIG_UART_INTERRUPT_DRIVEN=n
CONFIG_AT_HOST_LIBRARY=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Device Output:

[00:00:00.259,094] <inf> Reader_test: Reader provisioning started.
[00:00:00.259,429] <dbg> Reader_test: cmd_function: Full CRC: 3252
[00:00:00.259,460] <inf> Reader_test: Waiting for reader event...
[00:00:03.867,797] <inf> Reader_test: Pin ISR called
[00:00:03.867,858] <inf> Reader_test: Reader event triggered.
[00:00:03.867,889] <inf> Reader_test: Bytes written: 32
[00:00:03.867,889] <inf> Reader_test: Bytes Claimed (0+ = valid):32
[00:00:03.867,950] <inf> Reader_test: New Buf
[00:00:03.867,980] <inf> Reader_test: Looping...
[00:00:03.901,611] <inf> Reader_test: TX complete
[00:00:03.901,641] <inf> Reader_test: Bytes Claimed (0+ = valid):0
[00:00:04.906,311] <inf> Reader_test: RX stopped
[00:00:04.906,402] <inf> Reader_test: RX stopped
[00:00:04.907,409] <inf> Reader_test: RX stopped
[00:00:04.907,531] <inf> Reader_test: RX stopped
[00:00:04.908,508] <inf> Reader_test: RX stopped
[00:00:04.908,630] <inf> Reader_test: RX stopped
[00:00:04.909,637] <inf> Reader_test: RX stopped
[00:00:04.909,729] <inf> Reader_test: RX stopped
[00:00:04.910,736] <inf> Reader_test: RX stopped
[00:00:04.910,827] <inf> Reader_test: RX stopped
[00:00:04.911,834] <inf> Reader_test: RX stopped
[00:00:04.911,956] <inf> Reader_test: RX stopped
[00:00:04.912,231] <inf> Reader_test: DATA RECEIVED FROM RX... 1 Bytes
[00:00:04.912,261] <inf> Reader_test: RX released
[00:00:04.912,292] <inf> Reader_test: RX released
[00:00:04.912,322] <inf> Reader_test: RX Disabled

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
* Copyright (c) 2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include <zephyr/logging/log_core.h>
#include <zephyr/logging/log.h>
#include <string.h>
//#include <zephyr/mgmt/osdp.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/devicetree.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/printk.h>
#include <zephyr/drivers/uart.h>
#include <zephyr/sys/ring_buffer.h>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX