C779-Software

From Geekworm Wiki
Revision as of 12:32, 27 December 2021 by Harry (talk | contribs)
Jump to navigation Jump to search

TC358743 HDMI to CSI-2 install instructions

1. To use the kernel drivers, please update your system. There are a few things that have changed with the 5.4 kernel, so these instructions are for 5.4 or later. If "uname -a" reports anything less, then fix this before proceeding.

1. Update & upgrade the raspberry pi system (It will take a long time depend on the different country)

sudo apt-get update
sudo apt-get upgrade

2. Enable camera module (the camera is enabled by default in Raspberry pi Bullseys OS)

sudo raspi-config

Navigate to 'Interfacing Options' and hit Enter. Now select the 'Camera' option, and hit the Enter key to enable it. Select “Finish” and select to reboot your Raspberry Pi.

2. Edit /boot/config.txt to add the line (that will need sudo, and use your preferred editor)

dtoverlay=tc358743

to the end of the file.

If (and only if) you have a device such as the Auvidea B102 that supports the 22pin connector with all 4 lanes wired out, and are using a Compute Module with the CAM1 connector that also has all 4 lanes wired up, you can use

dtoverlay=tc358743,4lane=1

3. Check the amount of memory assigned to the CMA heap with "dmesg | grep cma". The first line should be along the lines of

pi@raspberrypi:~ $ dmesg | grep cma
[    0.000000] cma: Reserved 256 MiB at 0x000000001ec00000

If it reports less than 96MB assigned to CMA, then edit /boot/cmdline.txt and add

cma=96M

to the start of the line. Do NOT add any carriage returns.

4. Reboot. If all is well you should get a /dev/video0 device, and "v4l2-ctl --list-devices" will tell you that it is provided by Unicam. After connecting all the cables, power on the Raspberry Pi, the C779 indicator light is normally green, and after opening the Raspberry Pi terminal, enter the following command:

pi@raspberrypi:~ $ ls /dev/video0
/dev/video0
pi@raspberrypi:~ $ v4l2-ctl --list-devices
bcm2835-codec-decode (platform:bcm2835-codec):
	/dev/video10
	/dev/video11
	/dev/video12
	/dev/video18
	/dev/media1

bcm2835-isp (platform:bcm2835-isp):
	/dev/video13
	/dev/video14
	/dev/video15
	/dev/video16
	/dev/media0

unicam (platform:fe801000.csi):
	/dev/video0
	/dev/video1
	/dev/media2

5. This driver puts all the control in the hands of the user, or the user's application. By default there is no EDID loaded into the chip to allow it to tell the HDMI source what resolutions are supported. There are EDID editors around. If you create a file edid.txt, then you can push this to the device using

The comment of edid.txt file:

00ffffffffffff005262888800888888
1c150103800000780aEE91A3544C9926
0F505400000001010101010101010101
010101010101011d007251d01e206e28
5500c48e2100001e8c0ad08a20e02d10
103e9600138e2100001e000000fc0054
6f73686962612d4832430a20000000FD
003b3d0f2e0f1e0a2020202020200100
020321434e041303021211012021a23c
3d3e1f2309070766030c00300080E300
7F8c0ad08a20e02d10103e9600c48e21
0000188c0ad08a20e02d10103e960013
8e210000188c0aa01451f01600267c43
00138e21000098000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
cd ~
sudo nano edid.txt
#copy the above commend in edid.txt, save&exit;