Difference between revisions of "What can I do with IGEPv2 EXPANSION"

From IGEP - ISEE Wiki

Jump to: navigation, search
m (How to use CAN bus)
m
 
(15 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
}}  
 
}}  
  
__TOC__
+
 
 
= Overview  =
 
= Overview  =
  
Line 14: Line 14:
  
 
We will learn some basic tasks.
 
We will learn some basic tasks.
 +
 +
 +
__TOC__
 +
  
 
= What can I do<br>  =
 
= What can I do<br>  =
Line 28: Line 32:
  
 
== How to use serial console ==
 
== How to use serial console ==
[[Image:Igepv2expdb9connector.PNG|right|200px]] IGEPv2 Expansion integrates a DB9 RS232 connector. Now you need a Null-Modem DB9 male-make serial cable. Connect the cable between the board and your PC. Open the serial on your PC using your preferred serial communications program (minicom) and configure the port as follows:
+
[[Image:Igepv2expdb9connector.PNG|right|200px]] IGEPv2 Expansion integrates a DB9 RS232 connector. This UART is shared with RS485 so it's incompatible use both interfaces at the same time. For that reason to use UART1 for RS232 comunications you should disable RS485 interface. You can do this [[How_do_I_edit_my_kernel_command_line | adding following kernel cmdline parameter]].
 +
 
 +
board.ei485=no
 +
 
 +
You need a Null-Modem DB9 male-make serial cable. Connect the cable between the target board and your PC.
 +
 
 +
Open the serial port on your PC using your preferred serial communications program (minicom) and configure the port as follows:
  
 
* 115200
 
* 115200
Line 34: Line 44:
 
* no flow control (either software or hardware)
 
* no flow control (either software or hardware)
  
Open the serial port and the debug shell prompt should appear.
+
On the target board open a serial port as follows:
 
 
A detailed guide on how to connect via serial debug port can be found by following this link: [[Using serial debug port to communicate]]
 
  
 +
  $ microcom -s 115200 /dev/ttyS0
  
 +
Now when you write a character in you PC serial port, the character should appear in the target board.
  
 +
A detailed guide on how use UARTS can be found by following this link: [[How to use UARTs]]
  
 
== How to use Telit Modem  ==
 
== How to use Telit Modem  ==
Line 57: Line 68:
  
 
*Power up the modem using the next commands:
 
*Power up the modem using the next commands:
<pre>echo 0 &gt; /sys/class/gpio/gpio140/value
+
<pre>$ echo 0 &gt; /sys/class/gpio/gpio140/value
echo 1 &gt; /sys/class/gpio/gpio141/value
+
$ echo 1 &gt; /sys/class/gpio/gpio141/value
sleep 1
+
$ sleep 1
echo 0 &gt; /sys/class/gpio/gpio141/value</pre>  
+
$ echo 0 &gt; /sys/class/gpio/gpio141/value</pre>  
 
*Once the modem is on (led near power button is blinking now), you can interact with it via UART 2.
 
*Once the modem is on (led near power button is blinking now), you can interact with it via UART 2.
  
 
You can use Microcom to comunicate with it from the serial debug console:
 
You can use Microcom to comunicate with it from the serial debug console:
<pre>microcom -s 115200 /dev/ttyO1</pre>  
+
<pre>$ microcom -s 115200 /dev/ttyO1</pre>  
 
*To check the modem status use the command:<br>
 
*To check the modem status use the command:<br>
 
<pre>at</pre>  
 
<pre>at</pre>  
Line 77: Line 88:
 
[[Image:Igepv2expvideocompositeconnector.PNG|right|200px]]IGEPv2 Expansion integrates two composite video connectors to decode analog input signal.
 
[[Image:Igepv2expvideocompositeconnector.PNG|right|200px]]IGEPv2 Expansion integrates two composite video connectors to decode analog input signal.
 
=== Configure TVP5151 ===
 
=== Configure TVP5151 ===
*Plug some peripheral with video composite output in J501 rca connector, see the image for more details..<br>  
+
*Plug some peripheral with video composite output in J501 RCA connector, see the image for more details.<br>  
 
*Connect a screen, for example HDMI monitor.  
 
*Connect a screen, for example HDMI monitor.  
 
*Refresh repositories and accept it.
 
*Refresh repositories and accept it.
<pre>zypper ref </pre>  
+
<pre>$ zypper ref </pre>  
 
*Install video4linux2 plugin
 
*Install video4linux2 plugin
<pre>zypper in gst-plugins-good-video4linux2
+
<pre>$ zypper in gst-plugins-good-video4linux2
 
</pre>
 
</pre>
 
=== Play with TVP5151  ===
 
=== Play with TVP5151  ===
 
*Load OMAP ISP kernel module<br>
 
*Load OMAP ISP kernel module<br>
<pre>modprobe omap3-isp
+
<pre>$ modprobe omap3-isp
 
</pre>  
 
</pre>  
*Configure ISP, for PAL resulution use 720x576 for NTSC resolution use 720x480 for '''IGEPv2 Expansion''':<br>
+
*Configure ISP, for PAL resulution use 720x576 for NTSC resolution use 720x480:
<pre>media-ctl -r -l '"tvp5150 2-005c":0-&gt;"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1-&gt;"OMAP3 ISP CCDC output":0[1]'
+
<pre>$ media-ctl -r -l '"tvp5150 2-005c":0-&gt;"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1-&gt;"OMAP3 ISP CCDC output":0[1]'
media-ctl -v --set-format '"tvp5150 2-005c":0 [UYVY 720x480]'
+
$ media-ctl -v --set-format '"tvp5150 2-005c":0 [UYVY 720x480]'
media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY 720x480]'
+
$ media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY 720x480]'
media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY 720x480]' </pre>  
+
$ media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY 720x480]' </pre>  
 
*Export display
 
*Export display
<pre>export DISPLAY=:0.0 </pre>  
+
<pre>$ export DISPLAY=:0.0 </pre>  
 
*Launch gstreamer
 
*Launch gstreamer
<pre>gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=8&nbsp;! video/x-raw-yuv,format=\(fourcc\)UYVY,width=720,height=480&nbsp;! ffmpegcolorspace&nbsp;! autovideosink</pre>  
+
<pre>$ gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=8&nbsp;! video/x-raw-yuv,format=\(fourcc\)UYVY,width=720,height=480&nbsp;! ffmpegcolorspace&nbsp;! autovideosink</pre>  
 
*Now you can see in your IGEP screen a result similar like this
 
*Now you can see in your IGEP screen a result similar like this
  
Line 110: Line 121:
  
 
The following example writes the value 0x22 to register 0x10 of device 0x50 on i2c bus 2:  
 
The following example writes the value 0x22 to register 0x10 of device 0x50 on i2c bus 2:  
<pre>i2cset -f -y 2 0x50 0x10 0x22
+
<pre>$ i2cset -f -y 2 0x50 0x10 0x22
i2cget -f -y 2 0x50 0x10</pre>
+
$ i2cget -f -y 2 0x50 0x10</pre>
 
''From [[How to use EEPROM]]''
 
''From [[How to use EEPROM]]''
  
Line 132: Line 143:
 
Now you can set up the interface (on all boards when using multiple IGEPv2 EXPANSION <span lang="en" id="result_box" class="short_text"><span title="Click for alternate translations" class="hps">connected to a CAN network simultaneously)</span></span>:<br>  
 
Now you can set up the interface (on all boards when using multiple IGEPv2 EXPANSION <span lang="en" id="result_box" class="short_text"><span title="Click for alternate translations" class="hps">connected to a CAN network simultaneously)</span></span>:<br>  
  
  /bin/ip link set can0 up type can bitrate 125000
+
  $ ip link set can0 up type can bitrate 125000
  
 
If you want to receive CAN data, use:  
 
If you want to receive CAN data, use:  
  
  candump can0
+
  $ candump can0
  
 
If you want to send CAN data, use:  
 
If you want to send CAN data, use:  
  
  cansend can0 -i 0x123 0xaa 0xbb 0xcc 0xdd
+
  $ cansend can0 -i 0x123 0xaa 0xbb 0xcc 0xdd
  
 
On the receiver side, you must see the following messages:  
 
On the receiver side, you must see the following messages:  
Line 148: Line 159:
 
Switch roles and try it again.
 
Switch roles and try it again.
  
{{#lst:How to use CAN bus|IGEPv2 EXPANSION}}
+
''From [[How to use CAN bus]]''
''From [[How to use CAN bus]]''  
+
 
{{Template:Navigation/IGEP Technology Guides/What can I do/Ending}} {{Table/IGEP Technology Devices
+
== How to use VGA connector  ==
|Tech_Family={{#lst:Template:Links|IGEPv2_EXPANSION_Tech_Family}}
+
{| cellspacing="1" cellpadding="1" width="363" border="1" align="right"
|Tech_ID={{#lst:Template:Links|IGEPv2_EXPANSION_Tech_ID}}
+
|-
|Name={{#lst:Template:Links|IGEPv2_EXPANSION_Name}}
+
| [[Image:Igepv2expconnecttovga.jpg|150px]]
|Image={{#lst:Template:Links|IGEPv2_EXPANSION_Image}}
+
| [[Image:Igepv2expvgaconnector.PNG|200px]]
|ISEE_MainPage={{#lst:Template:Links|IGEPv2_EXPANSION_ISEE_MainPage}}
+
|}
|ISEE_Hardware={{#lst:Template:Links|IGEPv2_EXPANSION_ISEE_Hardware}}
+
 
}}
+
IGEPv2 Expansion integrates a VGA connector, the output VGA signal is equal to HDMI connector. Plug a monitor with VGA&nbsp;input. <br><br><br><br><br><br><br><br><br><br>
 +
 
 +
{{Template:Navigation/IGEP Technology Guides/What can I do/Ending}}  
 +
 
 +
[[Category:IGEP Technology Devices Guides]]

Latest revision as of 12:20, 29 January 2013


Overview

This is the 2/3 chapter of IGEPv2 Expansion Tutorial Guide.

We will learn some basic tasks.



What can I do

How to use TFT and Touchscreen

IGEP0022 PROTO RA DSC 0142.JPG
IGEPv2 Expansion supports SEIKO 7” or POWERTIP 4.3” LCD screen. Use J301 connector for POWERTRIP 4.3" or use J302, J303 and J304 connector for SEIKO 7".

Seiko and Powertip touch screens are not supported by default in IGEPv2. Use the following steps for it:

Edit igep.ini file to configure your touch screen, you can do this adding following kernel cmdline parameter

  • In Seiko screen add the following line:
omapdss.def_disp=lcd-70
  • In Powertip screen add the following line:
omapdss.def_disp=lcd-43

How to use serial console

Igepv2expdb9connector.PNG
IGEPv2 Expansion integrates a DB9 RS232 connector. This UART is shared with RS485 so it's incompatible use both interfaces at the same time. For that reason to use UART1 for RS232 comunications you should disable RS485 interface. You can do this adding following kernel cmdline parameter.
board.ei485=no

You need a Null-Modem DB9 male-make serial cable. Connect the cable between the target board and your PC.

Open the serial port on your PC using your preferred serial communications program (minicom) and configure the port as follows:

  • 115200
  • 8N1
  • no flow control (either software or hardware)

On the target board open a serial port as follows:

 $ microcom -s 115200 /dev/ttyS0

Now when you write a character in you PC serial port, the character should appear in the target board.

A detailed guide on how use UARTS can be found by following this link: How to use UARTs

How to use Telit Modem

IGEP0022 Modem with antenna.png
Igepv2expcardreader.PNG
GSM-GPRS antenna (highly recommended) SIM card reader

IGEPv2 Expansion integrates a GSM/GPRS modem to make phone calls or to send SMS or to write and read data from it, etc. Telit modem is not supported by default in IGEPv2 Expansion. Configure this adding following kernel cmdline parameter

buddy.modem=yes 
  • Power up the modem using the next commands:
$ echo 0 > /sys/class/gpio/gpio140/value
$ echo 1 > /sys/class/gpio/gpio141/value
$ sleep 1
$ echo 0 > /sys/class/gpio/gpio141/value
  • Once the modem is on (led near power button is blinking now), you can interact with it via UART 2.

You can use Microcom to comunicate with it from the serial debug console:

$ microcom -s 115200 /dev/ttyO1
  • To check the modem status use the command:
at
  • Answer should be OK.
  • Now unlock it by inserting your SIM card PIN number. Use the command:
at+cpin=<PIN>
  • If you correctly inserted the PIN number, the answer should be OK. If you fail more than 3 times, your SIM card will lock and you will have to insert PUK number.
  • Now you are ready to use the GSM/GPS modem.

From How to use Telit Modem

How to use TVP5151 Video Decoder

Igepv2expvideocompositeconnector.PNG
IGEPv2 Expansion integrates two composite video connectors to decode analog input signal.

Configure TVP5151

  • Plug some peripheral with video composite output in J501 RCA connector, see the image for more details.
  • Connect a screen, for example HDMI monitor.
  • Refresh repositories and accept it.
$ zypper ref 
  • Install video4linux2 plugin
$ zypper in gst-plugins-good-video4linux2

Play with TVP5151

  • Load OMAP ISP kernel module
$ modprobe omap3-isp
  • Configure ISP, for PAL resulution use 720x576 for NTSC resolution use 720x480:
$ media-ctl -r -l '"tvp5150 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
$ media-ctl -v --set-format '"tvp5150 2-005c":0 [UYVY 720x480]'
$ media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY 720x480]'
$ media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY 720x480]' 
  • Export display
$ export DISPLAY=:0.0 
  • Launch gstreamer
$ gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=8 ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=720,height=480 ! ffmpegcolorspace ! autovideosink
  • Now you can see in your IGEP screen a result similar like this
Igepv2expgstreamercapture.jpg

From How to setup tvp5151 video decoder

How to use EEPROM

IGEPv2 Expansion includes a serial EEPROM, provides 1KB of user data storage. EEPROM is connected through I2C2 of OMAP3 processor at address 0x50.

The following example writes the value 0x22 to register 0x10 of device 0x50 on i2c bus 2:

$ i2cset -f -y 2 0x50 0x10 0x22
$ i2cget -f -y 2 0x50 0x10

From How to use EEPROM

How to use CAN bus

Igepv2expcanconnector.PNG
IGEPv2 Expansion integrates a CAN peripheral. Connect any CAN bus device or network to the CAN bus connector (J703).

You have to connect the two boards like this:

IGEPv2 Exp 1         IGEPv2 Exp 2
.---                 .---
| 1 |-X            X-| 1 |  VDD_CAN: Supply Voltage (+5V DC)
| 2 |------------------| 2 |  CANL: CAN Low-Level Voltage I/O
| 3 |------------------| 3 |  GND : Ground
| 4 |------------------| 4 |  CANH : CAN High-Level Voltage I/O
.---                 .---

If this is your first time accessing CAN bus, check J702 jumper is not connected before follow this tutorial. If you don't have this jumper, don't worry because its function is only for testing.

Now you can set up the interface (on all boards when using multiple IGEPv2 EXPANSION connected to a CAN network simultaneously):

$ ip link set can0 up type can bitrate 125000

If you want to receive CAN data, use:

$ candump can0

If you want to send CAN data, use:

$ cansend can0 -i 0x123 0xaa 0xbb 0xcc 0xdd

On the receiver side, you must see the following messages:

can0  123  [4] aa bb cc dd

Switch roles and try it again.

From How to use CAN bus

How to use VGA connector

Igepv2expconnecttovga.jpg Igepv2expvgaconnector.PNG

IGEPv2 Expansion integrates a VGA connector, the output VGA signal is equal to HDMI connector. Plug a monitor with VGA input.











You have successfully completed this chapter of the guide.


Continue this tutorial guide: 3/3 - Start developing under IGEP Technology
Igep forum.png If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat Irc.png