User Manual RSB-4210 Evaluation Kit Freescale i.
Copyright The documentation and the software included with this product are copyrighted 2012 by Advantech Co., Ltd. All rights are reserved. Advantech Co., Ltd. reserves the right to make improvements in the products described in this manual at any time without notice. No part of this manual may be reproduced, copied, translated or transmitted in any form or by any means without the prior written permission of Advantech Co., Ltd. Information provided in this manual is intended to be accurate and reliable.
Packing List Before setting up the system, check that the items listed below are included and in good condition. If any item does not accord with the table, please contact your dealer immediately. RSB-4210 (P/N: RSB-4210CF-A78AAE) 7" LED PANEL 320N 4WR T/S 800X480(G), 97G070V1N0F-2, P/N: 96LEDKA070WV32RB1) LCD Backlight Cable (P/N: 1700019577) LVDS Cable (P/N: 1700014418) Touch Cable (P/N: 1700000194) SQFlash SD Card SLC 2G, 2CH(-40 ~ 85° C) (P/N: SQF-ISDS2-2G-ETE) A CABLE SATA 15P/1*4P-2.
Safety Instructions 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Read these safety instructions carefully. Keep this User Manual for later reference. Disconnect this equipment from any AC outlet before cleaning. Use a damp cloth. Do not use liquid or spray detergents for cleaning. For plug-in equipment, the power outlet socket must be located near the equipment and must be easily accessible. Keep this equipment away from humidity. Put this equipment on a reliable surface during installation.
Contents Chapter Chapter 1 Overview...............................................1 1.1 1.2 1.3 1.4 Introduction ............................................................................................... 2 Features .................................................................................................... 2 Hardware Specifications ........................................................................... 3 Board Block Diagram ..............................................................
2.2.7 2.2.8 2.2.9 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.18 2.2.19 2.2.20 2.2.21 2.2.22 2.2.23 2.2.24 2.2.25 2.2.26 2.2.27 2.2.28 2.2.29 2.2.30 2.2.31 2.2.32 2.2.33 2.2.34 RSB-4210 User Manual Pin Header for I2S (CN7)............................................................ 15 Figure 2.12Pin Header for I2S.................................................... 15 LVDS0 LCD Connector (CN8) .................................................... 16 Figure 2.13LVDS0 LCD Connector .........
Chapter 2.3 CTS) ......................................................................... 32 2.2.35 DC-IN Power Jack(DCIN1) ......................................................... 33 Figure 2.40DC-IN Power Jack .................................................... 33 2.2.36 SD Card Slot (SD1)..................................................................... 33 Figure 2.41SD card Slot ............................................................. 33 Mechanical ..........................................
3.11 3.12 RSB-4210 User Manual 3.10.1 What is a GPIO?......................................................................... 54 3.10.2 Paths in Sysfs ............................................................................. 55 3.10.3 GPIO Mapping Table .................................................................. 57 Interface Device Reference Documentation ........................................... 57 3.11.1 I2C .................................................................................
Chapter 1 1 Overview This chapter briefly introduces the RSB-4210 Platform and RSB-4210 Evaluation Kit.
1.1 Introduction In order to offer potential RISC-based Design-to-Order-Service (DTOS) project customers with a more efficient and low risk evaluation tool, Advantech provides a variety of RISC-based evaluation kits. Before DTOS projects kick-off, customers can check their designs with these kits in detail more easily. The evaluation kits are already equipped with all of the necessary H/W and S/W parts which customers will need, thus reducing design effort and speeding up application development.
Item Description Kernel Freescale i.MX53 1GHz (ARM Cortex A8) 2D/3D Accelerators Support OpenGL ES 2.0 and OpenVG™ 1.1 hardware accelerators System RAM 512 MB (Optional: 256 MB) Onboard Flash 2 GB (Optional: None) RTC Yes Watchdog Timer Yes Reset H/W reset & S/W reset I/O COM COM 1, RS-232, 2–wire(TX/RX), Pin header, (Debug port) COM 2, RS-232, D-Sub9 Connector(TX/RX/RTS/CTS) COM 3, RS-485, 2-pin Phoenix Connector COM 4, 3.
Power Consumption Normal Run ~2.3 W Full Run ~3.8 W Power Control 1 x Power ON/OFF Pin header 1 x H/W reset Pin header 1 x Suspend Pin header Power Management -Standard mode -Idle mode Mechanical and Environmental Board size 146 x 102 x 20 mm (PCB thickness 1.6 mm; 8 layer) Weight 110 g Operation Temperature 0 ~ 60° C (32 ~ 140° F) (-40 ~ 85° C by component change) Operating Humidity 5% ~ 95% Relative Humidity, non condensing Vibration 3.
Chapter 2 2 H/W Installation This chapter introduces the setup procedures of the RSB-4210 hardware, including instructions on setting jumpers and connecting peripherals, switches, indicators and mechanical drawings. Be sure to read all safety precautions before you begin this installation procedure.
2.1 Development Kit H/W Installation The Figure 2-1 is RSB-4210 Evaluation Kit Assembly, and the detail descriptions with Advantech P/N are shown as below.
Chapter 2 H/W Installation Figure 2.1 RSB-4210 Development Kit Assembly 2.1.1 RSB-4210 (Part-A) RSB-4210 is a cost-effective, low-power, and high-performance SBC (Single Board Computer) without a heatsink, geared to satisfy the needs of industrial computing applications. Based on the Freescale i.MX53 Processor - ARM® Cortex™ A8 architecture, RSB-4210 comes with DDR3, and iNAND flash.
2.1.3 LCD Backlight Cable (Part-B2) The LVDS backlight cable connects RSB-4210 (CN11) with the LCD backlight connector of 7" LVDS LCD Module. 2.1.4 LVDS Cable (Part-B3) The LVDS cable connects RSB-4210 LVDS0 connector (CN8) with the LCD signal connector of 7" LVDS LCD Module. 2.1.5 Touch Cable (Part-B4) The touch cable connects RSB-4210 (CN1) with the touch connector of 7" LVDS LCD Module. 2.1.6 SQFlash SD Card (Part-C) The SQFlash SD card is a standard SD device.
3P Power Cord (USA, Europe or UK standard) for 19 V Power Adapter AC input. 2.1.16 Speaker & Audio Cables (Part-M) The cable connects with RSB-4210 (AUDIO1) and LINE-OUT, LINE-IN, MIC-IN and L&R Speakers. Chapter 2 2.1.15 Power Cord (Part-L) 2.1.17 Power Cable for Charger Board (Part-N1) 2.1.18 Signal Cable for Charger Board (Part-N2) The cable provides the control signal for charger board. It connects RSB-4210 (BAT_CN2) with the charger board (CN1). 2.1.
2.2 RSB-4210 Connectors The following table shows the connector list of RSB-4210. 2.2.1 Connector Description CN 1 Wafer for 4-wire Resistive Type Touch Screen CN 2 Phoenix Connector for CAN Bus CN 3 Phoenix Connector for COM3, RS-485 CN 4 System Bus CN 5 Pin Header for COM5, RS-232 (TX/RX/RTS/CTS) CN 6 Pin Header for COM4, 3.
Chapter 2 Pin Description Pin Description 1 Touch_Y- 2 Touch_Y+ 3 Touch_X- 4 Touch_X+ 2.2.2 Phoenix Connector for CAN Bus (CN2) RSB-4210 supports one CAN bus, while CN2 is a phoenix connector for CAN bus. Note! For CAN applications, the two ends of the cable will have a termination resistor connected across the two wires. Without termination resistors, reflections of fast driver edges can cause multiple data edges that can cause data corruption. Please refer to Figure 2.4 and Figure 2.
Figure 2.4 CAN Application Figure 2.5 Schematics of CAN on RSB-4210 2.2.3 Phoenix Connector for COM3, RS-485 (CN3) RSB-4210 supports one RS-485 interface, while CN3 is a phoenix connector for RS485. Note! For RS-485 applications, the two ends of the cable will have a termination resistor connected across the two wires. Without termination resistors, reflections of fast driver edges can cause multiple data edges that can cause data corruption. Please refer to Figure 2.7 and Figure 2.
Chapter 2 Figure 2.7 RS-485 Application H/W Installation Figure 2.8 Schematics of RS-485 on RSB-4210 2.2.4 System Bus (CN4) The RSB-4210 provides system bus via PCI104+ connector for extended device use. The pin assignments are shown below in Fig 2.9. Figure 2.
A7 SysBus_A4 B7 SysBus_A5 C7 SysBus_A11 D7 SysBus_A10 A8 SysBus_A6 B8 SysBus_A7 C8 SysBus_A9 D8 SysBus_A8 A9 SysBus_A16 B9 SysBus_A17 C9 SysBus_A24 D9 N/C A10 SysBus_A18 B10 SysBus_A19 C10 N/C D10 SysBus_OE A11 SysBus_A20 B11 SysBus_A21 C11 SysBus_RW D11 GND A12 SysBus_A22 B12 SysBus_A23 C12 N/C D12 N/C A13 DIO_3V3 B13 N/C C13 SysBus_CS0 D13 SysBus_CS1 A14 SysBus_D0 B14 SysBus_D1 C14 SysBus_D15 D14 SysBus_D14 A15 SysBus_D2 B15 SysBus_D3 C15 SysBus_D13 D15 SysBu
Description Pin Description 1 N/C 2 N/C 3 COM5_RXD 4 COM5_RTS 5 COM5_TXD 6 COM5_CTS 7 N/C 8 N/C 9 GND 10 N/C CN6 is a 4-wire (TX/RX/RTS/CTS) 3.3 V TTL signal which provides connections between serial devices (For example, GPS, GSM and Bluetooth devices etc.) or a communication network. Figure 2.11 Pin Header for COM4, 3.3V TTL (TX/RX/RTS/CTS) 2.2.
Pin Description Pin Description 1 AUDIO_CLK 2 AUD3_TXD 3 AUD3_TXC 4 N/C 5 AUD3_TXFS 6 N/C 7 AUD3_RXD 8 N/C 9 GND 10 DIO_3V3 2.2.8 LVDS0 LCD Connector (CN8) RSB-4210 supports dual LVDS LCD Interfaces (24+24 bit), in which CN8 is LVDS0 (24-bit) while CN14 is LVDS1 (24-bit). The pin assignment of LVDS0 (CN8) is shown as below. Figure 2.13 LVDS0 LCD Connector Pin Description Pin Description 1 3.3 V 2 3.3 V 3 3.3 V 4 3.
CN9 is a 2-wire (TX/RX) RS-232 port which provides connections between serial devices (For example, GPS, GSM and Bluetooth devices etc.) or a communication network. Chapter 2 2.2.9 Pin Header for COM1, RS-232 (TX/RX) (CN9) H/W Installation Figure 2.14 Pin Header for COM1, RS-232 (TX/RX) Pin Description Pin Description 1 N/C 2 N/C 3 COM1_RXD 4 N/C 5 COM1_TXD 6 N/C 7 N/C 8 N/C 9 GND 10 N/C 2.2.10 Pin Header for SD2 (CN10) The SD/MMC Slots are 3.
Figure 2.15 Pin Header for SD2 Pin Description Pin Description 1 GND 2 GND 3 SD4_DATA1 4 SD4_CLK 5 SD4_DATA0 6 SD4_CMD 7 SD4_DATA3 8 SD4_CD 9 SD4_DATA2 10 3V3 11 N/C 12 N/C 2.2.11 Wafer for Backlight Power and Controller (CN11) This wafer provides DC +12 V, DC +5 V, back-light on/off control signal and 0 ~ 5 V PWM dimming control to inverter. We suggest users choose an inverter so that dimming control is by PWM to fit development kit design. Figure 2.
Description Pin Description 1 GND 2 GND 3 BLK_PWR_EN 4 BLK_PWR_EN 5 Brightness 6 PWM1 7 12 V 8 5V Chapter 2 Pin 2.2.12 MiniPCIe Connector-Latch (CN12) and Connector (CN13) Figure 2.
39 N/C 40 GND 41 N/C 42 LED_WWAN 43 GND 44 LED_WLAN 45 N/C 46 LED_WPAN 47 N/C 48 IO_1V5 49 N/C 50 GND 51 N/C 52 DIO_3V3 53 N/C 54 N/C 55 GND 56 GND 2.2.13 LVDS1 LCD Connector (CN14) RSB-4210 supports dual LVDS LCD Interfaces (24+24bit), in which CN8 is LVDS0 (24 bit) while CN14 is LVDS1 (24 bit). The pin assignment of LVDS1 (CN14) is shown below. Figure 2.
RSB-4210 provides one Jtag interface for debugging CPU. CN15 is the pin header for Jtag interface. H/W Installation Figure 2.19 Pin Header for Jtag Pin Description Pin Description 1 JTAG_TCK 2 GND 3 JTAG_TMS 4 GND 5 JTAG_TDO 6 GND 7 JTAG_TDI 8 IO_3V3 9 JTAG_TRST 10 N/C 2.2.15 Wafer for SATA power (CN16) CN16 provides DC +5 V for SATA device. The pin assignment is shown as below. Figure 2.20 Wafer for SATA power 21 Chapter 2 2.2.
Pin Description Pin Description 1 SATA_5 V 2 GND 3 GND 4 N/C 2.2.16 Wafer for Power ON/OFF (CN17) When plug-in the adapter with CN17 shorted by a jumper, the system will power-on. Or you can connect this wafer with an external button to control the power ON/OFF. Note! If your system cannot power-on with an adapter, please check this wafer in advance. There should be a jumper or external power switch on the wafer. Figure 2.
Chapter 2 2.2.18 Wafer for Coin Battery (CN19) CN19 is used for a coin battery. The pin assignment is shown as below. Figure 2.23 Wafer for Coin Battery Pin Description Pin Description 1 COIN_RTC 2 GND 23 RSB-4210 User Manual H/W Installation Figure 2.
2.2.19 SIM Card slot (CN20) RSB-4210 provides a SIM card slot for MiniPCIe devices. Figure 2.24 SIM Card slot 2.2.20 Pin Header for Reset (RST_BTN1) RST_BTN1 is used for resetting the system. You can connect it with an external button for application. The pin assignment are shown below. Figure 2.
SUS_BTN1 is used to making system entering into suspend mode or resume from suspend mode. You can connect it with an external button for applications. The pin assignment is shown as below. Chapter 2 2.2.21 Pin Header for Suspend (SUS_BTN1) H/W Installation Figure 2.26 Pin Header for Suspend Pin Description Pin Description 1 nSUSPEND 2 GND 2.2.22 Pin Header for Matrix Keypad (KEYPAD1) The keypad circuitry scans a 6*6 array of 36 normal-open, single-pole switches.
Figure 2.27 Pin Header for Matrix Keypad Pin Description Pin Description 1 KEY_COL2 2 KEY_ROW2 3 KEY_COL3 4 KEY_ROW3 5 KEY_COL4 6 KEY_ROW4 7 KEY_COL5 8 KEY_ROW5 9 KEY_COL6 10 KEY_ROW6 11 KEY_COL7 12 KEY_ROW7 2.2.23 Pin Header for I2C/SPI (CN21) RSB-4210 provides two I2C and one SPI interface with user to expand their applications. CN21 is the pin header for I2C/SPI interface. The pin assignment is shown as below. Figure 2.
Description Pin Description 1 GND 2 SPI_IRQ 3 I2C1_SCL 4 SPI_MISO 5 I2C1_SDA 6 SPI_MOSI 7 I2C3_SCL 8 SPI_CS0 9 I2C3_SDA 10 SPI_CLK 11 DIO_3V3 12 DIO_3V3 GPIO1 is extended for 20x pins 3.3V TTL Level GPIO. GPIO1~4 pins are coming from CPU directly while GPIO5~20 pins are extended from IC PCA9555. The pin assignment is shown as below. Figure 2.
2.2.25 SATA Connector (SATA_CN1) RSB-4210 supports one SATA Interface thru SATA_CN1. (Both SATA DOM and SATA HDD support.) The pin assignment is shown in Fig 2.30 below. Figure 2.30 SATA Connector Pin Description Pin Description 1 GND 2 SATA_TX+ 3 SATA_TX- 4 GND 5 SATA_RX- 6 SATA_RX+ 7 GND 2.2.26 Pin Header for USB_HUB1 (USB1) The USB port is extended from USB_HUB1. The pin assignment is shown below. Figure 2.
BAT_CN1 provides the power with battery charger board. +VIN_ADP is the voltage from adapter to battery charge board; +VIN is the voltage from battery charge board to RSB-4210. The pin assignment is shown below. Chapter 2 2.2.27 Wafer for Battery Charger Board - Power (BAT_CN1) H/W Installation Figure 2.32 Wafer for Battery Charger Board - Power Pin Description Pin Description 1 +VIN_ADP (For Battery) 2 +VIN_ADP (For Battery) 3 GND 4 GND 5 +VIN (For RSB-4210) 6 +VIN (For RSB-4210) 2.2.
Pin Description Pin Description 1 3.3 V_STB 2 GND 3 I2C3_SCL_BAT 4 N/C 5 I2C3_SDA_BAT 6 N/C 7 Charger_board_IN# 8 N/C 2.2.29 USB OTG MINI-AB Connector (USB_OTG1) The RSB-4210 has a single USB OTG mini-AB port which can be used as a USB client to link with PC or a USB host device. For USB client applications, users could upload or download files to any folder in Windows CE and create a synchronous folder between PC and RSB-4210 thru this connector.
RSB-4210 supports a standard VGA Interface (D-SUB15). The pin assignment is shown below. Pin Description Pin Description 1 CRT_R 2 CRT_G 3 CRT_B 4 N/C 5 GND 6 GND 7 GND 8 GND 9 +5 V 10 GND 11 N/C 12 DDC_SD_CRT 13 HSYNC 14 VSYNC 15 DDC_SC_CRT 2.2.32 HDMI Connector (HDMI_CN1) RSB-4210 supports a standard HDMI Interface. The pin assignment is shown below. Figure 2.
2.2.33 Box Header for LINE-OUT, LINE-IN, MIC-IN and L&R Speakers (AUDIO1) The box header is used for audio input / output signal port, and the speaker-out uses a 2W amplifier. The pin assignment is shown below. Figure 2.38 Box Header for LINE-OUT, LINE-IN, MIC-IN and L&R Speakers Pin Description Pin Description 1 LINE_OUT_R 2 SPK_R- 3 LINE_OUT_L 4 SPK_L- 5 SPK_R+ 6 SPK_L+ 7 N/C 8 AGND 9 LINE_IN_R 10 LINE_IN_L 11 N/C 12 AGND 13 N/C 14 N/C 15 MIC_IN 16 AGND 2.2.
N/C 2 COM2_RXD 3 COM2_TXD 4 N/C 5 GND 6 N/C 7 COM2_RTS 8 COM2_CTS 9 N/C 2.2.35 DC-IN Power Jack(DCIN1) Chapter 2 1 The DC-in power jack DCIN1 provides the power with RSB-4210 (+9 ~ 24 V). H/W Installation Figure 2.40 DC-IN Power Jack 2.2.36 SD Card Slot (SD1) The SD card Slot (SD1) is powered with 3.3 V, which includes the following features: Fully compatible with the MMC system specification version 3.2 Compatible with the SD Memory Card specification 1.
2.3 Mechanical 2.3.1 Connector Location Figure 2.42 RSB-4210 Connector Position (Top) Figure 2.
Chapter 2 2.3.2 RSB-4210 Board Dimension 35 RSB-4210 User Manual H/W Installation Figure 2.
RSB-4210 User Manual 36
Chapter 3 3 Software Functionality This chapter details the Linux operating system on RSB-4210.
3.1 Introduction The RSB-4210 platform is an embedded system with Linux kernel 2.6.35 as default. Its major functions include all system-required shell commands and drivers ready for RSB-4210 platform. Advantech’s Linux package does not offer a development environment. Users can develop it under an Ubuntu environment. There are three major boot components for Linux, "u-boot.bin", "uImage" and "File System". The "u-boot.bin" is for initial peripheral hardware parameter.
RSB-4210 source code package contains many software components which are accessed by RSB-4210 products. Some are developed by Advantech and some are developed in and by the open source community. This package contains seven main folders, "cross_compiler", "image", "logo", "mk_inand", "rootfs", "scripts", and "source". The description of RSB-4210_Linux_Source_Code package contents: "cross_compiler"' → This folder contains source code for cross compiler.
boot' → The startup files and the kernel. In some recent distributions also grub data. Grub is the Grand Unified Boot loader and is an attempt to get rid of the many different boot-loaders we know today. dev' → Contains references to all the CPU peripheral hardware, which are represented as files with special properties.
All instructions in this guide are for Ubuntu 10.04 LTS. Please install the Ubuntu 10.04 LTS at your PC/NB in advance. When you got the RSB-4210 Linux source code package, you can refer to the following steps to unzip to your developing environment: 1. Copy "RSB4210_Linux_BSP.tar.gz" package to your desktop. 2. Open "Terminal" utility. 3. Type #sudo su (Change to "root" authority) 4. Type user password 5. Type #cd Desktop/ 6. Type #tar xvf RSB4210_Linux_BSP.tar.gz (Unzip file) 7.
3.3.1 Setenv.sh The script "setenv.sh" is mainly used to configure the developing environment quickly. It will configure the important folder paths for system, and you can also add/ modify the setenv.sh by yourself if you have added/changed the folder paths. The default code of setenv.sh is shown as following: #!/bin/bash export SRCROOT=${PWD}/..
Type #cd Desktop/RSB4210_BSP/scripts/ Type #. setenv.sh (To configure the developing environment automatically) Type #apt-get install libncurses5-dev (To get the menuconfig library) Type #apt-get install jigit (To get mkimage) Type #. cfg_kernel.sh (To set the uImage configuration automatically) Type #. mk_kernel.sh (Start to build the uImage) Then you can see "uImage" under folders "image" and "mk_inand" Finish. When an error occurs during building kernel, it will record in this file. This build.
8. Go to "Device Drivers"'"Real Time Clock", then you can see the "Seiko Instruments S-35390A" on the list. Select this option then exit and save the configuration. Figure 3.4 Selecting Seiko Instruments S-35390A 9. Go to folder "source/linux-2.6.35.3/arch/arm/mach-mx5", and edit the "mx53_smd.c", to add these codes. Figure 3.5 Integrate Code for Seiko Instruments S-35390A 10. Then you can refer to Chapter 3.3.2 to rebuild the kernel with RTC driver (Seiko Instruments S-35390A).
3. 4. 5. 7. Open "Terminal" utility. Type #cd Desktop/bootlogo (Go into the folder that bootlogo.png located) Type #pngtopnm bootlogo.png | pnmtoplainpnm > logo_linux_clut224.ppm Type #cp logo_linux_clut224.ppm /home/user/Desktop/ RSB4210_BSP/source/linux-2.6.35.3/drivers/video/logo Then you can refer Chapter 3.3.2 to rebuild the kernel with your own boot logo. 3.6 Making Linux System Booting Media RSB-4210 supports booting from SD storage card and onboard flash.
7. Type #./mkmmc-linux.sh /dev/sdf u-boot.bin uImage ../rootfs 8. Type #y (Start to copy files, waiting few minutes until it shows [Done]) 9. Finish. Then insert the Linux system SD storage card to CN41 of RSB-4210 and it will boot into the Linux environment when powering up the device. 3.6.2 Booting from Onboard Flash Another way to boot up RSB-4210 is through the onboard flash. The script "mkmmclinux.sh" will help you to build a "uImage" . 1. Refer to Chapter 3.4.
After the bootloader is programmed on SD card, press "POWER" key to power up the board. The bootloader prompt is displayed on the terminal screen. 3.8 Linux Software Applications on RSB-4210 This section will guide you to develop your own application under Linux. Firstly an example "Hello World" will be shown, and some of the pre-installed applications on RSB-4210 platform will be introduced in detail then. 3.8.
11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Save the file and exit. Type #$CC -o helloworld helloworld.c (To compile helloworld.c) Then you can see "helloworld" in the work directory. (/Desktop/helloworld/) Insert the Linux system SD card to your development computer. Type #cp helloworld /media/rootfs/tool (/media/rootfs is the partition of your Linux system SD card) Remove this SD card and insert it to RSB-4210 for booting.
Chapter 3 3.8.2.2 Running Audio Demo Execute the following commands to run the Audio demo application on RSB-4210. 1. Type #root (login) 2. Type #cd /unit_tests 3. Type #aplay audio8k16S.wav 4. You should be able to hear music from the speaker/head-sets. 3.8.2.3 Running Video Demo Execute the following commands to run the Video demo application on RSB-4210. 1. Type #root (login) 2. Type #cd /unit_tests 3. Type #gplay akiyo.mp4 4. Then you can watch the video demo on the LCD panel. Figure 3.9 Video demo 3.
Figure 3.10 Photo demo 3.8.2.5 Running Buzzer Testing Execute the following commands to test the buzzer function of RSB-4210. 1. Type #root (login) 2. Type #cd /tools 3. Type #./test_buzzer.sh 4. You should hear the buzzer sound from RSB-4210. 3.8.2.6 Running Memory Testing Execute the following commands to test the memory of RSB-4210. 1. Type #root (login) 2. Type #cd /tools 3. Type #./memtester 10M 1 (Testing Size=10M Bytes; Loop=1 time) 4.
In this section, we will introduce how to configure VGA/HDMI on RSB-4210. As depicted in Figure 3-12, IC CH7033B on RSB-410 board will be used for transferring TTL signal to VGA/HDMI output. There are two output modes for VGA/HDMI signals on RSB-4210 as shown below: Auto mode: CH7033B controls output timing. Bypass mode: CPU Freescale i.MX53 controls output timing. The following sections will introduce each of the output modes in detail.
your panel. (For example, if your panel supports UXGA60 as its max resolution, you may choose value "2".) Table 3.
43 720x400P85 35500 720x400@85P 44 640x400P85 31500 640x400@85P 255 Auto Mode Table 3.3: Auto Parameters Auto Parameter Description Note 9 VGA/HDMI and LVDS are the same screen This mode only supports 1080P60 19 VGA/HDMI is primary screen, LVDS is secondary screen LVDS only supports 800x480. 23 LVDS is primary screen, VGA/HDMI is secondary screen LVDS only supports 800x480. To change RSB-4210 output to bypass mode (auto mode as default), please refer to the following steps: 1.
4. Type # echo 2 > mode (Configure bypass mode) Figure 3.15 Bypass mode configuration Note! 5. You can choose the value which corresponds with your panel resolution setting. Above is an example for 1920 x 1080p resolution. Type # echo 19 > auto_video (Use auto parameter function) Figure 3.16 Auto parameter selection Note! 6. 7. You can choose the auto parameter corresponds with your requirement. Above is an example for VGA/HDMI as primary screen. Type #reboot (Restart the system) Finish 3.
3.10.2 Paths in Sysfs There are three kinds of entry in /sys/class/gpio: Control interfaces used to get userspace control over GPIOs; GPIOs themselves; and GPIO controllers ("gpio_chip" instances). "export" ... Userspace may ask the kernel to export control of a GPIO to userspace by writing its number to this file. #echo 19 > export Will create a "gpio19" node for GPIO #19, if that's not requested by kernel code. "unexport" ... Reverses the effect of exporting to userspace.
"edge" "active_low" reads as either "none", "rising", "falling", or "both". Write these strings to select the signal edge(s) that will make poll(2) on the "value" file return. This file exists only if the pin can be configured as aninterrupt generating input pin. reads as either 0 (false) or 1 (true). Write any nonzero value to invert the value attribute both for reading and writing.
ROM-1210 RSB-4210 Physical Number Logical Number Physical Number 1 149 1 176 2 148 2 148 3 147 3 147 4 33 4 33 5 175 5 224 6 176 6 225 7 226 7 226 8 227 8 227 9 228 9 228 10 229 10 229 11 230 11 230 12 231 12 231 13 232 13 232 14 233 14 233 15 234 15 234 16 235 16 235 17 236 17 236 18 237 18 237 19 238 19 238 20 239 20 239 3.11 Interface Device Reference Documentation 3.11.
somewhat dynamically, so you cannot assume much about them. They can even change from one boot to the next.
Note that only a subset of the I2C and SMBus protocols can be achieved by the means of read() and write() calls. In particular, so-called combined transactions (mixing read and write messages in the same transaction) aren't supported. For this reason, this interface is almost never used by user-space programs. Note! Because of the use of inline functions, you *have* to use '-O' or some variation when you compile your program! 3.11.2.
Do combined read/write transaction without stop in between. Only valid if the adapter has I2C_FUNC_I2C. The argument is a pointer to a struct i2c_rdwr_ioctl_data { struct i2c_msg *msgs; /* ptr to array of simple messages */ int nmsgs; /* number of messages to exchange */ } The msgs[] themselves contain further pointers into data buffers. The function will write or read data to or from that buffers depending on whether the I2C_M_RD flag is set in a particular message or not.
3.11.3 UART 3.11.3.1 Driver Interface open() close() write() put_char() flush_chars() write_room() ioctl() Called when a device is opened. May sleep Called when a device is closed. At the point of return from this call the driver must make no further ldisc calls of any kind. May sleep Called to write bytes to the device. May notsleep. May occur in parallel in special cases. Because this includes panic paths drivers generally shouldn't try and do clever locking here.
set_termios() set_ldisc() throttle() unthrottle() stop() start() hangup() break_ctl()wait_until_sent() send_xchar() Called on termios change, serialized against itself by a semaphore. May sleep. Notifier for discipline change. At the point this is done the discipline is not yet usable. Can now sleep (I think) Called by the ldisc to ask the driver to do flow control. Serialization including with unthrottle is the job of the ldisc layer. Called by the ldisc to ask the driver to stop flow control.
ldisc = tty_ldisc_ref_wait(tty); Caution! The ldisc->open(), ldisc->close() and driver->set_ldisc functions are called with the ldisc unavailable. Thus tty_ldisc_ref will fail in this situation if used within these functions. Ldisc and driver code calling its own functions must be careful in this case. 3.11.3.3 RS422/RS485 Tips Transmit RS422/RS458 as soon as setting GPIO 61/62 "high". Receive RS485 as soon as setting GPIO 61/63 low. 3.11.3.
( void ) ftime( &tb ); realNow = (unsigned int )(((tb.time%4290) * 1000000 ) + ( tb.
Chapter 3 case 57600: retval = B57600; break; case 115200: retval = B115200; break; Software Functionality #ifdef B230400 case 230400: retval = B230400; break; #endif #ifdef B460800 case 460800: retval = B460800; break; #endif #ifdef B500000 case 500000: retval = B500000; break; #endif #ifdef B576000 case 576000: retval = B576000; break; #endif #ifdef B921600 case 921600: retval = B921600; break; #endif #ifdef B1000000 case 1000000: retval = B1000000; break; #endif #ifdef B1152000 65 RSB-4210 User Manu
case 1152000: retval = B1152000; break; #endif #ifdef B1500000 case 1500000: retval = B1500000; break; #endif #ifdef B2000000 case 2000000: retval = B2000000; break; #endif #ifdef B2500000 case 2500000: retval = B2500000; break; #endif #ifdef B3000000 case 3000000: retval = B3000000; break; #endif #ifdef B3500000 case 3500000: retval = B3500000; break; #endif #ifdef B4000000 case 4000000: retval = B4000000; break; #endif default: retval = 0; break; } RSB-4210 User Manual 66
Chapter 3 return(retval); } void *Uartsend(void * threadParameter) { int *tx; double speed; double time; tcount = 0; tx = malloc(size); memset(tx, 0x0f, size); while(trun) { sleep(1); tx[0] = 0x55; time = get_time(); write(fd, tx, size); time = get_time() - time; speed = size * 8 / (time/1000000); tcount += size; printf("sent %d bytes with speed %fbps\n", size, speed); } free(tx); return 0; } void *Uartread(void * threadParameter) { char *rx; int iores, iocount; rcount = 0; while(rrun) { iocount = 0; iore
/* Read in and wrap around the list */ iores = read(fd, rx, iocount); rcount += iores; fwrite(rx, 1, iores, furead); free(rx); } return 0; } static void print_usage(const char *pname) { printf("Usage: %s device [-S] [-O] [-E] [-HW] [-B baudrate]" "\n\t'-S' for 2 stop bit" "\n\t'-O' for PARODD " "\n\t'-E' for PARENB" "\n\t'-HW' for HW flow control enable" "\n\t'-B baudrate' for different baudrate\n", pname); } int main(int argc, char *argv[]) { int i, ret; struct termios options; unsigned long baudrate = DEF
Chapter 3 tcgetattr(fd, &options); options.c_cflag &= ~CSTOPB; options.c_cflag &= ~CSIZE; options.c_cflag |= PARENB; options.c_cflag &= ~PARODD; options.c_cflag |= CS8; options.c_cflag &= ~CRTSCTS; options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 0; options.c_cflag |= (CLOCAL | CREAD); for(i = 2; i < argc; i++) { if (!strcmp(argv[i], "-S")) { options.c_cflag |= CSTOPB; continue; } if (!strcmp(argv[i], "-O")) { options.c_cflag |= PARODD; options.
cfsetospeed(&options, baudrate_map(baudrate)); } tcsetattr(fd, TCSANOW, &options); printf("UART %lu, %dbit, %dstop, %s, HW flow %s\n", baudrate, 8, (options.c_cflag & CSTOPB) ? 2 : 1, (options.c_cflag & PARODD) ? "PARODD" : "PARENB", (options.c_cflag & CRTSCTS) ? "enabled" : "disabled"); trun = 1; rrun = 1; furead = fopen("uart_read.
return 0; } (More detail please reference "source/linux-2.6.35.3/Documentation/serial/tty.txt") CAN bus is a set of open source CAN drivers and a networking stack contributed by Volkswagen Research to the Linux kernel. Formerly known as Low Level CAN Framework (LLCF). Typical CAN communication layers. With SocketCAN (left) or conventional (right). Traditional CAN drivers for Linux are based on the model of character devices. Typically they only allow sending to and receiving from the CAN controller.
#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include
Chapter 3 enum { VERSION_OPTION = CHAR_MAX + 1, }; void sigalrm_fn(int sig) { printf("CAN Bus Error\n"); exit(1); while ((opt = getopt_long(argc, argv, "hf:t:p:vi:lreR", long_options, NULL)) != -1) { switch (opt) { case 'h': print_usage(basename(argv[0])); exit(0); case 'f': family = strtoul(optarg, NULL, 0); 73 RSB-4210 User Manual Software Functionality } int main(int argc, char **argv) { struct can_frame frame = { .
break; case 't': type = strtoul(optarg, NULL, 0); break; case 'p': proto = strtoul(optarg, NULL, 0); break; case 'v': verbose = 1; break; case 'l': if (optarg) loopcount = strtoul(optarg, NULL, 0); else infinite = 1; break; case 'i': frame.
} printf("interface = %s, family = %d, type = %d, proto = %d\n", interface, family, type, proto); s = socket(family, type, proto); if (s < 0) { perror("socket"); return 1; } addr.can_family = family; strcpy(ifr.ifr_name, interface); if (ioctl(s, SIOCGIFINDEX, &ifr)) { perror("ioctl"); return 1; } addr.can_ifindex = ifr.
if (rtr) frame.can_id |= CAN_RTR_FLAG; if (verbose) { printf("id: %d ", frame.can_id); printf("dlc: %d\n", frame.can_dlc); for (i = 0; i < frame.can_dlc; i++) printf("0x%02x ", frame.data[i]); printf("\n"); } if(!Relay) { /*set 10 seconds to alarm */ alarm(10); while (infinite || loopcount--) { // for (i= 0 ;i<8;i++) test_pattern[i]=random()%255; test_pattern[i]=0xFF; printf("Send Data :"); for (i = 0; i < 8; i++) { printf("%d ",test_pattern[i]); frame.data[i] = test_pattern[i]; } printf("\n"); frame.
} } else /*relay packet*/ { int nBytes; while(1) { if ((nBytes=read(s,&frame, sizeof(struct can_frame))) < 0) { perror("read"); return 1; } else { printf("Receive data: "); for(i=0;i<8;i++) printf("%d ",frame.data[i]); printf("\n"); write(s, &frame, sizeof(struct can_frame)); } } } close(s); return 0; } (More detail please reference "source/linux-2.6.35.3/Documentation/networking/ can.txt") 3.11.
SD card /dev/mmcblk1 iNand /dev/mmcblk0 USB Disk /dev/sdx SATA Disk /dev/sdx You can use open/close/write/read functions to control this storage. 3.11.6 LAN Refer to Socket Programming (http://www.tenouk.com/cnlinuxsockettutorials.html) 3.11.7 RTC Because Linux supports many non-ACPI and non-PC platforms, some of which have more than one RTC style clock, it needed a more portable solution than expecting a single battery-backed MC146818 clone on every system.
The time at which the clock will generate a system wakeup event. This is a one shot wakeup event, so must be reset after wake if a daily wakeup is required. Format is either seconds since the epoch or, if there's a leading +, seconds in the future. IOCTL INTERFACE --------------- * RTC_RD_TIME, RTC_SET_TIME ... every RTC supports at least reading time, returning the result as a Gregorian calendar date and 24 hour wall clock time. To be most useful, this time may also be updated.
* RTC_IRQP_SET, RTC_IRQP_READ: the irq_set_freq function will be called to set the frequency while the framework will handle the read for you since the frequency is stored in the irq_freq member of the rtc_device structure. Your driver needs to initialize the irq_freq member during init. Make sure you check the requested frequency is in range of your hardware in the irq_set_freq function. If it isn't, return -EINVAL. If you cannot actually change the frequency, do not define irq_set_freq.
rtctest [rtcdev]\n"); if (fd == -1) { perror(rtc); exit(errno); } fprintf(stderr, "\n\t\t\tRTC Driver Test Example.\n\n"); /* Turn on update interrupts (one per second) */ retval = ioctl(fd, RTC_UIE_ON, 0); if (retval == -1) { if (errno == ENOTTY) { fprintf(stderr, "\n...Update IRQs not supported.
fprintf(stderr, "\nAgain, from using select(2) on /dev/ rtc:"); fflush(stderr); for (i=1; i<6; i++) { struct timeval tv = {5, 0}; /* 5 second timeout on select */ fd_set readfds; FD_ZERO(&readfds); FD_SET(fd, &readfds); /* The select will wait until an RTC interrupt happens. */ retval = select(fd+1, &readfds, NULL, NULL, &tv); if (retval == -1) { perror("select"); exit(errno); } /* This read won't block unlike the select-less case above.
rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.tm_sec); retval = ioctl(fd, RTC_ALM_SET, &rtc_tm); if (retval == -1) { if (errno == ENOTTY) { fprintf(stderr, "\n...Alarm IRQs not supported.\n"); goto test_PIE; } perror("RTC_ALM_SET ioctl"); exit(errno); } /* Read the current alarm settings */ retval = ioctl(fd, RTC_ALM_READ, &rtc_tm); if (retval == -1) { perror("RTC_ALM_READ ioctl"); exit(errno); } fprintf(stderr, "Alarm time now set %02d:%02d:%02d.\n", rtc_tm.tm_hour, rtc_tm.tm_min, rtc_tm.
fprintf(stderr, "Waiting 5 seconds for alarm..."); fflush(stderr); /* This blocks until the alarm ring causes an interrupt */ retval = read(fd, &data, sizeof(unsigned long)); if (retval == -1) { perror("read"); exit(errno); } irqcount++; fprintf(stderr, " okay. Alarm rang.
} perror("RTC_IRQP_SET ioctl"); exit(errno); } /* Enable periodic interrupts */ retval = ioctl(fd, RTC_PIE_ON, 0); if (retval == -1) { perror("RTC_PIE_ON ioctl"); exit(errno); } for (i=1; i<21; i++) { /* This blocks */ retval = read(fd, &data, sizeof(unsigned long)); if (retval == -1) { perror("read"); exit(errno); } fprintf(stderr, " %d",i); fflush(stderr); irqcount++; } /* Disable periodic interrupts */ retval = ioctl(fd, RTC_PIE_OFF, 0); if (retval == -1) { perror("RTC_PIE_OFF ioctl"); exit(errno); }
3.11.8 WatchDog Usually an userspace daemon will notify the kernel watchdog driver via the/dev/ watchdog special device file that userspace is still alive, at regular intervals. When such a notification occurs, the driver will usually tell the hardware watchdog that everything is in order, and that the watchdog should wait for yet another little while to reset the system.
the argument to the ioctl is ignored. Setting and getting the timeout: For some drivers it is possible to modify the watchdog timeout on the fly with the SETTIMEOUT ioctl, those drivers have the WDIOF_SETTIMEOUT flag set in their option field. The argument is an integer representing the timeout in seconds. The driver returns the real timeout used in the same variable, and this timeout might differ from the requested one due to limitation of the hardware.
There is also a get function for getting the pretimeout: ioctl(fd, WDIOC_GETPRETIMEOUT, &timeout); printf("The pretimeout was is %d seconds\n", timeout); Not all watchdog drivers will support a pretimeout. Get the number of seconds before reboot: Some watchdog drivers have the ability to report the remaining time before the system will reboot. The WDIOC_GETTIMELEFT is the ioctl that returns the number of seconds before reboot.
Power bad/power fault The machine is showing an undervoltage status WDIOF_CARDRESET Card previously reset the CPU The last reboot was caused by the watchdog card Power over voltage The machine is showing an overvoltage status. Note that if one level is under and one over both bits will be set - this may seem odd but makes sense. WDIOF_KEEPALIVEPING Keep alive ping reply The watchdog saw a keepalive ping since it was last queried.
ioctl(fd, WDIOC_SETOPTIONS, &options); The following options are available: WDIOS_DISABLECARDTurn off the watchdog timer WDIOS_ENABLECARDTurn on the watchdog timer WDIOS_TEMPPANICKernel panic on temperature trip More detail please reference "source/linux-2.6.35.3/Documentation/watchdog/watchdog-api.txt" 3.11.9 Audio 3.11.9.1 Kernel Configuration To enable ALSA support you need at least to build the kernel with primary sound card support (CONFIG_SOUND).
input mousedev keybdev usbcore uhci_hcd or ohci_hcd or ehci_hcd usbhid After this, the USB keyboard will work straight away, and the USB mouse will be available as a character device on major 13, minor 63: crw-r--r-- 1 root root 13, 63 Mar 28 22:45 mice This device has to be created.
Device drivers are the modules that generate events. The events are however not useful without being handled, so you also will need to use some of the modules from section 3.10.9.3.2. A. usbhid usbhid is the largest and most complex driver of the whole suite. It handles all HID devices, and because there is a very wide variety of them, and because the USB HID specification isn't simple, it needs to be this big.
RSB-4210 User Manual Software Functionality 93 Chapter 3 The right way would be to pass the events to keyboard.c directly, best if keyboard.c would itself be an event handler. This is done in the input patch, available on the webpage mentioned below. B. mousedev mousedev is also a hack to make programs that use mouse input work. It takes events from either mice or digitizers/tablets and makes a PS/2-style (a la /dev/ psaux) mouse device available to the userland.
evdev is the generic input event interface. It passes the events generated in the kernel straight to the program, with timestamps. The API is still evolving, but should be useable now. This should be the way for GPM and X to get keyboard and mouse events. It allows for multihead in X without any specific multihead kernel support. The event codes are the same on all architectures and are hardware independent.
3.12 Backlight Adjustment 95 RSB-4210 User Manual Software Functionality The brightness of the display backlight can be adjusted in a range from 0 to 255. The value is exported as a virtual file in the sysfs under /sys/class/backlight/ pwm_backlight/brightness. It can be accessed using the standard file operations open(), read(), write() and close().
www.advantech.com Please verify specifications before quoting. This guide is intended for reference purposes only. All product specifications are subject to change without notice. No part of this publication may be reproduced in any form or by any means, electronic, photocopying, recording or otherwise, without prior written permission of the publisher. All brand and product names are trademarks or registered trademarks of their respective companies. © Advantech Co., Ltd.