Imaging solutions with Free Software & Open Hardware

Who's online

There are currently 0 users online.

Subscribe to Wiki Recent Changes feed
Track the most recent changes to the wiki in this feed. MediaWiki 1.28.0
Updated: 21 min 58 sec ago

Tensorflow with gpu

Thu, 04/26/2018 - 13:49

← Older revision Revision as of 19:49, 26 April 2018 (7 intermediate revisions by the same user not shown)Line 5: Line 5:    81:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)   81:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)  * check driver version * check driver version −  ~$ modinfo nv[TAB]+  ~$ cat /proc/driver/nvidia/version  + NVRM version: NVIDIA UNIX x86_64 Kernel Module  387.26  Thu Nov  2 21:20:16 PDT 2017  + GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)  * install cuda 9.0 with patches * install cuda 9.0 with patches    https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal   https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal Line 15: Line 17:    ~$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}   ~$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}    ~$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}   ~$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}  +*  + ~$ nvidia-smi  + Thu Apr 26 12:39:25 2018       + +-----------------------------------------------------------------------------+  + | NVIDIA-SMI 387.26                Driver Version: 387.26                    |  + |-------------------------------+----------------------+----------------------+  + | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |  + | Fan  Temp  Perf  Pwr:Usage/Cap|        Memory-Usage | GPU-Util  Compute M. |  + |===============================+======================+======================|  + |  0  GeForce GT 610      Off  | 00000000:81:00.0 N/A |                  N/A |  + | N/A  31C    P8    N/A /  N/A |    148MiB /  956MiB |    N/A      Default |  + +-------------------------------+----------------------+----------------------+  +                                                                                 + +-----------------------------------------------------------------------------+  + | Processes:                                                      GPU Memory |  + |  GPU      PID  Type  Process name                            Usage      |  + |=============================================================================|  + |    0                    Not Supported                                      |  + +-----------------------------------------------------------------------------+  +  +* install tensorflow  + ~$ sudo pip3 install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.7.0-cp35-cp35m-linux_x86_64.whl  +  +* testing  + ~$ python3  + Python 3.5.2 (default, Nov 23 2017, 16:37:01)  + [GCC 5.4.0 20160609] on linux  + Type "help", "copyright", "credits" or "license" for more information.  + >>>  + >>>  + >>>  + >>> import tensorflow as tf  + >>> hello = tf.constant('Hello, World!')                                                                                                                                                                             + >>> sess = tf.Session()                                                                                                                                                                                                 + 2018-04-26 13:00:19.050625: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA                                           + 2018-04-26 13:00:19.181581: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1344] Found device 0 with properties:                                                                                                             + name: GeForce GT 610 major: 2 minor: 1 memoryClockRate(GHz): 1.62                                                                                                                                                                 + pciBusID: 0000:81:00.0                                                                                                                                                                                                           + totalMemory: 956.50MiB freeMemory: 631.69MiB                                                                                                                                                                                               + <font color='red'><b>2018-04-26 13:00:19.181648: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1394] Ignoring visible gpu device (device: 0, name: GeForce GT 610, pci bus id: 0000:81:00.0, compute capability: 2.1) with Cuda compute capability 2.1. The minimum required Cuda capability is 3.5.</b></font>                                                                                                                                                                                                               + 2018-04-26 13:00:19.181669: I tensorflow/core/common_runtime/gpu/gpu_device.cc:911] Device interconnect StreamExecutor with strength 1 edge matrix:                                                                                       + 2018-04-26 13:00:19.181683: I tensorflow/core/common_runtime/gpu/gpu_device.cc:917]      0                                                                                                                                                       + 2018-04-26 13:00:19.181695: I tensorflow/core/common_runtime/gpu/gpu_device.cc:930] 0:  N                                                                                                                                                       + >>> print(sess.run(hello))                                                                                                                                                                                                                             + b'Hello, World!'  +  +* Supported cards:  + https://developer.nvidia.com/cuda-gpus Oleg

Tensorflow with gpu

Thu, 04/26/2018 - 12:42

← Older revision Revision as of 18:42, 26 April 2018 (3 intermediate revisions by the same user not shown)Line 5: Line 5:    81:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)   81:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)  * check driver version * check driver version −  ~$ modinfo nv[TAB]+  ~$ cat /proc/driver/nvidia/version  + NVRM version: NVIDIA UNIX x86_64 Kernel Module  387.26  Thu Nov  2 21:20:16 PDT 2017  + GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.9)  * install cuda 9.0 with patches * install cuda 9.0 with patches    https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal   https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal Line 15: Line 17:    ~$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}   ~$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}    ~$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}   ~$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}  +*  + ~$ nvidia-smi  + Thu Apr 26 12:39:25 2018       + +-----------------------------------------------------------------------------+  + | NVIDIA-SMI 387.26                Driver Version: 387.26                    |  + |-------------------------------+----------------------+----------------------+  + | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |  + | Fan  Temp  Perf  Pwr:Usage/Cap|        Memory-Usage | GPU-Util  Compute M. |  + |===============================+======================+======================|  + |  0  GeForce GT 610      Off  | 00000000:81:00.0 N/A |                  N/A |  + | N/A  31C    P8    N/A /  N/A |    148MiB /  956MiB |    N/A      Default |  + +-------------------------------+----------------------+----------------------+  +                                                                                 + +-----------------------------------------------------------------------------+  + | Processes:                                                      GPU Memory |  + |  GPU      PID  Type  Process name                            Usage      |  + |=============================================================================|  + |    0                    Not Supported                                      |  + +-----------------------------------------------------------------------------+ Oleg

Tensorflow with gpu

Thu, 04/26/2018 - 12:27

Created page with "==Pre== * check device ~$ lspci | grep NVIDIA 81:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 610] (rev a1) 81:00.1 Audio device: NVIDIA Corporation..."

New page

==Pre==
* check device
~$ lspci | grep NVIDIA
81:00.0 VGA compatible controller: NVIDIA Corporation GF119 [GeForce GT 610] (rev a1)
81:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)
* check driver version
~$ modinfo nv[TAB]
* install cuda 9.0 with patches
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=deblocal
* then
sudo apt-get install cuda-9-0

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions
*
~$ export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
~$ export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} Oleg

Tmp manual

Thu, 04/19/2018 - 17:55

‎Changelog

← Older revision Revision as of 23:55, 19 April 2018 Line 287: Line 287:  ===Changelog=== ===Changelog===    <font size='1'>'''==20180416=='''   <font size='1'>'''==20180416=='''  + * 20180419 - mt9f002: fixed changing window size    * mt9f002: added triggered mode   * mt9f002: added triggered mode    * mt9f002: added vertical and horizontal flips (mirror)   * mt9f002: added vertical and horizontal flips (mirror) Oleg

10398

Mon, 04/16/2018 - 19:32

‎MT9F002 Application Notes

← Older revision Revision as of 01:32, 17 April 2018 Line 26: Line 26:  |[[File:Mt9f002 slave mode.jpeg|700px|thumb|Fig.3 Slave mode]] |[[File:Mt9f002 slave mode.jpeg|700px|thumb|Fig.3 Slave mode]]  |} |}  +  +====I2C commands via sysfs====  + root@elphel393:~# cd /sys/devices/soc0/elphel393-sensor-i2c\@0/  +* read (port 0):  + echo "mt9f002 0x0 0x3000" > i2c0  + cat i2c0  +* write:  + echo "mt9f002 0x0 0x301a 0x011c" > i2c0     ====Measure frame timing==== ====Measure frame timing==== Oleg

New image sensors for 10393

Mon, 04/16/2018 - 19:07

‎in device tree

← Older revision Revision as of 01:07, 17 April 2018 (5 intermediate revisions by the same user not shown)Line 6: Line 6:  * Read [[Driverless_mode_393|this article]] * Read [[Driverless_mode_393|this article]]  ===Developing a driver=== ===Developing a driver=== −{|+[[File:10393 sensor driver structure.png|thumb|700px|Fig.1 Sensor driver]] −|[[File:10393 sensor driver structure.png|thumb|700px|Fig.1 Sensor driver]]+[[File:10393_cpu_fpga_i2c_records_table.png|thumb|700px|Fig.2 FPGA has a certain 256-line table (for all ports)]] −|}  −{|  −|[[File:10393_cpu_fpga_i2c_records_table.png|thumb|700px|Fig.2 FPGA has a certain 256-line table (for all ports)]]  −|}     −* In device tree:+====Device tree==== −** record for sensor, like:+* record for sensor, like: −    elphel393_mt9f002: elphel393-mt9f002@0 {+ <font size=1>elphel393_mt9f002: elphel393-mt9f002@0 { −        compatible = "elphel,elphel393-mt9f002-1.00";+    compatible = "elphel,elphel393-mt9f002-1.00"; −    };+ };</font> −** record for sensor i2c address, like:+* record for sensor i2c address, like: −    elphel393_sensor_i2c: elphel393-sensor-i2c@0 {+ <font size=1>elphel393_sensor_i2c: elphel393-sensor-i2c@0 { −                compatible = "elphel,elphel393-sensor-i2c-1.00";+    compatible = "elphel,elphel393-sensor-i2c-1.00"; −                /* Add known devices: name, slave address (7-bit), number of address bytes, number of data bytes, SCL frequency (kHz) */+    /* Add known devices: name, slave address (7-bit), number of address bytes, number of data bytes, SCL frequency (kHz) */ −                elphel393-sensor-i2c,i2c_devices = "mt9f002        0x10 2 2 500",+    elphel393-sensor-i2c,i2c_devices = "mt9f002        0x10 2 2 500", −                                                  "mt9p006        0x48 1 2 500",+                                        "mt9p006        0x48 1 2 500", −                                                  "el10359        0x08 1 2 500",+                                        "el10359        0x08 1 2 500", −                                                  "el10359_32    0x08 1 4 500",+                                        "el10359_32    0x08 1 4 500", −                                                  "pca9500_eeprom 0x50 1 1 100",+                                        "pca9500_eeprom 0x50 1 1 100", −                                                  "sensor_eeprom  0x50 1 1 100",+                                        "sensor_eeprom  0x50 1 1 100", −                                                  "sensor_temp    0x18 1 2 100",+                                        "sensor_temp    0x18 1 2 100", −                                                  "cy22393        0x69 1 1 100";+                                        "cy22393        0x69 1 1 100"; −    } ;+ };</font>  +* edit detected sensors:  + <font size=1>elphel393_detect_sensors: elphel393-detect_sensors@0 {  +    compatible = "elphel,elphel393-detect_sensors-1.00";  +    elphel393-detect_sensors,port-mux = "none none none none"; /* "none", "detect" or "mux10359" */  +    elphel393-detect_sensors,sensors =  "mt9f002", // Line per port, may contain up to 4 sensors (3 with 10359)  +                                        "mt9f002",  +                                        "mt9f002",  +                                        "mt9f002";  + };</font>    −** edit detected sensors:+====Add a proper application==== −    elphel393_detect_sensors: elphel393-detect_sensors@0 {+* In '''autocampars.php''' −        compatible = "elphel,elphel393-detect_sensors-1.00";+* Set application through 10389's serial or more preferably through /etc/elphel393/default_10389.xml in a 10389-less setup −        elphel393-detect_sensors,port-mux = "none none none none"; /* "none", "detect" or "mux10359" */  −        elphel393-detect_sensors,sensors = "mt9f002", // Line per port, may contain up to 4 sensors (3 with 10359)  −                                            "mt9f002",  −                                            "mt9f002",  −                                            "mt9f002";  −    };  −   −* edit '''autocampars.php''' - add a proper application  −* set application through 10389's serial or more preferably through /etc/elphel393/default_10389.xml in a 10389-less setup      +====Driver code====  * In ''linux-elphel/src/drivers/elphel/''   * In ''linux-elphel/src/drivers/elphel/''    ** Create mt9f002.h and mt9f002.c ** Create mt9f002.h and mt9f002.c  ** Add to Makefile: ** Add to Makefile: −  obj-$(CONFIG_ELPHEL393)           += mt9f002.o+  <font size=1>obj-$(CONFIG_ELPHEL393) += mt9f002.o</font>  ** Edit pgm_functions.c ** Edit pgm_functions.c  ** mt9f002.h - fill with registers addresses (from sensor's datasheet) and other constants ** mt9f002.h - fill with registers addresses (from sensor's datasheet) and other constants  ** mt9f002.c: ** mt9f002.c: −  mt9f002_par2addr table+  <font size=1>mt9f002_par2addr table    mt9f002_pages table   mt9f002_pages table    mt9f002_ahead_tab - no need to edit in the beginning   mt9f002_ahead_tab - no need to edit in the beginning Line 66: Line 63:    mt9f002_pgm_limitfps func   mt9f002_pgm_limitfps func    mt9f002_pgm_exposure func   mt9f002_pgm_exposure func −  mt9f002_pgm_triggermode func+  mt9f002_pgm_triggermode func</font>           [[Category:393]] [[Category:393]] Oleg

New image sensors for 10393

Mon, 04/16/2018 - 19:03

‎Driver

← Older revision Revision as of 01:03, 17 April 2018 (4 intermediate revisions by the same user not shown)Line 6: Line 6:  * Read [[Driverless_mode_393|this article]] * Read [[Driverless_mode_393|this article]]  ===Developing a driver=== ===Developing a driver=== −{|+[[File:10393 sensor driver structure.png|thumb|700px|Fig.1 Sensor driver]] −|[[File:10393 sensor driver structure.png|thumb|700px|Fig.1 Sensor driver]]+[[File:10393_cpu_fpga_i2c_records_table.png|thumb|700px|Fig.2 FPGA has a certain 256-line table (for all ports)]] −|}  −{|  −|[[File:10393_cpu_fpga_i2c_records_table.png|thumb|700px|Fig.2 FPGA has a certain 256-line table (for all ports)]]  −|}     −* In device tree:+====in device tree==== −** record for sensor, like:+* record for sensor, like: −    elphel393_mt9f002: elphel393-mt9f002@0 {+ <font size=1>elphel393_mt9f002: elphel393-mt9f002@0 { −        compatible = "elphel,elphel393-mt9f002-1.00";+    compatible = "elphel,elphel393-mt9f002-1.00"; −    };+ };</font> −** record for sensor i2c address, like:+* record for sensor i2c address, like: −    elphel393_sensor_i2c: elphel393-sensor-i2c@0 {+ <font size=1>elphel393_sensor_i2c: elphel393-sensor-i2c@0 { −                compatible = "elphel,elphel393-sensor-i2c-1.00";+    compatible = "elphel,elphel393-sensor-i2c-1.00"; −                /* Add known devices: name, slave address (7-bit), number of address bytes, number of data bytes, SCL frequency (kHz) */+    /* Add known devices: name, slave address (7-bit), number of address bytes, number of data bytes, SCL frequency (kHz) */ −                elphel393-sensor-i2c,i2c_devices = "mt9f002        0x10 2 2 500",+    elphel393-sensor-i2c,i2c_devices = "mt9f002        0x10 2 2 500", −                                                  "mt9p006        0x48 1 2 500",+                                        "mt9p006        0x48 1 2 500", −                                                  "el10359        0x08 1 2 500",+                                        "el10359        0x08 1 2 500", −                                                  "el10359_32    0x08 1 4 500",+                                        "el10359_32    0x08 1 4 500", −                                                  "pca9500_eeprom 0x50 1 1 100",+                                        "pca9500_eeprom 0x50 1 1 100", −                                                  "sensor_eeprom  0x50 1 1 100",+                                        "sensor_eeprom  0x50 1 1 100", −                                                  "sensor_temp    0x18 1 2 100",+                                        "sensor_temp    0x18 1 2 100", −                                                  "cy22393        0x69 1 1 100";+                                        "cy22393        0x69 1 1 100"; −    } ;+ };</font>  +* edit detected sensors:  + <font size=1>elphel393_detect_sensors: elphel393-detect_sensors@0 {  +    compatible = "elphel,elphel393-detect_sensors-1.00";  +    elphel393-detect_sensors,port-mux = "none none none none"; /* "none", "detect" or "mux10359" */  +    elphel393-detect_sensors,sensors =  "mt9f002", // Line per port, may contain up to 4 sensors (3 with 10359)  +                                        "mt9f002",  +                                        "mt9f002",  +                                        "mt9f002";  + };</font>    −** edit detected sensors:+====Add a proper application==== −    elphel393_detect_sensors: elphel393-detect_sensors@0 {+* In '''autocampars.php''' −        compatible = "elphel,elphel393-detect_sensors-1.00";+* Set application through 10389's serial or more preferably through /etc/elphel393/default_10389.xml in a 10389-less setup −        elphel393-detect_sensors,port-mux = "none none none none"; /* "none", "detect" or "mux10359" */  −        elphel393-detect_sensors,sensors = "mt9f002", // Line per port, may contain up to 4 sensors (3 with 10359)  −                                            "mt9f002",  −                                            "mt9f002",  −                                            "mt9f002";  −    };  −   −* edit '''autocampars.php''' - add a proper application  −* set application through 10389's serial or more preferably through /etc/elphel393/default_10389.xml in a 10389-less setup      +====Driver code====  * In ''linux-elphel/src/drivers/elphel/''   * In ''linux-elphel/src/drivers/elphel/''    ** Create mt9f002.h and mt9f002.c ** Create mt9f002.h and mt9f002.c  ** Add to Makefile: ** Add to Makefile: −  obj-$(CONFIG_ELPHEL393)           += mt9f002.o+  <font size=1>obj-$(CONFIG_ELPHEL393) += mt9f002.o</font>  ** Edit pgm_functions.c ** Edit pgm_functions.c  ** mt9f002.h - fill with registers addresses (from sensor's datasheet) and other constants ** mt9f002.h - fill with registers addresses (from sensor's datasheet) and other constants  ** mt9f002.c: ** mt9f002.c: −  mt9f002_par2addr table+  <font size=1>mt9f002_par2addr table    mt9f002_pages table   mt9f002_pages table    mt9f002_ahead_tab - no need to edit in the beginning   mt9f002_ahead_tab - no need to edit in the beginning Line 66: Line 63:    mt9f002_pgm_limitfps func   mt9f002_pgm_limitfps func    mt9f002_pgm_exposure func   mt9f002_pgm_exposure func −  mt9f002_pgm_triggermode func+  mt9f002_pgm_triggermode func</font>           [[Category:393]] [[Category:393]] Oleg

10398

Mon, 04/16/2018 - 18:42

‎Measure frame timing

← Older revision Revision as of 00:42, 17 April 2018 (3 intermediate revisions by the same user not shown)Line 26: Line 26:  |[[File:Mt9f002 slave mode.jpeg|700px|thumb|Fig.3 Slave mode]] |[[File:Mt9f002 slave mode.jpeg|700px|thumb|Fig.3 Slave mode]]  |} |}  +  +====Measure frame timing====  + root@elphel393:~# cd /usr/local/verilog/; test_mcntrl.py @hargs-after  +  + //0x21  + //      x393_status_sens_io_t - [22] time_busy  + //0x40  + //      x393_status_sensor_timing_t - [23:0] quad_cycles  + //0x40a  + //      x393_sensio_jtag_t  + //          0s are ok for other bits  + //          timing_to  : 2; // [11:10] (0) Measuring sensor time to: 0 - sof, 1 - eof, 2 - sol, 3 eol  + //          timing_from : 2; // [13:12] (0) Measuring sensor time from: 0 - sof, 1 - eof, 2 - sol, 3 eol  + //          lane_num    : 2; // [15:14] (0) Measuring sensor time on lane 0..3  + //          timing_start: 1; // [  16] (0) Start sensor timing measurement  +  +  + // measure time from sof to sol, lane 0  + write_control_register 0x40a 0x10800  + // sof to eof  + write_control_register 0x40a 0x10400  + // sol to eol  + write_control_register 0x40a 0x12c00  + // eof to sof  + write_control_register 0x40a 0x11000  + // eol to sol  + write_control_register 0x40a 0x13800  +  + // sol to sol  + write_control_register 0x40a 0x12800  +  + // sof to sof  + '''write_control_register 0x40a 0x10000'''  +  + // eof to eof  + write_control_register 0x40a 0x11800  +  +  + // sof to sol  + write_control_register 0x40a 0x10800  +  + // eol to eof  + write_control_register 0x40a 0x13400  +   + read_status 0x21  +  + read_status 0x40 Oleg

New image sensors for 10393

Mon, 04/16/2018 - 18:32

Created page with "==Description== This page describes development and testing of any new sensors for 10393 system boards. It covers a driver-less mode where python scripts are used to get the f..."

New page

==Description==
This page describes development and testing of any new sensors for 10393 system boards. It covers a driver-less mode where python scripts are used to get the first images and the sensor driver structure.

==Application notes==
===Driverless mode===
* Read [[Driverless_mode_393|this article]]
===Developing a driver===
{|
|[[File:10393 sensor driver structure.png|thumb|700px|Fig.1 Sensor driver]]
|}
{|
|[[File:10393_cpu_fpga_i2c_records_table.png|thumb|700px|Fig.2 FPGA has a certain 256-line table (for all ports)]]
|}

* In device tree:
** record for sensor, like:
elphel393_mt9f002: elphel393-mt9f002@0 {
compatible = "elphel,elphel393-mt9f002-1.00";
};
** record for sensor i2c address, like:
elphel393_sensor_i2c: elphel393-sensor-i2c@0 {
compatible = "elphel,elphel393-sensor-i2c-1.00";
/* Add known devices: name, slave address (7-bit), number of address bytes, number of data bytes, SCL frequency (kHz) */
elphel393-sensor-i2c,i2c_devices = "mt9f002 0x10 2 2 500",
"mt9p006 0x48 1 2 500",
"el10359 0x08 1 2 500",
"el10359_32 0x08 1 4 500",
"pca9500_eeprom 0x50 1 1 100",
"sensor_eeprom 0x50 1 1 100",
"sensor_temp 0x18 1 2 100",
"cy22393 0x69 1 1 100";
} ;

** edit detected sensors:
elphel393_detect_sensors: elphel393-detect_sensors@0 {
compatible = "elphel,elphel393-detect_sensors-1.00";
elphel393-detect_sensors,port-mux = "none none none none"; /* "none", "detect" or "mux10359" */
elphel393-detect_sensors,sensors = "mt9f002", // Line per port, may contain up to 4 sensors (3 with 10359)
"mt9f002",
"mt9f002",
"mt9f002";
};

* edit '''autocampars.php''' - add a proper application
* set application through 10389's serial or more preferably through /etc/elphel393/default_10389.xml in a 10389-less setup

* In ''linux-elphel/src/drivers/elphel/''
** Create mt9f002.h and mt9f002.c
** Add to Makefile:
obj-$(CONFIG_ELPHEL393) += mt9f002.o
** Edit pgm_functions.c
** mt9f002.h - fill with registers addresses (from sensor's datasheet) and other constants
** mt9f002.c:
mt9f002_par2addr table
mt9f002_pages table
mt9f002_ahead_tab - no need to edit in the beginning
sensor_t structure - some fields are used, some - not
mt9f002_inits - registers that must be initialized
mt9f002_pgm_detectsensor func - remove mrst and read id via i2c, register other functions
mt9f002_pgm_initsensor func - applies init i2c commands, cable phase adjustment, gain table and shadow regs
mt9f002_pgm_sensorin func - this just set MT9F002_VACT_DELAY because of sensor's specifics
mt9f002_pgm_window func - uses mt9f002_pgm_window_common
mt9f002_pgm_window_safe func - uses mt9f002_pgm_window_common
mt9f002_pgm_window_common func - change window, also sets horizontal blanking
mt9f002_pgm_gains func
mt9f002_pgm_limitfps func
mt9f002_pgm_exposure func
mt9f002_pgm_triggermode func



[[Category:393]] Oleg

File:10393 sensor driver structure.png

Mon, 04/16/2018 - 17:52

Oleg uploaded File:10393 sensor driver structure.png

New page

== Licensing ==
{{CC }} Oleg

File:10393 cpu fpga i2c records table.png

Mon, 04/16/2018 - 17:52

Oleg uploaded File:10393 cpu fpga i2c records table.png

New page

== Licensing ==
{{CC }} Oleg

Tmp manual

Mon, 04/16/2018 - 16:59

‎Accessing raw pixel values

← Older revision Revision as of 22:59, 16 April 2018 (2 intermediate revisions by the same user not shown)Line 281: Line 281:     ==<font color="blue">Firmware images</font>== ==<font color="blue">Firmware images</font>== −* [https://community.elphel.com/files/393/20180406/ '''20180406''']+* [https://community.elphel.com/files/393/20180416/ '''20180416''']  +* [https://community.elphel.com/files/393/20180406/ 20180406]  * [https://community.elphel.com/files/393/20180130/ 20180130] * [https://community.elphel.com/files/393/20180130/ 20180130]  * [https://community.elphel.com/files/393/20180118/ 20180118] * [https://community.elphel.com/files/393/20180118/ 20180118] −* [https://community.elphel.com/files/393/20180116/ 20180116]   ===Changelog=== ===Changelog=== −  <font size='1'>==20180406==+  <font size='1'>'''==20180416=='''  + * mt9f002: added triggered mode  + * mt9f002: added vertical and horizontal flips (mirror)  + '''==20180406=='''    * added initial support for MT9F002 sensor: no triggered mode, no binning/decimation   * added initial support for MT9F002 sensor: no triggered mode, no binning/decimation    * display serial number in http://camera-ip:port/meta   * display serial number in http://camera-ip:port/meta    * decode jp4s on the index page (http://camera-ip)   * decode jp4s on the index page (http://camera-ip)    * turn off auto wb button for all ports on the index page   * turn off auto wb button for all ports on the index page −  ==20180130==+  '''==20180130=='''    * added photo finish demo   * added photo finish demo    * fixed fps limit calcs for triggered mode   * fixed fps limit calcs for triggered mode −  ==20180118==+  '''==20180118=='''    * raw.py & raw.php, see wiki.elphel.com   * raw.py & raw.php, see wiki.elphel.com    * added python3 and python3-opencv   * added python3 and python3-opencv −  ==20180116==+  '''==20180116=='''    * raw pixel data downloading through membridge   * raw pixel data downloading through membridge    * added gcc,make   * added gcc,make −  ==20180109==+  '''==20180109=='''    * fixed autoexposure   * fixed autoexposure −  ==20171228==+  '''==20171228=='''    * + strace, ltrace, dmsetup   * + strace, ltrace, dmsetup    * added to drivers: register devs to sysfs - nodes then created by udev   * added to drivers: register devs to sysfs - nodes then created by udev −  ==20171226==+  '''==20171226=='''    * kernel updated to 4.9 (from 4.0)   * kernel updated to 4.9 (from 4.0)    * lots of drivers is updated to newer versions   * lots of drivers is updated to newer versions    * +dm-crypt and cryptsetup   * +dm-crypt and cryptsetup −  ==20171120==+  '''==20171120=='''    * bugfix - incorrect displaying of TRIG_PERIOD at init   * bugfix - incorrect displaying of TRIG_PERIOD at init −  ==20171115==+  '''==20171115=='''    * Fixed autocampars to let 10393 work with the mux board - 10359, see wiki.elphel.com for   * Fixed autocampars to let 10393 work with the mux board - 10359, see wiki.elphel.com for     docs    docs −  ==20170823==+  '''==20170823=='''    * Fixed autocampars for multiple sensors getting desynced at init   * Fixed autocampars for multiple sensors getting desynced at init    * Fixed Garmin GPS 18x USB driver   * Fixed Garmin GPS 18x USB driver −  ==20170802==+  '''==20170802=='''    * fixed a page for taking snapshots - works in chrome and firefox for bigger images (>2MB)   * fixed a page for taking snapshots - works in chrome and firefox for bigger images (>2MB)    * enabled "Access-Control-Expose-Headers: Content-Disposition" and CORS   * enabled "Access-Control-Expose-Headers: Content-Disposition" and CORS −  ==20170627==+  '''==20170627=='''    * viewing decoded jp4 format in camvc   * viewing decoded jp4 format in camvc −  ==20170623==+  '''==20170623=='''    * fixed incorrect default setting of the master channel   * fixed incorrect default setting of the master channel  </font> </font> Line 380: Line 383:  [[10393_power#Powering_from_batteries| 12V and 48V power options]] [[10393_power#Powering_from_batteries| 12V and 48V power options]]  ===Accessing raw pixel values=== ===Accessing raw pixel values=== −[[Working_with_raw_image_data|Working with raw pixel data]]+[[Working_with_raw_image_data|Working with raw pixel data (how to capture raw images)]]  +   ===Photo finish (linescan mode)=== ===Photo finish (linescan mode)===  [[Photo-finish|Photo Finish]] (works for JP4 image format) [[Photo-finish|Photo Finish]] (works for JP4 image format) Oleg

10398

Wed, 04/11/2018 - 11:05

‎Application notes

← Older revision Revision as of 17:05, 11 April 2018 (4 intermediate revisions by the same user not shown)Line 15: Line 15:  [[Media:10398_assy.tar.gz|10398 component placement files]] [[Media:10398_assy.tar.gz|10398 component placement files]]    −===Application notes===+===MT9F002 Application Notes=== −====Slave mode, not GRR====+====Slave mode====  +To enable:  +# R0x301A[8]=1  +# R0x3026[9:7]=0x1 for GPI1, after this step sensor operates in GPI1 triggered GRR switching to free running (ERS)  +# (undocumented) R0x3158[15]=1 - most likely '''slave mode enable''' - after this step senor operates in slave mode GRR  +# (undocumented) R0x3158[13]=1 - disable GRR? - after this step senor operates in slave mode, readouts on rising GPI1, see Fig.3  +   +{|  +|[[File:Mt9f002 slave mode.jpeg|700px|thumb|Fig.3 Slave mode]]  +|} Oleg

File:Mt9f002 slave mode.jpeg

Wed, 04/11/2018 - 10:44

Oleg uploaded File:Mt9f002 slave mode.jpeg

New page

== Licensing ==
{{CC }} Oleg

10398

Wed, 04/11/2018 - 10:21

← Older revision Revision as of 16:21, 11 April 2018 Line 14: Line 14:  [[Media:10398_gerber.tar.gz|10398 Gerber files]] <br/> [[Media:10398_gerber.tar.gz|10398 Gerber files]] <br/>  [[Media:10398_assy.tar.gz|10398 component placement files]] [[Media:10398_assy.tar.gz|10398 component placement files]]  +  +===Application notes===  +====Slave mode, not GRR==== Oleg

Presentations

Mon, 04/09/2018 - 19:30

added pfresentation

← Older revision Revision as of 01:30, 10 April 2018 Line 1: Line 1:  ==Presentations== ==Presentations==  +===2018/04/09 High Resolution Wide FoV CNN System for Target Classification, Ranging and Tracking===  +*Presentation:  +**[https://community.elphel.com/files/presentations/Elphel_TP-CNN_slides.pdf  Elphel_TP-CNN_slides.pdf (2MB)]  +**[https://community.elphel.com/files/presentations/Elphel_TP-CNN_slides.odp Elphel_TP-CNN_slides.odp (12MB)]  ===2016/12/30 The 33rd Chaos Communication Congress (33C3), Hamburg, Germany=== ===2016/12/30 The 33rd Chaos Communication Congress (33C3), Hamburg, Germany===  * Presentation:   * Presentation:   Andrey.filippov

Tmp manual

Fri, 04/06/2018 - 11:13

‎Firmware images

← Older revision Revision as of 17:13, 6 April 2018 Line 281: Line 281:     ==<font color="blue">Firmware images</font>== ==<font color="blue">Firmware images</font>== −* [https://community.elphel.com/files/393/20180130/ '''20180130''']+* [https://community.elphel.com/files/393/20180406/ '''20180406''']  +* [https://community.elphel.com/files/393/20180130/ 20180130]  * [https://community.elphel.com/files/393/20180118/ 20180118] * [https://community.elphel.com/files/393/20180118/ 20180118]  * [https://community.elphel.com/files/393/20180116/ 20180116] * [https://community.elphel.com/files/393/20180116/ 20180116]  ===Changelog=== ===Changelog=== −  <font size='1'>==20180130==+  <font size='1'>==20180406==  + * added initial support for MT9F002 sensor: no triggered mode, no binning/decimation  + * display serial number in http://camera-ip:port/meta  + * decode jp4s on the index page (http://camera-ip)  + * turn off auto wb button for all ports on the index page  + ==20180130==    * added photo finish demo   * added photo finish demo    * fixed fps limit calcs for triggered mode   * fixed fps limit calcs for triggered mode Oleg

Driverless mode 393

Tue, 04/03/2018 - 11:13

‎Example: other window sizes

← Older revision Revision as of 17:13, 3 April 2018 (11 intermediate revisions by the same user not shown)Line 7: Line 7:  * to load bitstream for MT9F002 appropriate changes need to be made to: * to load bitstream for MT9F002 appropriate changes need to be made to:  ** device tree ** device tree −  set sensors to '''mt9f002''' in ''elphel393-detect_sensors,sensors'' entry+  <font size=2>set sensors to '''mt9f002''' in ''elphel393-detect_sensors,sensors'' entry</font> −** /etc/elphel393/default_10389.xml for setup w/o 10389 or 10389's eeprom otherwise+** /etc/elphel393/default_10389.xml for setup w/o 10389 or 10389's eeprom otherwise write '''MT9F002''' as application − write '''MT9F002''' for application   * Disable driver * Disable driver −  root@elphel393~# touch /etc/elphel393/disable_driver+  <font size=2>root@elphel393~# touch /etc/elphel393/disable_driver −  # then reboot+  # then reboot</font>     ===init=== ===init===  * start python session: * start python session:    root@elphel393~# cd /usr/local/verilog/; test_mcntrl.py @hargs-after   root@elphel393~# cd /usr/local/verilog/; test_mcntrl.py @hargs-after −* init:+* init (if the driver is not disabled the i2c writes will not work): −    setup_all_sensors True None 0x1 False 4384 3280+ <font size=2>setup_all_sensors True None 0x1 False 4384 3280          −    write_sensor_i2c 0 1 0 0x31c08000 # hispi timing+ write_sensor_i2c 0 1 0 0x31c08000 # hispi timing −    write_sensor_i2c 0 1 0 0x030600b4 # pll multiplier+ write_sensor_i2c 0 1 0 0x030600b4 # pll multiplier −    write_sensor_i2c 0 1 0 0x31c68400 # hispi control status+ write_sensor_i2c 0 1 0 0x31c68400 # hispi control status −    write_sensor_i2c 0 1 0 0x306e9280 # datapath select+ write_sensor_i2c 0 1 0 0x306e9280 # datapath select −    write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming+ write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming          −    hispi_phases_adjust 0+ hispi_phases_adjust 0          −    write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming+ write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming          −    setup_all_sensors True None 0x1 False 4384 3280+ setup_all_sensors True None 0x1 False 4384 3280 −    compressor_control all None None None None None 2+ compressor_control all None None None None None 2 −    program_gamma all 0 0.57 0.04+ program_gamma all 0 0.57 0.04          −    write_sensor_i2c 0 1 0 0x3028000a # global gain+ write_sensor_i2c 0 1 0 0x3028000a # global gain −    write_sensor_i2c 0 1 0 0x302c000d # some gain+ write_sensor_i2c 0 1 0 0x302c000d # some gain −    write_sensor_i2c 0 1 0 0x302e0010 # some gain+ write_sensor_i2c 0 1 0 0x302e0010 # some gain −    write_sensor_i2c 0 1 0 0x30120080 # coarse exposure+ write_sensor_i2c 0 1 0 0x30120080 # coarse exposure          −    jpeg_acquire_write+ jpeg_acquire_write          −    #write_sensor_i2c 0 1 0 0x301a0018 # put to standby+ #write_sensor_i2c 0 1 0 0x301a0018 # put to standby</font>  * inspect image: * inspect image: −  http://192.168.0.9/img.jpeg+  <font size=2>http://192.168.0.9/img.jpeg</font>  +   +===Example: 1600x1200 window===  +====8-bit compress to jpeg====  +* setup:  + <font size=2>write_sensor_i2c 0 1 0 0x3002001e  + write_sensor_i2c 0 1 0 0x300604f5  + write_sensor_i2c 0 1 0 0x034e04d8  + write_sensor_i2c 0 1 0 0x300a056a  + write_sensor_i2c 0 1 0 0x30040090  + write_sensor_i2c 0 1 0 0x300806cf  + write_sensor_i2c 0 1 0 0x034c0640  + write_sensor_i2c 0 1 0 0x300c04c8  +  + setup_all_sensors True None 0x1 False 1600 1200  + compressor_control all None None None None None 2  +  + write_sensor_i2c 0 1 0 0x301a001c  + # wait  + write_sensor_i2c 0 1 0 0x301a0018  +  + jpeg_acquire_write</font>  +* inspect:  + <font size=2>refresh http://192.168.0.9/img.jpeg</font>  +====8-bit raw====  +   +* setup  + <font size=2>same as above, no need to repeat if already done</font>  +* capture (copy-pasting the code below with comments will work)  + <font size=2>setup_all_sensors True None 0x1 False 1600 1200  +  + write_sensor_i2c 0 1 0 0x301a001c  + # wait  + write_sensor_i2c 0 1 0 0x301a0018  +  + # notice '''membridge_start''' (under Setting membridge for sensor 0)  + # it can be different: '''0x2e000000''' or '''0x2dc00000'''  +  + membridge_start  + mem_save "/usr/local/verilog/sensor_dump" '''0x2e000000''' 0x400000</font>  +* copy (from an ssh session in another terminal)  + <font size=2>scp /usr/local/verilog/sensor_dump ip@host:/path/1600x1200_8bit.raw</font>  +* open:  + <font size=2>Use imagej: File > Import > Raw...</font>  +====16-bit raw====  +* setup  + <font size=2>same as above, no need to repeat if already done</font>  +* capture (copy-pasting the code below with comments will work)  + <font size=2># Notice that the window width in 16 bit mode is 2x  + setup_all_sensors True 18 0x1 False '''3200''' 1200  + set_sensor_mode 0 1 1 True True  + enable_memcntrl_en_dis 12 True  +  + write_sensor_i2c 0 1 0 0x301a001c  + # wait  + write_sensor_i2c 0 1 0 0x301a0018  +   + # notice '''membridge_start''' (under Setting membridge for sensor 0)  + # it can be different: '''0x2e000000''' or '''0x2dc00000'''  +  + membridge_start  + mem_save "/usr/local/verilog/sensor_dump" 0x2e000000 0x400000</font>  +* copy (from an ssh session in another terminal)  + <font size=2>scp /usr/local/verilog/sensor_dump ip@host:/path/1600x1200_16bit.raw</font>  +* open:  + <font size=2>Use imagej: File > Import > Raw...</font>  +   +===Example: other window sizes===  +* Download and run [https://git.elphel.com/Elphel/x393/blob/master/py393/mt9f002_window_generator.py mt9f002_window_generator.py]  +* Then edit the code snippets for 1600x1200 according to the new window size  +* If getting raw sensor data 8-bit and 16-bit the membridge buffer is 4MB, so calculate accordingly:  + for 8-bit : '''WxH < 4M'''  + for 16-bit: '''WxH < 2M'''  + If not then - the buffer is circular which will result in overwriting of the beginning of the image     [[Category:393]] [[Category:393]] Oleg

Driverless mode 393

Tue, 04/03/2018 - 10:55

‎Example: 1600x1200

← Older revision Revision as of 16:55, 3 April 2018 (7 intermediate revisions by the same user not shown)Line 7: Line 7:  * to load bitstream for MT9F002 appropriate changes need to be made to: * to load bitstream for MT9F002 appropriate changes need to be made to:  ** device tree ** device tree −  set sensors to '''mt9f002''' in ''elphel393-detect_sensors,sensors'' entry+  <font size=2>set sensors to '''mt9f002''' in ''elphel393-detect_sensors,sensors'' entry</font> −** /etc/elphel393/default_10389.xml for setup w/o 10389 or 10389's eeprom otherwise+** /etc/elphel393/default_10389.xml for setup w/o 10389 or 10389's eeprom otherwise write '''MT9F002''' as application − write '''MT9F002''' for application   * Disable driver * Disable driver −  root@elphel393~# touch /etc/elphel393/disable_driver+  <font size=2>root@elphel393~# touch /etc/elphel393/disable_driver −  # then reboot+  # then reboot</font>     ===init=== ===init===  * start python session: * start python session:    root@elphel393~# cd /usr/local/verilog/; test_mcntrl.py @hargs-after   root@elphel393~# cd /usr/local/verilog/; test_mcntrl.py @hargs-after −* init:+* init (if the driver is not disabled the i2c writes will not work): −    setup_all_sensors True None 0x1 False 4384 3280+ <font size=2>setup_all_sensors True None 0x1 False 4384 3280          −    write_sensor_i2c 0 1 0 0x31c08000 # hispi timing+ write_sensor_i2c 0 1 0 0x31c08000 # hispi timing −    write_sensor_i2c 0 1 0 0x030600b4 # pll multiplier+ write_sensor_i2c 0 1 0 0x030600b4 # pll multiplier −    write_sensor_i2c 0 1 0 0x31c68400 # hispi control status+ write_sensor_i2c 0 1 0 0x31c68400 # hispi control status −    write_sensor_i2c 0 1 0 0x306e9280 # datapath select+ write_sensor_i2c 0 1 0 0x306e9280 # datapath select −    write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming+ write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming          −    hispi_phases_adjust 0+ hispi_phases_adjust 0          −    write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming+ write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming          −    setup_all_sensors True None 0x1 False 4384 3280+ setup_all_sensors True None 0x1 False 4384 3280 −    compressor_control all None None None None None 2+ compressor_control all None None None None None 2 −    program_gamma all 0 0.57 0.04+ program_gamma all 0 0.57 0.04          −    write_sensor_i2c 0 1 0 0x3028000a # global gain+ write_sensor_i2c 0 1 0 0x3028000a # global gain −    write_sensor_i2c 0 1 0 0x302c000d # some gain+ write_sensor_i2c 0 1 0 0x302c000d # some gain −    write_sensor_i2c 0 1 0 0x302e0010 # some gain+ write_sensor_i2c 0 1 0 0x302e0010 # some gain −    write_sensor_i2c 0 1 0 0x30120080 # coarse exposure+ write_sensor_i2c 0 1 0 0x30120080 # coarse exposure          −    jpeg_acquire_write+ jpeg_acquire_write          −    #write_sensor_i2c 0 1 0 0x301a0018 # put to standby+ #write_sensor_i2c 0 1 0 0x301a0018 # put to standby</font>  * inspect image: * inspect image: −  http://192.168.0.9/img.jpeg+  <font size=2>http://192.168.0.9/img.jpeg</font>     +===Example: 1600x1200 window===  +====8-bit compress to jpeg====  +* setup:  + <font size=2>write_sensor_i2c 0 1 0 0x3002001e  + write_sensor_i2c 0 1 0 0x300604f5  + write_sensor_i2c 0 1 0 0x034e04d8  + write_sensor_i2c 0 1 0 0x300a056a  + write_sensor_i2c 0 1 0 0x30040090  + write_sensor_i2c 0 1 0 0x300806cf  + write_sensor_i2c 0 1 0 0x034c0640  + write_sensor_i2c 0 1 0 0x300c04c8  +  + setup_all_sensors True None 0x1 False 1600 1200  + compressor_control all None None None None None 2  +  + write_sensor_i2c 0 1 0 0x301a001c  + # wait  + write_sensor_i2c 0 1 0 0x301a0018  +  + jpeg_acquire_write</font>  +* inspect:  + <font size=2>refresh http://192.168.0.9/img.jpeg</font>  +====8-bit raw====  +  +* setup  + <font size=2>same as above, no need to repeat if already done</font>  +* capture (copy-pasting the code below with comments will work)  + <font size=2>setup_all_sensors True None 0x1 False 1600 1200  +  + write_sensor_i2c 0 1 0 0x301a001c  + # wait  + write_sensor_i2c 0 1 0 0x301a0018  +  + # notice '''membridge_start''' (under Setting membridge for sensor 0)  + # it can be different: '''0x2e000000''' or '''0x2dc00000'''  +  + membridge_start  + mem_save "/usr/local/verilog/sensor_dump" '''0x2e000000''' 0x400000</font>  +* copy  + <font size=2>scp /usr/local/verilog/sensor_dump ip@host:/path/1600x1200_8bit.raw</font>  +====16-bit raw====  +* setup  + <font size=2>same as above, no need to repeat if already done</font>  +* capture (copy-pasting the code below with comments will work)  + <font size=2># Notice that the window width in 16 bit mode is 2x  + setup_all_sensors True 18 0x1 False '''3200''' 1200  + set_sensor_mode 0 1 1 True True  + enable_memcntrl_en_dis 12 True  +  + write_sensor_i2c 0 1 0 0x301a001c  + # wait  + write_sensor_i2c 0 1 0 0x301a0018  +   + # notice '''membridge_start''' (under Setting membridge for sensor 0)  + # it can be different: '''0x2e000000''' or '''0x2dc00000'''  +  + membridge_start  + mem_save "/usr/local/verilog/sensor_dump" 0x2e000000 0x400000</font>  +* copy (from an ssh session in another terminal)  + <font size=2>scp /usr/local/verilog/sensor_dump ip@host:/path/1600x1200_16bit.raw</font>  [[Category:393]] [[Category:393]] Oleg

Driverless mode 393

Tue, 04/03/2018 - 10:32

Created page with "==Description== Instructions on how to disable sensor driver and get images from image sensor (for MT9F002 sensor) ==Instructions== ===pre=== * to load bitstream for MT9F002..."

New page

==Description==
Instructions on how to disable sensor driver and get images from image sensor (for MT9F002 sensor)


==Instructions==
===pre===
* to load bitstream for MT9F002 appropriate changes need to be made to:
** device tree
set sensors to '''mt9f002''' in ''elphel393-detect_sensors,sensors'' entry
** /etc/elphel393/default_10389.xml for setup w/o 10389 or 10389's eeprom otherwise
write '''MT9F002''' for application
* Disable driver
root@elphel393~# touch /etc/elphel393/disable_driver
# then reboot

===init===
* start python session:
root@elphel393~# cd /usr/local/verilog/; test_mcntrl.py @hargs-after
* init:
setup_all_sensors True None 0x1 False 4384 3280

write_sensor_i2c 0 1 0 0x31c08000 # hispi timing
write_sensor_i2c 0 1 0 0x030600b4 # pll multiplier
write_sensor_i2c 0 1 0 0x31c68400 # hispi control status
write_sensor_i2c 0 1 0 0x306e9280 # datapath select
write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming

hispi_phases_adjust 0

write_sensor_i2c 0 1 0 0x301a001c # reset and start streaming

setup_all_sensors True None 0x1 False 4384 3280
compressor_control all None None None None None 2
program_gamma all 0 0.57 0.04

write_sensor_i2c 0 1 0 0x3028000a # global gain
write_sensor_i2c 0 1 0 0x302c000d # some gain
write_sensor_i2c 0 1 0 0x302e0010 # some gain
write_sensor_i2c 0 1 0 0x30120080 # coarse exposure

jpeg_acquire_write

#write_sensor_i2c 0 1 0 0x301a0018 # put to standby
* inspect image:
http://192.168.0.9/img.jpeg

[[Category:393]] Oleg

Pages