Register Access – Serial Communications

Serial Protocol

  • The Register Read/Write of the SONY Sensor can be done by either 4-wire (SPI) or I2C.
  • The determination of which protocol to be used it based on the 1st communication, and not possible to be changed thereafter until a sensor reset.
    • I2C – XCE must be held HIGH (disabling SPI communication (Slave Select))
    • [Unknown] – how does the 1st communication work??
  • SONY Documentation Page 26 to 34 for protocol definition

 

4-Wire Communication

As far as I understand, the 4-wire communication described in the documentation is SPI – Serial Peripheral Interface. It is omitted in our 2024 module this time, so below is a good introductory article about SPI protocol:

Introduction to Serial Peripheral Interface (SPI)

Essentially, there is a master (ARM processor) and a slave (sensor) with a LSB-first transfer.

Protocol Name Meaning SONY Pin Name Physical Socket (Pin)
CLK / SCK Serial Clock SCK SPI0_CLK (25)
MOSI Master Out / Slave In SDI SPI0_MOSI (26)
MISO Master In / Slave Out SDO SPI0_MISO (27)
SS Slave Select XCE SPI0_CSN (28)

[Unknown] – pin 33 & 34 has I2C / UART port, what is that for? pin 35 &36 are IR_CUT?

 

alt text

I2C

This is also a LSB-first transfer (TAKE NOTE, the documentation is contradictory p.29 & p.31, so TAKE NOTE and do experiment out. It is suspected that this shouldbe MSB-first transfer)

Protocol Name Meaning SONY Pin Name Physical Socket (Pin)
SCL  Serial Data Communication Input SCK SPI0_CLK (25)
SDA  Serial Clock Input SDI SPI0_MOSI (26)

The Slave Address is: 0011010 + R/W

Register Communication Timing

There is a certain communication prohibied period, at the instant of Frame Update Timing. For registers marked “V” in the Register Map (p.35), they are updated at FUT. (Some “immediate” update registers can be set as well, while the rest must be set in standby mode.)

It is not obviously shown, but serial communication may NOT be allowed during Data Line frames. [TO VERIFY]

Register Holding (page 92)

This technique is used to stop the changes of register values to take effect immediately, by setting REGHOLD to 1.

IMX178 Sensor Board Pinout Diagram

IMX178 Sensor Board Pinout Diagram

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: