cancel
Showing results for 
Search instead for 
Did you mean: 

Can we continuously read registers using I2c ?

Amal Babu
Associate III

i have interfaced opt8320 optical sensor to stm32f446zet.I hav configured STM as master and Opt8320 as Slave. Can i initiate continuous registers read from sensor using I2c ?Please share suggestions regarding this issue.

4 REPLIES 4
Uwe Bonnes
Principal II

You can read/write continous with DMA.

S.Ma
Principal

1khz fps. One check per milisecond seems good enough. At 400kbps, one transaction may last less than a milisecond. If the sensor is the only slave on the bus, you could run i2c with dma transaction under interrupt, and trigger this i2c transaction by timer 1msec event. This being very specific and free the main code from dealing with low level management or need to use rtos and share the resource of i2c.

Various schemes exist and it depends on the overall picture.

S.Ma
Principal

Looking deeper in the spec, i2c seems not used to get scanned data. 8 bit parallel interface is implemented for high throuput... I2c seems moslt for the control and configuration of the device

Amal Babu
Associate III

Thanks for your support