How to drive HSB camera connector GPIO

Hello,

I am working with the following hardware:

  • Hardware:

    Host: AGX Thor DevKit
    Sensor Bridge: Lattice CPNX100-ETH-SENSOR-BRIDGE updated to “sb_ip_version=0x2510”
    Cameras: Custom dual camera module
    Camera 0: IP 192.168.0.2, interface mgbe0_0
    Camera 1: Not used

  • Software Versions:

    Host OS: Jetson Linux R38.4
    Holoscan Sensor Bridge: v2.5

I have a camera board that was previously connected to the camera connector on my NVIDIA AGX Orin DevKit.

I needed to control the following pins to enable the sensors on the Orin dev kit:

#define CAM_RST_L      TEGRA234_MAIN_GPIO(H, 3)
#define CAM_PWR_EN_H   TEGRA234_MAIN_GPIO(H, 6)

However, now that my board was has been moved to the Lattice board, I can no longer drive these pins directly, the HSB must do it.

Is it possible to control these two pins via for example a specific I2C access to internal FPGA registers, for example, in order to enable my sensor?

The pins appear to be the following on the HSB:

  • Pin 95 (CPRO_CAM_UART_TX) → CAM_RST_L

  • Pin 93 (CPRO_CAM_UART_CTS) → CAM_PWR_EN_H

    Thank you for your help

Hi,

Those pins are connected to the Holoscan Sensor Bridge pins o_sw_sen_rst[1:0] that can be toggled, but more as a GPIO.

Pin 95 → CAM_RST_L → Register Address 0x0000_0008 bit [0]

Pin 93 → CAM_PWR_EN_H → Register Address 0x0000_0008 bit [1]

The default values of the register is 0. But it is inverted at the RTL level, so when register bit value is 0, you’ll see the pin is 1, and vice versa.

So you can toggle these bits from the application code, like:

hololink.write_uint32(0x00000008, 0x00000001)

If “hololink” is the defined handle.

But specifically to your comment about accessing these pins for I2C transaction, no, these pins are not connected as I2C.

Hi @kewoo !

Thank you very much for your answer.

I will test that very soon and get back there, in the mean time, can you explain quickly how you know the registers address and gpio linkage?

Where can I found thoses values and how to know which gpio is mapped to which register and bit?

EDIT: I confirm it works, thank you!

Regards

Hi again,

I also need to drive Pin 119 on the connector, is it possible?

Regards

Hi,

These connections are specific to the Lattice HSB Devkit and it’s currently not on the public user guide.

For pin 119, CAM_GPIO9 sits on bit[25] of these registers.

Address: 0x0000_000C (GPIO_OUTPUT), configure bit[25], there is no inversion on the output.

Address: 0x0000_002C (GPIO_DIRECTION), configure bit[25], 0=GPIO OUTPUT, 1=GPIO INPUT

1 Like

Hi!

Work like a charm, thank you very much!

Regards

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.