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

..--

CMakeLists.txtD18-Mar-2025437 1712

README.mdD18-Mar-20251.8 KiB5537

main.cD18-Mar-20256.1 KiB16168

prj.confD18-Mar-202535 20

sample.yamlD18-Mar-20251.2 KiB3534

README.md

1# TWIM with TWIS blocking {#twim_twis_tx_rx_blocking}
2
3The sample demonstrates a functionality of nrfx_twim and nrfx_twis drivers operating in the blocking mode.
4
5## Requirements
6
7The sample supports the following development kits:
8
9| **Board**           | **Support** |
10|---------------------|:-----------:|
11| nrf52dk_nrf52832    |     Yes     |
12| nrf52833dk_nrf52833 |     Yes     |
13| nrf52840dk_nrf52840 |     Yes     |
14| nrf5340dk_nrf5340   |     Yes     |
15| nrf9160dk_nrf9160   |     Yes     |
16
17## Overview
18
19Application initializes nrfx_twim and nrfx_twis drivers and sends a specified message ( @p MSG_TO_SEND ) from master to slave and back using TWIM and TWIS peripherals.
20To perform this operation, different buffers are used and data is transferred as follows:
21@p m_tx_buffer_master -> @p m_rx_buffer_slave -> @p m_rx_buffer_master
22
23> For more information, see **TWIM driver** and **TWIS driver** - **nrfx documentation**.
24
25## Wiring
26
27To run the sample correctly, connect pins as follows:
28* `LOOPBACK_PIN_1A` with `LOOPBACK_PIN_1B`.
29* `LOOPBACK_PIN_2A` with `LOOPBACK_PIN_2B`
30
31> Refer to pin definitions in `common/nrfx_example.h`.
32
33You should monitor the output from the board to check if it is as expected.
34
35## Building and running
36
37To 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.
38
39## Sample output
40
41You should see the following output:
42
43```
44- "Starting nrfx_twim_twis blocking example."
45- "Message to send: Nordic Semiconductor"
46- "Content of slave RX buffer:  "
47- "Content of master RX buffer: "
48- "m_tx_buffer_master -> m_rx_buffer_slave -> m_rx_buffer_master"
49- "Content of slave RX buffer:  Nordic Semiconductor"
50- "Content of master RX buffer: Nordic Semiconductor"
51```
52
53[//]: #
54[Building and running]: <../../../README.md#building-and-running>
55