2025-06-03 2:16 AM
Hi, I am working with the LSM303AH (accelerometer + magnetometer) as a potential replacement to the LIS2DS12 (accelerometer only). The accelerometer section of both devices seems identical with the only exception being the SPI on the LSM303AH is 3 wire only. To evaluate the LSM303AH I am using the same software as has been used with the LIS2DS12 for a long time and is reliable (altered only for 3-wire SPI) but am getting strange behaviour.
When reading from the FIFO in a burst read, the first 24 bytes (4 samples) come out fine but then there are a block of 16 bytes read as all zero, after this the behaviour seems erratic, some devices return to reading correct data, others return correct data but with sporadic erroneous zero bytes mixed in. If instead of burst reading all data from the FIFO in one go I read 6 bytes (1 sample) at a time with separate SPI read commands the data comes out fine.
This behaviour has been replicated on 3 devices.
The application notes for both devices recommend the same burst read procedure for reading all data from the FIFO. I can't find any errata to suggest that there is an issue with burst reads on this device, is this a known issue? I notice the datasheet for the LSM303AH omits the paragraph that describes the auto-increment wrapping for the FIFO which is present in the LIS2DS12 data sheet (section 4.4 in LSM303AH vs 5.4 in LIS2DS12), does this indicate that the feature is removed and the application note has incorrectly been copied over?
Cheers,
Will S