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

UART(E) frame error issue

   We are using UART peripheral from nrf52840. It communicates with a modem over the serial, but after receiving a random number of bytes, we get frame errors(the uart driver return 0x4 in error mask)
   We changed the test and the device from AT modem to a usb-serial adapter and from our device to development board PCA10056, but the error appears at each test.
  The wires we are using are about 2 cm for AT modem and 10 cm for usr-serial adapter.
  No flow control is used.
  Also we have tested with different speeds - 38400, 115200, 230400.
 The test program is the example from nRF5_SDK_15.3.0_59ac345/examples/peripheral/serial_uartes/ (attached) , modified to use only one serial instance and wait for UART bytes.
 We send a small number of characters (10 -20) followed by <CR><LF> sequence.
 After a random number of sequences the UART driver indicate frame error.

How can we resolve this to have a correct transfer?

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
* Copyright (c) 2018 - 2019, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX