Hide thumbs Also See for SBC6845:

Advertisement

Quick Links

Single
Single
Single
Single Board
User
User
User
User Manual
SBC6845
SBC6845
SBC6845
SBC6845
Board
Board
Board Computer
Manual
Manual
Manual
(For
(For
Linux
Linux
System)
System)
(For
(For Linux
Linux System)
System)
Computer
Computer
Computer
Version 1.1 – Jan.11.2013

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SBC6845 and is the answer not in the manual?

Questions and answers

Summary of Contents for Embest SBC6845

  • Page 1 SBC6845 SBC6845 SBC6845 SBC6845 Single Board Computer Single Board Computer Single Single Board Board Computer Computer User User Manual Manual User User Manual Manual (For (For Linux Linux System) System) (For (For Linux Linux System) System) Version 1.1 – Jan.11.2013...
  • Page 2 Copyright Statement: Statement: Statement: � SBC6845 and its related intellectual property are owned by Shenzhen Embest Technology Co., Ltd. � Shenzhen Embest Technology has the copyright of this document and reserves all rights. Any part of the document should not be modified, distributed or duplicated in any approach and form with the written permission issued by Embest Technology Co., Ltd.
  • Page 3: Table Of Contents

    Overview.......................................... 1 1 1 1 .......................................... 1.1 Introduction........................1 1.2 Packing List........................1 1.3 Product Features......................1 1.4 Components on SBC6845....................3 1.5 Hardware Dimensions.....................4 1.6 BSP Package in CD-ROM....................4 Chapter Chapter Chapter 2 2 2 2 System System...
  • Page 4 5.2.1 Preparations......................50 5.2.2 Burning Bootstrap File..................53 5.2.3 Burning U-boot File.................... 54 5.2.4 Burning Logo File....................55 5.2.5 Burning uImage File...................56 5.2.6 Burning Linux System..................57 5.3 Burning System Image Automatically................. 60 Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 5 Embest Technology iv iv iv iv Technical Technical Technical Technical Support Support Support Support and and Warranty Warranty Warranty Warranty..........................................................................62 Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 6: Packing List

    RS485), a CAN interface, an Ethernet interface, a high-speed USB host interface, a SD/MMC card interface and an audio output interface. SBC6845 is designed to satisfy the different requirements of various fields such as industrial control, intelligent instrumentation, data acquisition and analysis, medical products and network equipments.
  • Page 7 � A CAN 2.0 interface (isolated) � 2 USB 2.0 interfaces � A 10/100Mb Ethernet interface � A SD card slot (hot plugging) � Pins for SPI, I2C, PWM, ADC, Keypad and GPIO Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 8: 1-1 Components On Sbc6845

    Panel Panel Panel SPI&IIC&PWM&ADC SPI&IIC&PWM&ADC DEBUG&COM0&COM1&COM2(RS485)&COM DEBUG&COM0&COM1&COM2(RS485)&COM DEBUG&COM0&COM1&COM2(RS485)&COM 3 3 3 3 16 GPIO 16 GPIO SPI&IIC&PWM&ADC SPI&IIC&PWM&ADC DEBUG&COM0&COM1&COM2(RS485)&COM 16 GPIO 16 GPIO Figure Figure Figure Figure 1-1 1-1 Components on SBC6845 Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 9: Hardware Dimensions

    The CD-ROM provided along with SBC6845 contains a BSP package that helps development the Linux system. Users can make a custom system running on SBC6845 platform by utilizing the package. The table shown below lists out the contents of the BSP attached with the corresponding descriptions.
  • Page 10 GPIO Driver for 16 GPIO Driver for 10bit ADC Root Root Root Root YAFFS2 Readable and writable filesystem Filesystem Filesystem Filesystem Filesystem Graphic Graphic Graphic Graphic Version 4.4.2 Interface Interface Interface Interface Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 11: Testing

    System Boot-up Boot-up SBC6845 can support boot-up from Data Flash only. A default Linux system image has been burned in Data Flash when it is manufactured. If you need to update the image, please refer to the contents of Chapter 5 Updating Linux System.
  • Page 12: Example Applications

    Embest Technology 7 7 7 7 Figure Figure Figure Figure 2-2 2-2 Setting up HyperTerminal Now you can connect the power supply to SBC6845 and see the boot-up information displayed in HyperTerminal. Example Applications 2.2 Example Example Example Applications Applications...
  • Page 13: Lcd Color Testing

    Serial interface and RS485 testing evtest evtest evtest evtest Testing for buttons, keypad, touch-screen, etc. gpio gpio gpio gpio GPIO testing LCD testing LED testing Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 14 If you’d like to look into the details of how the programs are working, please view the source code under \Linux 2.6 Kit\01 SourceCode\application\ in the SBC6845’s CD-ROM. The tables listed below are the API functions called by some of the example applications we provided in the CD-ROM, as well as the descriptions attached to each function.
  • Page 15 Called by system to send data through serial interfaces fd (serial file descriptor) Parameters Parameters Parameters Parameters buf (pointer to the data about to be sent) nbytes (length of data about to be sent, Byte) Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 16 Acquire the logic level input on GPIO interfaces Parameters Parameters Parameters Parameters pin (GPIO pin name, e.g. “pb29” Returned Returned Value Value Returned Returned Value Value 0 or 1 for input level, other values for input failure Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 17 Testing 2.4 Starting Starting Testing Testing This section will show you how to use the example applications installed by default in the system to accomplish the testing of SBC6845’s functions. After you finish the System System Boot-up Boot-up configurations mentioned in 2.1 2.1 System...
  • Page 18 Note: � The IP in the above instructions are just examples. Please set IP address according to your network configurations and ensure that SBC6845 and your PC are set in the same network segment. The table shown below is the testing information in HyperTerminal window.
  • Page 19: Ethernet Testing

    SBC6845 integrates only one CAN bus, and therefore it needs to work with another SBC6845 or a CAN-enabled device to test the data transfer over CAN bus. The figure shown below illustrates the connections between SBC6845 and a CAN-enabled device.
  • Page 20 RS485 Bus Bus Testing Testing Testing Testing RS485 interface is associated to the device /dev/ttySAC2. Similar to CAN bus testing, two RS485-enabled devices are required to accomplish the testing as shown below. Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 21 (less than 300 meters) transmission can work well without terminal resistor. 2.4.9 Testing 2.4.9 2.4.9 2.4.9 USB USB Testing Testing Testing SBC6845 has a USB host interface. Please insert a flash disk and see the information in HyperTerminal window as shown below. Table Table 2-10 2-10 Connection Connection Information...
  • Page 22 View the contents of the flash disk; [root@SBC6845:/]# [root@SBC6845:/]# [root@SBC6845:/]# [root@SBC6845:/]# cd cd /mnt/ /mnt/ /mnt/ /mnt/ [root@SBC6845:/mnt]# [root@SBC6845:/mnt]# [root@SBC6845:/mnt]# ls ls ls ls [root@SBC6845:/mnt]# 3 3 3 3 ) Unmount the flash disk; [root@SBC6845:/mnt]# [root@SBC6845:/mnt]# cd / / / / [root@SBC6845:/mnt]# [root@SBC6845:/mnt]# cd [root@SBC6845:/]# [root@SBC6845:/]#...
  • Page 23 2.4.11 2.4.11 2.4.11 2.4.11 SD SD Card Card Card Card Testing Testing Testing Testing After inserting a SD card into the SD slot on SBC6845, HyperTerminal will display the following information; Table Table 2-11 2-11 Card Card Recognized Recognized Table...
  • Page 24 2.4.12 2.4.12 LED LED Testing Testing SBC6845 has 4 LED indicators, among them the D12 defined as system state indictor. The following testing is intended for the three LEDs except D12. 1 1 1 1 ) Test LEDs with application;...
  • Page 25: Gpio Testing

    GPIO GPIO Testing Testing Testing To test GPIO interfaces on SBC6845, you need to use jumper caps to short the pins of U57 connector on the board according to the following table and figure. (Please refer to 1.4 Components Components...
  • Page 26: Adc Testing

    The ADC input pin, which is named as PD27, can be found on U58 connector as shown Components Components SBC6845 SBC6845 below. (Please refer to 1.4 1.4 Components Components on on SBC6845 SBC6845 to locate the position of U58 connector which is marked as “SPI&IIC&PWM&ADC”) Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 27 This testing is intended for the button K1 and K2, which are marked as “User Key” in the figure shown in 1.4 1.4 Components Components Components Components on on SBC6845 SBC6845 SBC6845 SBC6845). Please execute the following instruction to conduct testing. [root@SBC6845:/]# [root@SBC6845:/]# /home/app/evtest /home/app/evtest /dev/event0 /dev/event0 [root@SBC6845:/]#...
  • Page 28: Button Testing

    2.4.17 Keypad Keypad Keypad Keypad Testing Testing Testing Testing Please connect a 6X6 matrix keypad to U56 interface on SBC6845 and then execute the following instruction to conduct testing. (Please refer to 1.4 1.4 Components Components Components Components on on SBC6845...
  • Page 29: Keypad Testing

    Telnet Telnet Telnet Login Login Login Login Testing Testing Testing Testing Please use a network cable to connect SBC6845 to your LAN and then follow the steps listed below to complete testing. Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 30 Figure Figure Figure Figure 2-7 2-7 Open Command Line Window 2 2 2 2 ) Enter “ping 192.192.192.211 (the default IP address of SBC6845) as shown below to test network connection; Figure Figure Figure Figure 2-8 2-8 Testing Network Connection Copyright ©...
  • Page 31 Embest Technology 26 26 26 26 3 3 3 3 ) telnet telnet Execute command telnet telnet to initiate a session with SBC6845 as shown below; Figure Figure Figure Figure 2-9 2-9 Initiating Telnet Session 4 4 4 4 )...
  • Page 32 Programs > Programs and Features > Turn Windows features on or off, and then check “Telnet Client” to enable it. � The default IP address of SBC6845 is 192.192.192.211. Please ensure that the board and your PC are set in the same network segment.
  • Page 33 Now the contents under the share directory can be viewed by accessing /mnt. Note: Note: Note: Note: � SBC6845 has the write privilege over the share directory, which means any change will be effective immediately. 2.4.22 2.4.22 2.4.22 2.4.22 Transferring...
  • Page 34 [root@SBC6845:/]# [root@SBC6845:/]# /tmp /tmp [root@SBC6845:/]# [root@SBC6845:/]# cd cd /tmp /tmp [root@SBC6845:/tmp]# [root@SBC6845:/tmp]# [root@SBC6845:/tmp]# [root@SBC6845:/tmp]# rx rx rx rx recvfile recvfile recvfile recvfile 2 2 2 2 ) Select Transfer Transfer Transfer Transfer > > > > Send Send Send Send X X X X m m m m odem...
  • Page 35 The above information shows that the file has been transmitted successfully. Ctrl+C Ctrl+C Please press Ctrl+C Ctrl+C to exit. Note: Note: Note: Note: � It is recommended to select a small file due to the relatively slow speed of serial interfaces. Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 36 3 3 3 3 ) Execute the following instruction to view the downloaded file; [root@SBC6845:/tmp]# [root@SBC6845:/tmp]# [root@SBC6845:/tmp]# [root@SBC6845:/tmp]# ls ls ls ls -l -l -l -l The HyperTerminal will display the following information; Table Table Table Table 2-18 2-18...
  • Page 37 2 2 2 2 ) And then execute “qpe” to start Qtopia application; (the filesystem has to have a QT installed) [root@SBC6845:/]# [root@SBC6845:/]# [root@SBC6845:/]# [root@SBC6845:/]# qpe QT interface and system information are shown below; Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 38 Embest Technology 33 33 33 33 Figure 2-14 Figure Figure Figure 2-14 2-14 2-14 QT Interface Figure Figure 2-15 2-15 Figure Figure 2-15 2-15 System Information Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 39 Compilation Compilation Compilation Before getting started with the development on SBC6845, an ARM Linux cross development environment is required. This chapter will take Ubuntu as the example operating system to show you how to build a cross development environment and accomplish system compilation.
  • Page 40 2.6\ Kit/01\ Kit/01\ Kit/01\ SourceCode/kernel SourceCode/kernel SourceCode/kernel /linux-2.6.30.tar.bz2 /linux-2.6.30.tar.bz2 root@LINUXSERVER:~/embest# /media/cdrom/02\ Linux\ 2.6\ Kit/01\ SourceCode/rfs/rfs-sbc6845.tar.bz2 SourceCode/rfs/rfs-sbc6845.tar.bz2 ./ ./ ./ ./ cp /media/cdrom/02\ /media/cdrom/02\ /media/cdrom/02\ Linux\ Linux\ Linux\ 2.6\ 2.6\ 2.6\ Kit/01\ Kit/01\ Kit/01\ SourceCode/rfs/rfs-sbc6845.tar.bz2 SourceCode/rfs/rfs-sbc6845.tar.bz2 root@LINUXSERVER:~/embest# Copyright © 2012-2013 Embest Technology...
  • Page 41 Bootstrap-v1.14 and rfs-qtopia are generated under current directory. 1.1.2 1.1.2 1.1.2 1.1.2 Making Making Making Making Bootstrap Bootstrap Bootstrap Bootstrap SBC6845 support boot-up from DATAFLASH. Please execute the following instructions; root@LINUXSERVER:~/embest# cd cd Bootstrap-v1.14 Bootstrap-v1.14 Bootstrap-v1.14 Bootstrap-v1.14 board/at91sam9g45ekes/dataflash board/at91sam9g45ekes/dataflash root@LINUXSERVER:~/embest/Bootstrap-v1.14# cd cd board/at91sam9g45ekes/dataflash board/at91sam9g45ekes/dataflash root@LINUXSERVER:~/embest/Bootstrap-v1.14/board/at91sam9g45ekes/dataflash # make...
  • Page 42 Use the tool mkyaffs2image under the directory \02 Linux 2.6 Kit\02 Tools\ of the CD-ROM to make a filesystem image by executing the following instruction (suitable for Ubuntu system only). mkyaffs2image mkyaffs2image rfs-qtopia/ rfs-qtopia/ rootfs.yaffs2 rootfs.yaffs2 root@LINUXSERVER:~/embest# mkyaffs2image mkyaffs2image rfs-qtopia/ rfs-qtopia/ rootfs.yaffs2 rootfs.yaffs2 Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 43 Device drivers drivers drivers drivers > > > > Real Real Real Real Time Time Time Time Clock Clock Clock Clock > > > > EPSON EPSON EPSON EPSON RX-8025SA RX-8025SA RX-8025SA RX-8025SA Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 44 The table shown below is an example of driver modules that are simple but including most of interfaces. Table Table Table Table 2-3 2-3 Drivers Drivers Drivers Drivers Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 45 (ret < 0) { printk (KERN_ERR "%s: copy_from_user error\n", DEVICE_NAME); return -1; return sizeof(result); static int device_release(struct inode *inode, struct file *filp) /* close will trigger the function */ return 0; Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 46 __exit device_exit(void) /* rmmod operation will trigger the function */ misc_deregister(&device_miscdev); printk(KERN_INFO DEVICE_NAME " removed!\n"); module_init(device_init); module_exit(device_exit); MODULE_LICENSE("GPL"); /* protocol used by driver modules */ MODULE_DESCRIPTION("Linux Driver Demo"); /* driver module description */ Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 47 Downloading Downloading Drivers Drivers Drivers Drivers [root@SBC6845:/]# insmod insmod insmod insmod device_drv.ko device_drv.ko device_drv.ko device_drv.ko demo initialized! [root@SBC6845:/]# ls ls ls ls /dev/demo /dev/demo /dev/demo /dev/demo /dev/demo [root@SBC6845:/]# rmmod rmmod rmmod rmmod device_drv.ko device_drv.ko device_drv.ko device_drv.ko demo removed! Copyright © 2012-2013 Embest Technology...
  • Page 48 ("read before write, value=%X\n", value); print read value before writing */ int writeValue = 0x5E7F; if (write (fd, &writeValue, sizeof(writeValue)) < 0) { /* writing 0x5E7F to driver module by calling write function */ Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 49 The following three functions are commonly used by driver layer to control GPIO. int at91_set_gpio_input(unsigned pin, int use_pullup) /* set GPIO as input */ int at91_get_gpio_value(unsigned pin) /* acquire GPIO input value */ Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 50 = 0; /* share resources */ pthread_mutex_t mutex; /* mutex lock */ int main(void) pthread_t reader, writer; /* define process ID */ pthread_mutex_init(&mutex, NULL); /* initiate mutex lock */ Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 51 Please execute the instruction below to implement compilation. # # # # arm-none-linux-gnueabi-gcc arm-none-linux-gnueabi-gcc pthread.c pthread.c -o -o -o -o pthread_demo pthread_demo -lpthread arm-none-linux-gnueabi-gcc arm-none-linux-gnueabi-gcc pthread.c pthread.c pthread_demo pthread_demo -lpthread -lpthread -lpthread Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 52 /* local address information */ struct sockaddr_in their_addr; /* connector's address information */ int sin_size; if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) { perror (" socket ") ; exit(1) ; Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 53 Client Client Example Example Table Table 1-4 1-4 TCP TCP Client Client Example Example /* File: client.c */ #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <string.h> #include <netdb.h> #include <sys/types.h> #include <netinet/in.h> Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 54 (connect(sockfd, (struct sockaddr *)&their_addr, sizeof(struct sockaddr)) == -1) perror(" connect "); exit (1); if ((numbytes=recv(sockfd, buf, MAXDATASIZE, 0)) == -1) { perror (" recv "); exit (1); buf[numbytes] = '\0'; printf("Received: %s",buf); Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 55 And then run the server and client on two SBC6845 respectively to conduct testing. If you only have one SBC6845, firstly you need to compile a server program working on PC’s Linux system by executing the instruction below; # # # # gcc gcc server.c...
  • Page 56 Linux System System System System SBC6845 has a DATAFLASH and a NANDFLASH on board. But Linux system can only support boot-up from DATAFLASH currently. This chapter will introduce in detail how to update Linux system in DATAFLASH. Image Image Mapping...
  • Page 57 1.1.1 Preparations Preparations 1 1 1 1 ) Connect the serial and USB interfaces on SBC6845 to your PC respectively; Please refer to the relevant contents of Hardware Manual to view the detailed information on connections; 2 2 2 2 )...
  • Page 58 Embest Technology 53 53 53 53 databit, None Parity, 1 stop bit, and None data flow control. 3 3 3 3 ) Connect power supply to SBC6845 and launch SAM-BA v2.9 to open the window as shown below; Figure Figure...
  • Page 59 All in Scripts Scripts drop-down menu and then click Execute Execute to erase all the contents in DATAFLASH as shown in the figure below; Figure Figure Figure Figure 1-3 1-3 Erase DATAFLASH Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 60 Execute to open the following window; Figure Figure Figure Figure 1-4 1-4 Select the File to be Burned dataflash_at91sam9g45ekes.bin dataflash_at91sam9g45ekes.bin Select dataflash_at91sam9g45ekes.bin dataflash_at91sam9g45ekes.bin in the above window and click Open Open Open Open; Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 61 2 2 2 2 ) The information box at the bottom of SAM-BA’s main interface will show the downloading process as you can see below; Figure Figure Figure Figure 1-5 1-5 Burn dataflash_at91sam9g45ekes.bin Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 62 Open Open Open Open; 2 2 2 2 ) Click Send Send Send Send File File File File in SAM-BA main window to download u-boot.bin to the DATAFLASH on the board; Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 63 Open Open; 2 2 2 2 ) Click Send Send Send Send File File File File in SAM-BA main window to download logo.bin logo.bin logo.bin logo.bin to the DATAFLASH on the board; Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 64 Enter an address 0x0 0x0 in Address Address Address text box and click on the right of Send Send Send File Name File File File Name Name Name text box to open the following window; Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 65 System System 1.1.6 1.1.6 Burning Burning Linux Linux System System 1 1 1 1 ) Connect SBC6845 to your PC with a network cable; 2 2 2 2 ) tftpd.exe Linux2.6 Kit\02 Tools\ Copy tftpd.exe tftpd.exe tftpd.exe located under \02 \02 Linux2.6...
  • Page 66 5 5 5 5 ) Browse Browse Click Browse Browse in the pop-up window shown below to specify the path of uImage.bin and click OK Figure Figure Figure Figure 1-13 1-13 1-13 1-13 Configuration Window Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 67 Figure 1-14 1-14 1-14 Start Server 7 7 7 7 ) Space Space Reboot SBC6845 and press Space Space key on your keyboard when a countdown information is shown in HyperTerminal to enter U-boot command mode as shown below; Figure Figure...
  • Page 68 SD card, and insert it into the SD slot on the board and then power it up. The system will automatically implement image burning to DATAFLASH and NANDFLASH. After burning process is complete, you just need to reboot SBC6845 to finish the whole work. (Images are saved under \01 Module\SBC6845 Update System Through SD\SD Image_Linux\ of the CD-ROM) The table shown blow contains of the images required.
  • Page 69 System image, by renaming dataflash_at91sam9g45ekes.bin u-boot.bin System image, u-boot.bin System System System System logo.bin System image Images Images Images Images uImage System image, uImage rootfs.bin System image, by renaming yaffs2 filesystem Copyright © 2012-2013 Embest Technology SBC6845 User Manual...
  • Page 70 Technical Support Support Technical Technical Support Support Embest Technology provides its product with one-year free technical support including: � Providing software and hardware resources related to the embedded products of Embest Technology; � Helping customers properly compile and run the source code provided by Embest Technology;...
  • Page 71 G. G. G. Products purchased from unauthorized sales; H. H. H. H. Warranty (including verbal and written) that is not made by Embest Technology and not included in the scope of our warranty should be fulfilled by the party who committed. Embest Technology has no any responsibility;...
  • Page 72 Website Website Website Website: http://www.armkits.com http://www.embest-tech.com Address Address Address Address: Tower B 4/F, Shanshui Building, Nanshan Yungu Innovation Industry Park, Liuxian Ave. No. 1183, Taoyuan St., Nanshan District, Shenzhen, China (518055) Copyright © 2012-2013 Embest Technology SBC6845 User Manual...

Table of Contents