Difference between revisions of "Dev/Caspa"

From PaparazziUAV
Jump to navigation Jump to search
Line 37: Line 37:
  cp uImage /media/mmcblk0p1
  cp uImage /media/mmcblk0p1


===== Replace some files to get the camera modules working =====


wget http://cumulus.gumstix.org/images/angstrom/misc/caspapx/uImage-2.6.34
wget http://cumulus.gumstix.org/images/angstrom/misc/caspapx/modules-2.6.34.tgz
tar -xf modules-2.6.34.tgz -C /media/mmcblk0p2/
cp uImage-2.6.34 /media/mmcblk0p1/uImage
cp uImage-2.6.34 /media/mmcblk0p2/boot/uImage


3. Replace some files to get the camera modules working
===== Attach the camera to the Overo board =====


Download:
Insert the white ribbon cable contact-side-up into the Caspa connector and contact side down into the Overo connector.
http://cumulus.gumstix.org/images/angstrom/misc/caspapx/uImage-2.6.34
 
http://cumulus.gumstix.org/images/angstrom/misc/caspapx/modules-2.6.34.tgz
===== Insert MicroSD card in the Overo board =====
 
===== Set environment variables =====
* Connect the expansion board to the host machine via USB B (Console)


Do:
* On the host machine do:
$ tar -xf modules-2.6.34.tgz -C /media/mmcblk0p2/
[sudo apt-get install ckermit]
$ cp uImage-2.6.34 /media/mmcblk0p1/uImage
kermit -l /dev/ttyUSB0
$ cp uImage-2.6.34 /media/mmcblk0p2/boot/uImage
C-Kermit>set flow-control none
C-Kermit>set carrier-watch off
C-Kermit>set speed 115200
/dev/ttyUSB0, 115200 bps
C-Kermit>connect
Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.


4. Attach the camera to the Overo board
You have now a console connection to the Overo


Insert the white ribbon cable contact-side-up into the Caspa connector and contact side down into the Overo connector.
* Power-up the expansion board


5. Insert MicroSD card in the Overo board
* Hit 'Enter' to interrupt the boot sequence


6. Set environment variables
* Type in the console:
nand erase 240000 20000
reset


Connect the expansion board to the host machine via USB
This makes the Overo to read the environment variables defined by the kernel in the MicroSD. You just have to this once after setting up the card.


On the host machine do:
* Hit 'Enter' to interrupt the boot sequence again
sudo apt-get install ckermit
$ kermit -l /dev/ttyUSB0
C-Kermit>set flow-control none
C-Kermit>set carrier-watch off
C-Kermit>set speed 115200
/dev/ttyUSB0, 115200 bps
C-Kermit>connect
Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.


Power-up the expansion board
* Type in the console:
setenv defaultdisplay lcd43; saveenv;
reset


Hit 'Enter' to interrupt the boot sequence
You just have to this once after setting up the card.
Type:
nand erase 240000 20000
reset
Hit 'Enter' to interrupt the boot sequence
Type:
setenv defaultdisplay lcd43; saveenv;
reset


7. Get the image
===== Get the image =====


Let the Overo boot properly
* Let the Overo boot properly
Touch the screen and calibrate it as indicated
* Touch the screen and calibrate it as indicated. You just have to this once after setting up the card.
In the serial command line do:
* Type in the console:
overo login: root
overo login: root
export DISPLAY=:0.0
export DISPLAY=:0.0
mplayer tv:// -tv driver=v4l2:device=/dev/video0 -x 480 -y 272 -vo x11
mplayer tv:// -tv driver=v4l2:device=/dev/video0 -x 480 -y 272 -vo x11


The camera image should appear in the LCD display
The camera image should appear on the LCD display.


Based on: http://wiki.gumstix.org/index.php?title=Caspa_camera_boards
Based on: [http://wiki.gumstix.org/index.php?title=Caspa_camera_boards Gumstix wiki].

Revision as of 05:27, 6 July 2011

This page describes the ongoing work to fully integrate a Caspa FS camera on a Lisa/L board. Any advices/suggestions/contributions are welcome.

Final Goal

The final goal is to have a Caspa FS camera connected to the Overo chip on a Lisa/L board. The Overo chip should be able to communicate with the STM32 via SPI. The link shall be used to transmit the result of the image processing computed by the Overo. However this should be flexible enough to let some room for the developer to decide which processing to do and which kind of data to send.

Methods

The following lists the steps that are deemed to be important in achieving the final goal.

  1. Bitbake a kernel for Overo that includes the camera modules and the SPI modules
  2. Bitbake a kernel for STM32 that includes the SPI modules

Caspa camera on an Overo expansion board

As a first step a simple connection between the camera and the Overo was tried using an Overo expansion board, i.e. not the the Lisa/L board.

Hardware components

Step-by-step

Create a bootable MicroSD card if you do not have one

Follow this and use LABEL1 as 'mmcblk0p1' and LABEL2 as 'mmcblk0p2'.

Load a pre-built standard image
wget http://cumulus.gumstix.org/images/angstrom/factory/2011-03-25-1619/omap3-desktop-nand-image-overo-booted.tar.bz2
tar -xf omap3-desktop-nand-image-overo-booted.tar.bz2 -C /media/mmcblk0p2 // the filesystem
wget http://cumulus.gumstix.org/images/angstrom/factory/2011-03-25-1619/MLO
wget http://cumulus.gumstix.org/images/angstrom/factory/2011-03-25-1619/u-boot.bin
wget http://cumulus.gumstix.org/images/angstrom/factory/2011-03-25-1619/uImage
cp MLO /media/mmcblk0p1
cp u-boot.bin /media/mmcblk0p1
cp uImage /media/mmcblk0p1
Replace some files to get the camera modules working
wget http://cumulus.gumstix.org/images/angstrom/misc/caspapx/uImage-2.6.34
wget http://cumulus.gumstix.org/images/angstrom/misc/caspapx/modules-2.6.34.tgz
tar -xf modules-2.6.34.tgz -C /media/mmcblk0p2/
cp uImage-2.6.34 /media/mmcblk0p1/uImage
cp uImage-2.6.34 /media/mmcblk0p2/boot/uImage
Attach the camera to the Overo board

Insert the white ribbon cable contact-side-up into the Caspa connector and contact side down into the Overo connector.

Insert MicroSD card in the Overo board
Set environment variables
  • Connect the expansion board to the host machine via USB B (Console)
  • On the host machine do:
[sudo apt-get install ckermit]
kermit -l /dev/ttyUSB0
C-Kermit>set flow-control none
C-Kermit>set carrier-watch off
C-Kermit>set speed 115200
/dev/ttyUSB0, 115200 bps
C-Kermit>connect
Connecting to /dev/ttyUSB0, speed 115200
Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.

You have now a console connection to the Overo

  • Power-up the expansion board
  • Hit 'Enter' to interrupt the boot sequence
  • Type in the console:
nand erase 240000 20000
reset

This makes the Overo to read the environment variables defined by the kernel in the MicroSD. You just have to this once after setting up the card.

  • Hit 'Enter' to interrupt the boot sequence again
  • Type in the console:
setenv defaultdisplay lcd43; saveenv;
reset

You just have to this once after setting up the card.

Get the image
  • Let the Overo boot properly
  • Touch the screen and calibrate it as indicated. You just have to this once after setting up the card.
  • Type in the console:
overo login: root
export DISPLAY=:0.0
mplayer tv:// -tv driver=v4l2:device=/dev/video0 -x 480 -y 272 -vo x11	

The camera image should appear on the LCD display.

Based on: Gumstix wiki.