tier4 / tier4_automotive_hdr_camera

This repository contains the device driver for the TIER IV Automotive HDR Cameras
https://tier4.github.io/edge-auto-docs/index.html
GNU General Public License v2.0
12 stars 7 forks source link

port opening order #1

Closed cwyark closed 1 year ago

cwyark commented 1 year ago

Hi, I'm check C1 HDR camera on ROScube X (RQX-58G) and found there's a port opening order issue. When two cameras are on the same deserializer (both link A and link B), link B's camera can only be activated after link A's camera is activated.

What I observed

I think there's a key point register: MAX9296 (0x48)'s CTRL0 (0x10)

  1. Only link A camera is connected (CTRL0 = 0x01, which is configured to single link A mode) => it works
  2. Only link B camera is connected (CTRL0 = 0x02, which is configured to single link B mode) => it works
  3. Both link A and link B camera are connected. (CTRL0 = 0x03, which is configured to splitter mode) => problem here

A Workaround

When both link A and link B cameras are connected. I first set CTRL0 to 0x22 (link B single link mode)

i2ctransfer -y -f 30 w3@0x48 0x00 0x10 0x22

Then open link B's camera, it works. Somehow MAX9296 in splitter mode affects the data path on link A and link B

yk-fujii commented 1 year ago

@cwyark Thanks for report and suggestion! Looks good to me! I will check your suggestion with my device and create a PR.

yk-fujii commented 1 year ago

It is a different implementation than the method you presented, but it was resolved in v1.2.1. Thank you for your report.