A40i SoM Realizes High-Definition Analog Camera 720P Solution

Forlinx Embedded FETA40i-C core board equipped with Allwinner A40i processor can support 4 analog cameras PAL (720x576)/NTSC (720x480). However, in actual use, the resolution of PAL or NTSC format cannot meet actual needs. Customers often ask whether it can support high-definition analog cameras? Can the HD camera resolution support 720P or 1080P? In response to this demand, the editor compiled and edited the FETA40i-C core board Linux/Android system to support 720P high-definition analog camera solutions.

One, Program evaluation

According to the description of the A40i CPU manual, CSI0 supports up to 1080p@30fps and supports 8-bit BT656 interface.

description of the A40i CPU manual

According to the above information, the hardware selects the RN6752 chip, which supports 2 channels of CVBS to BT656 high-definition video decoding chip, the input is 2 channels of CVBS input at different times, the output is BT656 format, NTSC/PAL input is automatically detected, 720P and 1080P decoding, and ADC sampling The rate is up to 72MHz, which can achieve the best color and image transient response.

Two, Reference schematic

VINA and VINB are not input at the same time, and VINA input is used by default. There are internal registers to control channel switching.

Reference schematic

Three, driver transplantation

  • Put the corresponding driver into the following path: drivers/media/platform/sunxi-vfe/device/rn6752.c
  • Modify Makefile obj-y +=rn6752.o
  • Driver compilation
  • Modify csi0 in sys_config1024x600.fex corresponding to csi0_dev0_mname, csi0_dev0_twi_addr and other parameters
  • Compile the kernel and repackage the image, and burn it

When driver migration, you need to pay attention to:

  • The multiplexing of the pins used by the camera needs to be removed.
  • The CSI interface adopts BT656, the input format is YUV422, and the output is NV21/NV12.
  • RN6752 uses V4L2_MBUS_FMT_UYVY8_2X8 format.
  • The crystal oscillator used by RN6752 is 72MHz.

Fourth, the display effect on Linux and Android

1, On Linux

The default factory Cameratest can be used for testing on Linux.

The preview effect is as follows:

the display effect on Linux and Android

2. On Android

Multiple Camera can be used for testing on Android.

The preview effect is as follows:

Multiple Camera

Further reading

At present, the Android car recorder APP only supports the analog camera corresponding to video4, and the other 3 channels are not supported. Multiple Camera can be used to preview 4 analog camera images. The details are shown in the figure:

Due to the limited number of cameras on hand, 2 cameras were used in the test: (by default, analog cameras in the NTSC format are supported)

Multiple Camera


Finally, sum up the FETA40i-C core board to support HD camera solutions:

  • The support of RN6752 is currently debugged. For other decoding chip solutions, project customization can be considered.
  • Currently, only 720P@30fps support is debugged.
  • Multiple Camera is a simple DEMO test, which aims to verify that the camera channel can be previewed without other support.
  • Among them, RN6752 driver and configuration, and Multiple Camera test program, follow-up if the customer needs this solution, please contact the sales engineer.