[Elphel-support] Script for changing the SADDR bit for the MT9P031 sensor

Frederick Gamache frederick.gamache at gmail.com
Thu Mar 8 07:37:17 PST 2018


Hello Oleg,

Thank you for your fast response.

I'm not able to build the firmware at the moment. Following the spec,
changing the SADDR pin to a HIGH value should translate the device ID to
0xBA, so *0x5D* as the 7-bit address.
I'm able to read the device registers on your sensor board using the
print_sensor_i2c command.

Can you send me an updated version of the firmware using the 0x5D addr
please?
Will I be able to copy the files you will send me on the camera micro SD
card so I can boot from it?

Best regards,
Frederick




On Wed, Mar 7, 2018 at 12:35 PM, Oleg <support-list at support.elphel.com>
wrote:

> Hi,
>
> 1.
> I made change so it could be set int device tree (0x48) - just noticed a
> bug and had to fix it:
>
>>  ...
>
>     elphel393_sensor_i2c: elphel393-sensor-i2c at 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";
>>     } ;
>
> ...
>
>
> Commands to recompile devicetree:
> decompile:
>
>> $ dtc -I dtb -O dts devicetree.dtb -o devicetree.dts
>
> compile:
>
>> $ dtc -I dts -O dtb devicetree.dts -o devicetree.dtb
>
>
>
> 2. Are you able to build the firmware or should I upload it to somewhere?
>
>
> 3. Before any updating - can you read sensor's registers?
>
>> ~$ ssh root at 192.168.0.9
>> root at elphel393:~# cd /usr/local/verilog/
>> root at elphel393:~# test_mcntrl.py @hargs-after
>> x393 --> r
>> x393 --> print_sensor_i2c (without args it will print usage)
>>
>> *...*
>> *print_sensor_i2c <num_sensor> <reg_addr> <indx> <sa7> <verbose>*
>> *...*x393 --> print_sensor_i2c 0 0x3000 0xff *0x10* 0
>> *   Result: 0x2e01*
>
>
> <num_sensor> - 10393's port the sensor is connected to. Can be: 0..3
> <reg_addr> - I tried on a sensor that has 16-bit addresses (0x3000), for
> MT9P006 it can be 0x0 (ID register addr)
> *<indx> *- set 0xff
> *<sa7> -* SADDR
>
>
> 4. Side note (sensor power and clock):
> At boot autocampars.php calls: test_mcntrl.py @hargs
>
> test_mcntrl.py (located at /usr/local/bin/)
> hargs (located at /usr/local/verilog/)
>
> Inside hargs file there are commands for:
> - which bitstream to load
> - setting sensor power: for MT9P006 it's PAR12 which translates to
> {"mv":2800, "freq":24.0,"iface":"2V5_LVDS"}
> - setting sensor clock frequency: for MT9P006 it's 24.0 "2V5_LVDS"
>
> Best regards,
> Oleg Dzhimiev
> Electronics Engineer
> phone: +1 801 783 5555 x124 <(801)%20783-5555>
> Elphel, Inc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20180308/4be3778c/attachment.html>


More information about the Support-list mailing list