Renesas NetX Auto IP, NetX Duo Auto IP networking Application Note
NetX Auto IP and NetX Duo Auto IP are networking modules designed to dynamically configure IPv4 addresses on a local network without requiring a server. Auto IP uses address resolution protocol (ARP) for automatic IP address assignment and allocates addresses in the range of 169.254.1.0 through 169.254.254.255. This module guide provides information to effectively use this module with your own design, configure it correctly for the target application and write code using the included application project code as a reference and efficient starting point.
Advertisement
Advertisement
Application Note
Renesas Synergy™ Platform
NetX™ and NetX Duo™ Auto IP
Module Guide
R11AN0135EU0100
Rev.1.00
Nov 1, 2017
Introduction
This module guide will enable you to effectively use a module with your own design. Upon completion of this guide, you will be able to add this module to your own design, configure it correctly for the target application, and write code using the included application project code as a reference and efficient starting point. References to more detailed API descriptions and suggestions of other application projects that illustrate more advanced uses of the module are available on the Renesas Synergy Knowledge Base (as described in the References section at the end of this document) and should be valuable resources for creating more complex designs.
The Auto IP Protocol is designed to dynamically configure IPv4 addresses on a local network without requiring a server; unlike the Dynamic Host Configuration Protocol (DHCP). Auto IP uses address resolution protocol (ARP) for automatic IP address assignment and allocates addresses in the range of 169.254.1.0 through 169.254.254.255.
Note: Except for internal processing, the NetX Duo ™ Auto IP is identical in the application, set-up, and running of an
Auto IP session as the NetX ™ Auto IP.
Contents
Customizing the NetX and NetX Duo Auto IP Module for a Target Application ...................... 13
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 1 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
1. NetX and NetX Duo Auto IP Module Features
• Compliant with RFC3927 and related RFCs
• Uses ARP probes to check for address conflicts
• Uses the collision handler notification in NetX to detect an address already in use
• Registers a valid Auto IP address with the IP instance
• Provides high-level APIs for:
Creating and deleting an Auto IP instance
Starting and stopping the Auto IP thread task
Specifying the network interface on which to run Auto IP
Figure 1 NetX and NetX Duo Auto IP Module Block Diagram
2. NetX and NetX Duo Auto IP Module APIs Overview
The NetX Auto IP defines APIs for creating, deleting, getting, and setting addresses. A complete list of the available APIs, an example API call, and a short description of each can be found in the following table. A table of status return values follows the API summary table.
Table 1 NetX and NetX Duo Auto IP Module API Summary
Function Name nx_auto_ip_create
Example API Call and Description nx_auto_ip_create(&g_auto_ip0, "AutoIP 0", &g_ip0, stack_pointer, stack_size, priority);
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 2 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
Function Name Example API Call and Description
Create an Auto IP instance nx_auto_ip_delete nx_auto_ip_delete(&g_auto_ip_0);
Delete Auto IP instance. nx_auto_ip_get_address nx_auto_ip_get_address(&g_auto_ip_0, &local_address);
Get current Auto IP address. nx_auto_ip_set_interface nx_auto_ip_set_interface(&g_auto_ip_0, interface_index); nx_auto_ip_start
Set network interface needing an Auto IP address. nx_auto_ip_start(&g_auto_ip_0, IP_ADDRESS(0,0,0,0));
Start Auto IP processing. If the address input is NULL. NetX Auto IP randomly assigns an address in the Auto IP address range. nx_auto_ip_stop nx_auto_ip_stop(&g_auto_ip_0);
Stop Auto IP processing. nx_dhcp_server_stop nx_dhcp_server_stop(&dhcp_server);
Stop DHCP server processing.
Note: For details on operation and definitions for the function data structures, typedefs, defines, API data,
API structures, and function variables, review the associated Express Logic User’s Manual in the
References section.
Table 2 Status Return Values
Name Description
NX_SUCCESS
NX_AUTO_IP_ERROR
NX_PTR_ERROR*
Successful AutoIP function
Error creating components of Auto IP instance
Invalid pointer input
NX_CALLER_ERROR*
NX_AUTO_IP_NO_LOCAL
Invalid caller of this service
No Auto IP address registered with the NetX IP instance.
NX_AUTO_IP_BAD_INTERFACE_INDEX Invalid network interface
Note: Lower-level drivers may return common error codes. Refer to the SSP User’s Manual API References for the associated module for a definition of all relevant status return values.
* These are error codes which are only returned if error checking is enabled. Refer to the NetX User
Guide for the Renesas Synergy™ Platform or NetX Duo User’s Guide for the Renesas Synergy™
Platform for more details on error-checking services in NetX and NetX Duo, respectively.
3. NetX and NetX Duo Auto IP Module Operational Overview
The NetX Auto IP protocol first selects a random address within the Auto IP IPv4 address range of 169.254.1.0 through
169.254.254.255. Alternatively, the application may force a starting IP address by providing it to the nx_auto_ip_start service; this is useful in situations where an Auto IP address has been used previously.
Once an auto IP address is selected, the NetX Auto IP sends out a series of ARP probes for the selected address. An
ARP probe consists of an ARP request message with the sender address set to 0.0.0.0 and the target address set to the desired Auto IP address. A series of these ARP probes are sent (the actual number is set by the ARP probes to send property of the NetX Auto IP instance); if another network node responds to this probe or sends an identical probe for the same address, a new auto IP address is randomly selected within the auto IP IPv4 address range and the probe processing repeats.
If ARP probes to send and probes are sent without any responses, the NetX Auto IP issues many ARP announcements
(set by the Number of ARP announces property) for the selected address. An ARP announcement consists of an ARP request message with both the sender and target address in the ARP message set to the selected auto IP address. If another network node responds to an announced message or sends an identical announcement for the same address, a new auto IP address is randomly selected within the auto IP IPv4 address range, and the probe processing starts over.
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 3 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
When the probe and announcement completes without any detected conflicts, the selected auto IP address is considered valid and the address is registered with the IP instance.
The NetX Auto IP registers the auto IP-generated IP address with the NetX IP instance successful probe and announcement processing. The Auto IP application can be notified of address changes using the nx_ip_address_change_notify callback in NetX, or it can use the nx_ip_status_check to determine when a valid IP address is assigned. Once a valid address is assigned, the application should stop the auto IP task using the nx_auto_ip_stop service. The address change callback notifies the application of address changes after the auto IP thread task is suspended. Possible reasons for an address changing without explicitly being done with an auto IP may be due to auto IP-address conflicts with other nodes, or a DHCP address resolution to replace the auto IP address.
3.1 NetX and NetX Duo Auto IP Module Important Operational Notes and
Limitations
3.1.1 NetX and NetX Duo Auto IP Module Operational Notes
• The NetX DHCP Client and NetX Auto IP can both be used to ensure a host has a valid IP address. Typically, the
DHCP Client attempts to contact a server. If none of the servers responds to the DHCP Client, the client is suspended and the auto IP task is started. Auto IP generally guarantees a local address even if no DHCP Server is available. The DHCP Client can try later to broadcast requests to a DHCP Server; this process, if successful, automatically overwrites the auto IP local address.
• When the IP address changes, the application is responsible for closing out existing socket connections.
3.1.2 NetX and NetX Duo Auto IP Module Limitations
• If the NetX DHCP is used with the auto IP, the DHCP thread created must have a higher priority than the auto IP thread.
• The NetX Auto IP does not provide a mechanism to retain previously used IP address.
Refer to the latest SSP Release Notes for any additional operational limitations for this module.
4. Including the NetX and NetX Duo Auto IP Module in an Application
This section describes how to include either or both NetX and NetX Duo Auto IP module in an application using the
SSP configurator.
Note: It is assumed you are familiar with creating a project, adding threads, adding a stack to a thread, and configuring a block within the stack. If you are unfamiliar with any of these items, refer to the first few chapters of the SSP
User’s Manual to learn how to manage each of these important steps in creating SSP-based applications.
To add the NetX and NetX Duo Auto IP module to an application, simply add it to a thread using the stacks selection sequence given in the following table. (The default name for the NetX and NetX Duo Auto IP module is g_auto_ip0 . This name can be changed in the associated Properties window.)
Table 3 NetX and NetX Duo Auto IP Module Selection Sequence
Resource g_auto_ip0 NetX Auto IP
ISDE Tab Stacks Selection Sequence
Threads New Stack> X-Ware> NetX> Protocols> NetX Auto IP g_auto_ip0 NetX Duo Auto IP Threads New Stack> X-Ware> NetX Duo> Protocols> NetX Duo
Auto IP
As shown in the following figure, when the NetX Auto IP module is added to the thread stack, the configurator automatically adds any needed lower-level modules. Any modules needing additional configuration information have the box text highlighted in Red . Modules with a Gray band are individual modules that stand alone. Modules with a
Blue band are shared or common; they need only be added once and can be used by multiple stacks. Modules with a
Pink band can require the selection of lower-level modules; these are either optional or recommended. (This is indicated in the block with the inclusion of this text.) If the addition of lower-level modules is required, the module description include Add in the text. Clicking on any Pink banded modules brings up the New icon and displays possible choices.
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 4 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
Figure 2 NetX and NetX Duo Auto IP Module Stack
5. Configuring the NetX and NetX Duo Auto IP Module
The NetX Auto IP module must be configured by the user for the desired operation. The SSP configuration window automatically identifies (by highlighting the block in red) any required configuration selections, such as interrupts or operating modes, which must be configured for lower-level modules for successful operation. Only properties that can be changed without causing conflicts are available for modification. Other properties are locked and not available for changes and are identified with a lock icon for the locked property in the Properties window in the ISDE. This approach simplifies the configuration process and makes it much less error-prone than previous manual approaches to configuration. The available configuration settings and defaults for all the user-accessible properties are given in the
Properties tab within the SSP Configurator and are shown in the following tables for easy reference.
One of the properties most often identified as requiring a change is the interrupt priority; this configuration setting is available within the Properties window of the associated module. Simply select the indicated module and then view the
Properties window; the interrupt settings are often toward the bottom of the properties list, so scroll down until they become available. Also note that the interrupt priorities listed in the Properties window in the ISDE indicates the validity of the setting based on the targeted MCU (CM4 or CM0+). This level of detail is not included in the following configuration properties tables, but is easily visible with the ISDE when configuring interrupt-priority levels.
Note: You may want to open your ISDE, create the module, and explore the property settings in parallel with looking over the following configuration table values. This helps to orient you and can be a useful hands-on approach to learning the ins and outs of developing with SSP.
Table 4 Configuration Settings for the NetX and NetX Duo Auto IP Module
Parameter
Wait before sending first probe
(seconds)
ARP probes to send
Minimum wait between probes
(seconds)
Value
1
3
1
Description
Wait before sending first probe selection
ARP probes to send selection
Minimum wait between probes selection. (The
Auto IP recommends a random delay between probes.)
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 5 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
Parameter Value Description
Maximum wait between probes
(seconds)
Maximum conflicts before increasing processing delay
2
10
Maximum wait between probes selection
Maximum conflicts before increasing processing delay before Auto IP tries another local IP address.
Wait extend after maximum conflicts
(seconds)
Wait before announcement (seconds)
60
2
2
2
10
Interval that Auto IP waits before trying another local address after the maximum conflicts is reached.
Wait before announcement if the local IP address being probed results in zero conflicts.
Number of ARP announcements sent selection
Wait between announces selection
Number of ARP announces
Wait between announces (seconds)
Wait between defense announces
(seconds)
Name
Internal thread stack size (bytes)
Internal thread priority
Wait between defense announces selection g_auto_ip0 Module name
2048
3
Internal thread stack size selection
Internal thread priority selection
Note: The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other
MCUs may have different default values and available configuration settings.
In some cases, settings other than the defaults for stack modules can be desirable. For example, it might be useful to select different addresses for the Ethernet port. The configurable properties for the lower-level stack modules are given in the following sections for completeness and as a reference.
Note: Most of the property settings for lower-level modules are intuitive and usually can be determined by inspection of the associated properties window from the SSP configurator.
5.1 Configuration Settings for the NetX and NetX Duo Auto IP Lower-Level
Modules
Only a small number of settings must be modified from the default for the IP layer and lower-level drivers as indicated via the red text in the thread stack block. Notice that some of the configuration properties must be set to a certain value for proper framework operation and are locked to prevent user modification. The following table identifies all the settings within the properties section for the module.
Table 5 Configuration Settings for the NetX and NetX Duo IP Instance
ISDE Property Value Description
Name
IPv4 Address (use commas for separation) g_ip0
0,0,0,0
Module name
IPv4 Address selection
Subnet Mask (use commas for separation)
**IPv6 Global Address (use commas for separation)
**IPv6 Link Local Address (use commas for separation, All zeros means use MAC address)
255,255,255,0
0x2001, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x1
0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0
IP Helper Thread Stack Size (bytes) 2048
Subnet Mask selection
IPv6 global address selection
IPv6 link local address selection
IP Helper Thread Stack Size (bytes) selection
IP Helper Thread Priority
ARP
ARP Cache Size in Bytes
Reverse ARP
3
Enable
512
Enable, Disable
Default: Disable
IP Helper Thread Priority selection
ARP selection
ARP Cache Size in Bytes selection
Reverse ARP selection
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 6 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
ISDE Property
TCP
UDP
ICMP
IGMP
IP fragmentation
Value
Enable, Disable
Default: Enable
Enable
Enable, Disable
Default: Enable
Enable, Disable
Default: Enable
Enable, Disable
Default: Disable
Description
TCP selection
UDP selection
ICMP selection
IGMP selection
IP fragmentation selection
Note: The example settings and defaults are for a project using the Synergy S7G2 MCU Group. Other
MCUs may have different default values and available configuration settings.
** Indicates properties that are only available in NetX Duo.
Table 6 Configuration Settings for the NetX and NetX Duo Common Instance
ISDE Property Value Description
No configurable parameters
Note: The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other
MCUs may have different default values and available configuration settings.
Table 7 Configuration Settings for the NetX and NetX Duo Packet Pool Instance
ISDE Property
Name
Packet Size in Bytes
Number of Packets in Pool
Value g_packet_pool0
640
16
Description
Module name
Packet size selection
Number of packets in pool selection
Note: The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other
MCUs may have different default values and available configuration settings.
Table 8 Configuration Settings for the NetX Port ETHER
ISDE Property
Parameter Checking
Value
BSP, Enabled, Disabled
Default: BSP
IOPORT_PORT_09_PIN_03
0x00002E09
Channel 0 Phy Reset Pin
Channel 0 MAC Address
High Bits
Channel 0 MAC Address
Low Bits
Channel 1 Phy Reset Pin
Channel 1 MAC Address
High Bits
Channel 1 MAC Address
Low Bits
Number of Receive Buffer
Descriptors
Number of Transmit Buffer
Descriptors
Ethernet Interrupt Priority
0x0A0076C7
IOPORT_PORT_07_PIN_06
0x00002E09
0x0A0076C8
8
32
Priority 0 (highest), Priority 1:2,
Priority 3 (CM4: valid, CM0+: lowest- not valid if using
ThreadX ® ), Priority 4:14 (CM4: valid, CM0+: invalid), Priority 15
(CM4 lowest - not valid if using
ThreadX, CM0+: invalid)
Default: Disabled
Description
Enable or disable the parameter checking
Channel 0 Phy reset pin selection
Channel 0 MAC address high bits selection
Channel 0 MAC address low bits selection
Channel 1 Phy reset pin selection
Channel 1 MAC address high bits selection
Channel 1 MAC address low bits selection
Number of receive buffer descriptors selection
Number of transmit buffer descriptors selection
Ethernet interrupt priority selection
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 7 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
ISDE Property
Name
Channel
Value g_sf_el_nx
0
Description
Module name
Channel selection
Callback NULL Callback selection
Note: The example settings and defaults are for a project using the S7G2 Synergy MCU Group. Other
MCUs may have different default values and available configuration settings.
5.2 NetX and NetX Duo Auto IP Module Clock Configuration
The ETHERC peripheral module uses PCLKA as its clock source. The PCLKA frequency is set using the SSP configurator clock tab prior to a build, or by using the CGC interface at run-time.
5.3 NetX and NetX Duo Auto IP Module Pin Configuration
The ETHERC peripheral module uses pins on the MCU device to communicate to external devices. I/O pins must be selected and configured by the external device as required. The following table illustrates the method for selecting the pins within the SSP configuration window and the subsequent table illustrates an example selection for the I 2 C pins.
Note: The selected operation mode determines the peripheral signals available and the MCU pins required.
Table 9 Pin Selection for the ETHERC Module
Resource
ETHERC
ISDE Tab
Pins
Pin selection Sequence
Select Peripherals > Connectivity:ETHERC > ETHERC1.RMII
Note: The selection sequence assumes ETHERC1 is the desired hardware target for the driver.
Table 10 Pin Configuration Settings for the ETHERC1
Property Value
Operation Mode Disabled, Custom, RMII
(Default: Disabled)
Pin Group Selection Mixed, _A only
(Default: _A only)
REF50CK
TXD0
P701
P700
Description
Select RMII as the Operation Mode for ETHERC1
Pin group selection
TXD1
TXD_EN
RXD0
RXD1
RX_ER
CRS_DV
MDC
MDIO
P406
P405
P702
P703
P704
P705
P403
P404
REF50CK Pin
TXD0 Pin
TXD1 Pin
TXD_EN Pin
RXD0 Pin
RXD1 Pin
RX_ER Pin
CRS_DV Pin
MDC Pin
MDIO Pin
Note: Example settings are for a project using the S7G2 Synergy MCU and the SK-S7G2 Kit. Other Synergy
MCUs and other Synergy Kits may have different available pin configuration settings.
6. Using the NetX and NetX Duo Auto IP Module in an Application
In a typical application, it is assumed that an IP instance has been created and an ARP is enabled. Once this IP instance is accomplished, the typical steps in using the NetX Auto IP in an application are:
1. Allow time for the IP thread task and the network driver to get initialized (2-3 seconds) using the tx_thread_sleep() API
2. Set the address change notification with the nx_ip_address_change_notify API [Optional]
3. Start the Auto IP instance with the nx_auto_ip_start API.
4. Check for a valid address for the IP instance using either the nx_ip_status_check or nx_auto_ip_get_address API.
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 8 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
The nx_ip_status_check API defaults to the primary address. If running Auto IP on a secondary interface, use the nx_ip_interface_status_check. Note that nx_auto_ip_get_address API works for Auto IP on either primary or secondary addresses.
5. If a valid local IP address is assigned, stop the auto IP thread task using the nx_auto_ip_stop API.
The following figure illustrates common steps in a typical operational flow diagram:
Figure 3 Flow Diagram of a Typical NetX and NetX Duo Auto IP Module Application
7. The NetX and NetX Duo Auto IP Module Application Project
The application project associated with this module guide demonstrates the steps needed in a full design. The project can be found using the link provided in the References section at the end of this document. You may want to import and open the application project within the ISDE and view the configuration settings for the NetX and NetX Duo Auto IP module. You can also read over the code in autoip_thread_entry.c which illustrates the NetX and NetX Duo
Auto IP module APIs in a complete design.
The application project demonstrates the typical use of the NetX and NetX Duo Auto IP module APIs. The auto IP protocol is responsible for selecting a valid IP address; this is a helpful method in non-DHCP cases, for example.
Appropriate NetX functions are used to monitor the network connection.
The following table identifies the target versions for the associated software and hardware used by the Application
Project:
Table 11 Software and Hardware Resources Used by the Application Project
Resource e 2 studio
SSP
IAR EW for Synergy
Revision
5.3.1 or later
1.2.0 or later
7.71.1 or later
Description
Integrated Solution Development Environment
Synergy Software Platform
IAR Embedded Workbench ® for Renesas Synergy
SSC 5.3.1.002 or later Synergy Standalone Configurator
SK-S7G2 v3.0 to v3.1 Starter Kit
A simple flow diagram of the application project is given in the figure below:
™
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 9 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
Figure 4 NetX and NetX Duo Auto IP Module Application Project Flow Diagram
The autoip_thread_entry.c file is located in the project once it has been imported into the ISDE. You can open this file within the ISDE and follow along with the description provided to help identify key uses of APIs.
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 10 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
The first section of the autoip_thread_entry.c has the header files which reference the NetX and NetX Duo
Auto IP instance and integer types. The next section contains macro definitions, created to improve code readability and for the your convenience. Next, a variable is defined; it holds the number of IP address changes.
The second section of the file contains prototypes of functions defined and called in the third section of the same file.
The third section of the file contains definitions of functions. It starts with an auxiliary function ip_octet, which extracts a selected octet from an IP address. It is helpful for printing an IP address (stored in a single variable) in readable 4-octet format. Next is a function ip_address_changed; it is a callback function called every time the IP address has changed. It might be used to detect the IP address change occurrence and to perform appropriate action for such an event. Here it performs the start of an auto IP protocol and the g_address_changes variable incrementation. The next function, establish_network_link, is responsible for establishing the network link.
The nx_ip_status_check function is then used to check if a network link is enabled. If so, an auto IP protocol is started by calling the nx_auto_ip_start function. An auto IP protocol tries to assign a valid IP address selected from a range of 169.254.1.0 through 169.254.254.255. Function nx_auto_ip_get_address checks whether an assigned IP address is valid. The function nx_ip_status_check is then used again; this time, however, it checks whether an IP address has been resolved. If so, the network link has been established correctly and an auto IP protocol may be stopped using the nx_auto_ip_stop function.
The last section of the autoip_thread_entry.c file contains the autoip_thread_entry function definition.
This is the core part of the application project; functions described earlier are called from this function. At its beginning, there are definitions of necessary variables and a constant. The tx_thread_sleep function after that assures a delay for the IP thread task and the network driver initialization. Information about the LEDs available on the board is then read using the R_BSP_LedsGet function. An IP address change callback function is registered by the nx_ip_address_change_notify function. From now on, the ip_address_changed function is called every time an IP address has changed. The network link is established by the establish_network_link function. After that, there is an infinite loop. Inside of it, the LED is toggled. The currently established IP address is retrieved with the nx_ip_address_get function and displayed in the virtual debug console. There is a network link check performed.
In case of a network-link loss, the application starts waiting for a network link to be established again by calling the establish_network_link function. The infinite loop repeats after a delay caused by the tx_thread_sleep function.
A few key properties are configured in this application project to support the required operations and the physical properties of the target board and MCU. The properties with the values set for this specific project are listed in the following tables. You can also open the application project and view these settings in the Properties window as a hands-on exercise.
Table 12 NetX and NetX Duo Auto IPServer Module Configuration Settings for the Application Project
ISDE Property
Wait before sending first probe (seconds)
ARP probes to send
Minimum wait between probes (seconds)
Maximum wait between probes (seconds)
Maximum conflicts before increasing processing delay
Wait extend after maximum conflicts (seconds)
Wait before announcement (seconds)
Number of ARP announces
Wait between announces (seconds)
Wait between defense announces (seconds)
Name
Internal thread stack size (bytes)
Internal thread priority
Server option list size (optional)
Server option list (required - use space for separation)
Size of the current client hostname buffer (byte)
Maximum size of an IP addresses list (units)
Value Set
1
3
1
2
10
60
2
2
2
10 g_auto_ip0
2048
3
3
53 54
30
20
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 11 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
ISDE Property
Size of the client record table (units)
Size of the BOOT buffer (bytes)
Size of the DHCP header (bytes)
Name
Internal thread stack size (bytes)
Value Set
50
548
236 g_dhcp_server0
2048
Table 13 NetX and NetX Duo IP Instance Configuration Settings for the Application Project
ISDE Property
Name
IPv4 Address (use commas for separation)
Subnet Mask (use commas for separation)
**IPv6 Global Address (use commas for separation)
**IPv6 Link Local Address (use commas for separation, all zeros mean use MAC address)
IP Helper Thread Stack Size (bytes)
IP Helper Thread Priority
ARP
ARP Cache Size in Bytes
Reverse ARP
TCP
UDP
ICMP
Value Set g_ip0
0,0,0,0
255,255,255,0
0x2001, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0
2048
3
Enable
512
Disable
Enable
Enable
Enable
Table 14 NetX and NetX Duo Common Configuration Settings for the Application Project
ISDE Property
No configurable parameters
Value Set
Table 15 NetX Packet Pool Instance Configuration Settings for the Application Project
ISDE Property
Name
Packet Size in Bytes
Number of Packets in Pool
Value Set g_packet_pool0
1500
32
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 12 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
Table 16 NetX Port ETHER Configuration Settings for the Application Project
ISDE Property
Parameter Checking
Channel 0 Phy Reset Pin
Channel 0 MAC Address High Bits
Channel 0 MAC Address Low Bits
Channel 1 Phy Reset Pin
Channel 1 MAC Address High Bits
Channel 1 MAC Address Low Bits
Number of Receive Buffer Descriptors
Number of Transmit Buffer Descriptors
Ethernet Interrupt Priority
Name
Channel
Callback
Value Set
Default (BSP)
IOPORT_PORT_09_PIN_03
0x00002E09
0x0A0076C7
IOPORT_PORT_08_PIN_06
0x00002E09
0x0A0076BA
8
32
Priority 8 (CM4: valid, CM0+: invalid) g_sf_el_nx
1
NULL
8. Customizing the NetX and NetX Duo Auto IP Module for a Target Application
Some configuration settings can be changed by the developer from those shown in the application project. For example, you can easily change the MAC address of the SK-S7G2 Ethernet interface. To make the change, modify the properties,
Channel 1 MAC Address High Bits and the Channel 1 MAC Address Low Bits, of the NetX Port ETHER configuration settings. You can also change ARP behavior by modifying NetX and NetX Duo Auto IP module configuration settings. For example, the delay for sending the first ARP probe may be adjusted with the Wait before
sending the first probe (seconds) property. The number of ARP probes to be sent can be altered with the ARP probes
to send property.
9. Running the NetX and NetX Duo Auto IP Module Application Project
To run the NetX and NetX Duo Auto IP Module application project and to see it executed on a target kit, you can simply import it into your ISDE, compile, and run debug.
Note: The following steps are described in sufficient detail for someone experienced with the basic flow through the
Synergy development process. If these steps are not familiar, refer to the first few chapters of the SSP User’s
Manual for a description of how to accomplish these steps.
1. Refer to the Synergy Project Import Guide (r11an0023eu0116-synergy-ssp-import-guide.pdf, included in this package) for instructions on importing the project into e 2 studio or the IAR EW for Synergy ISDE and building/running the application.
2. Connect to the host PC via a micro USB cable to J19 on SK-S7G2 Kit.
3. Start to debug the application. While in Debug mode in e 2 studio, click Run > Resume or click on the Play icon twice.
4. Connect to the host PC via an Ethernet cable to J11 on SK-S7G2 Synergy MCU Kit.
5. The SK-S7G2 Synergy MCU Kit gets a valid IP address.
Its output text messages can be viewed in the virtual debug console.
6. Disconnect Ethernet cable from J11 on SK-S7G2 Kit for a few seconds, then connect the cable again.
7. The SK-S7G2 Kit gets a valid IP address.
Its output text messages can be viewed in the virtual debug console.
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 13 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
Figure 5 Example Output from NetX and NetX Duo Auto IP Module Application Project
10. NetX and NetX Duo Auto IP Module Conclusion
This Module Guide has provided all the background information needed to select, add, configure, and use the module in an example project. Many of these steps were time consuming and error-prone activities in previous generations of embedded systems. The Renesas Synergy ™ Platform makes these steps much less time consuming and removes the common errors like conflicting configuration settings or incorrect selection of lower-level drivers. The use of high-level
APIs (as demonstrated in the application project) illustrates additional development-time savings by allowing work to begin at a high level and avoiding the time required in older development environments to use, or in some cases, create, lower-level drivers.
11. NetX and NetX Duo Auto IP Module Next Steps
After you have mastered a simple NetX and NetX Duo Auto IP module project, you may want to review a more complex example. Because auto IP is only one of the methods which can configure the IP address, it is advisable to try out the
NetX DHCP module as well as other networking modules available in the NetX and NetX Duo Interfaces. User’s Guides for these modules can be easily found using the instructions provided in the References section at the end of this document.
12. NetX and NetX Duo Auto IP Module Reference Information
SSP User’s Manual: Available in html format in the SSP distribution package and as a pdf from the Renesas Synergy
Gallery .
Links to all the most up-to-date NetX and NetX Duo Auto IP module reference materials and resources are available on the Synergy Knowledge Base .
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 14 of 15
Renesas Synergy™ Platform NetX™ and NetX Duo™ Auto IP Module Guide
Website and Support
Support: https://synergygallery.renesas.com/support
Technical Contact Details:
• America: https://www.renesas.com/en-us/support/contact.html
• Europe: https://www.renesas.com/en-eu/support/contact.html
• Japan: https://www.renesas.com/ja-jp/support/contact.html
All trademarks and registered trademarks are the property of their respective owners.
R11AN0135EU0100 Rev.1.00
Nov 1, 2017
Page 15 of 15
Revision History
Rev.
1.00
Date
Nov 1, 2017
Description
Page
—
Summary
Initial release
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 or any other use of the circuits, software, and information in the design of your product or system. Renesas Electronics disclaims any and all liability for any losses and damages incurred by you or third parties arising from the use of these circuits, software, or information.
2.
Renesas Electronics hereby expressly disclaims any warranties against and liability for infringement or any other disputes involving 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, including but not limited to, the product data, drawing, chart, program, algorithm, application examples.
3.
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 shall not alter, modify, copy, or otherwise misappropriate any Renesas Electronics product, whether in whole or in part. Renesas Electronics disclaims any and all liability for any losses or damages incurred by you or third parties arising from such alteration, modification, copy or otherwise misappropriation of Renesas Electronics products.
5.
Renesas Electronics products are classified according to the following two quality grades: "Standard" and "High Quality". The intended 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 (traffic lights); large-scale communication equipment; key financial terminal systems; safety control 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 (space and undersea repeaters; nuclear power control systems; aircraft control systems; key plant systems; military equipment; etc.). Renesas
Electronics disclaims any and all liability 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.
When using the Renesas Electronics products, refer to the latest product information (data sheets, user’s manuals, application notes, "General Notes for Handling and Using Semiconductor Devices" in the reliability handbook, etc.), and ensure that usage conditions are within the ranges specified by Renesas Electronics with respect to maximum ratings, operating power supply voltage range, heat radiation characteristics, installation, etc. Renesas Electronics disclaims any and all liability for any malfunctions or failure or accident 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 Renesas Electronics 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 ensure to implement safety measures to guard them against the possibility of bodily injury, injury or damage caused by fire, and social damage in the event of failure or malfunction of Renesas Electronics products, 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 by your own responsibility as warranty for your products/system. Because the evaluation of microcomputer software alone is very difficult and not practical, 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 investigate applicable laws and regulations that regulate the inclusion or use of controlled substances, including without limitation, the EU RoHS Directive carefully and sufficiently and use Renesas Electronics products in compliance with all these applicable laws and regulations. Renesas Electronics disclaims any and all liability for damages or losses occurring as a result of your noncompliance with applicable laws and regulations.
9.
Renesas Electronics products and technologies shall 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 shall not use Renesas Electronics products or technologies for (1) any purpose relating to the development, design, manufacture, use, stockpiling, etc., of weapons of mass destruction, such as nuclear weapons, chemical weapons, or biological weapons, or missiles (including unmanned aerial vehicles (UAVs)) for delivering such weapons, (2) any purpose relating to the development, design, manufacture, or use of conventional weapons, or (3) any other purpose of disturbing international peace and security, and you shall not sell, export, lease, transfer, or release Renesas Electronics products or technologies to any third party whether directly or indirectly with knowledge or reason to know that the third party or any other party will engage in the activities described above. When exporting, selling, transferring, etc., Renesas Electronics products or technologies, you shall comply with any applicable export control laws and regulations promulgated and administered by the governments of the countries asserting jurisdiction over the parties or transactions.
10. Please acknowledge and agree that you shall bear all the losses and damages which are incurred from the misuse or violation of the terms and conditions described in this document, including this notice, and hold Renesas Electronics harmless, if such misuse or violation results from your resale or making Renesas Electronics products available any third party.
11. This document shall not be reprinted, 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.
(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.
(Rev.3.0-1 November 2016)
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, HAL II 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
© 2017 Renesas Electronics Corporation. All rights reserved.
Colophon 6.0

Public link updated
The public link to your chat has been updated.
Advertisement
Key features
- Dynamically configure IPv4 addresses
- Uses ARP for automatic IP address assignment
- Addresses in the range of 169.254.1.0 through 169.254.254.255
- Provides high-level APIs for creating, deleting, getting and setting addresses
- Compliant with RFC3927 and related RFCs
- Uses ARP probes to check for address conflicts
- Uses the collision handler notification in NetX to detect an address already in use
- Registers a valid Auto IP address with the IP instance