cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DW12 sensor with SPI DMA is not working

basavanagouda
Associate II

HI All,

I'm using LIS2DW12 sensor with STM32 controller. sensor is interfaced with SPI protocol. I'm using DMA to read sensor output. SPI is configured and tested with 8MHZ and 16Mhz clock frequency.

For 16Mhz clock I'm able to read data from the sensor. !!!!!!!!!!!!! ( Sensor supports max 10Mhz clock frequency but i'm able to see data output with 16Mhz)

but with 8Mhz DMA read data is not proper...????

Please help me to understand this issue and share inputs to solve this issue.

Thanks,

Basavangouda.

4 REPLIES 4
Miroslav BATEK
ST Employee

Do you use SPI Mode 3?

If yes, can you capture the signals on SPI bus with oscilloscope or logic analyzer?

I'm using SPI 4 wire mode.

Hi,

I have observed one more fact in testing.

I have configured the SPI wtih 8 MHz, CPL and CPH with High and able to see the data output from the sensor.

After hour or 2 hour sensor sending 0xFF. i'm not understading this issue. I need to power off the system and ON to get out from this state.

  1. Is my sensor went to Sleep mode?
  2. Or any issue with clock ?
  3. How to avoid this state by configuring other registers?

Thanks

Basava.

The sensor will not switch to any sleep mode automatically.

I suppose the problem is in your firmware, the sensor is able to work continuously without any issue.