This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UART does not send data in nRF9160.

I want to use UART.

I checked the waveform and UART does not send data.
Here is my code. build and run are successful. Any help?
I connect UART RX and TX directly, which means p16 and p15 are connected by a jumper.

SEGGER IDE V4.16
nrf version: v0.4.0

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<main.c>
#include <zephyr.h>
#include <misc/printk.h>
#include <uart.h>
#include <string.h>
#include <stdlib.h>
/* nRF9160 DK voltage = 3.0V
non sucure
board name: nrf9160_pca10090ns
nrf9160_pca10090ns.overlay */
static u8_t uart_buf[1024];
void uart_cb(struct device *x)
{
printk("uart_cb start!!\n");
uart_irq_update(x);
int data_length = 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
<prj.conf>
CONFIG_SERIAL=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
# CONFIG_BSD_LIBRARY_TRACE_ENABLED=n
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_1_NRF_UARTE=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
<nrf9160_pca10090ns.overlay>
&uart1 {
status = "ok";
current-speed = <115200>;
tx-pin = <16>;
rx-pin = <15>;
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX