Unable to receive data over UART

I have an external GPS module connected to an nrf9151dk over UART. The module is correctly powered, and sending messages over its tx pin, which has been confirmed by attaching a logic analyzer in parallel with the dev board and seeing valid NMEA 0183 messages being sent. Despite this, and despite trying both the interrupt driven and DMA-based async api for uart, I've been unable to come up with firmware that can read any data. Below I've provided the overlay file definitions pertaining to this peripheral, and the code handling the UART device.

app.overlay

Fullscreen
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


prj.conf

Fullscreen
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

gps_uart.c:

Fullscreen
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

gps_uart.h

Fullscreen
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


The actual UART driver code here is substantially based off the lpuart example found here.

The GPS module is sending ~10 (I haven't actually counted, but a significant number) NMEA messages every second, and yet at runtime the only UART events received by the callback are one or two buf requests, and one ready event at most. 

I would appreciate any guidance as to what mistakes there may be here that are leading to the bizarre behaviour

Kaitlyn

  • Hello,

    can you show the compiled zephyr.dts and .config? Have you tried using uart1 to send and receive from the USB ACM CDC serial port to a computer?

  • Hi Hakon,

    Files are attached. I believe uart1 is used for the TF-M USB ACM CDC serial port by default, hence why I have TF-M logging disabled. When it was used for that I was able to receive data over it just fine.

    2806.zephyr.dts

    7776..config.txt

  • Can you add UART_RX_DISABLED , UART_RX_STOPPED to the uart_callback(), and write to the log whenever those events happen? And please post the log here.