User Manual ROM-5420 RISC-based SMARC Module with Freescale i.
Copyright The documentation and the software included with this product are copyrighted 2014 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.
Declaration of Conformity FCC Class B Note: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications.
Safety Precaution - Static Electricity Follow these simple precautions to protect yourself from harm and the products from damage. To avoid electrical shock, always disconnect the power from your PC chassis before you work on it. Don't touch any components on the CPU card or other cards while the PC is on. Take care to avoid electrostatic discharge (ESD) before making any configuration changes. Use a static-free workstation, grounding strap, or take other precautions.
Ordering Information Model Number Description Commercial grade Part No. ROM-5420CD-MDA1E CPU Freescale i.MX6 Dual 1 GHz Memory 1 GB eMMC 4 GB Camera Input 1 Parallel RGB Yes HDMI Yes LVDS Yes PCIe 1 USB 1 Host, 1 OTG Audio Yes GPIO 12 Serial 4 CAN 2 I2C 5 Operation Temp.
Safety Instructions 1. 2. 3. 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. 4. For plug-in equipment, the power outlet socket must be located near the equipment and must be easily accessible. 5. Keep this equipment away from humidity. 6. Put this equipment on a reliable surface during installation.
Contents Chapter Chapter 1 Product Overview ................................1 1.1 1.2 1.3 1.4 1.5 Introduction ............................................................................................... 2 Product Features....................................................................................... 3 Mechanical Specifications......................................................................... 4 Electrical Specifications .................................................................
Chapter Chapter 3.7 3.8 Debug Message...................................................................................... 30 Linux Software AP and Testing on ROM-5420 ....................................... 30 3.8.1 “Hello World!” Application and Execution ................................... 30 3.8.2 Watchdog Timer Sample Code................................................... 31 3.8.3 GPIO Setting............................................................................... 33 3.8.
Chapter 1 1 Product Overview This chapter briefly introduces ROM-5420 platform.
1.1 Introduction ROM-5420 adopts Freescale i.MX6 Dual Core Processor - ARM® Cortex™ A9 architecture as its SoC solution. The main features of this platform are followed by SMARC 1.0 standard, with a heatsink-less, compact, reliable & great power management. Therefore, ROM-5420 platform is suitable for following applications: HMI (Human Machine Interface) Portable devices Fleet management / Navigation Industrial data collector And the main features of Freescale i.
SMARC v1.0 Compatible Module Processor System Memory Freescale i.MX6 Dual Core 1.0 GHz Technology DDR3 1066 MHz Capacity On-board DDR3 1 GB Flash 4 GB eMMC for O.S. and 4 MB NOR Flash for Advantech boot loader Graphics Engine 3 GPUs. OpenGL ES 2.0 for 3D, BitBlt for 2D and OpenVG 1.1 H/W Video Codec Decoder: MPEG-4 ASP, H.264 HP, H.263, MPEG-2 MP, MJPEG BP Encoder: MPEG-4 SP, H.264 BP, H.
1.3 Mechanical Specifications Dimensions: SMARC form factor size, 82 mm (W) x 50 mm(D) Height on Top: Under 3.0 mm base on SPEC definition (without heatsink) Height on Bottom: Under 1.3 mm base on SPEC definition Heat Spreader Dimensions: 42 mm x 82 mm x 6 mm (L x W x H) Semi-Heat sink Dimensions: 42 mm x 82 mm x 13 mm (L x W x H) 1.4 Electrical Specifications Power supply Voltage: – Voltage requirements: +3 ~ 5.
Chapter 2 2 H/W Installation This chapter gives mechanical and connector information on the ROM-5420 CPU Computer on Module.
2.1 ROM-5420 Board Looks 2.2 Board Connectors The board has four connectors that allow you to configure your system to your application. 2.2.
Jumper Mode Jumper Mode 1-ON 2-OFF SPI-ROM (Default) 1-OFF 2-ON SD (Reserved for recovery) CN1101 (MCU programming port) Signal Pin Signal 1 +3.3 V 2 SWDIO 3 SWCLK 4 MCU_JTAG_RESET 5 GND CN1602 (JTAG connector) Pin Signal Pin Signal 1 +3.3 V 2 JTAG_TRST# 3 JTAG_TMS 4 JTAG_TDO 5 JTAG_TDI 6 JTAG_TCK 7 JTAG_RTCK 8 GND 9 - 10 GND CN1603 (Debug connector) Pin Signal Pin Signal 1 +3.
2.3 ROM-5420 Board Block Diagram Below is the block diagram of ROM-5420. DDR3 Memory eMMC 4GB Flash TTL 24bit LVDS HDMI SMARC MXM3 Connector - 314 pin CSI (Camera input) MDI Ethernet Transceiver RGMII USB Host/OTG PCIe x1 Freescale i.MX6 Dual/Quad SATA SDIO 4 SPI 4 I2C (Slave) ISC Switch I2C I2C I2S SPDIF 4 UART 2 CAN 12 GPIO I2C SPI Flash Figure 2.
Chapter 3 3 Software Functionality This chapter details the software programs on the ROM-5420 platform.
3.1 Test Tools All test tools must be verified on ROM-5420 Evaluation kit, please prepare required test fixtures before verifying each specified I/O. If you have any problem to get the test fixture, please contact your Advantech contact window for help. 3.1.1 eMMC Test Step1: Erase and check #dd if=/dev/zero of=/dev/mmcblk0 bs=1024 count=1 seek=25118 1+0 records in 1+0 records out #hexdump -C /dev/mmcblk0 -s 25720832 -n 16 01887800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................
| dd of=/dev/sdb bs=1024 count=1 #hexdump -C /dev/sdb -s 25720832 -n 16 01887800 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 |0123456789ABCDEF| This operation may damage the data stored in USB flash disk. Please make sure there is no critical data in the USB flash disk being used for this test. 3.1.
Note! Please make sure parameter “seek” is equal to 25118 as indicated in red in above codes. If you create the file to a wrong sector, that may damage the system. 3.1.5 GPIO Test 3.1.5.
As you can see in below procedure A and B, we set gpio 177 as GPI and gpio 178 as GPO so once we send data out from gpio 178, it should be able to receive the same data from gpio 177. Chapter 3 #cat ./gpio178/value 0 3.1.6 LVDS/HDMI/VGA Test Software Functionality 3.1.6.1 Testing through gplay (for default single display) Step 1: #gplay /tools/Advantech.avi #gplay /tools/Advantech.avi Step 2: Then you can see the video demo on the default display screen. 3.1.6.
#gst-launch playbin2 uri=file:///tools/Advantech.avi videosink="mfw_v4lsink device=/dev/video17" audio-sink="alsasink device=plughw:0" B. Plughw:1 → Output the audio through HDMI. #gst-launch playbin2 uri=file:///tools/Advantech.avi videosink="mfw_v4lsink device=/dev/video17" audio-sink="alsasink device=plughw:1" If you’d like to change display monitor, please refer to below table: video16 HDMI video17 HDMI overlay video18 VGA video19 VGA overlay video20 LVDS 0 video21 LVDS 1 3.1.
#i2cdump -f -y 1 0x50 c 03 56 95 2d 00 00 00 20 14 65 96 6e 1e 20 00 00 d 01 4f 00 40 44 fd 00 20 05 03 00 28 20 40 00 00 e 01 9e b3 58 35 00 00 01 0e 0c dc 55 b8 31 00 00 f 01 28 00 2c 4c 32 fc f6 0f 00 0c 00 28 20 00 b5 0123456789abcdef ........?i?"???? ?????0?x**??VO?( ?PT??.???@???.?. qO???.?:??q8-@X, E.???..?.....D5L MQS096048?...?.2 K?S?.? ...? .ASUS VS228? ?? ??"qO??????????? ????#?????..e??. ?.???? ?-??>?.?? ?..???.rQ?? n(U. ???..???.?R?? ?( U@???..????? @1 ?@U.???..?...... ...............
3.1.8 Mini PCIe (Wifi) Test The command used to test 3G module is as follows, the supported module P/N is EWM-C106FT01E. #ifconfig wlan0 up #wpa_passphrase "$ESSID" "$PASS" > /tmp/wpa.conf (note: put $ESSID and $PASS with exact essid and pass phrase) #wpa_supplicant -BDwext -iwlan0 -c/tmp/wpa.conf #dhclient wlan0 3.1.9 CAN Test Step 1: Check CAN network device #dmesg | grep can vcan: Virtual CAN interface driver flexcan netdevice driver flexcan imx6q-flexcan.
Please follow below instructions to test OpenGL on ROM-5420 platform: Step 1: Change path to /opt/viv_samples/vdk #cd /opt/viv_samples/vdk #ls tutorial* tutorial1 tutorial2_es20 tutorial4 tutorial5_es20 tutorial1_es20 tutorial3 tutorial4_es20 tutorial6 tutorial2 tutorial3_es20 tutorial5 tutorial7 Step 3: Run tutorial3_es20 for OpenGL ES 2.0 A ball made of a mirroring material and centered at the origin spins about its Y-axis and reflects the scene surrounding it. #./tutorial3_es20 3.1.
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) If you would like to config IP manually, please use the command below: #ifconfig eth0 xxx.xxx.xxx.xxx up Here is a real case for your reference.The hosts(ROM-5420) IP is 172.17.21.97; the target(A desktop computer) IP is 172.17.20.
UART: UART: UART: UART: undefined, undefined, undefined, undefined, Port: Port: Port: Port: 0x0000, 0x0000, 0x0000, 0x0000, IRQ: IRQ: IRQ: IRQ: 59 60 61 62 Software Functionality 3.1.13.1 UART2 Testing #stty -F /dev/ttymxc1 -echo #cat /dev/ttymxc1 & #echo hello > /dev/ttymxc1 Hello Chapter 3 /dev/ttymxc1, /dev/ttymxc2, /dev/ttymxc3, /dev/ttymxc4, 3.1.13.2 UART3 Testing #stty -F /dev/ttymxc2 -echo #cat /dev/ttymxc2 & #echo hello > /dev/ttymxc2 Hello 3.1.13.
3.1.15 Audio Test Execute the following commands to run the Audio demo application on ROM-5420. #cd /unit_tests #aplay audio8k16S.wav Then you can hear the music from speaker/head-sets. 3.1.16 Photo Demo Test Execute the following commands to run the Photo demo application on ROM-5420. #cd /tools #./fbv Advantech.jpg Then you can see the photo demo on the default display screen. 3.1.17 Camera Input Test Execute the following commands to run the camera demo application on ROM-5420. 3.1.17.
Execute the following commands to run the battery application on ROM-5420. Read mV # i2cset -f -y 4 0x30 0x82 0x05 # RAWDATA=`i2cget -f -y 4 0x30 0x80 w` # echo $((RAWDATA % 256 * 256 + RAWDATA / 256))mV Chapter 3 ROM-5420 platform is an embedded system with Linux kernel 3.0.35 inside. It contains all system-required shell commands and drivers ready for ROM-5420 platform. We do not offer IDE developing environment in ROM-5420 BSP, users can evaluate and develop under Ubuntu 10.
3.2 Package Content We would offer you two different kinds of Linux package for ROM-5420. One is prebuilt system image for system recovery another is source code package (BSP). 3.2.1 Source Code Package ROM-5420 source code package (BSP) contains cross compiler, Linux source code, Uboot source code, root file system and some scripts used in OS development. Some of above components are developed by Advantech and the others are developed by open source community.
3.2.1.3 image This folder includes uImage & u-boot. 3.2.1.4 image/rootfs Linux adopts Hierarchical File System (HFS), image/rootfs is the Linux file system in highest level of the tree structure. – bin → Common programs, shared by the system, the system administrator and the users. – dev → Contains references to all the CPU peripheral hardware, which are represented as files with special properties.
– mksd-linux.sh → A script to setup up a bootable SD card if users build their images 3.2.1.6 source This folder contains sub-directories “linux-3.0.35” and “u-boot-2009.08”. They are the source codes of the Linux kernel and U-boot. Linux is a clone of the operating system UNIX.
All instructions in this guide are based on Ubuntu 10.04 LTS developing environment. Please install the Ubuntu 10.04 LTS at your PC/NB in advance. Advantech offer you a script to setup the developing environment quickly. You can refer following steps to setup your developing environment: 1. Open "Terminal" on Ubuntu 10.04 LTS. 2. $sudo su (Change to “root” authority) 3. Input user password 4. Change directory to BSP's scripts folder 5. #. setenv.sh (To configure the developing environment automatically) 6.
Note! You have to wrap “setenv.sh” once you open a new "Terminal" utility every time. (i.e. #source setenv.sh) Note! It is suggested to change to “root” authority to use the source code. 3.4 Build Instructions This section will guide you how to build the u-boot & Linux kernel. 3.4.1 Build u-boot Image Advantech has written a script to build the u-boot quickly. You can build u-boot image by follow below steps: 1. Open "Terminal" on Ubuntu 10.04 LTS 2. $sudo su (Change to “root” authority) 3.
This section will guide you how to use the Linux source code. You will see some examples of using BSP source code in this section. 3.5.1 Add a Driver to Kernel by menuconfig Figure 3.1 Linux Kernel Configuration 27 ROM-5420 User Manual Software Functionality You can add a driver to kernel by menuconfig. Here is an example to guide you how to add a RTC driver (Seiko Instruments S-35390A) to Linux kernel. Please refer to the following steps: 1. Open "Terminal" on Ubuntu 10.04 LTS. 2.
8. Select “Device Drivers”→”Real Time Clock”, you will see an option “Seiko Instruments S-35390A” on the list. Choose this option then exit and save your configuration. Figure 3.2 Selecting Seiko Instruments S-35390A 9. Change directory to “source/linux-3.0.35/arch/arm/mach-mx6”, edit the “boardmx6q_ROM-5420.h” and “board-mx6q_advantech.c”. Please add below codes to source/linux-3.0.35/arch/arm/mach-mx6/boardmx6q_ROM-5420.
By default, ROM-5420 shows a boot logo when booting up. You can replace the logo to whatever your want by following below steps: 1. You have to download “netpbm” corresponding to your OS version from internet first, 2. Install “netpbm” by typing $sudo apt-get install netpbm. 3. Prepare your boot logo. For example: bootlogo.png (Under folder Desktop/bootlogo) This picture should be in PNG format and less than 224 colors. It is suggested to have the image resolution equal to your LCD panel size. 4. 5. 6. 7.
2. Insert this Linux system SD card to ROM-DB7500 and connect serial console. 3. On ROM-5420 platform, type #root (Login) 4. On ROM-5420 platform, type #cd /mk_inand 5. On ROM-5420 platform, type #./mkinand-linux.sh /dev/mmcblk0 6. On ROM-5420 platform, type “y “(Start to copy files, wait until it shows [Done]) 7. Power off and remove this SD card. Then you can boot from onboard flash without SD card. 3.6.
#. setenv.sh (To configure the developing environment automatically) #cd ../source #mkdir helloworld (Create your own work directory on the Desktop) #cd helloworld (Enter the work directory) #gedit helloworld.c (Create a new C source file) Edit the helloworld.c with the following source code: 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. Save the file and exit. #$CC -o helloworld helloworld.c (To compile helloworld.c) Then you can see “helloworld” in current directory.
if (sleep_sec <= 0) { sleep_sec = 1; printf("correct 0 or negative sleep time to %d seconds\n", sleep_sec); } test = atoi(argv[3]); printf("Starting wdt_driver (timeout: %d, sleep: %d, test: %s)\n", timeout, sleep_sec, (test == 0) ? "ioctl" : "write"); fd = open("/dev/watchdog", O_WRONLY); if (fd == -1) { perror("watchdog"); exit(1); } printf("Trying to set timeout value=%d seconds\n", timeout); ioctl(fd, WDIOC_SETTIMEOUT, &timeout); printf("The actual timeout was set to %d seconds\n", timeout); ioctl(fd, W
Please see GPIO initial code listed below. Below code is to assign the starting value to GPIO variable. 3.8.4 RS232 Initial Code The RS232 initial code as below. It shows you how to initial COM2 ports. int open_port(void) { int fd; fd=open("/dev/ttymxc1",O_RDWR|O_NOCTTY|O_NDELAY); if(fd == -1){ perror("open error"); } return(fd); } 3.8.5 Display Output Setting 3.8.5.
220, 40, 21, 7, 60, 10, 0, FB_VMODE_NONINTERLACED, FB_MODE_IS_DETAILED,}, } The definition of fb_videomode in linux-3.0.35/include/linux/fb.h: The name field is optional. If you input this value, it can be used in U-Boot environment settings. The refresh field is the screen refresh frame rate, such as 60Hz, 70Hz. The resolution can be filled in the xres & yres fields. The pixel clock (pixclock) is equaled to 1012/(Total horizontal line * Total vertical line * DCLK).
LVDS 2(Split) out, please set in u-boot as below: setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/ mmcblk1p1 rootwait rw video=mxcfb0:dev=ldb,1920x1080M@60,if=RGB24 ldb=sin1' setenv bootargs_mmc 'setenv bootargs ${bootargs} root=/dev/mmcblk1p1 rootwait setenv bootargs_base 'setenv bootargs console=ttymxc0,115200 enable_wait_mode=off video_mode=extension' For display interface clock, there are several options (Independently for each port) listed below: 1.
-v be more verbose for some error conditions interface The name of the interface. This is usually a driver name followed by a unit number, for example eth0 for the first Ethernet interface. If your kernel supports alias interfaces, you can specify them with eth0:0 for the first alias of eth0. You can use them to assign a second address. To delete an alias interface use ifconfig eth0:0 down. Note: for every scope (i.e.
Chapter 4 4 System Recovery This chapter introduces how to recover Linux operating system if it is damaged accidentally.
4.1 System Recovery This section provides detail procedures of restoring the eMMC image. You can do system recovery following these steps if you destroy onboard flash image by accident. 1. Copy “5420LIVxxxx.tar.bz2” package to your desktop. 2. Open "Terminal" on Ubuntu 10.04 LTS. 3. $sudo su (Change to “root” authority) 4. Input your password. 5. #cd Desktop/ 6. #tar xvf 7420LIVxxxx.tar.bz2 (Unzip files) 7. Insert one SD card to your developing computer 8. Check the SD card location, like /dev/sdf 9. #cd .
Chapter 5 5 Advantech Services This chapter introduces Advantech design in serviceability, technical support and warranty policy for ROM-5420 evaluation kit.
5.1 RISC Design-in Services Advantech RISC Design-in Services help customers to reduce the time and work involved with designing new carrier boards. We handle the complexities of technical research and greatly minimize the development risk associated with carrier boards. Easy Development Advantech has support firmware, root file-system, BSP or other develop tools for customers. It helps customers to easy develop their carrier board and differentiate their embedded products and applications.
With the spread of industrial computing, a whole range of new applications have been developed, resulting in a fundamental change in the IPC industry. In the past System Integrators (SI) were used to completing projects without outside assistance but now such working models have moved on. Due to diverse market demands and intense competition, cooperation for (both upstream and downstream) vertical integration has become a much more effective way to create competitive advantages.
In view of this, Advantech proposed the concept of Streamlined Design-in Support Services for RISC-based Computer On Modules (COM). With a dedicated professional design-in services team, Advantech actively participates in carrier board design and problem solving. Our services not only enable customers to effectively distribute their resources but also reduce R&D manpower cost and hardware investment.
5.2 Contact Information Below is the contact information for Advantech customer service Region/Country Contact Information America 1-888-576-9688 Brazil 0800-770-5355 Mexico 01-800-467-2415 Europe (Toll Free) 00800-2426-8080 Singapore & SAP 65-64421000 Malaysia 1800-88-1809 Australia (Toll Free) 1300-308-531 China (Toll Free) 800-810-0345 800-810-8389 Sales@advantech.com.
5.3 Technical Support and Assistance For more information about this and other Advantech products, please visit our website at: http://www.advantech.com/ http://www.advantech.com/ePlatform/ For technical support and service, please visit our support website at: 1. Visit the Advantech web site at www.advantech.com/support where you can find the latest information about the product. 2.
Chapter 5 Advantech Services ROM-5420 User Manual 45
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.