2020-01-27 05:44 AM
Hi,
I'm trying to simply read WHO_AM_I (0Fh). OUT_Z_L (2Ch) and OUT_Z_H (2Dh) registers. But output data is only FFh. Also other registers too. What is the data sequence for simple read function? My SPI bus output is MSB first and clock idles low. For WHO_AM_I I'm sending 0F00h.
My schematic and SPI bus views is in the attachement.
Thanks in advence for your support.
Best regards,
2020-01-29 07:13 AM
Hi @AAYKA.1 , which are the Vdd and VddIO levels in your application? Are you pulling down the CS when you start the SPI communication? Regards
2020-01-29 07:21 AM
Hi Eleon,
Vdd and VddIO levels are 3.3V. CS pin is low before start the SPI communication.
2020-01-29 07:53 AM
Is the master SPI interface well configured? I mean for example the SPI datasize, the SPI polarity, the SPI phase/edge, etc... Regards
2020-01-29 08:03 AM
For example I'm sending 0F00h for WHO_AM_I register. MSB first and clock idles high.
2020-01-29 08:43 AM
May be I got it wrong about data type. Could you advice me please for WHO_AM_I or OUT_Z_H?
2020-01-30 02:15 AM
WHO_AM_I (0Fh) register value is 3Dh, while to see the OUT_Z_H varying try to enable OM[1:0] bits in CTRL_REG1 (20h). The SPI read protocol is the following one, so you have to send 16 clock shots and the SDI must contain the bit 0 (R/W) READ bit, which value is 1. For multiple readings the M/S bit has to be 1 too. SO you have to send the value 1F00h for WHO_AM_I reading. Regards
2020-01-31 04:40 PM
Hi, we have successful communication with sensor. But when we read the raw data from x,y,z axis, we read small values within, say - 1000 to +1000 by orienting sensor 360 degree. In datasheet it says data registers are 16bit in two's complement form. So, we expect to see from -32767 to +32767. Is there any way to increase these raw data values? We have worst case solution which is multiplying this value with a constant, but it results in big deviation even with no rotation.