Hello, guys!
We are using nRF52840 with SDK 17.2. In our system, there is a need to configure nRf52840 as SPI slave device and connect it to some other MCU. Naturally, our starting point was SPIS example.
We were able to properly receive SPI data packet on nRF52840 side when using SPIS example. The second step was to import SPIS example into our project that uses SoftDevice (among the other things).
Here comes the trouble... when we included SPIS example in our environment, SPI RX buffer (m_rx_buf) contains 0xFF instead of real data bytes. We checked the SPI lines with the logic analyzer and it seems that, on physical level everything is OK, the bytes are properly sent from the SPI master side.
The number of bytes sent from SPI master and received on SPI slave side (nRF52840) is correct, as you can see below.

[0m<info> mercury_spi: Transfer completed! 9 Bytes received [0m<info> mercury_spi: FF FF FF FF FF FF FF FF|........ [0m<info> mercury_spi: FF 00 00 00 00 00 00 00|........ [0m<info> mercury_spi: 00 |. [0m<info> mercury_spi: 01 00 00 00 00 00 00 00|........ [0m<info> mercury_spi: 00 00 00 00 00 00 00 00|........ [0m<info> mercury_spi: SPI RX/TX buffers set!
Do you have any idea what we are missing here? Why our m_rx_buf buffer contains 0xFF on the place of real data?
Thanks in advance for your time and efforts.
Sincerely,
Bojan