Skip to main content
Associate II
March 24, 2025
Solved

lis2dwt12 SPI communication with other slaves present

  • March 24, 2025
  • 1 reply
  • 634 views

I have lis2dwt12 sensor and nrf24l01+ sensor.Can i connect these devices on same spi line? i will select different CS pins.

Thank you for now.

Best answer by Andrew Neil

@Garslanbay wrote:

 I haven't been able to read the NRF24L01+ registers at all.


Can you communicate with it on its own - ie, with the LIS2DWT12 disconnected?

You can disable the I2C in the LIS2DWT12:

AndrewNeil_0-1742919954259.png

 

1 reply

Andrew Neil
Super User
March 25, 2025

Yes, that is the whole point of SPI as a bus.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate II
March 25, 2025

But I couldn't get it to work. I know that different models exist, and I adjusted accordingly. The common pins like SCK, MOSI, MISO are the same. I haven't been able to read the NRF24L01+ registers at all.

I had this thought: could it be that when I set the CS pin of the LIS2DWT12 sensor High, it switches to I2C and is preventing my communication with the NRF?

Andrew Neil
Andrew NeilBest answer
Super User
March 25, 2025

@Garslanbay wrote:

 I haven't been able to read the NRF24L01+ registers at all.


Can you communicate with it on its own - ie, with the LIS2DWT12 disconnected?

You can disable the I2C in the LIS2DWT12:

AndrewNeil_0-1742919954259.png

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.