cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization of multiple ISM330DHCX

JVinc.1
Associate III

Hello,

I need to use dual MEMS (ISM330DHCX) and MCU in my application for redundancy. Each MEMS is connected to a different MCU with independent supply. The data collected from sensors will be crossed checked if within a predefined tolerance. I think the MEMS may have different boot time and clock. What's the best way to synchronize them? Thanks in advance.

14 REPLIES 14

Please consider that the max ISM330DHCX ODR goes up to 6.66kHz, and that at this frequency you can have maximum 1/ODR mismatch in interrupt mode

That's what I would like to do. If the maximum allowable time for a mismatch is chosen sufficiently large compared to ODR, then it shouldn't be problem at all. For higher ODR rates, should I use FIFO mode? Because I have also some calculations which takes around 2-3ms. If FIFO not used, I can achieve up to 400 Hz ODR max. What do you recommend? Also for ISM330DHCX, are the acc & gyro measurements always in sync when they are set to same ODR? Is there something special for this? The previous MEMS I used was requiring to use gyro data ready signal to check if measurements from both acc&gyro ready.

Sensor hub feature is not useful in my case; since it doesn't provide independence of sensors.

Otherwise I would consider looking for a sensor with external sample trigger input.

This would be best option for synchronization but I couldn't find a part. Do you know any?

Hi @JVinc.1​ ,

>> For higher ODR rates, should I use FIFO mode? Because I have also some calculations which takes around 2-3ms

Right, using the FIFO in this case (ODR set to 6.66kHz) would be a good solution if you have to run real.time calculation longer than some 1/ODR time. When the FIFO is full, you can choose to trigger on the the sensor . Please note that, since you may no need all the 9kbytes samples:

The FIFO buffer memorizes up to 9 kbytes of data (with compression enabled) but the depth of the FIFO can be resized by setting the WTM [8:0] bits in FIFO_CTRL1 (07h) and FIFO_CTRL2 (08h). If the STOP_ON_WTM bit in FIFO_CTRL2 (08h) is set to '1', FIFO depth is limited up to the WTM [8:0] bits in FIFO_CTRL1 (07h) and FIFO_CTRL2 (08h).

So, you can calibrate the watermark properly (to a number of samples corresponding to 5ms, for example) and then manage the FIFO_ WTM_IA interrupt raised in FIFO_STATUS2 (3Bh) register. You can also route this interrupt to INT1 pin and manage it with your application processor.If you need some C examples, you can refer to the Github repository, or to sample codes like lsm6dsox_fifo.c for hints on the FIFO management.

Of course, having a device that can be triggered by and external signal would be the best solution. Unfortunately, it cannot be (but only passing through the SensorHub configuration). You might use an analog accelerometer such as the LIS344ALH, which starts the acquisition as soon as it is powered on: some more difficult if you need the gyroscope signal too...

-Eleon

Eleon BORLINI
ST Employee

Hello @JVinc.1​ ,

any news about your issue?

-Eleon

Unfortunately I haven't tested yet. I am currently develeoping firmware; it may take some time.