cancel
Showing results for 
Search instead for 
Did you mean: 

LSM303AGR is using 3-wire SPI how to interface the STM32WB MCUs with the LSM303 using 3-wire SPI

na.1
Associate II

0693W00000WKnLzQAL.jpgWe trying to implement the SPI -3 wire communication with the HAL-APIs i.e, HAL_SPI transmit, HAL_SPI_receive, while trying to read data from LSM303 we are receiving the device ID as 0xFF

we are using the LSM303 Accelerometer + Compass Breakout board from the Adafruit.

I2C communication working properly but we are not able to establish communication with the 3-wire SPI,

Is it possible to implement 3-wire SPI communication using the HAL functions (Transmit & receive) or we have to work with low-level libraries to implement SPI-3 wire

1 REPLY 1
S.Ma
Principal

Start with 4 wire SPI and short miso and mosi together, and disable mosi when reading. The other ways are not working as dreamt.