IBASE Technology MRS-801-RE User Manual

8 inch risc-based power-over-ethernet panel pc

Advertisement

Quick Links

www.ibase.com.tw
MRS-801-RE
User Manual
IBASE Technology Inc.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MRS-801-RE and is the answer not in the manual?

Questions and answers

Summary of Contents for IBASE Technology MRS-801-RE

  • Page 1 MRS-801-RE User Manual IBASE Technology Inc.
  • Page 2 MRS-801-RE User Manual Revision Release Date V0.1 2014/09/24 V0.2 2017/11/10 Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 3 MRS-801-RE User Manual Copyright © 2013 IBASE Technology Inc. All Rights Reserved. No part of this manual, including the products and software described in it, may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language in any form or by any means, except documentation kept by the purchaser for backup purposes, without the express written permission of IBASE Technology INC.
  • Page 4: Table Of Contents

    MRS-801-RE User Manual Table of Contents Setting up your system..................iii Care during use ....................iv Acknowledgments ....................v CHAPTER 1 INTRODUCTION ..................1 1.1 General Description ..................1 1.2 System Specification ..................2 1.2.1 Hardware Specifications ................2 1.2.2 Dimensions ....................3 1.2.3 I/O View ....................
  • Page 5: Setting Up Your System

    IBASE Technology Inc. Safety Information Your MRS-801-RE is designed and tested to meet the latest standards of safety for information technology equipment. However, to ensure your safety, it is important that you read the following safety instructions Setting up your system ...
  • Page 6: Care During Use

    MRS-801-RE User Manual Care during use  Do not walk on the power cord or allow anything to rest on it.  Do not spill water or any other liquids on your system.  When the system is turned off, a small amount of electrical current still flows.
  • Page 7: Acknowledgments

    FINTEK is a registered trademark of FINTEK Electronics Corporation.  REALTEK is a registered trademark of REALTEK Electronics Corporation.  All other product names or trademarks are properties of their respective owners. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 9: Chapter 1 Introduction

    It has one Gigabit Ethernet LAN PoE, an RS-232/485 port and USB OTG that are well suited for industrial applications. The unit is equipped with 5-side IP65 protection. It supports Linux 3.x and Android 4.x. The MRS-801-RE supports 12V DC single power input.
  • Page 10: System Specification

    MRS-801-RE User Manual 1.2 System Specification 1.2.1 Hardware Specifications Model Name MRS-801-RE System Mainboard IB102 Freescale I.MX6 Cortex A9 Solo (1 Cores @ 1GHz) Memory 1GB DDR3 memory 1x USB (USB Host. A-Type) 1x USB OTG (mini USB B Type)
  • Page 11: Dimensions

    IBASE Technology Inc. 1.2.2 Dimensions MRS-801-RE Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 12: I/O View

    MRS-801-RE User Manual 1.2.3 I/O View 1.3 Packing List Part No. Description Quantity 60W power adaptor 1 pc...
  • Page 13: Installation

    IBASE Technology Inc. 1.4 Installation 1.4.1 Installing wall mount 1. Loosen one screw and then replace the mounting bracket. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 14 MRS-801-RE User Manual 2. Install the mounting bracket on the wall. 3. Hang up the MRS-801-RE on the wall and twist one screw as shown.
  • Page 15: Chapter 2 Motherboard Introduction

    LEDs light bar x 1 (3xGPIO pin control Red, Orange and Green) Operating 0~60 degree Temperature SW Support 1. Ubuntu Linux 11.10 ( kernel 3.0) 2. Android 4.3 This specification is subject to change without prior notice. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 16 MRS-801-RE User Manual I/O View Board Dimensions...
  • Page 17: Setting Jumpers

    Contact your supplier if you have doubts about the best configuration for your needs. The following lists the connectors on IB102 and their respective functions. Jumper Locations on IB102 Top Side Bottom Side Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 18 MRS-801-RE User Manual JP1: Touch Pad Wire Setting 2.0mm Setting Function Pin 1-2 Short/Open 4 or 8 wire/5 wire (Default) Pin 3-4 Short/Open 4 or 8 wire/5 wire (Default) Pin 5-6 Short/Open 4 or 8 wire/5 wire (Default) JP2: Touch USB/UART Mode Setting 2.0mm...
  • Page 19 IBASE Technology Inc. JP3: Program Interface (E-CALL 0519-03-2161-120) (Factory use only) JP4: System reset/GPIO Mode Setting 2.0mm Setting Function Pin 1-2 Short/Closed GPIO Pin 2-3 Short/Closed System Reset (Default) Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 20 MRS-801-RE User Manual JP5, SW4 (S2): RS-232/422/485 Mode Selection 2.0mm COM1 Mode SW4 (S2) RS-232 Off (Default) 2-3 Short (Default) RS-485 2-3 Short RS-422 1-2 Short SW4 (S1): RS-422/485 Device Termination Selection SW4 (S1) Device Mode None Terminal (Default) Terminal...
  • Page 21 J2: BL Voltage Setting 2.0mm Setting Panel Voltage 5V (default) Pin 1-2 Short/Closed Pin 2-3 Short/Closed J3: BL ADJ Level Setting 2.0mm Setting Panel Voltage Pin 1-2 Short/Closed Pin 2-3 Short/Closed 3.3V (default) Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 22 MRS-801-RE User Manual J4: LVDS Panel Power Selection 2.0mm Setting Panel Voltage Pin 1-2 Short/Closed Pin 2-3 Short/Closed 3.3V (default)
  • Page 23: Connectors On Ib102

    IBASE Technology Inc. 2.3 Connectors on IB102 CN1: SD Card Connector CN2: Capacitor Touch Connector (ENTERY 7083K-F12N-04L) Pin # Signal Name 3.3V 3.3V Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 24 MRS-801-RE User Manual CN3: USB 2.0 Connector CN4: 10/100/1000Mb LAN (PoE+ supported) This RJ45 LAN connector supports PoE+ function.
  • Page 25 COM1 is jumper less for RS-232, RS-422 and RS-485 and configured with SW4 (S2) and JP5 Selection. Pin # Signal Name RS-232 R2-422 RS-485 Ground Ground Ground Ground Ground Ground DATA+ DATA- Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 26 MRS-801-RE User Manual CN7: +12V DC-IN Power Connector CN8: Mini USB OTG Connector Pin # Signal Name Note: CN8 will be used for USB device when ID is floating.
  • Page 27 IBASE Technology Inc. CN9: LVDS Connector (HRS DF19G-30P-1H(54) ) Pin # Signal Name LCD_VDD LCD_VDD TX0- TX0+ TX1- TX1+ TX2- TX2+ CLK- CLK+ TX3- TX3+ BKLT_ADJ BKLT_EN BKLT_VCC BKLT_VCC BKLT_VCC Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 28 MRS-801-RE User Manual J1: Mic Connector (WT04M-30003-02032) Pin # Signal Name MIC Input J5: COM2 RS232 Connector, Debug Port Connector 2.0mm (Factory use only) Pin # Signal Name COM2 RXD, Receive Data COM2 TXD, Transmit Data...
  • Page 29 IBASE Technology Inc. J7: Resistive Touch Panel Connector 2.5mm Pin # Signal Name Touch XP Touch XM Touch SG Touch YP Touch YM J8: Mini PCI-E Connector Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 30 MRS-801-RE User Manual J10: Digital In/Out Connector 2.0mm Signal Name Pin # Pin # Signal Name 3.3V GPIO2 GPIO1 GPIO5 GPIO3 GPIO8 GPIO7 Reset GPIO9 Watch Dog GPIO10 GPIO11 GPIO12 J11: USB2.0 Connector (JST B4B-PH-K-S) Pin # Signal Name...
  • Page 31 IBASE Technology Inc. J12: Speaker Right-Out Connector (WT04M-30003-02032) Pin # Signal Name SPEAKER_RIGHT+ SPEAKER_RIGHT- J13: Speaker Left-Out Connector (WT04M-30003-02032) Pin # Signal Name SPEAKER_LEFT- SPEAKER_LEFT+ SW3: System Reset Button Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 32: Chapter 3 Software Setup

    MRS-801-RE User Manual CHAPTER 3 Software SETUP Basically, the IB102 is preloaded O.S (Android / Linux) into eMMC by default. Connect the 8” LVDS panel (optional) with IB102, and 12V/ POE+ power directly. 3.1 Make a Recovery SD Card (for advanced user only) For advanced user who has Ibase standard image file, refer to this chapter to prepare the recovery boot-up SD card.
  • Page 33 And then, flash the Android/ Linux image into your SD card in your PC (Windows). 6. Please check insert (special COM1 RJ45 dongle, pin3 short to pin10, this dongle is for IB102 only) and make sure it can boot from SD Card by checking item8. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 34 MRS-801-RE User Manual --- Boot Up with IB102--- Please double check the Boot device selection before powering on. IB102, by default, is set to boot up from eMMC. Insert the SD card/MicroSD into the motherboard. Make sure the 8” panel (or your own panel) is connected and connect the power supply to boot up the system.
  • Page 35: Parameter Setting On U-Boot

    Board.COM1.Tx1 is connected to PC.COM.Rx ; Board.COM1.Rx1 to PC.COM.Tx) J5: COM2 RS232 Connector, Debug Port Connector (Factory use only) Pin # Signal Name COM2 RXD, Receive Data COM2 TXD, Transmit Data Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 36 MRS-801-RE User Manual 3.2.2 Display setting command For Android (for advanced software engineers only) With the debug port, follow the reference command examples to help you to be familiar with display modification. Select boot device: MX6SDL SABREDS U-BOOT > setenv bootcmd “booti mmcX”...
  • Page 37 Command to set the boot device Carrier SD : root=/dev/mmcblk1p1 Note: (remember to save the environment and reboot with the following command) MX6SDL SABREDS U-BOOT > saveenv MX6SDL SABREDS U-BOOT > boot Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 38: Chapter 4 Bsp User Guide ( For Advanced Software Engineer Only )

    MRS-801-RE User Manual CHAPTER 4 BSP User Guide ( for advanced software engineer only ) This Chapter is an example only, and it is mainly for advanced SW engineers to build the image for IBASE ARM PCB. Any other modification, new device or driver should be handled carefully.
  • Page 39 IBASE Technology Inc. mkdir -p /opt/freescale/usr/local/ cd /opt/freescale/usr/local/ tar xvf ~/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12.tgz Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 40 MRS-801-RE User Manual...
  • Page 41: Building U-Boot

    IBASE Technology Inc. 4.1.3 Building u-boot # Assume your linux BSP u-boot source is at~/linux_bsp/u-boot_2009_08/DL/u-boot cd ~/linux_bsp/u-boot_2009_08/DL/u-boot make ARCH=arm CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-lin aro-toolchain/bin/arm-none-linux-gnueabi- distclean Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 42 MRS-801-RE User Manual make ARCH=arm CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-lin aro-toolchain/bin/arm-none-linux-gnueabi- mx6solo_sabresd_config...
  • Page 43 IBASE Technology Inc. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 44 MRS-801-RE User Manual make ARCH=arm CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-lin aro-toolchain/bin/arm-none-linux-gnueabi- Note: **** If the building process is successful, u-boot.bin file will be generated. ****...
  • Page 45 IBASE Technology Inc. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 46: Building Kernel

    MRS-801-RE User Manual 4.1.4 Building kernel # Assume your linux kernel source is at ~/linux_bsp/kernel-3.0.35 cd ~/linux_bsp/kernel-3.0.35 make ARCH=arm clean make ARCH=arm CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib- 2011.12/fsl-linaro-toolchain/bin/arm-none-linux-gnueabi- uImage...
  • Page 47 IBASE Technology Inc. **** If the building process is successful, uImage file will be generated under arch/arm/boot directory. **** Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 48 MRS-801-RE User Manual...
  • Page 49: Copying U-Boot, Kernel To Sd Card

    First, a partition table must be created. If a partition already exists and it is big enough for the file system you want to deploy, then you can skip this step. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 50 MRS-801-RE User Manual To create a partition, at offset 16384 (in sectors of 512 bytes) enter the following command: sudo fdisk /dev/sdb NOTE On most Linux host operating systems, SD card will be mounted automatically upon insertion. Therefore, before running fdisk, please make sure that SD card is unmounted (via 'sudo umount /dev/sdb').
  • Page 51 IBASE Technology Inc. sudo umount /dev/sdb1 Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 52 MRS-801-RE User Manual sudo mkfs.ext4 /dev/sdb1...
  • Page 53 Copy the target file system to SD card partition by extracting rootfs package to mounted directory: (assume compressed root file system is F600_linux_fs.tgz) mkdir /tmp/SD sudo mount /dev/sdb1 /tmp/SD cd /tmp/SD Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 54 MRS-801-RE User Manual tar xvf ~/linux_bsp/F600_linux_fs.tgz...
  • Page 55 IBASE Technology Inc. Copying the file system takes several minutes. The file system content is now on the media. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 56: Booting With Your Sd Card

    MRS-801-RE User Manual 4.1.7 Booting with your SD card (For advance software users only) Put SD card in your board and insert special COM port dongle to boot from SD. Connect a debug cable to debug port with serial port 115200/N/8/1 setting on your PC’s serial port program such hyperterminal/teraterm.
  • Page 57: Appendix A- I2C, Gpio, Watchdog Reference Code Coding

    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #include <sys/ioctl.h> #include <errno.h> #include <string.h> #include <stdio.h> #include <stdlib.h> Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 58 MRS-801-RE User Manual #include <unistd.h> #include <linux/i2c-dev.h> #include "i2cbusses.h" #include "util.h" #include "../version.h" static void help(void) __attribute__ ((noreturn)); static void help(void) fprintf(stderr, "Usage: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]\n" " I2CBUS is an integer or an I2C bus name\n"...
  • Page 59 "not seem to support PEC\n"); return 0; static int confirm(const char *filename, int address, int size, int daddress, int pec) int dont = 0; fprintf(stderr, "WARNING! This program can confuse your I2C " Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 60 MRS-801-RE User Manual "bus, cause data loss and worse!\n"); /* Don't let the user break his/her EEPROMs */ if (address >= 0x50 && address <= 0x57 && pec) { fprintf(stderr, "STOP! EEPROMs are I2C devices, not " "SMBus devices. Using PEC\non I2C devices may "...
  • Page 61 'y': yes = 1; break; default: fprintf(stderr, "Error: Unsupported option " "\"%s\"!\n", argv[1+flags]); help(); exit(1); flags++; if (version) { fprintf(stderr, "i2cget version %s\n", VERSION); exit(0); if (argc < flags + 3) help(); Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 62 MRS-801-RE User Manual i2cbus = lookup_i2c_bus(argv[flags+1]); if (i2cbus < 0) help(); address = parse_i2c_address(argv[flags+2]); if (address < 0) help(); if (argc > flags + 3) { size = I2C_SMBUS_BYTE_DATA; daddress = strtol(argv[flags+3], &end, 0); if (*end || daddress < 0 || daddress > 0xff) { fprintf(stderr, "Error: Data address invalid!\n");...
  • Page 63 = i2c_smbus_read_word_data(file, daddress); break; default: /* I2C_SMBUS_BYTE_DATA */ res = i2c_smbus_read_byte_data(file, daddress); close(file); if (res < 0) { fprintf(stderr, "Error: Read failed\n"); exit(2); printf("0x%0*x\n", size == I2C_SMBUS_WORD_DATA ? 4 : 2, res); exit(0); Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 64 MRS-801-RE User Manual i2cset.c i2cset.c - A user-space program to write an I2C register. Copyright (C) 2001-2003 Frodo Looijaard <frodol@dds.nl>, and Mark D. Studebaker <mdsxyz123@yahoo.com> Copyright (C) 2004-2012 Jean Delvare <jdelvare@suse.de> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation;...
  • Page 65 (size) { case I2C_SMBUS_BYTE: if (!(funcs & I2C_FUNC_SMBUS_WRITE_BYTE)) { fprintf(stderr, MISSING_FUNC_FMT, "SMBus send byte"); return -1; break; case I2C_SMBUS_BYTE_DATA: if (!(funcs & I2C_FUNC_SMBUS_WRITE_BYTE_DATA)) { fprintf(stderr, MISSING_FUNC_FMT, "SMBus write byte"); return -1; Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 66 MRS-801-RE User Manual break; case I2C_SMBUS_WORD_DATA: if (!(funcs & I2C_FUNC_SMBUS_WRITE_WORD_DATA)) { fprintf(stderr, MISSING_FUNC_FMT, "SMBus write word"); return -1; break; case I2C_SMBUS_BLOCK_DATA: if (!(funcs & I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)) { fprintf(stderr, MISSING_FUNC_FMT, "SMBus block write"); return -1; break; case I2C_SMBUS_I2C_BLOCK_DATA: if (!(funcs & I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)) { fprintf(stderr, MISSING_FUNC_FMT, "I2C block write");...
  • Page 67 == I2C_SMBUS_BYTE_DATA ? "byte" : "word"); if (pec) fprintf(stderr, "PEC checking enabled.\n"); fprintf(stderr, "Continue? [%s] ", dont ? "y/N" : "Y/n"); fflush(stderr); if (!user_ack(!dont)) { fprintf(stderr, "Aborting on user request.\n"); return 0; Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 68 MRS-801-RE User Manual return 1; int main(int argc, char *argv[]) char *end; const char *maskp = NULL; int res, i2cbus, address, size, file; int value, daddress, vmask = 0; char filename[20]; int pec = 0; int flags = 0; int force = 0, yes = 0, version = 0, readback = 0;...
  • Page 69 = argv[flags+4][1] == 'p'; } else { size = I2C_SMBUS_BYTE_DATA; } else { /* All other commands */ if (strlen(argv[argc-1]) > 2 || (strlen(argv[argc-1]) == 2 && argv[argc-1][1] != 'p')) { Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 70 MRS-801-RE User Manual fprintf(stderr, "Error: Invalid mode '%s'!\n", argv[argc-1]); help(); switch (argv[argc-1][0]) { case 'b': size = I2C_SMBUS_BYTE_DATA; break; case 'w': size = I2C_SMBUS_WORD_DATA; break; case 's': size = I2C_SMBUS_BLOCK_DATA; break; case 'i': size = I2C_SMBUS_I2C_BLOCK_DATA; break; default: fprintf(stderr, "Error: Invalid mode '%s'!\n", argv[argc-1]);...
  • Page 71 = -1; break; default: value = -1; break; if (maskp) { vmask = strtol(maskp, &end, 0); if (*end || vmask == 0) { fprintf(stderr, "Error: Data value mask invalid!\n"); help(); Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 72 MRS-801-RE User Manual if (((size == I2C_SMBUS_BYTE || size == I2C_SMBUS_BYTE_DATA) && vmask > 0xff) || vmask > 0xffff) { fprintf(stderr, "Error: Data value mask out of range!\n"); help(); file = open_i2c_dev(i2cbus, filename, sizeof(filename), 0); if (file < 0 || check_funcs(file, size, pec) || set_slave_addr(file, address, force)) exit(1);...
  • Page 73 = i2c_smbus_write_byte(file, daddress); break; case I2C_SMBUS_WORD_DATA: res = i2c_smbus_write_word_data(file, daddress, value); break; case I2C_SMBUS_BLOCK_DATA: res = i2c_smbus_write_block_data(file, daddress, len, block); break; case I2C_SMBUS_I2C_BLOCK_DATA: res = i2c_smbus_write_i2c_block_data(file, daddress, len, block); break; Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 74 MRS-801-RE User Manual default: /* I2C_SMBUS_BYTE_DATA */ res = i2c_smbus_write_byte_data(file, daddress, value); break; if (res < 0) { fprintf(stderr, "Error: Write failed\n"); close(file); exit(1); if (pec) { if (ioctl(file, I2C_PEC, 0) < 0) { fprintf(stderr, "Error: Could not clear PEC: %s\n", strerror(errno));...
  • Page 75 #include <sys/stat.h> #include <sys/param.h> /* for NAME_MAX */ #include <sys/ioctl.h> #include <string.h> #include <strings.h> /* for strcasecmp() */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <limits.h> #include <dirent.h> #include <fcntl.h> #include <errno.h> Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 76 MRS-801-RE User Manual #include "i2cbusses.h" #include <linux/i2c-dev.h> enum adt { adt_dummy, adt_isa, adt_i2c, adt_smbus, adt_unknown }; struct adap_type { const char *funcs; const char* algo; static struct adap_type adap_types[5] = { { .funcs = "dummy", .algo = "Dummy bus", }, { .funcs...
  • Page 77 If not, we allocate more later as needed. */ #define BUNCH /* n must match the size of adapters at calling time */ static struct i2c_adap *more_adapters(struct i2c_adap *adapters, int n) Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 78 MRS-801-RE User Manual struct i2c_adap *new_adapters; new_adapters = realloc(adapters, (n + BUNCH) * sizeof(struct i2c_adap)); if (!new_adapters) { free_adapters(adapters); return NULL; memset(new_adapters + n, 0, BUNCH * sizeof(struct i2c_adap)); return new_adapters; struct i2c_adap *gather_i2c_busses(void) char s[120]; struct dirent *de, *dde;...
  • Page 79 = strcpy(all + len_name + len_type, algo); count++; fclose(f); goto done; /* look in sysfs */ /* First figure out where sysfs was mounted */ if ((f = fopen("/proc/mounts", "r")) == NULL) { goto done; Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 80 MRS-801-RE User Manual while (fgets(n, NAME_MAX, f)) { sscanf(n, "%*[^ ] %[^ ] %[^ ] %*s\n", sysfs, fstype); if (strcasecmp(fstype, "sysfs") == 0) { foundsysfs++; break; fclose(f); if (! foundsysfs) { goto done; /* Bus numbers in i2c-adapter don't necessarily match those in i2c-dev and what we really care about are the i2c-dev numbers.
  • Page 81 ((px = strchr(s, '\n')) != NULL) *px = 0; if (!sscanf(de->d_name, "i2c-%d", &i2cbus)) continue; if (!strncmp(s, "ISA ", 4)) { type = adt_isa; } else { /* Attempt to probe for adapter capabilities */ Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 82 MRS-801-RE User Manual type = i2c_get_funcs(i2cbus); if ((count + 1) % BUNCH == 0) { /* We need more space */ adapters = more_adapters(adapters, count + 1); if (!adapters) return NULL; adapters[count].nr = i2cbus; adapters[count].name = strdup(s); if (adapters[count].name == NULL) { free_adapters(adapters);...
  • Page 83 *i2cbus_arg) unsigned long i2cbus; char *end; i2cbus = strtoul(i2cbus_arg, &end, 0); if (*end || !*i2cbus_arg) { /* Not a number, maybe a name? */ return lookup_i2c_bus_by_name(i2cbus_arg); if (i2cbus > 0xFFFFF) { Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 84 MRS-801-RE User Manual fprintf(stderr, "Error: I2C bus out of range!\n"); return -2; return i2cbus; * Parse a CHIP-ADDRESS command line argument and return the corresponding * chip address, or a negative value if the address is invalid. int parse_i2c_address(const char *address_arg) long address;...
  • Page 85 */ if (ioctl(file, force ? I2C_SLAVE_FORCE : I2C_SLAVE, address) < 0) { fprintf(stderr, "Error: Could not set address to 0x%02x: %s\n", address, strerror(errno)); return -errno; return 0; i2cbusses.h Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 86 MRS-801-RE User Manual #ifndef _I2CBUSSES_H #define _I2CBUSSES_H #include <unistd.h> struct i2c_adap { int nr; char *name; const char *funcs; const char *algo; struct i2c_adap *gather_i2c_busses(void); void free_adapters(struct i2c_adap *adapters); int lookup_i2c_bus(const char *i2cbus_arg); int parse_i2c_address(const char *address_arg); int open_i2c_dev(int i2cbus, char *filename, size_t size, int quiet);...
  • Page 87 = fgetc(stdin); if (c == EOF) { ret = 0; break; s[0] = c; return ret; util - helper functions #ifndef _UTIL_H #define _UTIL_H extern int user_ack(int def); #endif /* _UTIL_H */ Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 88 MRS-801-RE User Manual Version.h #define VERSION "3.1.1"...
  • Page 89: How To Use Gpio In Linux

    > /sys/class/gpio/gpio32/direction echo 0 > /sys/class/gpio/gpio32/value echo 1 > /sys/class/gpio/gpio32/value # GPIO example 2: Input (take GPIO 32 as example) echo 32 > /sys/class/gpio/export echo in > /sys/class/gpio/gpio32/direction cat /sys/class/gpio/gpio32/value Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 90: How To Use Watchdog In Linux

    MRS-801-RE User Manual 1.2.3 How to use Watchdog in Linux #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> int main(void) int fd = open("/dev/watchdog", O_WRONLY); int ret = 0; if (fd == -1) { perror("watchdog"); exit(EXIT_FAILURE); while (1) { ret = write(fd, "\0", 1);...
  • Page 91: Appendix B: How To Flash The Image To Emmc

    #sudo fdisk –l Flash Module eMMC: # cd flash_emmc/rp100_emmc # ./fsl-sdcard-partition.sh –f /dev/mmcblk0 Remember to remove the special dongle, then, you can boot from eMMC (the IB102 default status) with the above concept. Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 92: Appendix C - Adb Configuration (For Android Only)

    MRS-801-RE User Manual Appendix C – ADB configuration (For Android only) Update the ADB configuration to scan for the new vendor ID. Below are the steps to update the ADB configuration for Windows PC. These steps (and the steps for Linux PC as well) can also be found in the R10,3.x user guide.
  • Page 93 IBASE Technology Inc. 8. Finally, test your ADB connection C:\Program Files\Android\android-sdk\platform-tools> adb devices List of devices attached 0123456789ABCDEF device Copyright © 2013 IBASE Technology Inc. All Rights Reserved.
  • Page 94: Appendix D -Useful Links

    MRS-801-RE User Manual Appendix D –Useful links For more information about Android, please visit: http://developer.android.com/index.html For more information Freescale i.MX6 CPU , please visit: http://www.freescale.com/webapp/sps/site/homepage.jsp?code=IMX_H...

Table of Contents