Author Topic: How does FSYNC work on IMUs?  (Read 3624 times)

0 Members and 1 Guest are viewing this topic.

Offline axemasterTopic starter

  • Contributor
  • Posts: 37
  • Country: us
How does FSYNC work on IMUs?
« on: March 07, 2020, 10:39:28 pm »
Hi guys, I've been trying to figure this out for a while but with little success.

I am working on a hobby project that includes the chip ICM-20602. This is an inertial measurement unit, i.e. accelerometer + gyroscope. It has an input pin called "FSYNC" which stands for "frame sync". This is apparently used for EIS or "electronic image stabilization". Essentially it's some sort of trigger that allows you to synchronize IMU data with the frame rate of a camera.

I would really like to use this feature, but despite a lot of googling I am simply unable to find a detailed description of exactly how it works.

It seems to be a pretty common feature on IMUs, so hopefully someone here has used it before and can help me figure this out.

ICM-20602 Datasheet:
https://invensense.tdk.com/wp-content/uploads/2016/10/DS-000176-ICM-20602-v1.0.pdf

Thanks!
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: How does FSYNC work on IMUs?
« Reply #1 on: March 07, 2020, 11:46:54 pm »
FSYNC is just an input signal that is used to generate an interrupt from the sensor. The sensor stores acceleration data in the FIFO for the duration of the frame (between two FSYNC edges) and MCU can go and read the whole buffer in one transaction.

That's it, there is nothing special about it. You could really just use VSYNC interrupt from the sensor itself for that, but doing it though the sensor allows you to play with polarity and generally makes writing drivers easier.
Alex
 

Offline axemasterTopic starter

  • Contributor
  • Posts: 37
  • Country: us
Re: How does FSYNC work on IMUs?
« Reply #2 on: March 08, 2020, 12:15:16 am »
Just so make sure I understand, you are saying that the FSYNC is gating data collection? As in, the FIFO will only store samples in between 2 FSYNC pulses?

I am not sure I understand the role of an interrupt here.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: How does FSYNC work on IMUs?
« Reply #3 on: March 08, 2020, 12:18:27 am »
No, it does not gate anything. It is literally just an external pin that causes an interrupt that will be raised over INT/IRQ pin. Your MCU will go and read the interrupt flags register. If one of the flags set is FSYNC, then it will drain the FIFO.

This is just a way to save time by not polling the chip constantly. All you need to do is wait for the interrupt and grab the acceleration data for the whole frame.
Alex
 

Offline axemasterTopic starter

  • Contributor
  • Posts: 37
  • Country: us
Re: How does FSYNC work on IMUs?
« Reply #4 on: March 08, 2020, 02:27:59 am »
OK, I think I understand now. Thanks for the help!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf