You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This command triggers an SPI transfer, returning the data back from the far end.
215
-
As an example (with MOSI looped back to MISO)::
215
+
216
+
As an example you can exchange (send and receive) 4 bytes (-x 4) on SPI2 (-b 2) using the command below with the ``loopback`` approach.
217
+
This approach requires that you connect the MOSI pin directly to the MISO pin (NOTE: SCLK and CS are not directly involved, but you still can see the clock and chip select waveforms if you decide to use an oscilloscope or more properly a logic analyzer to analyze these pins)::
216
218
217
219
nsh> spi exch -b 2 -x 4 aabbccdd
218
220
@@ -221,7 +223,7 @@ As an example (with MOSI looped back to MISO)::
221
223
Note that the ``TX Data`` are always specified in hex, and are always two digits
222
224
each, case insensitive.
223
225
224
-
I2C Build Configuration
226
+
SPI Build Configuration
225
227
-----------------------
226
228
227
229
NuttX Configuration Requirements
@@ -241,7 +243,7 @@ The SPI tools requires the following in your NuttX configuration:
241
243
CONFIG_SPI_DRIVER=y
242
244
243
245
The SPI tool will then use the SPI character driver to access the SPI bus.
244
-
These devices will reside at ``/dev/spiN`` where ``N`` is the I2C bus number.
246
+
These devices will reside at ``/dev/spiN`` where ``N`` is the SPI bus number.
245
247
246
248
**Note**: The SPI driver ``ioctl`` interface is defined in
0 commit comments