D/CX functionality

nRF5340 Product Specification

Some SPI slaves, for example display drivers, require an additional signal from the SPI master to distinguish between command and data bytes. For display drivers this line is often called D/CX.

The SPIM provides support for such a D/CX output line. The D/CX line is set low during transmission of command bytes and high during transmission of data bytes.

The D/CX pin number is selected using PSELDCX and the number of command bytes preceding the data bytes is configured using DCXCNT.

It is not allowed to write to the DCXCNT during an ongoing transmission.

The following figure shows the use of D/CX, using SPIM.DCXCNT=1.

Figure 3. D/CX example. SPIM.DCXCNT = 1.