Wiki pages that were migrated are redirecting to the new location. Pages not migrated are only accessible to users on the TI network. Users off the network can not access the Wiki and will receive a 404 error. DO NOT share Wiki URLs with customers. They can not access the Wiki site.
Demonstration of VPIF raw capture using MT9T031 sensor on AM18X/DA850/OMAP-L138 running Linux
About this page:[edit]
This page describes the steps to demonstrate VPIF raw capture using MT9T031 raw bayer sensor on AM18X/DA850/OMAP-L138 running Linux.
Enabling VPIF raw capture[edit]
- Support for VPIF raw capture is added in PSP release 03.21.00.04. Here are the links for latest kernel, sample application (look in vpif/vpif_mmap_loopback_sd.c) and filesystem.
- Follow this link for configuring and building kernel
- Make sure to enable camera interface on UI card by selecting CONFIG_DA850_UI_CAMERA.
System Type ---> TI DaVinci Implementations ---> <*> TI DA850/OMAP-L138/AM18x Reference Platform Select peripherals connected to expander on UI board ---> < >No peripheral is enabled < >RMII Ethernet PHY < >Character LCD < >Video Port Interface <*>CAMERA
- And enable VPIF capture and MT9T031 modules.
Device Drivers ---> <*> Multimedia support ---> <*> Video For Linux <*> Video capture adapters ---> <*> V4L platform devices ---> <*> DM646x/DA850/OMAPL138 Video Capture -*- DaVinci VPIF Driver <*> Soc camera support <*> mt9t031 support
Setup[edit]
As shown in below figure, setup consists of AM18x/DA850/OMAP-l138 EVM along with UI daughter card. The Micron MT9T031 sensor mounted on J7 camera interface port on UI card and composite cable connects comp video out port (J4) to TV.
Since I2C address of MT9T031 module (0x5d) clashes with the two onboard TVP parts, the setup requires a hardware modification on the UI daughter card. De-populate pull up resistor R54 and populate it as pull down resistor R56. This configures TVP5147(U6) video decoder to I2C slave address 0x5c. Please note that with this modification, SD video capture will become non functional (both TVP parts will be on the same address).
Verification[edit]
- Make sure to also enable vpif display device(as shown below) in the kernel build as its required by below loopback applications for displaying the captured image.
Device Drivers ---> <*> Multimedia support ---> <*> Video For Linux [*] Video capture adapters ---> [*] V4L platform devices ---> <*> DM646x/DA850/OMAPL138 EVM Video Display -*- DaVinci VPIF Driver [ ] Autoselect pertinent encoders/decoders and other helper chips Encoders/decoders and other helper chips ---> -*- THS7303 Video Amplifier -*- ADV7343 video encoder
- Please disable the graphical LCD frame buffer driver and the character LCD driver when VPIF display has to be used. They are pin multiplexed and VPIF display will not work when LCD is enabled.
Device Drivers ---> Graphics support ---> < > DA8xx/OMAP-L1xx/AM1xxx Framebuffer support
- Boot the kernel with following bootargs from U-boot and run mmap/user pointer loopback applications:
u-boot> setenv bootargs console=ttyS2,115200n8 noinitrd rw ip=<ipaddr> root=/dev/nfs nfsroot=<nfs path>, nolock mem=60M vpif_display.ch2_bufsize=2622464 vpif_display.cont_bufsize=20979712 vpif_capture.ch0_bufsize=2622464 vpif_capture.cont_bufoffset=6291456 vpif_capture.cont_bufsize=20979712 target$./vpif_mmap_loopback_sd -c 2 -m 0 target$./vpif_userptr_loopback_sd -c 2 -m 0
Note:
- Make sure to give complete bootargs in a single line.
- Above loopback applications displays captured image on composite video out in NTSC standard.
- Also note that vpif_mmap_loopback_sd application can be run with display disabled(with -d 0) and frames from 100 to 150 are saved on to file(with -w 1) capt_frame.
#./vpif_mmap_loopback_sd -c 2 -m 0 -d 0 -w 1
- Captured frames in capt_frame file can be viewed using suitable raw bayer viewer/player.