Kondo KEIm-CVSoC User guide

Ver.1.1
Kondo Electronics Industry Co., Ltd.
KEIm-CVSoC
Development Kit Rev.B
Startup Guide

Preface
Thank you for purchasing a KEIm product.
Read this manual and related documents thoroughly before using this product and observe the precautions
for use.
Precautions for use
⚫The contents of this manual are subject to change without prior notice. Contact the Kondo
Electronics Industry service center or check the Kondo Electronics Industry website for the latest
information before using the product.
⚫This product contains general electronic components. Do not use the product for devices that
require extremely high reliability (aerospace equipment, nuclear power equipment, medical
equipment for life support, etc.).
⚫This product is developed and manufactured for use only in Japan. If this product or a product that
incorporates this product is exported outside Japan, all the necessary procedures must be
completed at the responsibility and expense of the customer in accordance with the Foreign
Exchange and Foreign Trade Act and other export laws and regulations.
⚫Be sure to turn off the power before inserting or removing cables to connectors other than LAN and
USB.
⚫Do not use this product in locations subject to large amounts of water, humidity, dust, or oil smoke.
⚫Using or copying all or any part of the contents of documents related to this product without the
permission of Kondo Electronics Industry is prohibited.
⚫All company names and product names used in this manual and related documents are trademarks
or registered trademarks of their respective companies.
Contact information
⚫For any questions about this product, contact the following email address:
contact us

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
3
Kondo Electronics Industry Co., Ltd.
Table of contents
Overview...................................................................................................................................................4
Package contents.............................................................................................................................. 4
Camera unit specifications.......................................................................................................................4
Basic specifications ...........................................................................................................................4
Part names ........................................................................................................................................5
Board configuration ...........................................................................................................................6
2.3.1. Board layout................................................................................................................................ 6
2.3.2. Switches and LEDs.....................................................................................................................7
Description of LED functions................................................................................................ 7
Description of switch functions.............................................................................................8
CamView operation procedure................................................................................................................. 9
Equipment to prepare........................................................................................................................ 9
Downloading the SD image............................................................................................................... 9
Procedure for writing the SD image ................................................................................................10
How to remove and insert a microSD card ......................................................................................11
Connection configuration..................................................................................................................11
Terminal connection......................................................................................................................... 12
3.6.1. Installing the VCP driver ........................................................................................................... 12
3.6.2. Communication format..............................................................................................................12
Booting Linux...................................................................................................................................13
Executing CamView ........................................................................................................................13
boardTest operation procedure..............................................................................................................14
Procedure ........................................................................................................................................14
Shutdown procedure .............................................................................................................................. 15
Appendix................................................................................................................................................. 16
Precautions on mounting and removing the SoM. .......................................................................... 16
Modify ISP settings of camera module............................................................................................ 17
Revision history......................................................................................................................................20

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
4
Kondo Electronics Industry Co., Ltd.
Overview
This is a startup guide for designing software using the KEIm-CVSoC development kit.
Package contents
The table below shows the package contents of the KEIm-CVSoC development kit.
Item
Remarks
KEIm-CVSoC camera unit
Built-in KEIm-CVSoC SoM
AC adapter
12VDC, center plus
USB Micro B cable
For UART connection
Camera unit specifications
Basic specifications
Table 2-1 Basic specifications of the KEIm-CVSoC camera unit
Item
Description
SoM
SoC FPGA model name
5CSXFC6C6U23I7N
DDR3L SDRAM (HPS)
2GByte, bus width (32bit)
MT41K512M16VRN-107 IT (Micron) ×2
QSPI Flash (HPS)
64MByte
MT25QL512ABB8E12-0SIT (Micron)
QSPI Flash (FPGA)
32MByte, for configuration
MT25QL256ABA8E12-1SIT (Micron)
Clock (HPS)
25MHz
Clock (FPGA)
50MHz, 100MHz
RTC
DS1339U-33+ (Maxim), I2C I/F
EEPROM
24LC32A-I/ST (Microchip), 32kbit, I2C I/F
IO board
Camera input
Camera module OV5647 (OmniVision), MIPI CSI-2 2-Lane
Video output
DVI transmitter TFP410, mini-HDMI
Ethernet
10/100/1000Base-T, RJ45
USB2.0
HighSpeed (480Mbps), OTG, USB Micro-AB
UART
USB serial, USB Micro-B
SD
MicroSD card slot
M.2 slot
Mustang-M2BM-MX2 (sold separately) connectible
LED
For users × 4, for power × 1
Switch
DIP switch × 1 (4 contacts),
push switch × 4 (for users × 2, for reset × 2),
slide switch × 1 (for power)
Debug I/F
JTAG 10-pin connector
Power supply
12±5%, provided through the supplied AC adapter
Power consumption
TBD
Operating temperature range
0 to 40°C
Dimensions
110 × 80 × 50mm (excluding the protuberance)

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
5
Kondo Electronics Industry Co., Ltd.
Part names
Figure 2-1 and Figure 2-2 show the external view of the camera unit.
Figure 2-1 Camera unit external view (front view)
Figure 2-2 Camera unit external view (rear view)
Camera
MicroSD card slot
LED window
USB2.0 OTG (USB Micro-AB)
Video output (mini-HDMI)
Fan exhaust outlet
UART (USB Micro-B)
LAN (RJ45)
DC jack
Power switch

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
6
Kondo Electronics Industry Co., Ltd.
Board configuration
The camera unit consists of the SoM, IO board, and camera module. This section describes the functional
specifications of the board.
2.3.1. Board layout
Figure 2-3 and Figure 2-4 show the layout of the board.
Figure 2-3 Board layout (top view)
Figure 2-4 Board layout (bottom view)
LED4,3,2,1
USB2.0 OTG (USB Micro-AB)
Power switch
LED5
JTAG 10-pin connector
MicroSD card slot
UART (USB Micro-B)
Video output (mini-HDMI)
40pin expansion port
SoM:SW1
SoM:LED2,3,1
SoM:SW2
Fan connector
Camera input connector 2
Camera input connector 1
SW4 (nPOR)
SW3 (nRST)
SW5
SW2
SW1
LAN (RJ45)
DC jack
M.2 slot
Enclosure fan connector
RTC battery
Connector for power switch

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
7
Kondo Electronics Industry Co., Ltd.
2.3.2. Switches and LEDs
The SoM and the IO board have function setting and general-purpose (for users) switches and LEDs. This
section describes the functions of the switches and LEDs.
Description of LED functions
Table 2-2 and Table 2-3 show the LED functions of the SoM and the IO board, respectively.
Table 2-2 LED functions of the SoM
No.
Name
Function
LED1
Configuration LED
Indicates the configuration status.
ON: Configuration complete
OFF: Configuration not complete yet
LED2
User LED (FPGA)
User LED. It is connected to IO on the FPGA.
ON: The pin is set to Low.
OFF: The pin is set to High.
LED3
User LED (HPS)
User LED. It is connected to GPIO0 on the HPS.
ON: The pin is set to Low.
OFF: The pin is set to High.
Table 2-3 LED functions of the IO board
No.
Name
Function
LED1-4
User LED (FPGA)
User LED. It is connected to IO on the FPGA.
ON: The pin is set to Low.
OFF: The pin is set to High.
LED5
Power LED
Indicates the power status.
ON: The power is ON.
OFF: The power is OFF.

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
8
Kondo Electronics Industry Co., Ltd.
Description of switch functions
Table 2-4 and Table 2-5 show the switch functions of the SoM and the IO board, respectively.
Table 2-4 Switch functions of the SoM
No.
Function
Setting
Setting mode
SW1
BSEL setting switch.
Set the HPS boot mode.
BSEL1
Set to High
QSPI boot mode
BSEL1
Set to Low
SD boot mode
* Factory setting
SW2
MSEL setting switch.
Set the FPGA configuration
mode.
MSEL4=1
MSEL3=0
Active Serial × 1 or × 4 mode
MSEL4=0
MSEL3=1
Fast Passive Parallel × 32 mode
* Factory setting
Table 2-5 Switch functions of the IO board
No.
Signal name/function
Setting
Description
SW1
HPS_nRST
Push (ON)
Set nRST (Warm Reset) to Low
on the HPS and perform a reset.
Release (OFF)
Set nRST (Warm Reset) to High
on the HPS and release a reset.
SW2
HPS_nPOR
Push (ON)
Set nPOR (Cold Reset) to Low on
the HPS and perform a reset.
Release (OFF)
Set nPOR (Cold Reset) to High
on the HPS and release a reset.
SW3
PUSHSW1 (FPGA)
Push (ON)
Set the signal to Low.
Release (OFF)
Set the signal to High.
SW4
PUSHSW2 (HPS)
Push (ON)
Set the signal to Low.
Release (OFF)
Set the signal to High.
SW5
User switch
ON
Set the signal to Low.
OFF
Set the signal to High.
* Factory setting
SW6
Power switch
ON
Power ON
* Factory setting
OFF
Power OFF
1 2
ON
1 2
ON
ON
ON OFF
ON OFF
ON
H
L
H
L

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
9
Kondo Electronics Industry Co., Ltd.
CamView operation procedure
This section describes how to display a video captured with the camera module on the Linux terminal by
executing the Linux application software CamView using the reference design (available for download on
the Kondo Electronics Industry website).
Equipment to prepare
Table 3-1 shows items that need to be prepared, as well as this product, to run the program. Meanwhile,
Table 3-2 lists PC tools required for operation.
Table 3-1 List of equipment to prepare
Item
Remarks
KEIm-CVSoC development kit
This unit. It contains the AC adapter and the USB Micro-B cable.
HDMI mini cable
USB Micro-AB cable
MicroSD card
USB keyboard
USB mouse
USB hub
Display
The display must have an HDMI port.
PC
Used to write data to the microSD card or for the UART terminal. It
does not require high performance. However, if the PC has no SD
card slot, you will need a USB or other type of SD card reader.
Table 3-2 List of PC tools
Item
Remarks
Win32 Disk Imager
Used to write the SD image to the SD card.
TeraTerm
Terminal software
Demo software SD image
Download it from the Kondo Electronics Industry website.
Downloading the SD image
Write the Linux image to a microSD card that is inserted into the KEIm-CVSoC camera unit. In this manual,
Win32 Disk Imager is used as a write tool. Version 1.0 is available for download from the following website
as of September 2020. Download and install it according to the installer instructions.
https://sourceforge.net/projects/win32diskimager/
The SD image file “keim-cvsoc-b_devkit_gsrd.7z” is available for download from the following URL page
of the Kondo Electronics Industry website. Download the latest version. The file is compressed in 7z
format, so decompress it using 7zip to get the .img file.
https://kd-group.co.jp/download/

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
10
Kondo Electronics Industry Co., Ltd.
Procedure for writing the SD image
(1) Insert the microSD card into the PC. If the PC has no SD card slot, use a USB card reader.
(2) Start Win32 Disk Imager. Specify the path of the prepared .img file in Image File. Also, select the SD
card drive type from Device.
(3) When you click Write, the following (Confirm overwrite) dialog box appears. Click Yes to start writing
the image.
(4) When the image write is complete, the Complete dialog box appears. Click OK.
(5) Then, execute SD card ejection from the Windows task tray and remove the microSD card from the
SD card slot.
* There has been a change to SD card partition recognition since the Windows update (20H2). If you try
to overwrite the image to an SD card where the reference design is already written, it may fail. In such a
case, delete the SD card partition using the Windows administrative tools or Diskpart tool and write the
image again.

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
11
Kondo Electronics Industry Co., Ltd.
How to remove and insert a microSD card
To remove a microSD card from the camera unit, turn off the unit, push the microSD card gently using a
thin stick, and remove it when it pops out a little bit. When inserting a microSD card, make sure that it is
inserted until it clicks. At this time, the logo of the microSD card must be facing up.
Connection configuration
Figure 3-1 shows the connection configuration diagram. Be sure to cut the power from the AC adapter
before connecting the camera unit. If the DC plug is inserted into the camera unit with the AC adapter ON,
the unit is turned on. In this section, you will turn on the power after inserting the microSD card where the
SD image is already written. A power strip with a switch would be useful.
Figure 3-1 Connection configuration
Display
KEIm-CVSoC camera unit
Camera unit rear view
HDMI mini cable
USB Micro-AB cable
AC adapter
PC
USB Micro-B cable
Mouse
USB hub
Keyboard

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
12
Kondo Electronics Industry Co., Ltd.
Terminal connection
A terminal connection to the KEIm-CVSoC camera unit is established through USB serial CP2102N-A02-
GQFN24 (Silicon Labs). To use this interface, you need to install the Silicon Labs Virtual COM Port driver
(hereinafter referred to as VCP driver).
3.6.1. Installing the VCP driver
If you use a PC where the VCP driver is already installed, once you connect the KEIm-CVSoC camera
unit to the PC through the USB Micro B cable, the USB serial driver will be automatically installed.
Otherwise, install the Windows VCP driver from the following URL page of the Silicon Labs website.
https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
When the driver is successfully installed, the CP210x COM port is displayed in Windows Device Manager
as shown in Figure 3-2.
Figure 3-2 Device Manager
3.6.2. Communication format
Table 3-3 shows the UART communication format for the reference design. Use the same communication
settings for the terminal software, such as TeraTerm.
Table 3-3 Communication format
Item
Setting
Port
Set the COM number shown in Device Manager.
Speed
115200bps
Data
8bit
Parity
none
Stop bit
1bit
Flow control
None

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
13
Kondo Electronics Industry Co., Ltd.
Booting Linux
When the camera unit is turned on, Linux is booted with the login screen on the display as shown in the
figure below. Enter "linaro" in both username and password fields and click the Log In button.
Executing CamView
From the start menu, select System Tools > LXterminal to launch the terminal, and then enter the following
command:
$ cd ~/CamView/build/
$ ./CamView
The window appears as shown in Figure 3-3, displaying the video captured with the camera.
Figure 3-3 CamView execution result
To exit CamView, press the ESC key on the CamView window.

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
14
Kondo Electronics Industry Co., Ltd.
boardTest operation procedure
This section describes how to access the peripherals of the internal SoM and IO board in the KEIm-
CVSoC camera unit using boardTest, an application pre-installed in the reference design used in
Chapter 3.
Procedure
(1) Launch the Linux desktop using the same procedure as in Section 3.8 in the previous chapter.
(2) Connect the LAN cable to the camera unit LAN port to build an Internet environment.
(3) Enter the following command to execute the boardcheck application:
$ cd ~/Check
$ ./boardTest
When the menu is displayed on the console, select the desired number.
Table 4-1 shows the description of each process.
Table 4-1 Check menu list
No.
Item
Operation description
1
SDRAM memory check
Executes an SDRAM memory check.
2
RTC setting
Connects to the NTP server, and then writes the current
time to the RTC after the time is synchronized.
3
EEPROM check
Writes test data to the EEPROM, and then reads and
compares data.
4
QSPI flash check
Writes test data to the QSPI flash, and then reads and
compares data.
5
LED check
Flashes the LEDs on the IO board.
6
Dip switch & Push switch check
Reads out the DIP switch and push switch on the IO board.
7
Exit the board test
Exits this program.

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
15
Kondo Electronics Industry Co., Ltd.
Shutdown procedure
If you turn off the camera unit while Linux is running, microSD card data may corrupt. Be sure to perform
the shutdown process as shown in Figure 5-1 before turning off the power.
Figure 5-1 Shutdown process
(1)
Click the power mark at the lower right of the desktop.
(2)
Click Shutdown in the dialog box.
(3)
Wait for "System halted" to appear on the terminal.

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
16
Kondo Electronics Industry Co., Ltd.
Appendix
Precautions on mounting and removing the SoM.
To remove the SoM from the IO board in the KEIm-CVSoC camera unit, remove the screws indicated by
the red circles in the figure below and pull out the SoM vertically.
To mount the SoM again, align the diagonally-cut corner with the mark indicated by the red circle in the
figure below first, and then push it down firmly and vertically.

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
17
Kondo Electronics Industry Co., Ltd.
Modify ISP settings for camera module
The camera module’s CIS (CMOS Image Sensor) into the KEIm-CVSoC development kit, OV5647
(OmniVision) are equipped with image processing and adjustment functions such as AEC (Auto
Exposure Control), AGC (Auto Gain Control), and AWB (Auto White Balance). An application cam_set.py
is provided in the reference design to adjust the settings, so abailable it when you want to adjust the
image from the camera.
The usage is as follows.
First, launch the CamView application. (CIS is started by executing CamView and register access will be
possible. If CIS is not running, this application will not start with an error.)
Next, launch the cam_set.py application with the following command.
$ cd ~/CamView/
$ python3 pysrc/cam_set.py
The following GUI will be launched.
This application accesses the CIS register to modify and retrieve the setting value.
Please refer to CIS datasheet for details on each function and register.
The settings from this GUI are saved in the cam_set.ini file and restored at startup.
If you want to restore the default settings, click the “Defalt” button on the GUI, or delete the above .ini file
before starting up. Also, please note that registers changed by writing with "Direct Register Access" will
need to be written back to their initial values again, or CamView will need to be restarted.

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
18
Kondo Electronics Industry Co., Ltd.
This section describes each function that can be set in this application.
①ISP General controls
This function controls ON (Enable) or OFF (Disable) of each ISP function.
The functions are below.
➢Correction of lens distortion (LENC)
➢Cancelation of black defect pixel (DPC.Black)
➢Cancelation of white defect pixel (DPC.White)
➢Control of white balance (AWB)
➢Gain control of white balance (AWB Gain)
For details on each function, refer to the CIS datasheet.
②Direct Register Access
This function allows free register access. Write and read access is possible.
Input “Address (16 bits)” and “Data (8 bits)”, press the “Write” button to write to the register.
Input “Address (16bit)” and press the “Read” button to display the register read value in “Data (8bit)”.
The input and display here should be hexadecimal, “Address (16bit)” should be 4 digits, and “Data
(8bit)” should be 2 digits. Please note that there is no input checking or correction function.
Please refer to the CIS datasheet for details on the addresses and attributes of each register.
Batch writing is also possible from the register setting file. Prepare the register setting file cam_set.reg
in the current directory, and click the Reg Write button to write it. The file format is described below.

KEIm-CVSoC-B Development Kit Startup Guide
KD-KEIM1062
19
Kondo Electronics Industry Co., Ltd.
0x4000,0x89
0x4002,0x45
0x4005,0x18
#0x503d,0x80
Describe the registers to be written in hexadecimal notation in the order of Address (16 bits) and Data
(8 bits) on a single line, using commas (,) as separators. Use a comma (,) as a delimiter. Use a sharp
(#) to comment out.
③AEC/AGC controls
It controls the exposure and gain to adjust the brightness of the image. AEC (Auto Exposure Control)
and AGC (Auto Gain Control) are the automatic control mechanisms.
The displayed values are in decimal.
➢AEC/AGC manual Automatic or manual switch settings for exposure and gain control.
➢Manual setting Exposure and gain settings for manual selection.
When auto selection, the setting is not available, read only and display.
➢Luminance Average Brightness of the image. An average value calculated internally.
➢AEC control Automatic convergence control settings. (Cannot be set in manual.)
It is controlled by the upper limit (high side) and lower limit (low side) settings
of the boundary value (limit), and the brightness is converged (stable) within
the range. "Luminance Average" is the brightness.
“to stable” and “to unstable” are the boundary settings for state transitions.
"control zone" controls the fast AEC range, and "gain ceiling" is the upper limit
of the gain. Please refer to the CIS datasheet for details.
Table of contents