VAR-SOM-AM33 Linux Unit Testing: Difference between revisions

From Variscite Wiki
No edit summary
No edit summary
Line 3: Line 3:
__toc__
__toc__


= Introduction =
= CPU info =
Variscite VAR-DVK-AM33 LCD signals are 16 by default.
<pre>
To change board to support 24bit LCD remove resistor net RN109 and install RN108.
root@am335x-evm:~# cat /proc/cpuinfo
The pinmux is also configured by default to 16bit.
Processor      : ARMv7 Processor rev 2 (v7l)
Use the below pinmux example to change from 16bit to 24bit configuration.
BogoMIPS        : 598.35
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant    : 0x3
CPU part        : 0xc08
CPU revision    : 2


= 16bit LCD Pin-muxing =
Hardware        : VAR-SOM-AM33
Modify ~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01/arch/arm/boot/dts/am335x-som.dts
Revision        : 0000
<pre>
Serial          : 0000000000000000
              lcd_pins_default: lcd_pins_default {
root@am335x-evm:~# cat /proc/version
                        pinctrl-single,pins = <
Linux version 3.2.0-AM335XPSP_04.06.00.11.VAR_R13 (uri@pluto) (gcc version 4.7.3 20130226
                                0xa0 0x00      /* lcd_data0.lcd_data0, OUTPUT | MODE0 */
(prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 T
                                0xa4 0x00      /* lcd_data1.lcd_data1, OUTPUT | MODE0 */
ue Oct 15 10:06:14 IST 2013
                                0xa8 0x00      /* lcd_data2.lcd_data2, OUTPUT | MODE0 */
                                0xac 0x00      /* lcd_data3.lcd_data3, OUTPUT | MODE0 */
                                0xb0 0x00      /* lcd_data4.lcd_data4, OUTPUT | MODE0 */
                                0xb4 0x00      /* lcd_data5.lcd_data5, OUTPUT | MODE0 */
                                0xb8 0x00      /* lcd_data6.lcd_data6, OUTPUT | MODE0 */
                                0xbc 0x00      /* lcd_data7.lcd_data7, OUTPUT | MODE0 */
                                0xc0 0x00      /* lcd_data8.lcd_data8, OUTPUT | MODE0 */
                                0xc4 0x00      /* lcd_data9.lcd_data9, OUTPUT | MODE0 */
                                0xc8 0x00      /* lcd_data10.lcd_data10, OUTPUT | MODE0 */
                                0xcc 0x00      /* lcd_data11.lcd_data11, OUTPUT | MODE0 */
                                0xd0 0x00      /* lcd_data12.lcd_data12, OUTPUT | MODE0 */
                                0xd4 0x00      /* lcd_data13.lcd_data13, OUTPUT | MODE0 */
                                0xd8 0x00      /* lcd_data14.lcd_data14, OUTPUT | MODE0 */
                                0xdc 0x00      /* lcd_data15.lcd_data15, OUTPUT | MODE0 */
                                0xe0 0x00      /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
                                0xe4 0x00      /* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
                                0xe8 0x00      /* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
                                0xec 0x00      /* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
                        >;
                };
</pre>
</pre>


= RTC<br>  =
To set the RTC first set the date from Linux shell, type:<br>
<pre>$ date 2013.08.27-15:43
</pre>
Then set the real time clock from Linux shell, type:<br>
<pre>$ hwclock --systohc
</pre>
Power down your board wait 15 seconds and power up. Check your system with date and the time should be up to date.<br>


= 24bit LCD Pin-muxing =
= Audio record/play  =
Modify ~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01/arch/arm/boot/dts/am335x-som.dts
<pre>
<pre>
              lcd_pins_default: lcd_pins_default {
$ aplay /usr/share/sounds/alsa/Front_Center.wav
                        pinctrl-single,pins = <
$ arecord -f cd -d 10 -D hw:0,0 test.wav
0x20 0x01 /* gpmc_ad8.lcd_data16, OUTPUT | MODE1 */
$ aplay test.wav
0x24 0x01 /* gpmc_ad9.lcd_data17, OUTPUT | MODE1 */
0x28 0x01 /* gpmc_ad10.lcd_data18, OUTPUT | MODE1 */
0x2c 0x01 /* gpmc_ad11.lcd_data19, OUTPUT | MODE1 */
0x30 0x01 /* gpmc_ad12.lcd_data20, OUTPUT | MODE1 */
0x34 0x01 /* gpmc_ad13.lcd_data21, OUTPUT | MODE1 */
0x38 0x01 /* gpmc_ad14.lcd_data22, OUTPUT | MODE1 */
0x3c 0x01 /* gpmc_ad15.lcd_data23, OUTPUT | MODE1 */
                                0xa0 0x00      /* lcd_data0.lcd_data0, OUTPUT | MODE0 */
                                0xa4 0x00      /* lcd_data1.lcd_data1, OUTPUT | MODE0 */
                                0xa8 0x00      /* lcd_data2.lcd_data2, OUTPUT | MODE0 */
                                0xac 0x00      /* lcd_data3.lcd_data3, OUTPUT | MODE0 */
                                0xb0 0x00      /* lcd_data4.lcd_data4, OUTPUT | MODE0 */
                                0xb4 0x00      /* lcd_data5.lcd_data5, OUTPUT | MODE0 */
                                0xb8 0x00      /* lcd_data6.lcd_data6, OUTPUT | MODE0 */
                                0xbc 0x00      /* lcd_data7.lcd_data7, OUTPUT | MODE0 */
                                0xc0 0x00      /* lcd_data8.lcd_data8, OUTPUT | MODE0 */
                                0xc4 0x00      /* lcd_data9.lcd_data9, OUTPUT | MODE0 */
                                0xc8 0x00      /* lcd_data10.lcd_data10, OUTPUT | MODE0 */
                                0xcc 0x00      /* lcd_data11.lcd_data11, OUTPUT | MODE0 */
                                0xd0 0x00      /* lcd_data12.lcd_data12, OUTPUT | MODE0 */
                                0xd4 0x00      /* lcd_data13.lcd_data13, OUTPUT | MODE0 */
                                0xd8 0x00      /* lcd_data14.lcd_data14, OUTPUT | MODE0 */
                                0xdc 0x00      /* lcd_data15.lcd_data15, OUTPUT | MODE0 */
                                0xe0 0x00      /* lcd_vsync.lcd_vsync, OUTPUT | MODE0 */
                                0xe4 0x00      /* lcd_hsync.lcd_hsync, OUTPUT | MODE0 */
                                0xe8 0x00      /* lcd_pclk.lcd_pclk, OUTPUT | MODE0 */
                                0xec 0x00      /* lcd_ac_bias_en.lcd_ac_bias_en, OUTPUT | MODE0 */
                        >;
                };
</pre>
</pre>


= WLAN  =


= Modify LCD timings =
List SSIDs, from Linux shell type:
Modify ~/ti-sdk-am335x-evm-07.00.00.00/board-support/linux-3.12.10-ti2013.12.01/arch/arm/boot/dts/am335x-som.dts
<pre>$&nbsp;ifconfig wlan0 up
$&nbsp;iwlist wlan0 scan
</pre>
Connecting to an encrypted network<br>
 
Find your network from the above scan command.<br>
<pre>$ wpa_passphrase &lt;YourAP&gt; &lt;YourPassword&gt; &gt;wpa.conf
$ ps | grep wpa_supplicant
*kill the wpa_supplicant process if exist.
$ wpa_supplicant -Dwext -iwlan0 -c./wpa.conf -B
$ udhcpc -iwlan0
$ ifconfig
</pre>
 
= OpenGL demo (supported CPUs) =
Run the demo script at Linux command prompt after the VAR-DVK-AM33 EVB boots up
<pre>
<pre>
                lcdc: lcdc@0x4830e000 {
/etc/init.d/335x-demo
                        pinctrl-names = "default", "sleep";
                        pinctrl-0 = <&lcd_pins_default>;
                        pinctrl-1 = <&lcd_pins_sleep>;
                        status = "okay";
                        display-timings {
                                800x480p62 {
                                        clock-frequency = <30000000>; // LCD pixel clock
                                        hactive = <800>; // LCD horizontal pixel count
                                        vactive = <480>; // LCD vertical pixel count
                                        hfront-porch = <39>; // LCD HSYNC front porch length (in pixels)
                                        hback-porch = <39>; // LCD HSYNC back porch length (in pixels)
                                        hsync-len = <47>; // LCD HSYNC length (in pixels)
                                        vback-porch = <29>; // LCD VSYNC synch length (in pixels)
                                        vfront-porch = <13>;// LCD VSYNC synch length (in HSYNCs)
                                        vsync-len = <2>;// LCD VSYNC length (in HSYNCs)
                                        hsync-active = <1>; // HSYNC active high(1) or low (0)
                                        vsync-active = <1>;// VSYNC active high(1) or low (0)
                                };
                        };
                };
 
</pre>
</pre>

Revision as of 16:45, 17 June 2014

Unit Testing

CPU info

root@am335x-evm:~# cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 598.35
Features        : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls 
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2

Hardware        : VAR-SOM-AM33
Revision        : 0000
Serial          : 0000000000000000
root@am335x-evm:~# cat /proc/version
Linux version 3.2.0-AM335XPSP_04.06.00.11.VAR_R13 (uri@pluto) (gcc version 4.7.3 20130226 
(prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 T
ue Oct 15 10:06:14 IST 2013

RTC

To set the RTC first set the date from Linux shell, type:

$ date 2013.08.27-15:43

Then set the real time clock from Linux shell, type:

$ hwclock --systohc

Power down your board wait 15 seconds and power up. Check your system with date and the time should be up to date.

Audio record/play

$ aplay /usr/share/sounds/alsa/Front_Center.wav
$ arecord -f cd -d 10 -D hw:0,0 test.wav
$ aplay test.wav 

WLAN

List SSIDs, from Linux shell type:

$ ifconfig wlan0 up
$ iwlist wlan0 scan

Connecting to an encrypted network

Find your network from the above scan command.

$ wpa_passphrase <YourAP> <YourPassword> >wpa.conf
$ ps | grep wpa_supplicant
*kill the wpa_supplicant process if exist.
$ wpa_supplicant -Dwext -iwlan0 -c./wpa.conf -B
$ udhcpc -iwlan0
$ ifconfig

OpenGL demo (supported CPUs)

Run the demo script at Linux command prompt after the VAR-DVK-AM33 EVB boots up

/etc/init.d/335x-demo