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

SPI read and write

Dose this capture from the Nordic Specification means that to read bytes from SPI i need to send before. Each byte i send i get a byte!!! MLy case i have read only sensor that sends periodically. If it is mandatory to send in order to receive so i have to send 4 bytes to receive the 4 bytes i am looking for.11.PNG

Parents
  • Hi,

    SPI is typically implemented using shift registers, meaning that data is clocked out of the master shift register and into the slave register through the MOSI line, and similarly, out of the slave shift register and into the master register through the MISO line.

    In theory, you should be able to clock in the data through the MISO line without having the MOSI line connected. You are still required to "send" dummy data from the master, to make the clock run.

    This operation will depend on your sensor. Could you provide details on the device? Then I might be able to help you with your setup.

    Best regards,

    Jørgen

  • Please reply me after reading well what i mention. you just neglect all the important part.

    1. nrf_spim_task_trigger(&stSPI_iNRF_SPI_Type,NRF_SPIM_TASK_START); is it ok to lunch spi clk and so receive data

    2. NRF_SPIM_EVENT_ENDRX is it ok for when having 4 bytes data to be received. Instead of using 4 times the Ready interrupt when a byte is received

      enter code here

Reply Children
No Data
Related