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

Basic SPI reads and writes

Hi,

I have a SPI peripheral connected to the nRF960 DK. In order to access this correctly, I need to be able to write a byte to a specific address first and then read back from specific addresses. 

I can run the basic SPI example

https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/spi

which carries out a basic loop back. This all works fine but I can't see how to write a specific byte to a specific address or read a specific address.

So, ideally I would like to write 0xD2 to address 0x80, wait 1 second and then read data from address 0x00.

Can you point me to a simple example please?

Ta,
Rod

Related