Demo3 Sensor GPIO information

Demo3 Sensor GPIO information

The following information is for the Sensor GPIO (aka "SP") signals on the Demo3

By and large, the same SP pins have the same function across most headboards.

Demo3 headboards are the same except as noted:

  • SP3 controls the 20-bit-to-10-bit mux on the AP010x REV2 headboards. DevWare sets it to 0 on startup.  

  • SP3 is GSHT_CTL on many others. DevWare sets it to 0 on startup for all except ASX340/343/350 or AP010x.

  • SP4 is TRIGGER on many headboards. DevWare sets it to 0 on startup for all except ASX340/343/350 or AP010x.

  • SP5 is FRAMESYNC on ASX340/343/350. DevWare sets it to 0 on startup.

  • SP5 is SHUTDOWN on many other sensors. This can be controlled with midlib mode MI_SENSOR_SHUTDOWN.

    • On Demo3 only, DevWare sets SP5 to high-Z on startup for all except ASX340/344/350 or AP010x. 

  • SP7 controls the 20-bit-to-10-bit mux on the AP010x REV1 headboards. DevWare sets it to 0 on startup.

The actual registers and bitfields can be found in the board_data folder;

Demo3;   \Aptina Imaging\board_data\Demo3_5551.cdat - see "SensorGPIOControl".

Python Control of GPIO Pins

Note that these only apply to control of the Demo3, and NOT the GPIO controls on the sensor itself. The GPIO controls on the sensor must be configured for input or output.

Usage in Python:

apbase.Camera().MI_ALL_GPIO=<mask>

<mask> is a bit-field control of the 6 GPIOs

Bits 13-8 control "enable", bits 5-0 control level.

Examples:

  • To enable output on all GPIO and set all high, mask is 0x3f003f

  • To enable output on GPIO 1 and set to high, mask is 0x20002

  • To enable input input on GPIO 2, mask is 0x40000