SPI CS pin going High and From Transceiving function data is not coming.

I am using nrf52840 and i am working on nrf connect sdk v2.6.0  in my overlay file SPI CS pin is low but it is going high between the communication.

Data is not receiving from the sensor using spi_transceive_dt() function but in logic analyzer the MISO and MOSI lines are working.

Please look into the below code and help me on this.

Parents Reply
  • Hi,

     

    Not all sensors are equal. You should have a look at the datasheet for your sensor and use that as a basis for how to communicate with the device.

    Madhu Mohan Reddy said:
    tx_buffer = 1
    rx_buffer should be 1 or 2 ?

    This is not correct for the specific sensor that you're interfacing.

    tx_buffer should be 2 bytes and hold the register (OR with 0x20), and the second byte is the amount of registers to read, minus one.

     

    Kind regards,

    Håkon

Children
No Data
Related