• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

CMakeLists.txtD18-Mar-2025437 1712

README.mdD18-Mar-20252.2 KiB6547

main.cD18-Mar-20257.7 KiB20992

prj.confD18-Mar-202535 20

sample.yamlD18-Mar-20251.3 KiB3837

README.md

1# UARTE double-buffered {#uarte_rx_double_buffered}
2
3The sample demonstrates a functionality of the nrfx_uarte driver utilizing double-buffering feature.
4
5## Requirements
6
7The sample supports the following development kits:
8
9| **Board**           | **Support** |
10|---------------------|:-----------:|
11| nrf52dk_nrf52832    |     No      |
12| nrf52833dk_nrf52833 |     Yes     |
13| nrf52840dk_nrf52840 |     Yes     |
14| nrf5340dk_nrf5340   |     Yes     |
15| nrf9160dk_nrf9160   |     Yes     |
16
17## Overview
18
19Application initializes the nrfx_uarte driver, and using UARTE instance sends a specified message stored in @p m_tx_buffer.
20The same instance of UARTE is configured to receive the message.
21To perform this operation, different buffers are used, and data is transferred as follows:
22* @p m_tx_buffer -> @p m_rx_buffers
23
24To show the double-buffering feature the data is written to different buffers in the @p m_rx_buffers structure.
25The @p uarte_handler() is executed with relevant log messages.
26
27> For more information, see **UARTE driver - nrfx documentation**.
28
29## Wiring
30
31To run the sample correctly, connect pins as follows:
32* `LOOPBACK_PIN_1A` with `LOOPBACK_PIN_1B`.
33
34> Refer to pin definitions in `common/nrfx_example.h`.
35
36You should monitor the output from the board to check if it is as expected.
37
38## Building and running
39
40To run this sample, build it for the appropriate board and then flash it as per instructions in [Building and running](@ref building_and_running) section.
41
42## Sample output
43
44You should see the following output:
45```
46- "Starting nrfx_uarte RX double-buffered example."
47- "Content of TX buffer: Nordic Semiconductor nRF"
48- "................................"
49- "RX buffer1 - addr: (.*) | content:"
50- "RX buffer2 - addr: (.*) | content:"
51- "RX buffer3 - addr: (.*) | content:"
52- "................................"
53- "--> TX done"
54- "--> Bytes transfered: 25"
55- "................................"
56- "RX buffer1 - addr: (.*) | content: Nordic"
57- "RX buffer2 - addr: (.*) | content:  nRF"
58- "RX buffer3 - addr: (.*) | content:  Secmiconductor"
59- "................................"
60```
61> (.*) stands for memory address
62
63[//]: #
64[Building and running]: <../../../README.md#building-and-running>
65