DHCP client using the embedded TCP/IP M3S-T4-Tiny Module Firmware Integration Technology

Similar documents
This document describes the guidelines for Hi-Speed USB 2.0 board design. 1. Introduction USB Transmission Line... 3

File driver for FTP server and Web server Module Firmware Integration Technology Contents

Source. Gate N+ N+ N+ Drain. Figure 1 Structure of D Series (Vertical type) (N channel) Channel. Source. Drain. Gate N N+ N+ P+ Substrate

(hereafter T4) File system M3S-TFAT-Tiny SPI mode MultiMediaCard Driver* 2 M3S-T4-Tiny

Old Company Name in Catalogs and Other Documents

Silicon Planar Zener Diode for Surge Absorption and Stabilizer

Old Company Name in Catalogs and Other Documents

USB Peripheral Communications Device Class Driver for USB Mini Firmware Using Firmware Integration Technology

The application example described in this document applies to the following microcomputers (MCUs): MCUs: M16C Family, R8C Family

Old Company Name in Catalogs and Other Documents

DPDT SWITCH FOR 2.4 GHz AND 6 GHz DUAL-BAND WIRELESS LAN

RJH60D7DPK. Preliminary Datasheet. 600V - 50A - IGBT Application: Inverter. Features. Outline. Absolute Maximum Ratings. R07DS0165EJ0400 Rev.4.

Old Company Name in Catalogs and Other Documents

PoNET kbd48cnc. User s manual

Old Company Name in Catalogs and Other Documents

USB Peripheral Communications Device Class Driver (PCDC) using USB Basic Mini Firmware

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

Old Company Name in Catalogs and Other Documents

V850. Application Note. 32-Bit Single-Chip Microcontrollers AES 128 Encryption/Decryption. Document No. U19668EE1V0AN00 Date Published January 2009

Connection Cable for LED Driver Board

AN3332 Application note

Pulse Output Forced Cutoff Using the Clock Alarm Function and ELC CC-RL

BIPOLAR ANALOG INTEGRATED CIRCUIT

V850E2/ML4 APPLICATION NOTE. Performance Evaluation Software. Abstract. Products. R01AN1228EJ0100 Rev Aug. 24, 2012

BIPOLAR ANALOG INTEGRATED CIRCUIT

AN3998 Application note

Part Number Decoder for Toshiba NAND Flash

TOSHIBA Bipolar Linear Integrated Circuit Silicon Monolithic TAR5SB15~TAR5SB50

HG2 Series Product Brief

TOSHIBA Transistor Silicon PNP Epitaxial Type (PCT Process) 2SA1020

Rev.F 1/3 c 2013 ROHM Co., Ltd. All rights reserved.

SSM3K335R SSM3K335R. 1. Applications. 2. Features. 3. Packaging and Pin Configuration Rev.3.0. Silicon N-Channel MOS (U-MOS -H)

AN3265 Application note

Old Company Name in Catalogs and Other Documents

TPN4R712MD TPN4R712MD. 1. Applications. 2. Features. 3. Packaging and Internal Circuit Rev.4.0. Silicon P-Channel MOS (U-MOS )

Software Real Time Clock Implementation on MC9S08LG32

TOSHIBA Transistor Silicon NPN Epitaxial Type (PCT Process) 2SC2383

Digital-Output Magnetic Sensor (Hall IC)

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

AC 800M. EtherNet/IP DeviceNet Linking Device LD 800DN. Power and productivity for a better world TM SP1134

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

UM1613 User manual. 16-pin smartcard interface ST8034P demonstration board. Introduction

Old Company Name in Catalogs and Other Documents

UM1676 User manual. Getting started with.net Micro Framework on the STM32F429 Discovery kit. Introduction

AN4108 Application note

AN3354 Application note

DATA SHEET. The information in this document is subject to change without notice.

DK40 Datasheet & Hardware manual Version 2

M3 Single-Slot Cradle. User Guide. Cradle Model: A-1CR-U R00, A-1CR-U00D-040-R00, A-1CR-US R00, A-1CR-U0ED-110-R00

TCP/IP MODULE CA-ETHR-A INSTALLATION MANUAL

Interfacing an HTML Form to the ez80f91 MCU

AN2604 Application note

M3 ORANGE single-slot Cradle. User Guide. Product Number: A-1CR-US0D-030-R00, A-1CR-U0ED-030-R00. Compatible Device(s): M3 ORANGE

2SK1056, 2SK1057, 2SK1058

AN2680 Application note

AN4128 Application note

EM3242. Angle Sensor IC [EM3242]

Intel Desktop Board D945GCZ

etpu Host Interface by:

1CH VIDEO SERVER INSTALLATION GUIDE. Please read instructions thoroughly before operation and retain it for future reference.

PePWave Surf Series PePWave Surf Indoor Series: Surf 200, AP 200, AP 400

User Manual. PePWave Surf / Surf AP Indoor Series: Surf 200, E200, AP 200, AP 400. PePWave Mesh Connector Indoor Series: MC 200, E200, 400

BIT COMMANDER. Serial RS232 / RS485 to Ethernet Converter

Single LNB supply and control IC DiSEqC 1.X compliant with EXTM based on the LNBH29 in a QFN16 (4x4) Description

PICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description

This application note describes how to use CAN controllers of various Rensas microcontroller products.

CryptoAuth Xplained Pro

UPS Network Interface. Quick InstallationGuide

LM337. Three-terminal adjustable negative voltage regulators. Features. Description

RZ/T1 Group. User's Manual. Renesas Starter Kit+ User s Manual For e 2 studio. RENESAS MCU Family / RZ/T1 Series. Rev. 1.

Intel Desktop Board D945GNT

DSL Installation Guide

RENESAS TECHNICAL UPDATE

GSM. Quectel Cellular Engine. HTTP Service AT Commands GSM_HTTP_ATC_V1.2

Intel Active Management Technology with System Defense Feature Quick Start Guide

ETP01-xx21. Protection for Ethernet lines. Features. Description. Applications. Benefits. Complies with the following standards

User Manual. EtherUSB

How To Write To An Eeprom Memory On A Flash Memory On An Iphone Or Ipro Memory On Microsoft Flash Memory (Eeprom) On A Microsoft Microsoft Powerbook (Ai) 2.2.2

Description. Table 1. Device summary. Order code Temperature range Package Packaging Marking

TL-PS310U Single USB 2.0 Port MFP and Storage Server

A Zebra Technologies White Paper. Bar Code Printing from Oracle WMS and MSCA

STEVAL-IEG001V2. Smart real-time vehicle tracking system. Features

Data Transfer between Serial Link and TCP/IP Link Using ez80f91 MCU

NVIDIA GRID 2.0 ENTERPRISE SOFTWARE

Intel Desktop Board D925XECV2 Specification Update

DATA SHEET COMPACT AND LIGHTWEIGHT, SMALL MOUNTING SIZE, HIGH BREAKDOWN VOLTAGE

DATA SHEET PNP SILICON EPITAXIAL TRANSISTOR FOR HIGH-VOLTAGE HIGH-SPEED SWITCHING

C24-CAMANL Video Server/Encoder

BD238. Low voltage PNP power transistor. Features. Applications. Description. Low saturation voltage PNP transistor

Kvaser Mini PCI Express User s Guide

Figure 1. 8-Bit USB Debug Adapter

Z8 Encore! XP F64xx Series Flash Microcontrollers. In-Circuit Emulator. User Manual UM

Starting a Management Session

SoftRAID 5 QUICK START GUIDE. for OWC ThunderBay

RN-XV-RD2 Evaluation Board

Windows Embedded OS USB Driver Installation

Web Power Switch III User s Guide Revision LPC-3

1 Serial RS232 to Ethernet Adapter Installation Guide

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

Transcription:

Introduction APPLICATION NOTE This application note explains (hereafter DHCP client). DHCP client is provided as (FIT) Module. Please refer to the URL to know FIT outline. http://www.renesas.com/products/mpumcu/rx/child/fit.jsp R20AN0081EJ0103 Rev.1.03 DHCP client is used by combining the following middleware products. function product website TCP/IP M3S-T4-Tiny http://www.renesas.com/mw/t4 (hereafter T4) Ethernet Driver Ethernet driver module (R01AN2009) We prepared sample programs for each CPU board included in the Renesas Starter Kit. For more information, see Renesas Starter Kit for sample application notes. sample application notes document number website Application example using T4 (DHCP/DNS/FTP/HTTP) R20AN0314 http://www.renesas.com/mw/t4 Target Device RX62N group, RX63N group, RX64M group, RX71M group R20AN0081EJ0103 Rev.1.03 Page 1 of 11

Contents 1. Outline... 3 1.1 System Structure... 3 1.2 Software Structure... 4 2. API Information... 5 2.1 Hardware Requirements... 5 2.2 Software Requirements... 5 2.3 Supported Toolchains... 5 2.4 Limitations... 5 2.5 Header Files... 5 2.6 Configuration Overview... 5 2.7 API DATA Structures... 6 2.8 Adding Library to Your Project... 6 3. API Functions... 7 3.1 r_dhcp_open... 7 3.2 R_T4_DHCP_CLIENT_GetVersion... 8 4. User definition function reference... 9 4.1 reset_timer... 9 4.2 get_timer... 9 5. Technical data... 10 R20AN0081EJ0103 Rev.1.03 Page 2 of 11

1. Outline DHCP client is the program getting IP parameter (IP Address, subnet mask gateway address) from DHCP server. 1.1 System Structure Show System Structure Example. Oscillator MCU MMC socket */ USB connector MMC/ USB stick CPU ROM RAM RSPI/USB Ethernet controller E-DMAC RMII Ethernet PHY chip Oscillator RJ-45 connector with built-in pulse transformer LAN cable Switching hub LAN cable PC (DHCP Server) Note: * The MMC socket must be acquired separately when RSK is used. Figure 1 System Structure Example R20AN0081EJ0103 Rev.1.03 Page 3 of 11

1.2 Software Structure Show Software Structure Example. DHCP Client function scope Application DHCP Client DNS Client FTP Server HTTP Server (R20AN0081) (R20AN0103) (R20AN0078) (R20AN0075) Software T4 Library (R20AN0051) Interface conversion module for Ether Driver and Embedded system T4 (R20AN0311) File Driver TFAT Library (R20AN0038) TFAT-USB/MMC Driver I/F Changer driver Ethernet Driver Timer Driver USB Driver MMC Driver (R01AN2009) (R01AN1856) BSP (R01AN1685) EtherC/EDMAC CMT USB SCI/RSPI Figure 2 Software Structure Example(in case, store the web contents to MMC/USB memory) R20AN0081EJ0103 Rev.1.03 Page 4 of 11

2. API Information 2.1 Hardware Requirements None 2.2 Software Requirements This module is dependent upon the following packages: r_t4_rx r_ether_rx 2.3 Supported Toolchains This library is tested and working with following toolchains: Renesas RX Toolchain v.2.01.00 2.4 Limitations None 2.5 Header Files All API calls are accessed by including a single file " r_t4_dhcp_client_rx_if.h " which is supplied with this software s project code. 2.6 Configuration Overview All configurable options that can be set at build time are located in the file r_t4_dhcp_client_rx_config.h. A summary of these settings are provided in the following table: Table 1 Configuration options Configuration options in r_t4_dhcp_client_rx_config.h #define DHCP_TIMEOUT Default value is 200. Set the response time from DHCP server. Unit is 10ms. If you set the example, 200, 200 10ms = 2 seconds. R20AN0081EJ0103 Rev.1.03 Page 5 of 11

2.7 API DATA Structures Shows the API function argument structure. This structure listed in the r_t4_dhcp_client_rx_if.h with API function prototypes. DHCP data structure typedef struct _dhcp { uint8_t ipaddr[4]; uint8_t maskaddr[4]; uint8_t gwaddr[4]; uint8_t dnsaddr[4]; uint8_t dnsaddr2[4]; char domain[20]; uint8_t macaddr[6]; }DHCP; 2.8 Adding Library to Your Project Please refer to the Adding Modules to Projects "r01an1723eu0110_rx.pdf. R20AN0081EJ0103 Rev.1.03 Page 6 of 11

3. API Functions 3.1 r_dhcp_open This function obtains network information such as IP address from DHCP server. Format int32_t r_dhcp_open( DHCP *dhcp, uint8_t *work, uint8_t *mac_addr ) Parameters dhcp output pointer to result of DHCP client process work output pointer to work RAM for DHCP client mac_addr input pointer to MAC address Return Value 0 normal terminations -1 abnormal terminations Properties Prototyped in file r_t4_dhcp_client_rx_if.h. Description The application calls this function once before calling tcpudp_open(). This function is terminated with status completed process or abnormal termination (timeout, check parameter error). This function may need several seconds until process termination. This function has second parameter needs work area for DHCP client. The work area requires 742 bytes RAM. User can use this work area after DHCP client process. This function requires user definition function (get_timer(), reset_timer()) to check time out. The function get_timer() returns 10ms software timer value. The function reset_timer() resets 10ms software timer value. Reentrant Yes Special Notes None R20AN0081EJ0103 Rev.1.03 Page 7 of 11

3.2 R_T4_DHCP_CLIENT_GetVersion This function returns the version number of DHCP client. Format uint32_t R_T4_DHCP_CLIENT_GetVersion (void) Parameters None Return Value Version number of DHCP Client Properties Prototyped in file r_t4_dhcp_client_rx_if.h. Description Returns the version of this module. The version number is encoded such that the top two bytes are the major version number and the bottom two bytes are the minor version number. For example, version 4.25, the return value is 0x00040019. Reentrant Yes Special Notes This function is inlined using the #pragma inline directive in r_dhcp_client.c. R20AN0081EJ0103 Rev.1.03 Page 8 of 11

4. User definition function reference 4.1 reset_timer This function resets 10ms software timer value. Format void reset_timer(void) Parameters None Return Value None 4.2 get_timer This function returns 10ms software timer value. Format uint16_t get_timer(void) Parameters None Return Value 10ms software timer value R20AN0081EJ0103 Rev.1.03 Page 9 of 11

5. Technical data DHCP RFC URL ftp://ftp.rfc-editor.org/in-notes/rfc2131.txt R20AN0081EJ0103 Rev.1.03 Page 10 of 11

Website and Support Renesas Electronics Website http://www.renesas.com/ Inquiries http://www.renesas.com/contact/ All trademarks and registered trademarks are the property of their respective owners. R20AN0081EJ0103 Rev.1.03 Page 11 of 11

Revision History Rev. Date Description Page Summary 1.03 Feb 23, 15 Fixed source code. 1.02 Jan 05, 15 Added support MCUs. 1.01 May.09.14 Corresponded to FIT Modules. 1.00 Mar.15.11 First edition issued A-1

General Precautions in the Handling of MPU/MCU Products The following usage notes are applicable to all MPU/MCU products from Renesas. For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products. 1. Handling of Unused Pins Handle unused pins in accordance with the directions given under Handling of Unused Pins in the manual. The input pins of CMOS products are generally in the high-impedance state. In operation with an unused pin in the open-circuit state, extra electromagnetic noise is induced in the vicinity of LSI, an associated shoot-through current flows internally, and malfunctions occur due to the false recognition of the pin state as an input signal become possible. Unused pins should be handled as described under Handling of Unused Pins in the manual. 2. Processing at Power-on The state of the product is undefined at the moment when power is supplied. The states of internal circuits in the LSI are indeterminate and the states of register settings and pins are undefined at the moment when power is supplied. In a finished product where the reset signal is applied to the external reset pin, the states of pins are not guaranteed from the moment when power is supplied until the reset process is completed. In a similar way, the states of pins in a product that is reset by an on-chip power-on reset function are not guaranteed from the moment when power is supplied until the power reaches the level at which resetting has been specified. 3. Prohibition of Access to Reserved Addresses Access to reserved addresses is prohibited. The reserved addresses are provided for the possible future expansion of functions. Do not access these addresses; the correct operation of LSI is not guaranteed if they are accessed. 4. Clock Signals After applying a reset, only release the reset line after the operating clock signal has become stable. When switching the clock signal during program execution, wait until the target clock signal has stabilized. When the clock signal is generated with an external resonator (or from an external oscillator) during a reset, ensure that the reset line is only released after full stabilization of the clock signal. Moreover, when switching to a clock signal produced with an external resonator (or by an external oscillator) while program execution is in progress, wait until the target clock signal is stable. 5. Differences between Products Before changing from one product to another, i.e. to a product with a different part number, confirm that the change will not lead to problems. The characteristics of an MPU or MCU in the same group but having a different part number may differ in terms of the internal memory capacity, layout pattern, and other factors, which can affect the ranges of electrical characteristics, such as characteristic values, operating margins, immunity to noise, and amount of radiated noise. When changing to a product with a different part number, implement a system-evaluation test for the given product.

Notice 1. Descriptions of circuits, software and other related information in this document are provided only to illustrate the operation of semiconductor products and application examples. You are fully responsible for the incorporation of these circuits, software, and information in the design of your equipment. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from the use of these circuits, software, or information. 2. Renesas Electronics has used reasonable care in preparing the information included in this document, but Renesas Electronics does not warrant that such information is error free. Renesas Electronics assumes no liability whatsoever for any damages incurred by you resulting from errors in or omissions from the information included herein. 3. Renesas Electronics does not assume any liability for infringement of patents, copyrights, or other intellectual property rights of third parties by or arising from the use of Renesas Electronics products or technical information described in this document. No license, express, implied or otherwise, is granted hereby under any patents, copyrights or other intellectual property rights of Renesas Electronics or others. 4. You should not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics assumes no responsibility for any losses incurred by you or third parties arising from such alteration, modification, copy or otherwise misappropriation of Renesas Electronics product. 5. Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The recommended applications for each Renesas Electronics product depends on the product's quality grade, as indicated below. "Standard": Computers; office equipment; communications equipment; test and measurement equipment; audio and visual equipment; home electronic appliances; machine tools; personal electronic equipment; and industrial robots etc. "High Quality": Transportation equipment (automobiles, trains, ships, etc.); traffic control systems; anti-disaster systems; anti-crime systems; and safety equipment etc. Renesas Electronics products are neither intended nor authorized for use in products or systems that may pose a direct threat to human life or bodily injury (artificial life support devices or systems, surgical implantations etc.), or may cause serious property damages (nuclear reactor control systems, military equipment etc.). You must check the quality grade of each Renesas Electronics product before using it in a particular application. You may not use any Renesas Electronics product for any application for which it is not intended. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for which the product is not intended by Renesas Electronics. 6. You should use the Renesas Electronics products described in this document within the range specified by Renesas Electronics, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. Renesas Electronics shall have no liability for malfunctions or damages arising out of the use of Renesas Electronics products beyond such specified ranges. 7. Although Renesas Electronics endeavors to improve the quality and reliability of its products, semiconductor products have specific characteristics such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. Further, Renesas Electronics products are not subject to radiation resistance design. Please be sure to implement safety measures to guard them against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas Electronics product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other appropriate measures. Because the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or systems manufactured by you. 8. Please contact a Renesas Electronics sales office for details as to environmental matters such as the environmental compatibility of each Renesas Electronics product. Please use Renesas Electronics products in compliance with all applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive. Renesas Electronics assumes no liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations. 9. Renesas Electronics products and technology may not be used for or incorporated into any products or systems whose manufacture, use, or sale is prohibited under any applicable domestic or foreign laws or regulations. You should not use Renesas Electronics products or technology described in this document for any purpose relating to military applications or use by the military, including but not limited to the development of weapons of mass destruction. When exporting the Renesas Electronics products or technology described in this document, you should comply with the applicable export control laws and regulations and follow the procedures required by such laws and regulations. 10. It is the responsibility of the buyer or distributor of Renesas Electronics products, who distributes, disposes of, or otherwise places the product with a third party, to notify such third party in advance of the contents and conditions set forth in this document, Renesas Electronics assumes no responsibility for any losses incurred by you or third parties as a result of unauthorized use of Renesas Electronics products. 11. This document may not be reproduced or duplicated in any form, in whole or in part, without prior written consent of Renesas Electronics. 12. Please contact a Renesas Electronics sales office if you have any questions regarding the information contained in this document or Renesas Electronics products, or if you have any other inquiries. (Note 1) "Renesas Electronics" as used in this document means Renesas Electronics Corporation and also includes its majority-owned subsidiaries. (Note 2) "Renesas Electronics product(s)" means any product developed or manufactured by or for Renesas Electronics. SALES OFFICES Refer to "http://www.renesas.com/" for the latest and detailed information. Renesas Electronics America Inc. 2801 Scott Boulevard Santa Clara, CA 95050-2549, U.S.A. Tel: +1-408-588-6000, Fax: +1-408-588-6130 Renesas Electronics Canada Limited 9251 Yonge Street, Suite 8309 Richmond Hill, Ontario Canada L4C 9T3 Tel: +1-905-237-2004 Renesas Electronics Europe Limited Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K Tel: +44-1628-585-100, Fax: +44-1628-585-900 Renesas Electronics Europe GmbH Arcadiastrasse 10, 40472 Düsseldorf, Germany Tel: +49-211-6503-0, Fax: +49-211-6503-1327 Renesas Electronics (China) Co., Ltd. Room 1709, Quantum Plaza, No.27 ZhiChunLu Haidian District, Beijing 100191, P.R.China Tel: +86-10-8235-1155, Fax: +86-10-8235-7679 Renesas Electronics (Shanghai) Co., Ltd. Unit 301, Tower A, Central Towers, 555 Langao Road, Putuo District, Shanghai, P. R. China 200333 Tel: +86-21-2226-0888, Fax: +86-21-2226-0999 Renesas Electronics Hong Kong Limited Unit 1601-1611, 16/F., Tower 2, Grand Century Place, 193 Prince Edward Road West, Mongkok, Kowloon, Hong Kong Tel: +852-2265-6688, Fax: +852 2886-9022 Renesas Electronics Taiwan Co., Ltd. 13F, No. 363, Fu Shing North Road, Taipei 10543, Taiwan Tel: +886-2-8175-9600, Fax: +886 2-8175-9670 Renesas Electronics Singapore Pte. Ltd. 80 Bendemeer Road, Unit #06-02 Hyflux Innovation Centre, Singapore 339949 Tel: +65-6213-0200, Fax: +65-6213-0300 Renesas Electronics Malaysia Sdn.Bhd. Unit 1207, Block B, Menara Amcorp, Amcorp Trade Centre, No. 18, Jln Persiaran Barat, 46050 Petaling Jaya, Selangor Darul Ehsan, Malaysia Tel: +60-3-7955-9390, Fax: +60-3-7955-9510 Renesas Electronics India Pvt. Ltd. No.777C, 100 Feet Road, HALII Stage, Indiranagar, Bangalore, India Tel: +91-80-67208700, Fax: +91-80-67208777 Renesas Electronics Korea Co., Ltd. 12F., 234 Teheran-ro, Gangnam-Gu, Seoul, 135-080, Korea Tel: +82-2-558-3737, Fax: +82-2-558-5141 http://www.renesas.com 2015 Renesas Electronics Corporation. All rights reserved. Colophon 5.0