nRF52832 SPI tx rx

Hi

I'm developing nRF52832.

I have a question about SPI communication.(\nRF5_SDK_17.0.0\examples\peripheral\spi I don't understand, so I ask questions.)

I want to read sensor data through SPI communication, but I don't know how to separate Tx and Rx into nrf_drv_spi_transfer.

Example.

1-1. If I want to read the 0x00 register address, is it right to set it up like below?

1-2. When I read the 0x00 register address, do I have to read the register address + 0x00?

2-1. Is this the right way to use data through SPI?

Thank you.

Parents Reply Children
  • Hi

    The example is made to showcase the use of SPI.

    The example is configured to use the our DKs. This is mainly from the pin configurations.

    Our DKs have normal nRF microcontrollers on them.

    Therefore, if you change the pin configurations in the example, it should work with any nRF chip.

    To know if the SPI code is working for your custom board, use an oscilloscope or logic analyzer to measure the MOSI line to see if the nRF52832 is sending on SPI.

    Regards,
    Sigurd Hellesvik

Related