This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

is nrf52 dk support 3 wire spi interface

hello i am new to spi, i am doing project on 3 wire spi interface. I am using 3 wire interface as Sclk,ssn,MOSI pins only , I am not using MISO pin .I am tested spi example code but does not works well.so can any one tell me that nrf52 dk -spi support 3 wire interface ( with out using MISO pin). The issue is the serial clock was not generates signals .For sending data the function "nrf_drv_spi_transfer(&spi, m_tx_buf, m_length, m_rx_buf, m_length) " was used.Every time ssn pin is low to send the data & it is set to high after sending the data.Here i am using AD9837 module as slave & it works on spi interface only.I am facing 1 issue i.e., as follows. Here the data i hexa decimal but in the example code the tx buffer must be character type

  • Yes it supports it. You just set the MISO pin to -1 and even if you don't and it uses a pin, you just ignore the data.

  • even-though it was not working well ,are you sure nrf52 dk supports 3 wire spi interface. can you please share any example code supported 3 wire interface.I have spi example code(nRF5_SDK_13-pca10040) but it not working well on 3 wire spi interface

  • Your description in your original question was just that you aren't using the MISO pin. That's absolutely fine. However now I wonder whether you didn't explain yourself properly and you're actually talking about the half-duplex version of SPI which uses one pin for MISO and for MOSI. That isn't supported. You can work around that with some circuitry but it's not easy.

    So what are you actually talking about here?

  • i am connecting 3 wire(Sclk,ssn,MOSI pins only) & i am not connecting miso pin but it does not works well.can you please give me any example code for 3 wire connection interface & it is a simplex version not a half duplex version.

  • Then just don't connect the pin and use the same code. There is nothing special about SPI with just one pin unused. You can use the same code, you can even set it to use a pin for MISO and just don't connect that pin. The same example works.

Related