File Transfer Protocol Using MPLAB Harmonyv3 TCPIP DS00003475A

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

AN3475

File Transfer Protocol Using MPLAB Harmony v3 TCP/IP


Stack

Introduction
File Transfer Protocol (FTP) is an application layer protocol used to transfer files between local and remote hosts. It
runs on top of the TCP, such as HTTP.
This document focuses on the FTP implementation of the MPLAB® Harmony v3 TCP/IP stack, available in the latest
MPLAB Harmony v3 framework. It also provides an FTP client demonstration using the SAM E70. This
demonstration implements an Ethernet bootloader using FTP, through which the SAM E70 client downloads a binary
for self-programming from an FTP server.
Abbreviations
The following abbreviations are used in this document:
• FTP – File Transfer Protocol
• HTTP - Hypertext Transfer Protocol
• TCP/IP – Transmission Control Protocol/Internet Protocol
• DHCP - Dynamic Host Configuration Protocol
• DFP - Device Family Pack
• MHC - MPLAB Harmony Configurator

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 1


AN3475

Table of Contents
Introduction.....................................................................................................................................................1

1. FTP Overview......................................................................................................................................... 3
1.1. Client............................................................................................................................................ 3
1.2. Server...........................................................................................................................................3
1.3. Connection................................................................................................................................... 3
1.4. Operation Modes..........................................................................................................................4
1.5. FTP Applications.......................................................................................................................... 4

2. FTP in MPLAB Harmony v3.................................................................................................................... 5


2.1. FTP Server Module...................................................................................................................... 5
2.2. FTP Client Module........................................................................................................................5

3. FTP Client: Bootloader Application......................................................................................................... 7


3.1. Prerequisites................................................................................................................................ 7
3.2. Application Overview....................................................................................................................7
3.3. Running the Application............................................................................................................. 12

4. Troubleshooting.....................................................................................................................................17

5. Appendix............................................................................................................................................... 18
5.1. Generating Application Binary Files........................................................................................... 18
5.2. Self-Programming of Downloaded Binary.................................................................................. 20

6. References............................................................................................................................................22

The Microchip Website.................................................................................................................................23

Product Change Notification Service............................................................................................................23

Customer Support........................................................................................................................................ 23

Microchip Devices Code Protection Feature................................................................................................ 23

Legal Notice................................................................................................................................................. 23

Trademarks.................................................................................................................................................. 24

Quality Management System....................................................................................................................... 24

Worldwide Sales and Service.......................................................................................................................25

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 2


AN3475
FTP Overview

1. FTP Overview
FTP is built on a client/server model architecture using separate control and data connections between the client and
the server.
Figure 1-1. FTP Model

FTP Client PI : Protocol Interpreter


DTP : Data Transfer Process

User User Interface FTP Server

Control Connection
User PI Server PI

Data Connection
File System User DTP Server DTP File System

1.1 Client
A File Transfer Protocol client (FTP client) is a software that establishes a connection between a host computer and a
remote FTP server. An FTP client provides the dual-direction transfer of data and files between two computers over
TCP. An FTP client works on a client/server architecture, where the host computer is the client and the remote FTP
server is the central server. It works when the host computer connects to the FTP server by specifying the domain, IP
address, user name, and password of that server (in some cases, the port number also needs to be specified). After
the user authentication, a connection is established between both the systems, and the host computer can upload
data onto the FTP server. An FTP client generally supports one or multiple simultaneous file transfers. Moreover,
most FTP clients can connect to multiple FTP servers simultaneously, providing status updates of the uploading
process, and notifications about successful and failed transfers. The host computer can also download files from the
FTP server using the FTP client.

1.2 Server
The FTP server enables downloading and uploading files. There could be access restrictions, which are determined
by the FTP server administrator for downloading the various files and folders residing on the FTP server. Files
residing on FTP servers can be retrieved by common web browsers, but they may not support protocol extensions,
such as FTPS (FTP Secure). All file transfer protocol site addresses begin with ‘ ftp://’.

1.3 Connection
To transfer a file, the following TCP connections are used by the FTP in parallel: control connection and data
connection.
Control Connection: FTP uses control connection for sending control information, such as user identification,
password, commands to change the remote directory, and commands to retrieve and store files. The default port
number for control connection is 21. All control connections are initiated on this port.
Data connection: For sending the file, FTP uses data connection. The default port number for data connection is 20.
However, data connections are not always initiated on this port. Depending on the mode of operation, they may be
initiated in other port numbers. For additional information, refer to 1.4 Operation Modes.
Session:

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 3


AN3475
FTP Overview

When an FTP session is started between a client and a server, the client initiates a control TCP connection with the
server side. The client sends control information over this. When the server receives control information, it initiates a
data connection to the client side. Only one file can be sent over one data connection. But the control connection
remains active throughout the user session.

1.4 Operation Modes


FTP can operate in the following two modes, which determines how a data connection is established. In both cases,
the control connection is established with an FTP server on port 21.
Active Mode: In Active mode, the server initiates the data channel connection. The sequence of connection is as
follows:
• The client connects from a random port to port 21 on the FTP server. This is the control/command channel.
• Using the control connection, the client informs (through PORT command) the port number on which it is
listening. This port will be used for the data channel.
• Server connects from port 20 to the client port designated for the data channel
Active mode is more secure for the server as it does not require unsecured ports to be open at the server end. It is
the server that initiates the data connection to the client. However, it must be noted that Active mode is less secure
for the clients.
Active mode may fail in cases where the client is behind a firewall as the firewall might block incoming server
connections (for the data channel), if the random port of the server is not unblocked in the firewall.
Passive Mode: In passive mode, the client initiates the data channel connection.
• The client connects from a random port to port 21 on the FTP server. This is the control/command channel.
• Client issues the PASV command
• Server replies with a random port number for the data channel
• Client connects from a random port to the port number specified by the server
Passive mode is recommended for clients protected by a firewall, because no inbound connection requests to the
client.
Modes based on Data Representation
FTP allows files to be transferred in several formats:
• ASCII mode: This mode is used for plain text files or ASCI-based files, such as an HTML file, text file, or
PostScript. ASCII is the default transfer type.
• Binary mode: This mode is also known as Image mode, and it is used for transferring non-ASCII files, such as
images, applications, and generated archive/cabinet files, such as .zip and .tar files. In this mode, the file is
transferred without any conversion. This maintains an identical file structure on both machines. This is important
for files such as pictures, music, and videos which must be exact copies to preserve integrity of the data.
• EBCDIC mode: This mode is used for plain text between hosts using the EBCDIC character set.

1.5 FTP Applications


FTP has a wide range of applications, which span from day-to-day business operations to data transfer from
embedded systems. The following examples show some use cases:
• Organizations use FTP to allow employees to share files across different locations and branch offices.
• Employees use FTP to share files with coworkers and external business partners.
• IT teams use FTP to transfer data back to disaster recovery (DR) sites.
• Webmaster teams use FTP to transfer web pages, web application files, and images to their web server..
• Remote embedded systems use FTP to download application binary for firmware updates
• Retrieve log files stored in remotely operated MCUs and MPUs.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 4


AN3475
FTP in MPLAB Harmony v3

2. FTP in MPLAB Harmony v3


The TCP/IP stack library of MPLAB Harmony v3 provides the API of the FTP module with a convenient ‘C’ language
interface. It supports the FTP server and client, which facilitating the upload and download of files to an embedded
client and server.

2.1 FTP Server Module


The interface to the FTP TCP/IP stack library is defined in the ftp.h header file. To use the FTP server in a project
requires using the TCP/IP stack and a file system like FAT FS.
The FTP server can be enabled in the MPLAB Harmony v3 TCP/IP project using MHC: Project Graph > Application
Layer > TCP/IP Application Layer Configurator > FTP Server.
Figure 2-1. Project Graph

Table 2-1. FTP Server Module Files

File Description
ftp_config.h Configuration of the FTP server (from symbols generated in configuration.h)
ftp.h Interface to the FTP server TCP/IP Stack library
ftp.c Implementation of FTP server

Additional information on the FTP server module are found at https://github.com/Microchip-MPLAB-Harmony/net/


blob/master/doc/help_harmony_tcpip.pdf.

2.2 FTP Client Module


The FTP client module enables transfer of data reliably and efficiently between different devices, without worrying
about the different file storage systems among hosts.
Table 2-2. FTP Client Module Files

File Description
ftpc_config.h Configuration of the FTP Client (from symbols generated in configuration.h)
ftpc.h Interface to the FTP client TCP/IP stack library
ftpc.c Implementation of FTP client protocol

The following table displays some of the FTP commands supported by the FTPC module.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 5


AN3475
FTP in MPLAB Harmony v3

Table 2-3. FTP Commands Supported by the FTPC Module

FTP COMMAND STACK COMMAND TYPE FUNCTION NAME


USER - send username TCPIP_FTPC_CMD_USER TCPIP_FTPC_Login
PASS - send password TCPIP_FTPC_CMD_PASS TCPIP_FTPC_Login
ACCT - send account information TCPIP_FTPC_CMD_ACCT TCPIP_FTPC_Login
TYPE - set transfer type TCPIP_FTPC_CMD_TYPE TCPIP_FTPC_SetType
STRU - set file transfer structure TCPIP_FTPC_CMD_STRU TCPIP_FTPC_SetStruct
MODE - set transfer mode TCPIP_FTPC_CMD_MODE TCPIP_FTPC_SetMode
PASV - enter passive mode TCPIP_FTPC_CMD_PASV TCPIP_FTPC_SetActiveMode
TCPIP_FTPC_SetPassiveMode

PORT - open a data port TCPIP_FTPC_CMD_PORT TCPIP_FTPC_Connect


RETR - retrieve a remote file TCPIP_FTPC_CMD_GET TCPIP_FTPC_GetFile
STOR - store a file on the remote host TCPIP_FTPC_CMD_PUT TCPIP_FTPC_PutFile
NLST - name list of remote directory TCPIP_FTPC_CMD_NLST TCPIP_FTPC_NameList
LIST - list remote files TCPIP_FTPC_CMD_LIST TCPIP_FTPC_List
DELE - delete a remote file TCPIP_FTPC_CMD_DELE TCPIP_FTPC_DeleteFile
CWD - change working directory TCPIP_FTPC_CMD_CWD TCPIP_FTPC_Change_Dir
CDUP - CWD to the parent of the current TCPIP_FTPC_CMD_CDUP TCPIP_FTPC_ChangeToParentDir
directory
MKD - make a remote directory TCPIP_FTPC_CMD_MKD TCPIP_FTPC_MakeDir
RMD - remove a remote directory TCPIP_FTPC_CMD_RMD TCPIP_FTPC_RemoveDir
PWD - print working directory TCPIP_FTPC_CMD_PWD TCPIP_FTPC_Get_WorkingDir
QUIT - terminate the connection N/A TCPIP_FTPC_Logout

In addition to the implementation of FTP commands, the client module provides a user interface through the USART
terminal. This enables users to provide the required FTP command by entering into the terminal.
All FTP client commands start with the keyword ‘ftpc’, for example, ftpc login <username> <pswd> .

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 6


AN3475
FTP Client: Bootloader Application

3. FTP Client: Bootloader Application


The following sections cover software and hardware required for this application, and it also covers overview of the
application.

3.1 Prerequisites
Hardware:
• SAM E70 Xplained Ultra evaluation kit – 1 No.
• SD card – 1 No.
• Ethernet cable (RJ45) – 1 No.
• USB cable – 1 No.
Software:
• MPLAB X IDE (v5.30)
• MPLAB XC32/32++ Compiler (v2.40)
• MPLAB Harmony Configurator (v3.4.0)
– Harmony bsp repository, v3.5.0
– Harmony csp repository, v3.5.2
– Harmony core repository, v3.5.2
– Harmony dev_packs repository, 3.5.0
– Harmony net repository v3.5.1

3.2 Application Overview


This example demonstrates creating an application where an FTP client downloads a binary file from the FTP server,
which in turn used to Flash the microcontroller. The FAT-FS File System with SDCARD as storage media is used in
this application and the FTP client will write to and read from this FS.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 7


AN3475
FTP Client: Bootloader Application

Figure 3-1. Flow Diagram

3.2.1 Application Code


The user application for an FTP client must initiate the FTP connection request. Based on the server’s response for
the request, the username and password must be provided by the client for logging in. When the FTP client is
successfully logged in, data can be transferred between the server and the client. In this application, the client
downloads a binary file from the server and the downloaded file will be stored on an SD card. The binary is then
flashed to the microcontroller.
The following code displays the application code for the FTP connection and login.

case APP_Connect_FTP:
TCPIP_FTPC_Get_Status (ftpcHandle, &ftpcStatus);
if (ftpcStatus.isConnected)
{
SYS_CONSOLE_MESSAGE ("FTP Client connected \r\n");
appData.state = APP_Logign_FTP;
SYS_CONSOLE_MESSAGE ("Login with your credentials \r\nEg: ftpc login
username psswd\r\n");
}
break;

case APP_Login_FTP:
TCPIP_FTPC_Get_Status (ftpcHandle, &ftpcStatus);
if (ftpcStatus.isLoggedIn)

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 8


AN3475
FTP Client: Bootloader Application

{
SYS_CONSOLE_MESSAGE ("FTP Client logged in \r\n");
appData.state = APP_SET_CURRENT_DRIVE;
}
break;

3.2.2 Creating the Application


This application is created in MPLAB Harmony configurator as it provides an easy-to-use GUI that simplifies device
setup, library selection, configuration and application development.
For additional information on the MHC, refer to https://github.com/Microchip-MPLAB-Harmony/mhc/wiki .
MPLAB Harmony Configuration
• To create a 32-bit MPLAB Harmony v3 project for the SAME70Q21B using MPLAB X IDE, refer to https://
microchipdeveloper.com/harmony3:same70-getting-started-training-module)
• By default, the Device Family Pack (DFP), System, CMSIS Pack and EFC will be present when the
configuration is launched.
• For this demonstration, the Terminal communication, System service, File System, and TCP/IP features must be
added.
• The harmony configuration file (.xml) with these components configured can be found in the source code of this
application note (ftp_bootloader\firmware\src\config\default\sam_e70_xult.xml).
Load this file from the MPLAB Harmony configurator: MPLAB Harmony Configurator > File > Load State.
• The following figure illustrates the complete project graph:
Figure 3-2. Complete Project Graph

• Because this document focuses on FTP, the TCP/IP related configurations are highlighted below:
TCP/IP Harmony configuration
– For TCP/IP Basic Configurator, follow these steps:
1. Adding the TCP/IP Basic Configurator will create a BASIC CONFIGURATION view. Different views
can be selected as shown in the following figure.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 9


AN3475
FTP Client: Bootloader Application

Figure 3-3. Selecting Views

2. In the Basic Configurator view, TCPIP CMD, TCPIP CORE and NETCONFIG components are
enabled.
Figure 3-4. Basic Configurator View

3. In the TCP/IP CORE configuration options, the TCP/IP Stack Dynamic RAM Size can be adjusted
per the application requirement. For this example the RAM allocated is 67,960 bytes (66 KB).
Figure 3-5. Configuration Options

4. In NETCONFIG options, the necessary network details, such as IP address and gateway address
are configured:

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 10


AN3475
FTP Client: Bootloader Application

Figure 3-6. NETCONFIG Options

– TCP/IP Application Layer Configurator


1. In the APPLICATION LAYER view, the TCP/IP Application Layer Configurator is used to enable
ANNOUNCE, FTP CLIENT and DHCP CLIENT components. The ANNOUNCE module facilitates
device discovery on the DHCP-enabled networks, while the DHCP CLIENT module allows the
application to dynamically obtain an IP address from a DHCP server on the network.
Figure 3-7. APPLICATION LAYER View

2. In the FTP CLIENT configuration, the Enable FTP Client Commands option allows users to interact
with the FTP client through a serial terminal. Transmit and receive buffer size can be increased as
required (that is, 1,024).
Figure 3-8. FTP CLIENT Configuration

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 11


AN3475
FTP Client: Bootloader Application

3.3 Running the Application

3.3.1 Hardware Setup


Follow these steps to setup the hardware:
1. Ensure that the ERASE jumper is open.
2. Open the J805 Jumper..
3. Insert the LAN8740 PHY daughter board on the ETHERNET PHY MODULE header.
4. Connect the micro-USB cable from the computer to the DEBUG USB connector on the SAM E70 Xplained
Ultra Evaluation Kit.
5. Establish a connection between the router/switch with the SAM E70 Xplained Ultra Evaluation Kit through the
RJ45 connector. An IP address will be assigned to the kit by the DHCP server on the network. The kit can also
be connected to the RJ45 port on the PC, hence a DHCP server may be unavailable and a pre-configured
static IP address will be used by the kit.
6. Insert the SD card to the SD card slot on the backside of the hardware board.

3.3.2 Programming the MCU


Follow these steps to program the MCU:
1. Open the project in MPLAB X IDE: (File > Open Project, and then browse to ftp_bootloader\firmware
\sam_e70_xult.X).

2. Build and program the project to the target board by clicking (Make and Program device icon).

3.3.3 Setting up FTP Server


Before running the FTP client application, users need to follow these steps to setup the FTP server.
For this demonstration, the FileZilla Server Interface is used as the FTP server running on the user PC. Refer to
https://wiki.filezilla-project.org/Documentation for additional information.
Follow these steps to setup FileZilla server::
1. Open the FileZilla server interface.
2. In the pop-up window, enter a hostname, port, and password for the admin interface.
3. Click Connect.

4. Click (user icon), or go to Edit > User for adding the client.
5. In the User window, click General. Add the client by clicking Add , and then enable the account and password.
This will be the user name and password for connecting from the FTP client.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 12


AN3475
FTP Client: Bootloader Application

Figure 3-9. User Window

6. In the Shared folders section, add the path of the folder where the binary to be downloaded is located.
Figure 3-10. Adding the Path

3.3.4 Connecting FTP Client


Follow these steps to connect the FTP client:
1. From a terminal window application (lTera Term), connect to the COM port enumerated by the SAM E70
Xplained Ultra board.
2. Restart the application (that is, reset the SAM E70 board).
3. The IP address will be displayed on the terminal after it is ready, the user can connect to the FTP server by
typing: ftpc connect <host ip address>.
4. Upon successful connection, enter the login details: ftpc login <username> <password>.
5. Once logged in, use the following ftpc to get the command to download a binary from the server: ftpc get -
a -a <test.bin>.
Note: Refer to the section Appendix for steps to generate a binary file.
6. After the binary is successfully downloaded, it can be flashed to the MCU by using the boot command.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 13


AN3475
FTP Client: Bootloader Application

Note: This project is configured for a maximum binary file size of 7 KB. For binary files larger than this,
increase APP_DATA_LEN macro in app.c file of the ftp_bootloader project. If the binary file is larger than
available RAM, the file can be read in chunks (instead of reading complete file into buffer) and programmed.
7. The MCU is reset automatically after the programming is complete, and the application code starts executing.
Displaying the message: **** Executing Application code ****.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 14


AN3475
FTP Client: Bootloader Application

Figure 3-11. Output:

After the MCU reset, the following message is displayed, indicating that the MCU has been reprogrammed
with a new application binary.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 15


AN3475
FTP Client: Bootloader Application

Figure 3-12.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 16


AN3475
Troubleshooting

4. Troubleshooting
This section covers important error messages and appropriate workaround for that.
• “FTP timed out” - Server response time can be affected by the distance between the sites. If you see this
message when connecting to a server, increase the Connect Timeout setting to give the server more time to
respond during the login process.
• “Cannot open data connection” - If this error is encountered in a Windows system with the Firewall enabled, it
may be due to the firewall blocking the connection on the corresponding FTP data port. Try disabling the firewall
temporarily and see if the FTP connection succeeds. If the connection is successful with the firewall disabled,
users can configure the firewall to allow the required port and enable it.
• Client unable to connect using PASV (passive) mode - Ensure that the server is configured to accept passive
connection. For example, in the FileZilla server the passive mode can be enabled by disabling Active mode:
FileZilla Server > Server > Active.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 17


AN3475
Appendix

5. Appendix

5.1 Generating Application Binary Files


In general, for implementation where the bootloader is available in Flash, bootloaders are present at the base
(starting) address of the Flash memory. The application is loaded to the memory in Flash, which is beyond the
bootloader.

Application
Flash

Bootloader
0x0000
To generate the binary file of an application project in MPLAB X IDE, perform these actions:
1. Modify Application Start Address.
2. Execute the post build command to generate the bin file.

5.1.1 Modifying Application Start Address


The application start address must be modified to generate a bin file starting from the desired memory location,
beyond the memories taken by the bootloader.
To change the application start address, go to Project Properties > xc32-ld > Option categories: Symbols & Macros.
Users need to define the following macros:
• ROM_ORIGIN=0x430000
• ROM_LENGTH=0x1d0000

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 18


AN3475
Appendix

Figure 5-1. Project Properties

ROM Origin can be given as any address value which is beyond the size of the bootloader. ROM length can be the
size of the memory available from ROM origin to the end of the memory.

5.1.2 Generating Binary File


To generate the binary file follow these steps:
1. Go to Project Properties > Building.
2. Enable the “Execute this line after” build option, and then insert the following command:

${MP_CC_DIR}\xc32-objcopy -I ihex -O binary


"${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.hex"
"${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.bin"

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 19


AN3475
Appendix

Figure 5-2. Generating Binary File

Building the project. The bin file output can be found in the following path: <your_project>.X\dist\<config_name>
\production\

5.2 Self-Programming of Downloaded Binary


Users can download the desired application binary from any FTP server using the FTP client application
demonstrated in this document. Once the binary file is downloaded into the client file system, it can be programmed
to the MCU’s Flash memory as shown in the following flow chart.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 20


AN3475
Appendix

Figure 5-3. Programming Binary Flow Chart

Implementation of erasing and programing the Flash sector can be found in the APP_Flash_Task() function in the
source code of this application.
Application Code Entry
Upon every reset, the bootloader code checks for the following:
• User button press (SW0)
• A valid application code in the Flash address allocated for application
If either of these conditions is true, the execution jumps to the user application code without executing the FTP client
bootloader.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 21


AN3475
References

6. References
• The Microchip TCP/IP stack:
http://ww1.microchip.com/downloads/en/appnotes/00833c.pdf
®
• MPLAB Harmony v3 TCP/IP Help:
https://microchip-mplab-harmony.github.io/net/frames.html?frmname=topic&frmfile=index.html
• MPLAB Harmony v3 Installation and Usage:
https://github.com/Microchip-MPLAB-Harmony/mhc/wiki
• RFC 959:
https://tools.ietf.org/html/rfc959
• Microchip Developer Help:
https://microchipdeveloper.com/harmony3:start
• MPLAB Harmony v3:
https://www.microchip.com/mplab/mplab-harmony
• MPLAB Harmony GitHub wiki:
https://github.com/Microchip-MPLAB-Harmony/Microchip-MPLAB-Harmony.github.io/wiki
• How to Setup MPLAB Harmony v3 Software Development Framework:
http://ww1.microchip.com/downloads/en/DeviceDoc/How_to%20_Setup_MPLAB_%20Harmonyv3_
%20Software_%20Development_Framework_DS90003232A.pdf
• How to create first TCP/IP application: https://github.com/Microchip-MPLAB-Harmony/net/wiki/Create-your-first-
tcpip-pplication.
• MPLAB Harmony v2 to MPLAB Harmony v3 TCP/IP Application Migration Guide: https://github.com/Microchip-
MPLAB-Harmony/net/wiki/H2-to-H3-Migration.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 22


AN3475

The Microchip Website


Microchip provides online support via our website at http://www.microchip.com/. This website is used to make files
and information easily available to customers. Some of the content available includes:
• Product Support – Data sheets and errata, application notes and sample programs, design resources, user’s
guides and hardware support documents, latest software releases and archived software
• General Technical Support – Frequently Asked Questions (FAQs), technical support requests, online
discussion groups, Microchip design partner program member listing
• Business of Microchip – Product selector and ordering guides, latest Microchip press releases, listing of
seminars and events, listings of Microchip sales offices, distributors and factory representatives

Product Change Notification Service


Microchip’s product change notification service helps keep customers current on Microchip products. Subscribers will
receive email notification whenever there are changes, updates, revisions or errata related to a specified product
family or development tool of interest.
To register, go to http://www.microchip.com/pcn and follow the registration instructions.

Customer Support
Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Embedded Solutions Engineer (ESE)
• Technical Support
Customers should contact their distributor, representative or ESE for support. Local sales offices are also available to
help customers. A listing of sales offices and locations is included in this document.
Technical support is available through the website at: http://www.microchip.com/support

Microchip Devices Code Protection Feature


Note the following details of the code protection feature on Microchip devices:
• Microchip products meet the specification contained in their particular Microchip Data Sheet.
• Microchip believes that its family of products is one of the most secure families of its kind on the market today,
when used in the intended manner and under normal conditions.
• There are dishonest and possibly illegal methods used to breach the code protection feature. All of these
methods, to our knowledge, require using the Microchip products in a manner outside the operating
specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of
intellectual property.
• Microchip is willing to work with the customer who is concerned about the integrity of their code.
• Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code
protection does not mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection
features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital
Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you
may have a right to sue for relief under that Act.

Legal Notice
Information contained in this publication regarding device applications and the like is provided only for your
convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 23


AN3475

your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER


EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend,
indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such
use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights unless
otherwise stated.

Trademarks
The Microchip name and logo, the Microchip logo, Adaptec, AnyRate, AVR, AVR logo, AVR Freaks, BesTime,
BitCloud, chipKIT, chipKIT logo, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, HELDO, IGLOO, JukeBlox,
KeeLoq, Kleer, LANCheck, LinkMD, maXStylus, maXTouch, MediaLB, megaAVR, Microsemi, Microsemi logo, MOST,
MOST logo, MPLAB, OptoLyzer, PackeTime, PIC, picoPower, PICSTART, PIC32 logo, PolarFire, Prochip Designer,
QTouch, SAM-BA, SenGenuity, SpyNIC, SST, SST Logo, SuperFlash, Symmetricom, SyncServer, Tachyon,
TempTrackr, TimeSource, tinyAVR, UNI/O, Vectron, and XMEGA are registered trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries.
APT, ClockWorks, The Embedded Control Solutions Company, EtherSynch, FlashTec, Hyper Speed Control,
HyperLight Load, IntelliMOS, Libero, motorBench, mTouch, Powermite 3, Precision Edge, ProASIC, ProASIC Plus,
ProASIC Plus logo, Quiet-Wire, SmartFusion, SyncWorld, Temux, TimeCesium, TimeHub, TimePictra, TimeProvider,
Vite, WinPath, and ZL are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BlueSky, BodyCom,
CodeGuard, CryptoAuthentication, CryptoAutomotive, CryptoCompanion, CryptoController, dsPICDEM,
dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP,
INICnet, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, memBrain, Mindi, MiWi, MPASM, MPF,
MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM,
PICDEM.net, PICkit, PICtail, PowerSmart, PureSilicon, QMatrix, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad
I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense,
ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A.
and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
The Adaptec logo, Frequency on Demand, Silicon Storage Technology, and Symmcom are registered trademarks of
Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip
Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2020, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
ISBN: 978-1-5224-6113-5

Quality Management System


For information regarding Microchip’s Quality Management Systems, please visit http://www.microchip.com/quality.

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 24


Worldwide Sales and Service
AMERICAS ASIA/PACIFIC ASIA/PACIFIC EUROPE
Corporate Office Australia - Sydney India - Bangalore Austria - Wels
2355 West Chandler Blvd. Tel: 61-2-9868-6733 Tel: 91-80-3090-4444 Tel: 43-7242-2244-39
Chandler, AZ 85224-6199 China - Beijing India - New Delhi Fax: 43-7242-2244-393
Tel: 480-792-7200 Tel: 86-10-8569-7000 Tel: 91-11-4160-8631 Denmark - Copenhagen
Fax: 480-792-7277 China - Chengdu India - Pune Tel: 45-4485-5910
Technical Support: Tel: 86-28-8665-5511 Tel: 91-20-4121-0141 Fax: 45-4485-2829
http://www.microchip.com/support China - Chongqing Japan - Osaka Finland - Espoo
Web Address: Tel: 86-23-8980-9588 Tel: 81-6-6152-7160 Tel: 358-9-4520-820
http://www.microchip.com China - Dongguan Japan - Tokyo France - Paris
Atlanta Tel: 86-769-8702-9880 Tel: 81-3-6880- 3770 Tel: 33-1-69-53-63-20
Duluth, GA China - Guangzhou Korea - Daegu Fax: 33-1-69-30-90-79
Tel: 678-957-9614 Tel: 86-20-8755-8029 Tel: 82-53-744-4301 Germany - Garching
Fax: 678-957-1455 China - Hangzhou Korea - Seoul Tel: 49-8931-9700
Austin, TX Tel: 86-571-8792-8115 Tel: 82-2-554-7200 Germany - Haan
Tel: 512-257-3370 China - Hong Kong SAR Malaysia - Kuala Lumpur Tel: 49-2129-3766400
Boston Tel: 852-2943-5100 Tel: 60-3-7651-7906 Germany - Heilbronn
Westborough, MA China - Nanjing Malaysia - Penang Tel: 49-7131-72400
Tel: 774-760-0087 Tel: 86-25-8473-2460 Tel: 60-4-227-8870 Germany - Karlsruhe
Fax: 774-760-0088 China - Qingdao Philippines - Manila Tel: 49-721-625370
Chicago Tel: 86-532-8502-7355 Tel: 63-2-634-9065 Germany - Munich
Itasca, IL China - Shanghai Singapore Tel: 49-89-627-144-0
Tel: 630-285-0071 Tel: 86-21-3326-8000 Tel: 65-6334-8870 Fax: 49-89-627-144-44
Fax: 630-285-0075 China - Shenyang Taiwan - Hsin Chu Germany - Rosenheim
Dallas Tel: 86-24-2334-2829 Tel: 886-3-577-8366 Tel: 49-8031-354-560
Addison, TX China - Shenzhen Taiwan - Kaohsiung Israel - Ra’anana
Tel: 972-818-7423 Tel: 86-755-8864-2200 Tel: 886-7-213-7830 Tel: 972-9-744-7705
Fax: 972-818-2924 China - Suzhou Taiwan - Taipei Italy - Milan
Detroit Tel: 86-186-6233-1526 Tel: 886-2-2508-8600 Tel: 39-0331-742611
Novi, MI China - Wuhan Thailand - Bangkok Fax: 39-0331-466781
Tel: 248-848-4000 Tel: 86-27-5980-5300 Tel: 66-2-694-1351 Italy - Padova
Houston, TX China - Xian Vietnam - Ho Chi Minh Tel: 39-049-7625286
Tel: 281-894-5983 Tel: 86-29-8833-7252 Tel: 84-28-5448-2100 Netherlands - Drunen
Indianapolis China - Xiamen Tel: 31-416-690399
Noblesville, IN Tel: 86-592-2388138 Fax: 31-416-690340
Tel: 317-773-8323 China - Zhuhai Norway - Trondheim
Fax: 317-773-5453 Tel: 86-756-3210040 Tel: 47-72884388
Tel: 317-536-2380 Poland - Warsaw
Los Angeles Tel: 48-22-3325737
Mission Viejo, CA Romania - Bucharest
Tel: 949-462-9523 Tel: 40-21-407-87-50
Fax: 949-462-9608 Spain - Madrid
Tel: 951-273-7800 Tel: 34-91-708-08-90
Raleigh, NC Fax: 34-91-708-08-91
Tel: 919-844-7510 Sweden - Gothenberg
New York, NY Tel: 46-31-704-60-40
Tel: 631-435-6000 Sweden - Stockholm
San Jose, CA Tel: 46-8-5090-4654
Tel: 408-735-9110 UK - Wokingham
Tel: 408-436-4270 Tel: 44-118-921-5800
Canada - Toronto Fax: 44-118-921-5820
Tel: 905-695-1980
Fax: 905-695-2078

© 2020 Microchip Technology Inc. Application Note DS00003475A-page 25

You might also like