Document organization ........................6 Eddy-DK Related Documents ......................7 Technical Support ..........................8 Chapter 2. Getting Started ......................9 What can you do with Eddy DK ?....................9 Eddy-DK Package Contents ......................9 Eddy-CPU v2.1 / v2.5........................10 Eddy-DK v2.1 ..........................27 Eddy-S4M v2.1 / v2.5........................46 Eddy-S4M-DK v2.1 ........................58 Eddy-S4M-JiG v2.1 ........................68...
Page 4
Compiling on Windows ........................90 Compiling on Linux.........................90 Compiling with LemonIDE ......................91 Running Application on Eddy......................91 Uploading and Executing on Eddy ....................91 4.10 Execute a file on Booting of Eddy ....................92 Chapter 5. Creating Firmware ....................93 How to Create a Firmware ......................93 Firmware Upgrade..........................95 Chapter 6.
1.2 Who should read this document? This document is designed for programmers who wish to develop a new application using Eddy DK. It is strongly recommended that the programmer read this document before starting any programming work. If you are an administrator or an end user who just needs to apply the module into practical applications, you do not need to read this document.
Eddy DK Programmer Guide 1.3 Document organization Chapter 1. Introduction is a preface with general information and introductory notices. Chapter 2. Getting Started gives brief information needed before starting programming work. Chapter 3. Writing Application explains about the process of writing a customized application and related work..
Guide for primary function of each tool contained in LemonIDE on LemonIDE Manual Windows and Linux. Guide for SystemBase device server management application Portview User Manual Portview COM Port Redirector User Guide for SystemBase COM Port Redirector...
Eddy DK Programmer Guide 1.5 Technical Support There are three ways you can get a technical support from SystemBase. First, visit our website http://www.sysbas.com/ and go to ‘Technical Support’ menu. There you can read FAQ and ask your own question as well.
2.1 What can you do with Eddy DK ? Eddy DK is designed to help programmers to develop a customized application that can be applied to Eddy module easier and faster. It has been a time-consuming and burdensome work to port an operating system and develop an application on a new hardware.
Page 11
Eddy DK Programmer Guide Eddy-CPU v2.1/v2.5 Pin Assignment Signal Name Signal Name Signal Name Signal Name PC19 PC21 PC23 HDMA HDPA PC26 PC4 (RDY#) PC16 ICE_NTRST RTCK 3.3V 3.3V 3.3V 3.3V PB29 (CTS1) PB28 (RTS1) PB6 (TXD1) PB7 (RXD1) LAN_Speed...
Page 12
Eddy DK Programmer Guide Signal Name Signal Name Signal Name Signal Name PID0 PID1 PB12 PB13 PID2 PID3 PB30 PB31 PID4 PC22 PC14 PC17 PB16 PC18 PC8 (RTS3) PB17 PC20 PC10 (CTS3) PB18 PA22 PC15 (IRQ1) BHDM PB19 PB9 (RXD2)
Page 13
Eddy DK Programmer Guide J1 Specifications Signal Name Signal Name PC19 PC21 PC23 HDMA HDPA PC26 PC4 (RDY#) PC16 (nRESET) ICE_NTRST RTCK 3.3V 3.3V PB29 (CTS1) PB28 (RTS1) PB6 (TXD1) PB7 (RXD1) LAN_Speed LAN_lLink LAN_RX- LAN_RX+ LAN_TX- LAN_TX+...
Page 14
Eddy DK Programmer Guide J1 Pin Description DK v2.1 Expansion Pin No Name Description Pin No Header Pin No Peripheral A : CTS2 UART #2 Clear to Send Signal Disabled. J10_1 J4_2 Data Flash connected with SPI0 is used for Eddy-CPU v2.1/v2.5. For...
Page 15
Eddy DK Programmer Guide More than 5 seconds: Factory Default function. Peripheral A : D16 External Data Bus Disabled Peripheral B : SPI0_NPCS2 SPI0_SPCK, SPI0_MISO, and SPI0_MOSI signals for SPI0 are disabled as they are not connected externally. ICE_NTRST J10_15...
Page 16
Eddy DK Programmer Guide LAN connection speed Speed Pin State LED Definition LED_Speed J10_31 10Base-T 100Base-TX LAN connection status Link/Activity Pin State LED Definition No Link LED_Link J10_32 Link Activity Toggle Blinking LAN_RX- J10_33 CPU 내부 Ethernet PHY(WAN)의 Physical receive or transmit signal (- differential)
Page 17
Eddy DK Programmer Guide J2 Specifications Connect USB cable to J1 while the jumper is connected to J2, so that applications can be compiled, linked, created, and uploaded to the Eddy-CPU module. (Please refer to Programmer Guide for more information.)
Page 18
Eddy DK Programmer Guide J2 Pin Description DK v2.1 Expansion Pin No Name Description Pin No Header Pin No J9_1 External Address Bus 0-15 (0 at reset) 1~16 A[15:0] J3_4-J3_20 -J9_16 DK is directly connected with CPU and external connecter (J3) is connected by buffer.
Page 19
Eddy DK Programmer Guide External device Chip Select 7. Peripheral B : NCS7 256MB memory area addressable, active low Not Connect...
Page 21
Eddy DK Programmer Guide J3 Pin Description Expansion DK v2.1 Pin No Name Header Pin Description Pin No J8_1 Product ID only used by the manufacturer. PID[4:0] ~J8_5 Please do not work on these pins. 6,25,26 Ground Peripheral A : NCS3...
Page 22
Eddy DK Programmer Guide Peripheral B : ISI_D8 Image Sensor Data 8 Peripheral A : RXD3 UART3 Receive Data PB11 J8_18 J2_12 Peripheral B : ISI_D9 Image Sensor Data 9 Peripheral A : AD0 Analog to Digital Converter Input Ch0...
Page 23
Eddy DK Programmer Guide Peripheral B : ISI_D7 Image Sensor Data 7 Peripheral A : RI0 USART0 Ring Indicator PB25 J8_36 J2_26 Peripheral B : ISI_D5 Image Sensor Data 5...
Page 24
Eddy DK Programmer Guide J4 Specifications Signal Name Signal Name PB12 PB13 PB30 PB31 PC22 PB16 PB17 PB18 BHDM PB19 BHDP PB20 PB21 NANDOE NAND_CLE / A22 NANDWE NAND_ALE / A21...
Page 25
Eddy DK Programmer Guide J4 Pin Description Expansion DK v2.1 Pin No Name Header Pin Description Pin No Peripheral A : TXD5 USART5 Transmit Data PB12 J11_1 J2_17 Peripheral B : ISI_D10 Image Sensor Data 10 Peripheral A : RXD5...
Page 26
Eddy DK Programmer Guide Peripheral B : TIOA5 Timer Counter ch5 I/O Line A Peripheral A : TD0 SSC Transmit Data PB18 J11_12 J2_19 Peripheral B : TIOB4 Timer Counter ch4 I/O Line B HDMB J11_13 J1_28 USB Device Port Data -...
Eddy DK Programmer Guide 2.4 Eddy-DK v2.1 2.4.1 Modules’Locations NOTE: Ensure that the input power supply for Eddy Serial DK is from 9V to 48V with 500 mA (or higher). 2.4.2 Switch Description...
Page 28
Eddy DK Programmer Guide 2.4.2.1. S1~S4: Digital In Select It is possible to select the Distal Input mode with this switch (S1 ~ S4). In order to use VCC Common Mode, switch down, and to use GNC Common Mode switch up refer to below feature.
Page 29
Eddy DK Programmer Guide 2.4.2.2. S5: ADC Select You can choice the GPIO and ADC function with this switch. In order to use the ADC device, you should switch off. And In order to use the GPIO function, you should switch on.
Page 30
Eddy DK Programmer Guide 2.4.2.4. S7:UART Select In order to test Serial Port, UART Select Switches are pulled down. It means that UARTs in CPU are connected to Serial Port. If switches are pulled up, GPIO Ports are enabled and LEDs are controlled by GPIO Ports. And if Switch No.6 is pulled up, GPIO ports are connected with the Expansion Headers.
Page 31
Eddy DK Programmer Guide 2.4.2.5. S8:COM3 & S9: COM4 Select COM Port #3 and COM Port #4 set the RS422/RS485 mode. COM PORT#3, #4 settings Switch Switch Down Position(OFF) UP Position(ON) Bank RS485 Half-Duplex mode RS422 Full-Duplex mode RS422(RX enabled)
Page 32
Eddy DK Programmer Guide 2.4.2.6. SW1~SW16: Key Pad Key Pad of DK board are consisted with the 4x4 matrix. GPIOs are set to Input mode to read the Key value. and Key 2, 4, 6, 8 also have the ▲(UP), ▼(DN), ◀(LEFT), ▶(RIGHT) direction function for LCD menu.
Page 33
Eddy DK Programmer Guide 2.4.3 LED Description 2.4.3.1. GPIO LED Eddy-CPU v2.1/v2.5 supports Max 56 GPIO ports. DK board has 20 GPIO LEDs of all GPIO to test. This GPIO LEDs are controlled by UART select switches.(refer to 2.4.2.4 UART Select )
Page 34
Output Current PC4 - PC31 in 3.3V range PC4 - PC31 in 1.8V range * Eddy DK v2.1 has 3.3V range, so PC4-PC31 PIO is set to 2mA. (Refer to CPU Datasheet의 41.2 DC characteristics ) 2.4.3.2. Power, Ready LED System Ready (RDY): Indicates that the system is operating normally.
Page 35
Eddy DK Programmer Guide COM Port 3 Receive LED : Shows reception status of COM3 Port. 2.4.3.7. COM Port 4 LED COM Port 4 Transmit LED : Shows transmission status of COM4 Port. COM Port 4 Receive LED : Shows reception status of COM4 Port.
Page 37
Eddy DK Programmer Guide 2.4.4.1. WAN & LAN Interface WAN & LAN Port automatically recognizes Cross/ Direct.(auto MDIX) Signal Description TXD+ Transmit Data + TXD- Transmit Data - RXD+ Receive Data + RXD- Receive Data - Description Upon 100BaseT link, it lights...
Page 38
Eddy DK Programmer Guide 2.4.4.3. COM Port 3 & COM Port 4 RS422 Full Duplex Signal Description TXD+ Transmit differential data positive (Output) TXD- Transmit differential data negative (Output) Ground RXD+ Receive differential data positive (Input) RXD- Receive differential data negative (input)
Page 39
Eddy DK Programmer Guide Environment Setting Debug port is configured as follows so user has to set his or her PC serial port connected to debug port as follows. Speed: 115200 bps Data bit: 8 bit Parity bit: Non Parity Stop bit: 1 bit 2.4.4.5.
Page 40
Eddy DK Programmer Guide 2.4.5 Internal Device Description 2.4.5.1. EEPROM Eddy-DK v2.1 has the AT25160, 2Kx8bit SPI EEPROM.
Page 41
Eddy DK Programmer Guide 2.4.5.2. LCD Module Graphic LCD Module (PowerTIP PG12864LRU-JCNH11Q and I2C-Bus I/O Expander IC PCA9539) Signal Name Function Description Used for data transfer between the CPU and the LCD P[00:07] Data bits module. /CS1 Chip enable for D2 (Segment 1 to 64)
Page 42
Eddy DK Programmer Guide DIO Input, DI1 DIO Input, DI2 DIO Input, DI3 DIO Input, DI4 DIO Input, DI5 DIO Input, DI6 DIO Input, DI7 /INT Connected with PB16 of Eddy-CPU...
Page 43
Eddy DK Programmer Guide 2.4.5.4. RTC - DS1340 (Dallas, I2C interface) - 12.5pF load capacitance crystal must be used. (Refer to Crystal Spec below) - Do not use another RTC Chip. - Backup Battery: CR2032 (235mAh) Lithium Battery. DS1340 Crystal Specifications...
Page 44
Eddy DK Programmer Guide 2.4.5.7. NAND Flash - 256MB, 8bit Flash (Samsung K9F2G08U0A-PCB0) - Chip Select #3 used, Address range : 0x4000_0000~0x4FFF_FFFF. Eddy-CPU v2.1 /v2.5 Function Discription Signal Name COMMAND LATCH ENABLE The CLE input controls the activating path for commands sent to the command register.
Page 45
Eddy DK Programmer Guide 2.4.5.8. Ethernet Controller (WAN Port) - Davicom DM9000B Ethernet Controller - 16 bit mode set. - EECS pin should be connected with pull-up resistor to use link/speed LED. - RJ45 Transformer Center Tap is powered by DM9000B AVDD18.
Eddy DK Programmer Guide 2.5 Eddy-S4M v2.1 / v2.5 Eddy-S4M is a high-performance mini PCI type embedded module which include ARM9 processor 32MB SDRAM, 8MB DataFlash, 10/100Base-T Ethernet port, Serial 4 Channel, RTC with Battery, minroSD, 4ch ADC, temperature sensor, max 34 programmable GPIO pins. Eddy-S4M is 59.75 x 61.8mm size. If using Eddy-S4M-JIG board, user could develop their customized device without other H/W development, which minimizing time and cost to develop.
Page 48
Eddy DK Programmer Guide 2.5.1 miniPCI Card Type III Connector Pinout (J5) Signal Signal Signal Signal JTAG_TDI JTAG_TDO 3.3V PB13 PB16 PB17 JTAG_TMS JTAG_RTCK PB18 PB19 JTAG_TCK ICE_NTRST 3.3V LAN_RX+ LAN_TX+ PB20 PB21 LAN_RX- LAN_TX- PB30 LAN_Speed LAN_LINK PB31 P3_RX-...
Page 49
Eddy DK Programmer Guide 2.5.2 Connector Pinout of Boards 2.5.2.1. ICE and JTAG S4M-JIG S4M-DK Pin No Name Pin HDR Pin HDR Description (124) (46*2) (46*2) Test Data IN Test Data Out Test Mode Select RTCK Return Test Clock Test Clock...
Page 50
Eddy DK Programmer Guide 2.5.2.3. Serial (RS232 & COMBO) and PIOA (Peripheral I/O Controller A) S4M-JIG S4M-DK Pin No Name Pin HDR Pin HDR Description (124) (46*2) (46*2) COM port #3 Receive differential data negative (Input) P2_RX- J4 pin20 J6 pin20...
Page 51
Eddy DK Programmer Guide COM port #1 Data Set Ready signal DSR0 J4 pin8 J6 pin8 RS232 receiver input in Eddy-S4M module Receive Data signal of Debug Port DRxD J4 pin2 J6 pin2 RS232 receiver input in Eddy-S4M module COM port #1 Ring Indicator signal...
Page 52
Eddy DK Programmer Guide 2.5.2.4. PIOB and PIOC (Peripheral I/O Controller B/C) S4M-JIG S4M-DK Pin No Name Pin HDR Pin HDR Description (124) (46*2) (46*2) SPI1(Serial Peripheral Interface) Peripheral A : SPI1_MISO Master In Slave Out J5 pin11 J7 pin11...
Page 53
Eddy DK Programmer Guide Peripheral A : AD1 Analog to Digital Converter Input Ch1 J5 pin28 J7 pin28 Peripheral B : PCK0 Programmable Clock Output 0 Peripheral A : AD2 Analog to Digital Converter Input Ch2 J5 pin29 J7 pin29...
Page 54
Eddy DK Programmer Guide 2.5.2.6. Universal Serial Bus S4M-JIG S4M-DK Pin No Name Pin HDR Pin HDR Description (124) (46*2) (46*2) USB Device Port Data – J4 pin25 J6 pin25 J4 pin26 J6 pin26 USB Device Port Data + USB Port2 Data –. Connected to DSPORT2 of GL850A...
Page 56
Eddy DK Programmer Guide 2.5.3 Switch Operation Switch No 1 Operation descriotion For Flash Programming Store firmware image to Flash memory through USB Device. (Only via Window Host). For more information, please refer to chapter 9, system recovery. Normal booting via Eddy-S4M v2.1 Data Flash 2.5.4...
Page 57
Eddy DK Programmer Guide 2.5.6 - We used D1340 which is connected I2C interface. - In DS1340, you must use crystal of load capacitance = 12.5pF (Refer to bellow Crystal spec) - You have to confirm Crystal spec because some RTC Chips have different spec...
Eddy DK Programmer Guide 2.6 Eddy-S4M-DK v2.1 Eddy-S4M DK is Development Kit supporting programmer can easily materialize and test their application. 2.6.1 Switch and Connector explanation...
Page 59
Eddy DK Programmer Guide 2.6.1.1. S2 : GPIO Input Configuration After configure PB0-PB4 to input, you can confirm whether the input value is changing with dip switch control. Switch No Down Position(OFF) UP Position(ON) PB0 Value High PB0 input value...
Page 61
Eddy DK Programmer Guide 2.6.2 Interface Explanation 2.6.2.1. Power, Ready LED System Ready (RDY): Indicate normal state of system (Normal: blinking) Power (PWR): indicate Power is inserted (RED LED ON state)
Page 62
Eddy DK Programmer Guide 2.6.2.2. Serial Port LED Operation description Pin Name Signal Name Descriotion Debug Port Tx LED Debug Port Debug Port Rx LED COM Port 1 COM Port1 Tx LED (RS232) COM Port1 Rx LED COM Port2 Tx LED...
Page 63
Eddy DK Programmer Guide PB19 GPIO or RTD0 or TIOB5 PB18 GPIO or TD0 or TIOB4 PB17 GPIO or TF0 or TCLK4 PB16 GPIO or RxD5 or TCLK3 PB13 GPIO or RxD5 PB12 GPIO or TxD5 GPIO or SPI1_NPCS0 or TIOA5...
Page 64
Eddy DK Programmer Guide 2.6.2.4. J10 : Ethernet Since there is KSZ8041NL PHY in Eddy-S4M module, when integrating Ethernet, just connect RJ45 in which transformer located WARNING : When you use RJ45 which has transformer in its internal circuit, it is possible to each product doesn’t have equal PIN spec.
Page 65
Eddy DK Programmer Guide 2.6.2.5. J17, 18 : COM Port 1 & Port 2 RS232 Signal Description Data Carrier Detection (Input) (COM Port 1 only) Receive Data (Input) Transmit Data (Output) Data Terminal Ready (Output) (COM Port 1 only) Ground...
Page 66
Eddy DK Programmer Guide RS485 Half Duplex Signal Description TRX+ Transmit/Receive differential data positive TRX- Transmit/Receive differential data negative J15 : Debug Port You can confirm debug massage and information of state through debug port. Environment Configuration Debug port is configured like below so that you must change serial port (connected with debug port) configuration like bellow.
Page 67
Eddy DK Programmer Guide 2.6.2.7. S1 : Power Jack Contact Polarity Center (D : 2mm) 5VDC Outer (D: 6.5mm) Ground GPIO Connector pinout Signal Signal PA22 PA30 PB12 PB13 PB16 PB17 PB18 PB19 3.3V 3.3V PB20 PB21 PB30 PB31 PC10...
Eddy DK Programmer Guide 2.7 Eddy-S4M-JiG v2.1 Eddy-S4M JIG board is test board which enable of user to integrate and test their application with Eddy-S4M. JIG board include mini connector for joining Eddy-S4M, Ethernet RJ45, USB Host, Power, Reset Switch, and providing connectors to all Eddy-S4M functions.
Page 69
Eddy DK Programmer Guide 2.7.2 J1 : Ethernet Since there is KSZ8041NL PHY in Eddy-S4M module, when integrating Ethernet, just connect RJ45 in which transformer located WARNING : When you use RJ45 which has transformer in its internal circuit, it is possible to each product doesn’t have equal PIN spec.
Page 70
Eddy DK Programmer Guide 2.7.3 J2 : USB Host J2 is connected to USB HUB ControllerEddy-S4M in Eddy-S4M. Bellow is its PIN spec 2.7.4 RESET switch Definition Description Polling Input signal continually from External Reset key, implement as below with checking the constant...
Eddy DK Programmer Guide 2.8 Eddy-WiFi v2.1 Linking to Eddy-CPU and Eddy-S4M, Eddy-WiFi module enables to use various types of serial device (Security equipment, telecommunications device, modem, data output devices, industrial instruments etc.) through wireless LAN. Eddy-WiFi module supports IEEE 802.11b/g.
Page 73
Eddy DK Programmer Guide LEFT Description RIGHT Description VCC(3.3V) VCC(3.3V) USB Host Data(-) USB Host Data(+) H/W Reset Ground Ground...
Eddy DK Programmer Guide 2.9 Eddy-BT v2.1 Eddy-BT module is based on Bluetooth 2.0 and supports communication distance of up to 1,000m. Linking to Eddy- CPU and Eddy-S4M, Eddy-BT module enables communication with various types of Bluetooth device in Bluetooth method.
Eddy DK Programmer Guide Chapter 3. Development Environment This chapter explains the process of application programming and other important notes. SDK’s directory structures are as follows. Note All material related to Eddy including documentation, reference sources and utilities are periodically updated to www.embeddedmodule.com without prior notice.
You can use more than one source file if you are using C programming Language. If you are familiar with programming with ANSI C, there will be no difficulties creating applications for Eddy. 3.3 Development Environment Eddy DK requires Windows or Linux host system. Officially supported OSs are as follows. Windows Linux Red Hat 9.0...
To execute LemonIDE on Windows hosts, some of libraries from Linux system are required. Cygwin is a virtual Linux program for Windows. To install Cygwin, please refer to Cygwin-Setup.zip in SDK/Windows folder of Eddy DK CD. After unzipping this file in Windows PC, run Setup.exe file. Select “Install from Local Directory” and...
Page 81
Eddy DK Programmer Guide Select installation directory as “c:\cygwin”. Select a folder which Cygwin-Setup.zip is unzipped. . If it is unzipped in C:\cygwin-Setup folder, select “c:\cygwin-setup” folder.. Select the package to install. Only select “Devel” as left picture. Make sure the option changed to “Install”...
Toolchain compiles source codes composed on Windows environment and make it executable on the target, Eddy. Eddy. Toolchain installation file, “toolchain-windows-arm-411.tgz”, can be found under SDK/Windows folder in Eddy DK’s CD. Copy the file to the root directory of “C:”, and unzip the file from Windows command line as below.
3.8 Installation of Eddy DK Source Install Eddy DK Source. DK Source file, “filesystem_2.x.x.x.tar.gz”, can be found under SDK folder of Eddy DK’ s CD. Copy the file to the root directory of “C:”, and unzip the file from Windows command line as below.
# tar -zxvf /mnt/cdrom/SDK/linux/lemonide*.tar.gz 3.11 Installation of Eddy DK Source Install the entire source of Eddy DK. Eddy DK Source file, “Filesystem_2.x.x.x.tar.gz”, can be found under SDK folder on Eddy DK’s CD. Install Eddy DK Source as shown below. The eddy_DK_2xx folder will be created after the installation.
Development Environment can be removed by simply deleting the folder where installed files are located. 3.13 Removing Windows Development Environment Delete the folders where DK Source and Cywin are installed. 3.14 Removing Linux Development Environment # rm –rf filesystem_2.1.x.x ; Removal of Eddy DK Source # rm -rf /opt/Lemonix ; Removal of Eddy ToolChain...
This chapter explains how to compose application program, load to Eddy to execute and store it to flash memory of Eddy as a firmware. Application programs running in Eddy are made of Device Server functions. SystemBase does not provide part of application source running in Device server. Developers can refer to open source, socket and serial provided as sample source.
Page 87
Eddy DK Programmer Guide In case you make new application program, refer to sample source in Eddy_APPs folder. Among the programs in Eddy_APPs directory, source for device server application is not provided. So, refer to source code for various purposes provided as sample.
Page 88
Eddy DK Programmer Guide TCP socket communication application sample source This sample source waits for TCP connection to socket number test_tcp_server.c appointed to argment and retransmits the received data to the other socket. TCP socket communication application sample source This sample source tries connection to IP address and socket test_tcp_client.c...
Eddy DK Programmer Guide 4.2 Writing Application Program This chapter shows how to write an application program for Eddy. First, create a “hello_world.c” file under the “scr/Eddy_APPs” directody. #include <stdio.h> int main() While (1) printf("hello world !!!\n"); sleep (1); 4.3 Writing Makefile To compile an application program, compile information of the application program has to be registered on the Eddyy_APPs/Makefile directory.
Eddy DK Programmer Guide 4.4 Application Program Compile Compile the application program to execute on Eddy after registering the compile environment to the “Makefile”. 4.5 Compiling on Windows Enter “make” command through cmd(command prompt) on the directory where “Makefile” is located. As shown below, if a compile is successfully completed, execution file named “Hello_World”...
Second method is to load and execution file of an application to RAM type file system by using the FTP Server on Eddy DK, and execute it from there. This method is suitable for developing phase of application;...
Eddy DK Programmer Guide Chapter 5. Creating Firmware On the previous chapter, we explained how to make and compile application program with sample program. This chapter introduces methods to create a firmware which permanently saves the application into the Eddy module and apply it to hardware of Eddy.
Eddy DK board. Please refer “the chapter 9: System Recovery” for detail. Use USB client port of Eddy DK board to upload a firmware. Please refer “the chapter 9: System Recovery” for detail. This section explains how to upload a firmware using a FTP.
Page 96
Execution result of application program only output to the console port of Eddy. The console is a debug port of Eddy DK board and only execution result of application program is generated. The result can be seen on a computer screen using a serial emulator program such as hyper-terminal on Windows...
Page 97
Eddy DK Programmer Guide Welcome to Eddy ! Welcome to Eddy ! Welcome to Eddy ! Welcome to Eddy ! Welcome to Eddy ! Welcome to Eddy ! Welcome to Eddy !
Eddy DK Programmer Guide Chapter 6. Library Introduction This chapter introduces useful libraries and API functions that are applicable with Eddy-Serial DK. 6.1 Introduction All the functions introduced in this chapter are all APIs included in SB_APIs.a of /src/Eddy_APPs/SB_APIs directory.
None Notice Version information will be read like “1.0a.” BootLoader and O/S will be provided by SystemBase; therefore these cannot be changed. In case file system is programmed by the user, the version can be set by the user. When the parameter type other than ‘B’ ,’K’, ‘F’ are called, the function will return “0.00”...
Page 100
Returns Returns -1 upon failure. Notice Portview is Windows application developed by SystemBase which can remotely monitor Eddy’s operating condition. In contrast, SNMP server, which provides basically same function as Portview, is industry’s standard monitoring protocol S/W developed by 3Com, Cysco, etc. and sold in hundreds of thousands of U.S.
Page 101
Eddy DK Programmer Guide Function Requests shared memory to be used and reads memory pointer. Format void *SB_SetSharedMemory (int Key_ID, int Buffer_Size); Parameter Key_ID ID of shared memory to be registered Buffer_Size Size of shared memory to be used Returns...
Eddy DK Programmer Guide 6.5 Serial functions These functions are used to handle internal serial port and UART. SB_OpenSerial Function Opens serial port. Format int SB_OpenSerial (int Port_No); Parameter Port_No Serial port number 0: First serial port 1: Second serial port...
Page 103
Eddy DK Programmer Guide X X P P S D D (8 bit binary) P P : Parity Bits 0 0 : None, 0 1 : Odd, 1 0, 1 1: Even S : Stop Bits 0 : 1 bits, 1 : 2 bits...
Page 104
Eddy DK Programmer Guide SB_GetMsr Function Reads MSR register value from serial port Format Char SB_GetMsr (int handle); Parameter handle Handle to serial port. Returns Value MSR Register 값 Bit 7 6 5 4 3 2 1 0 Bit0: CTS change...
Eddy DK Programmer Guide 6.6 Ethernet functions These functions deal with the network-related information of Eddy. These functions are optimized socket API for Eddy, and user can use other API for development by using his or her own POSIX compatible standard socket API.
Page 106
Eddy DK Programmer Guide SB_GetMask Function Reads subnet mask address assigned to Eddy. Format Unsigned int SB_GetMack (char *interface); Parameter Interface Interface name to be read “eth0” for WAN port. “eth1” for LAN port. Returns Unsigned int Returns mask address in unsigned int type...
Page 107
Eddy DK Programmer Guide SB_ListenTcp Function Wait for connection to TCP socket Format SB_ListenTcp (int Socket_No, Int Tx_Size, int Rx_Size); Parameter Socket_No TCP socket number to wait for connection Tx_Bytes Tx buffer size of the socket (in K bytes) Rx_Bytes...
Page 108
Eddy DK Programmer Guide SB_AcceptTcpMulti Function Grants network multiple connection of TCP socket handle waiting for connection. Format SB_AcceptTcpMulti (int Socket_No, int wait_msec); Parameter Socket_No TCP socket handle number waiting for connection. (Return value of SB_ListenTcp) wait_msec Connection standby time (in msec)
Page 109
Eddy DK Programmer Guide SB_BindUdp Function Binds UDP socket. Format SB_BindUdp (int Socket_No); Parameter Socket_No UDP socket number to bind Returns Handle Handle number bound to UDP socket -1: Bind failure N: Handle number bound to UDP socket Notice SB_ReadUdp Function Reads data transmitted to UDP socket bound in network.
Page 110
Eddy DK Programmer Guide SB_SendUdpClient Function Transmit data to UDP socket (Client mode) Format SB_SendUdpClient (int Handle, char *Buffer, int Data_Size, Char *IP_Address, int Socket_No); Parameter Handle Handle number bound to UDP socket. Buffer Buffer point where packet data to be sent is saved.
Eddy DK Programmer Guide 6.7 GPIO Functions GPIO functions control up to 56 GPIO ports provided by Eddy-CPU, 34 GPIO ports provided by Eddy-S4M They can spot 3.3V power or control writes with individual GPIO port. Pins provided by Eddy CPU/S4M are public pins that can be used to control other devices and are not used solely for GPIO.
Page 112
Eddy DK Programmer Guide Eddy-S4M GPIO Table Section Description Number of GPIO Analog Digital Converter GPIO & User Peripheral Each port in Port A, B, C can be shown as 32 GPIO ports. So GPIO ports are shown as each bit in 4 byte int variable in program.
Page 113
Eddy DK Programmer Guide SETGPIOINIT Function Initializes ports that will be used as GPIO after boot. Format void ioctl(int fd, SETGPIOINIT, struct *gpio_struct); Parameter Handle to GPIO device(“/dev/eddy_gpio”) gpio_struct Pointer to the struct which stores GPIO table value in /etc/eddy_gpio.cfg with GPIO configuration file registered in Web configuration.
Page 114
Eddy DK Programmer Guide GETGPIOMOD_LM Function Reads Read/Write direction for all Port A, B, C Format void ioctl(int fd, GETGPIOMOD_LM, int *mode[3]); Parameter Handle to GPIO device(“/dev/eddy_gpio”) mode Pointer to the buffer that will store the “mode” value of Port A, B, C...
Page 115
Eddy DK Programmer Guide GETGPIOVAL_LM Function Reads Read/Write status value for Port A, B, C Format void ioctl(int fd, GETGPIOVAL_LM, int *mode[3]); Parameter Handle to GPIO device(“/dev/eddy_gpio”) mode Pointer to the buffer that will store the “value” value of Port A, B, C...
Page 116
Eddy DK Programmer Guide SETGPIOMOD_LA SETGPIOMOD_LB SETGPIOMOD_LC Function Sets Read/Write direction for one of Port A, B, C Format void ioctl(int fd, SETGPIOMOD_L?, int *mode[3]); Parameter Handle to GPIO device(“/dev/eddy_gpio”) mode Pointer to the buffer that stores “mode” value. Bit value 0 means input, 1 means output.
Page 117
Eddy DK Programmer Guide GETGPIOVAL_LA GETGPIOVAL_LB GETGPIOVAL_LC Function Reads Read/Write status value for one of Port A, B, C Format void ioctl(int fd, GETGPIOVAL_L?, int *mode[3]); Parameter Handle to GPIO device(“/dev/eddy_gpio”) mode Pointer to the buffer that will store the “value”...
6.8 ADC Function Eddy CPU provides 4 channels of ADC(Analog Digital Converter). Eddy DK board has temperature and illumination sensor for testing and the status of the sensors can be checked in real time with ADC. Sample program “Eddy_Apps/test_adc.c” uses ADC interface so users can refer to this source for developing programs.
Eddy DK Programmer Guide 6.9 RTC Function Eddy CPU provides separate RTC(Real Time Clock) in DK. Date and time can be configured through program or with Date and rdate provided by Busybox. Sample program “Eddy_Apps/test_rtc.c” uses RTC device so users can refer to this source for developing programs.
Eddy DK Programmer Guide 6.10 Debugging Function Eddy can debug operating condition of each application via Telnet in real time. The following functions are used to print debug log message to Telnet window when SB_DEBUG of each application is set ON.
Eddy DK Programmer Guide Chapter 7. Eddy Software This chapter explains software structure ported to Eddy-DK. Source codes for all application except Com_redirect, gdbserver, tae, SB_APIs library are disclosed. All disclosed source codes may be used as development guide when programming a firmware.
The list of applications can be manually run using telnet. Def, upgrade, loopback, The list of applications to test Eddy DK v2.1 board and a device: test_sio, test_dio, test_lcd, test_keypad, test_spi_eeprom, test_nand, test_sd, test_adc, test_gpio_pin, test_gpio_led Sample source to build socket, serial port application program is the following.
Eddy DK Programmer Guide Chapter 8. Handling HTML & CGI This chapter describes the CGI module for the environment configuration used by HTML files and HTML codes. Provided CGI source and HTML documents are used as Eddy’s default firmware, and it is modifiable as needed.
Eddy DK Programmer Guide 8.3 Example CGI Code Eddy-Serial DK has two CGI programs: getagent.cgi and setagent.cgi. “getagent.c” reads an environment configuration file on /etc/ folder to HTML document , and “setagent.c” saves user-modified information on the HTML document back the environment file on /etc/folder and saves it to flash/, so the user-modified environment configuration is stored.
Eddy DK Programmer Guide Chapter 9. Appendix This chapter explains how to recover Eddy when flash of Eddy is damaged and it cannot be booted. 9.1 System recovery via Bootloader Even if the flash in the user area has been damaged, it does not affect system booting. But if the system continuously reboots due to user program failure, or if the system is inaccessible as a result of wrong IP setting, you have to change the system to factory default status.
Page 128
Eddy DK Programmer Guide 9.1.2 Hardware Install and Recovery Connect LAN port of computer and that of DK board using LAN cable. Connect debug port and computer’s serial cable using serial cross cable and use minicom to connect to computer’s serial port. Configure computer’s serial port setting to 115200 bps, 8 data bit, No parity, 1 stop bit and power on DK.Board...
Page 129
Eddy DK Programmer Guide U-Boot> printenv ethaddr=00:05:F4:11:22:33 Config_Size=10000 stdin=serial stdout=serial stderr=serial OS_Size==20000000 filesize=1f0f07 fileaddr=20000000 netmask=255.255.255.0 ipaddr=192.168.0.223 IP Address of Eddy serverip=192.168.0.220 IP Address of TFTP server FileSystem_Size=0 U-Boot> To change Eddy’s temporary IP address and TFTP server’s IP address proceed as follows.
Page 130
Eddy DK Programmer Guide Proceed as follows and it will recover by downloading image file from TFTP server configured. The next shows OS recovery procedure. U-Boot> install os eddy-os-2.1.x.x.bin TFTP from server 192.168.0.220; our IP address is 192.168.0.223 Filename 'eddy-os-2.1.x.x.bin'.
Page 131
Eddy DK Programmer Guide tftp-server PC IP address) U-Boot> install fs eddy-fs-2.1.x.x.bin TFTP from server 192.168.0.220; our IP address is 192.168.0.223 Filename 'eddy-fs-2.1.x.x.bin'. Load address: 0x20000000 Loading TFTP error: 'File not found' (1) Starting again When recovery is not proceeded with message shown above, check firmware version information or name is correct.
Eddy-S4M v2.1 is compatible with Eddy-CPU v2.1 and Eddy-S4M v2.5 is compatible with Eddy-CPU v2.5. Eddy-CPU/mp v2.5 is compatible with Eddy-CPU v2.5 Eddy-CPU v2.1 or Eddy-S4M v2.1 Copy Eddy-CPU_v21_USB_Recovery.zip file to any directory (e.g. C:\SystemBase\USB_recovery) from SDK\Windows\USB_recovery directory in Eddy DK CD. Double-click “AT91-ISP.exe” file and begin the installation process of USB Tool program, then click Next.
Page 133
Eddy DK Programmer Guide Click Install. Click Next. If you want to create Shortcuts, check Desktop or Quick Launch Bar, then click Next. - Check Reboot now then click Finish. After system reboot, copy “isp-extram- at91sam9260.bin” file from CD to the following directory: C:\Program Files\ATMEL Corporation\ AT91-ISP v1.12\SAM-BA v2.8\lib...
Page 134
Eddy_burning_DataFlash.tcl eddy-bl-2.1.x.x.bin > logfile.log notepad logfile.log 5) Among files extracted Eddy_burning_DataFlash.tcl file performs transferring firmware to Eddy DK v2.1 board. In this file eddy-bs-2.1.x.x.bin, eddy-os-2.1.x.x.bin, and eddy-fs-2.1.x.x.bin file names should be same with the names of the files copied. …...
Page 135
Eddy DK Programmer Guide Eddy-CPU v2.5 , Eddy-CPU/mp v2.5 or Eddy-S4M v2.5 Copy Eddy-CPU_v25_USB_Recovery.zip file to any directory (e.g. C:\SystemBase\USB_recovery) from SDK\Windows\USB_recovery directory in Eddy DK CD. Double-click “Sam-ba_2.10.exe” file and begin the installation process of USB Tool program, then click Next.
Page 136
Eddy DK Programmer Guide - Click Install. - Click Next. - If you want to create Shortcuts, check Desktop or Quick Launch Bar, then click Next.. - Check Reboot now then click Finish.
Page 137
Prepare firmware files and flash writing utility programs as follows. 1 ) Copy usb_recovery_xxx.zip file to any directory (e.g. C:\SystemBase\USB_recovery) from SDK\Windows\USB_recovery directory in Eddy DK CD. (Refer to the Eddy official community site http://www.embeddedmodule.com) 2) Among files extracted copy at91sam9g20-ek.tcl & isp-serialflash-at91sam9g20.bin file to the below directory.
Page 138
Eddy DK Programmer Guide 9.2.2 Installing DK Board Driver To detect the DK board via USB you need to install the DK board driver for Windows as follows. 1) Turn off DK board. 2) Connect USB cable to both the DK board and PC.
Page 139
… -I- === Load the bootstrap: xxxxflash_at91sam9xxxek in the first sector === GENERIC::SendFile ./eddy-bs-2.x.x.x.bin at address 0x0 … 8) With the successful log message, confirm whether the new firmware works properly or not by rebooting Eddy DK v2.1 board.
Page 140
Eddy DK Programmer Guide 9.2.4 Solving problems during System recovery execution via USB If you use firmware file name wrongly, log file will pop up as below.In this case, you should check whether the file names of firmware copied is same with the firmware names in Eddy_burning_xxxxFlash.bat or Eddy_burning_xxxxFlash.tcl files.
Page 144
Eddy DK Programmer Guide Specification Classification Eddy-S4M v2.1 Eddy-S4M v2.5 CE Class A, FCC Class A, RoHS compliant 9.3.4 Eddy-S4M-DK v2.1 Specifcatons Classification Specification 2 x RS232 DB9 Male Serial Port 2 x RS422/485 5pin Terminal Block (S/W Selectable & with Auto toggle)
Page 145
Eddy DK Programmer Guide 9.3.6 Eddy-WiFi v2.1 Specifcatons Classification Specification Standard 802.11b, 802.11g 802.11g: OFDM Modulation 802.11b: CCK,DQPSK, DBPSK Frequency Band 802.11b/g:ISM band 2.4GHz ~ 2.4884GHz 802.11g: 14 dBm Output Power 802.11b: 17 dBm 802.11g: -68m @54Mbps 8% PER RX sensitivity 802.11b: -85dBm @11Mbps 8% PER...
Page 146
Eddy DK Programmer Guide 9.3.7 Eddy-BT v2.1 Specifcatons Classification Specification Interface Bluetooth v2.0+ EDR Class 1 Profile SPP (Serial Port Profile) +18dBm Max, TX Power RX sensitivity -88dBm Supply voltage: 3.3V DC Power Supply current::10mA 60mA Operating Temp Operating temperature: -30 ~ 80...
Need help?
Do you have a question about the Eddy DK and is the answer not in the manual?
Questions and answers