ZHCADV1A September 2022 – February 2024 DS90UB960-Q1 , HD3SS3212-Q1
在切换之前,禁用解串器输出,防止系统进入错误处理或失效防护模式。不建议在正传输数据时在摄像头之间切换。在通道间进行多路复用时,实现以下协议。
Analog LaunchPad Program
# Digital reset at initialization
board.WriteI2C(desAddr,0x01,0x01)
# Enable CSI-2 output and forwarding (steps below)
board.WriteI2C(desAddr,0x32,0x01) # Select CSI-2 port 0
board.WriteI2C(desAddr,0x33,0x03) # Enable CSI-2 output with continuous clock mode
board.WriteI2C(desAddr,0x20,0x00) # Forward all CSI-2 to port 0
# Before switching the MUX, disable the associated port and forwarding
board.WriteI2C(desAddr,0x20,0xF0) # Disable forwarding
board.WriteI2C(desAddr,0x0C,0x00) # Disable the RX port receiver
# After switching the MUX, restart the forwarding and the port receiver.
board.WriteI2C(desAddr,0x0C,0x0F) # Enable the RX port receiver
time.sleep(0.1) # Allow time for the port to re-lock
board.WriteI2C(desAddr,0x20,0x00) # Enable forwarding
# The switching protocol above disables forwarding for all channels. Depending on the application, deactivating only the multiplexed channel is sufficient.
For Example:
# Disable forwarding of RX Port 2
board.WriteI2C(desAddr, 0x20, 0x40)
# Disable Port 2 Receiver
board.WriteI2C(desAddr, 0x0C, 0x0B)
图 4-1 展示了从打开多路复用器到重新建立链路的切换时间。除重新建立链路所需的时间外,还需要考虑通过 I2C 的成像器的初始化时间,摄像头初始化完成后,就可以在处理器上看到输出。