The PL360 is a multi-protocol modem for the Power Line Communication (PLC) device, implementing a
very flexible architecture and allowing the implementation of standard and customized PLC solutions. It
has been conceived to be bundled with an external Microchip MCU, which downloads the corresponding
PLC firmware and controls the operation of the PL360 device.
The purpose of the PL360 Host Controller is to provide the external microcontroller a way to control the
PL360 device and offer upper layers an easy way to get access to PLC communication.
As an example of the PLC system, the figure below shows the system architecture for G3 protocol based
on a PL360 device being controlled by a SAM4C MCU.
Figure 1. G3 System Architecture
The aim of this document is to clarify and detail the user interface of the PL360 Host Controller.
The PL360 Host Controller is a C source code component which provides the host MCU application
access to the API of the Power Line Communications PHY layer running in the PL360 device. Figure 1-1
shows the architecture of the software which runs on the host MCU. The components of the PL360 Host
Controller are described in the following subsections.
Figure 1-1. PL360 Host Controller Architecture
PL360
PL360 Host Controller Architecture
1.1 PL360 Host Controller File Structure
The PL360 Host Controller is provided as a component of ASF (Atmel Software Framework). The image
below shows the location of the main files of the PL360 Host Controller Software. Different blocks provide
different features. The next subsections describe the purpose of each block.
This module provides an interface to the application for all PLC operations.
This API includes the following services:
•Set custom hardware interface
•Manage Bootloader process of the PL360 device
•Manage external configuration of the PL360 device
•Enable / Disable PLC interface
•Enable / Disable secure mode
•Enable / Disable add-on module
This interface is defined in file atpl360.h and some of these services can be configured in file
conf_atpl360.h (see 5.1 Configure Application).
1.3 PLC Stack Wrapper
This module provides an interface compliant with the specific PLC communication stack, G3 or PRIME. It
includes all declarations and definitions relative to the specific communication stack.
The main function of this module is to parse/serialize frames between SPI protocol and API functions in
order to manage information from/to upper layers. It also provides a configuration function to set some
hardware- specific parameters during the initialization process.
For further details, please refer to atpl360_comm.h header file.
This module is responsible for providing compatibility with Microchip PLC tools. Its main function is to
pack/unpack frames so that they can be used by each PLC tool.
There are two add-ons available per PLC communication stack: one to connect with the Microchip PLC
Sniffer PC tool, and another one to connect with the Microchip PLC PHY Tester PC tool.
1.5 Bootloader
The PL360 device is a RAM-based device, so it is required to transfer the binary code to the device after
each reset. The main purpose of this module is to manage the download process.
During the bootloading, the integrity of the SPI communication between the PL360 Host Controller and
the PL360 device is checked in each SPI transaction. If the SPI header does not match the expected
information, the PL360 Host Controller resets the PL360 device and the bootloader downloads the binary
code to the device again. The PL360 Host Controller tries this download process up to three times and
reports a critical failure to upper layers after the last unsuccessful download process.
There are two modes of operation for the bootloader: Normal mode or Secure mode.
PL360
PL360 Host Controller Architecture
The following points should be taken into account in order to enable the Secure Boot mode:
•It is mandatory to include specific metadata in the binary file before downloading it to the PL360
device, such as number of blocks to decypher, init vector and signature. A Microchip Python script
is provided in PLC PHY Workspace as an example about how to include this metadata information
in the binary file
•It is needed to define ATPL360_SEC_BOOT_MODE in conf_atpl360.h file, and make sure that
__ATPL360B__ is defined as symbol in project properties
For further details, please check the bootloader commands defined in atpl360_hal_spi.h header file.
1.6 Hardware Abstraction Layer (HAL)
The Hardware Abstraction Layer provides full hardware compatibility with the host device.
There are four hardware peripherals that depend on customer platform/implementation:
•Access to SPI peripheral
•Access to interrupt system
•Access to delay system
•Access to carrier detect line
For further details, please refer to section 4. Initialization Example.
Figure 2-1 shows the PL360 system architecture of the embedded firmware. The PL360 device has an
embedded Cortex M7 CPU to run the PLC firmware. This firmware can either implement the G3 or the
PRIME Physical layer depending on what has been loaded by the PL360 Host Controller. The
components of the system are described in the following subsections.
Figure 2-1. PL360 Embedded Firmware Architecture
PL360
PL360 System Architecture
2.2 Bootloader
The bootloader is an Internal Peripheral (IP) designed to load the program from an external master into
the instruction memory of the Cortex M7. This IP can access instruction memory, data memory and
peripheral registers.
For further information, please refer to the PL360 datasheet.
There are two memory configurations controlled via MEM_CONFIG bit. In the firmware loading process,
the appropriate memory configuration is established by the PL360 Host Controller according to the
firmware requisites.
MEM_CONFIGProgram memoryData memory
0128 KBytes64 KBytes
196 KBytes96 KBytes
The PL360 Host Controller code provided by Microchip sets MEM_CONFIG to 1 by default.
For further information, please refer to the PL360 datasheet.
2.4 PL360 Drivers
Each driver is responsible for managing a hardware peripheral:
•WDT: Watchdog system
•SPU: Signal Processing Unit
•APMC: Advanced Power Management Controller
•DACC: Digital to Analog Converter Controller
•ADCC: Analog to Digital Converter Controller
•SPI: Serial Peripheral Interface
•XDMAC: DMA Controller
•XCORR: Correlator
•PIO: Parallel Input/Output Controller
•CRC: Cyclic Redundancy Check
PL360
PL360 System Architecture
2.5 PHY PLC Service
There are several blocks in the PHY PLC service:
•Application Interface: The API provides a set of functions to access the physical medium and
different parameters relative to each communication stack
•Host Interface: This block is in charge of managing the communication with the PL360 Host
Controller through SPI. It is responsible for parsing/serializing the SPI data, managing PLC data
regions and providing control on PLC Interruption PIO
•Coupling: This block contains the hardware configuration associated to the reference design
provided by Microchip. If a customer needs to change this configuration to adapt it to its own
design, please refer to the 5.2 Configure Coupling Parameters chapter
•TX Chain: The TX chain is responsible for handling messages from upper layers (passed through
the API) to the physical output. This block controls all drivers relative to transmission and adapts
signal parameters in order to use functionalities of the transmission chain PHY Utils block:
convolutional encoder, scrambler, interleaver, modulator, IFFT and interpolator. Also, it handles the
result of the transmission in order to report it to upper layers through the API
•RX Chain: The RX chain is responsible for handling messages from the physical input to upper
layers (passed through the API). This block checks if the PLC signal is present on the PLC
medium, synchronizes with this PLC signal and drives the signal through functionalities of the
reception chain in the PHY Utils block: decimator, FFT, demodulator, deinterleaver, descrambler
and Viterbi block. Also, it builds the complete message and reports it to upper layers through the
API
•Shared Memory: This block defines the structure of the data memory to avoid collisions between
TX and RX chains
•Zero Cross: The Zero Cross is responsible for calculating the last Zero Cross value and providing it
to the PLC communication stack in use. For further information, please refer to 13. Appendix B: ZC
Offset Configuration
•PHY Utils: This block contains several functionalities used by the TX/RX chains
2.6 PHY Host Application
The PHY Host Application is responsible for running the main application of the PL360 device. It is in
charge of initializing the hardware and clock systems, checking the watchdog timer and managing the
PL360 PLC service described in the previous chapter.
The Advanced Software Framework (ASF) is a MCU software library providing a large collection of
embedded software for Atmel flash MCUs: megaAVR, AVR XMEGA, AVR UC3 and SAM devices.
For details on ASF please refer to Advanced Software Framework documentation:
•Advanced Software Framework - Website
•[PDF] Atmel AVR4029: Atmel Software Framework - Getting Started
This chapter aims to explain the different steps required during the initialization phase of the system. After
powering up the PL360 device, a set of initialization sequences must be executed in the correct order for
the proper operation of the PL360 device.
The steps are the following:
1.Init controller descriptor
2.Set controller callbacks
3.Enable controller
4.PL360 event handling
Failure to complete any of the these initialization steps will result in failure in the PL360 Host
Controller startup.
PL360
Initialization Example
4.1 Init Controller Descriptor
The PL360 Host Controller is initialized by calling the atpl360_init function in the API. The PL360
Host Controller initialization routine performs the following steps:
•Disable PLC interrupt and component
•Register wrapper for hardware abstraction layer (for further information, please refer to 12.1.1
Initialization Function)
•Reset the PL360 device using corresponding host MCU control GPIOs
•Configure a GPIO as an interrupt source from the PL360 device
•Initialize the SPI driver
•Register an internal event handler for the external PLC interrupt
•If an add-on is required, initialize specific add-on (configured previously). See chapter 5.1
Configure Application
•Return a descriptor to the PL360 Host Controller. This descriptor will be used to manage the PLC
communication
4.2 Set Controller Callbacks
After initializing the PL360 Host Controller, it is important to set callbacks to manage PL360 events.
The PL360 Host Controller reports PLC events using callback functions.
There are 4 callback functions.
•Data indication: Used to report a new incoming message
•Data confirm: Used to report the result of the last transmitted message
•Add-on event: Used to report that a new add-on message is ready to be sent to the PLC application
•Exception event: Used to report if an exception occurs, such as a reset of the PL360 device
The PL360 Host Controller is enabled by calling the atpl360_enable function in the API. This PL360
Host Controller routine performs the following steps:
•Disable/enable PLC interrupt and component
•Transfer the PL360 firmware to the PL360 device and validate. In case of failure, report a critical
error in host communication with the PL360 device through exception callback
4.4 PLC Event Handling
Once the controller callbacks have been set up, the PL360 Host Controller component must be enabled.
Then, the host MCU application is required to call the PL360 Host Controller API periodically to handle
events from PL360 embedded firmware.
The PL360 Host Controller API allows the host MCU application to interact with the PL360 embedded
firmware. To facilitate interaction, the PL360 Host Controller implements the host interface protocol
described in section 6. Host Interface Management. This protocol defines how to serialize and how to
handle API requests and response callbacks over the SPI bus interface.
PL360
Initialization Example
Some PL360 Host Controller APIs are synchronous function calls, whose return indicates that the
requested action is completed. However, most API functions are asynchronous. This means that when
the application calls an API to request a service, the call is non-blocking and returns immediately, usually
before the requested action is completed. When the requested action is completed, a notification is
provided in the form of a host interface protocol message from the PL360 embedded firmware to the
PL360 Host Controller, which, in turn, delivers it to the application via callback functions. Asynchronous
operation is essential when the requested service, such as a PLC message transmission, may take
significant time to complete. In general, the PL360 embedded firmware uses asynchronous events to
notify the host driver of status changes or pending data.
The PL360 device interrupts the host MCU when one or more events are pending in the PL360
embedded firmware. The host MCU application processes received data and events when the PL360
Host Controller calls the corresponding event callback function(s). In order to receive event callbacks, the
host MCU application is required to periodically call the atpl360_handle_events function in the API.
When host MCU application calls atpl360_handle_events, the PL360 Host Controller checks for
pending unhandled interrupts from the PL360 device. If no interrupt is pending, it returns immediately. If
an interrupt is pending, atpl360_handle_events function dispatches the PLC event data to the
respective registered callback. If the corresponding callback is not registered, the PLC event is discarded.
It is recommended to call this function either:
•From the main loop or from a dedicated task in the host MCU application; or,
•At least once when the host MCU application receives an interrupt from the PL360 embedded
firmware
The Host driver function atpl360_handle_events is non re-entrant. In the operating
system configuration, it is required to protect the PL360 Host Controller from re-entrance.
The PL360 firmware has a set of configurable parameters that control its behavior. There is a set of
configuration APIs provided to the host MCU application to configure these parameters. The configuration
APIs are categorized according to their functionality: application, coupling parameters and secure mode.
Any parameter left unset by the host MCU application will use the default value assigned during the
initialization of the PL360 firmware.
Info: All configuration parameters described in this chapter can be found in conf_atpl360.h file.
5.1 Configure Application
The following parameters can be modified to alter the behavior of the device.
•Use add-on capabilities:
–Serial Interface: provides handling of messages to communicate with the Microchip PLC PHY
Tester PC tool and PLC Python scripts
–Sniffer Interface: provides handling of messages to communicate with the Microchip PLC
Sniffer PC tool
PL360
Configuration
Info: These add-on modules are included in the PLC PHY workspace provided by Microchip.
This workspace contains the projects to use with the Microchip PLC tools commented on
previously.
•Only in case of G3 communication stack, the frequency band can be selected depending on
customer requirements. G3 CEN-A, CEN-B and FCC bands are available using ATPL360_WB
parameter in the file conf_atpl360.h. Take into account that this configuration requires the use
of different firmware binary files in the PL360 device. For further information, please refer to 12.2.1
Bandplan Selection.
5.2 Configure Coupling Parameters
Sometimes the hardware designed by the customer hasn’t got exactly the same performance as the
reference design provided by Microchip, so it is possible that some adjustments are needed in order to
get the best performance.
For that purpose, the following parameters can be modified:
•MAX_RMS_HI_TABLE, MAX_RMS_VLO_TABLE: Coupling parameters to define RMS values in
Hi/Vlo impedance
•TH1_HI_TABLE, TH2_HI_TABLE, TH1_VLO_TABLE, TH2_VLO_TABLE: Coupling parameters
to define threshold values to check in Hi/Vlo impedance
•PREDIST_COEF_HI_TABLE, PREDIST_COEF_VLO_TABLE: Coupling parameters to define
Predistortion Coefficients in Hi/Vlo impedance
•
IFFT_GAIN_HI_MAX, IFFT_GAIN_VLO_MAX : Coupling parameters to define IFFT Gain in Hi/Vlo
impedance
•DACC_CFG_TABLE: Coupling parameters to define DACC behavior
Tip: Microchip provides a specific tool called PHY Calibration Tool with the purpose of helping
customers calculate the best values for all coupling parameters depending on their own
hardware design.
During startup, the PL360 Host Controller verifies that the firmware is running in the PL360 device and
sets custom coupling parameters through the atpl360_comm_set_coup_cfg function in the API,
which should be adapted by customers depending on their hardware requirements. The PL360 Host
Controller calls this function after any unexpected reset of the PL360 device.
Tip: To apply a customized coupling configuration, ATPL360_CFG_COUP_ENABLE must be
uncommented in conf_atpl360.h file.
5.3 Configure Secure Mode
For further information, please contact the Microchip support team.
The PL360 Host Controller services are divided in two categories: synchronous and asynchronous
services. See 4.4 PLC Event Handling.
Most of the services implemented by the PL360 Host Controller are asynchronous.
The synchronous service is only used in the get_config function in order to get specific internal
parameters relative to the communication stack.
When a function from the API is called, a sequence of actions is activated to format the request and to
arrange to transfer it to the PL360 device through the SPI protocol.
When an asynchronous event occurs, the PL360 Host Controller handles the PLC interrupt, checks the
events reported by the PL360 device and extracts the information relative to the notified event.
The associated callback will be invoked in the next call to atpl360_handle_events function.
6.1 Message Transmission
The following figure shows the steps involved in the transmission of a message from the PL360 Host
Controller to the PL360 device.
PL360
Host Interface Management
Figure 6-1. Sequence of Message Transmission
6.2 Message Reception
The following figure shows the steps involved in the reception of a message from the PL360 device to the
PL360 Host Controller.
The main interface of the PL360 device is the SPI. The PL360 device employs a protocol to allow the
exchange of formatted data with the PL360 Host Controller. The PL360 SPI protocol uses raw bytes
exchanged on the SPI bus to form high level structures like requests and callbacks.
The PL360 SPI protocol consists of two layers:
•Layer 1: bootloader commands to transfer the firmware and configure the PL360 device
•Layer 2: firmware commands to allow the host MCU application to exchange high level messages
(e.g. PLC data transmission or PLC data reception) with the PL360 embedded firmware
The PL360 SPI Protocol is implemented as a command-response transaction and assumes that one part
is the master (PL360 Host Controller) and the other one is the slave (PL360 embedded firmware).
The format of Command, Response and Data frames is described in the following subsections. The
following points apply:
•There is a response for each command
•Transmitted/received data is divided into packets with variable size
•For a write transaction (slave is receiving data packets), the slave sends a response for each data
packet
•For a read transaction (master is receiving data packets), the master does not send any response
The header field is formed by the first 15 bits and it contains the boot signature data
(0b010101100011010). This data is fixed by the PL360 device and it is used to identify the status of the
PL360 device.
The flags field contains information about the reset type of the last reset event:
•USER_RST: User reset
•CM7_RST: Cortex reset
•WDG_RST: Watchdog reset
Table 7-1. Boot Signature Data
3130292827262524
01010110
2322212019181716
0011010USER_RST
15141312111098
CM7_RSTWDG_RST––––––
76543210
––––––––
7.3 Firmware Command Format
The following frame format is used for firmware commands, where the PL360 device supports a DMA
address of two bytes.
The address field contains the identification number of the region to access data. These region numbers
are described in section 7.5 Firmware Data Memory Regions.
The CMD field (1 bit), which is the most significant bit of the length field, contains the SPI command:
•Read command: 0
•Write command: 1
The length field (15 bits) contains the number of 16-bit blocks to read.
The payload field depends on the region number to access and on the communication stack in use, G3 or
PRIME. For further information, please refer to atpl360_comm.h file.
7.4 Firmware Response Format
The following frame format is used for firmware responses.
Figure 7-3. Firmware Response Fields
The header field contains the firmware signature data (0x1122). This field is fixed by the PL360
embedded firmware and is used to check if this firmware runs properly.
Info: Due to the 16-bit configuration used in this SPI firmware transaction, the firmware
signature is stored in memory as 0x2211.
The payload field depends on the PLC communication stack in use (G3 or PRIME). For further
information, please refer to atpl360_comm.h file.
7.5 Firmware Data Memory Regions
This section shows the data memory regions defined in the PL360 device depending on which PLC
communication stack is used.
The only difference between PRIME and G3 communication stacks regarding data memory regions is the
CAUTION
number of transmission messages that can be simultaneously queued. In case of G3, only one message
can be queued. In case of PRIME, two transmission messages can be queued simultaneously. This is
possible because there are two transmission buffers defined in the PRIME PL360 embedded firmware,
TX0 and TX1.
In both cases, G3 and PRIME, upper layers are responsible for managing multiple TX times in
order to avoid collisions between them.
7.5.1 G3 Memory Regions
The following table defines memory regions to use with the G3 communication stack:
Table 7-2. G3 Memory Regions Table
Region NameValueComments
ATPL360_STATUS_INFO_ID0Information relative to the system timer and system events
PL360
SPI Protocol
occurrences in the PL360 firmware
ATPL360_TX_PARAM_ID1Information relative to parameters of the last transmission
ATPL360_TX_DATA_ID2Information relative to data of the last transmission
ATPL360_TX_CFM_ID3Information relative to the confirmation of the last transmission
ATPL360_RX_PARAM_ID4Information relative to parameters of the last received message
ATPL360_RX_DATA_ID5Information relative to data of the last received message
ATPL360_REG_INFO_ID6Information relative to internal registers or PIB’s
7.5.2 PRIME Memory Regions
The following table defines memory regions to use with the PRIME communication stack:
Table 7-3. PRIME Memory Regions Table
Region NameValueComments
ATPL360_STATUS_INFO_ID0Information relative to the system timer and system events
ATPL360_TX0_PARAM_ID1Information relative to parameters of the last transmission
ATPL360_TX0_DATA_ID2Information relative to data of the last transmission (buffer 0)
ATPL360_TX0_CFM_ID3Information relative to the confirmation of the last transmission
occurrences in the PL360 firmware
(buffer 0)
(buffer 0)
ATPL360_TX1_PARAM_ID4Information relative to parameters of the last transmission
(buffer 1)
ATPL360_TX1_DATA_ID5Information relative to data of the last transmission (buffer 1)
ATPL360_TX1_CFM_ID6Information relative to the confirmation of the last transmission
In a message transmission, there are 2 SPI blocks. The first one is relative to the transmission of G3
parameters of the message, the second one is relative to the data part of the same message.
In a transmission of parameters, the following can be seen:
•Master (MOSI):
–Send ID memory region(16 bits): 0x0001 (ATPL360_TX_PARAM_ID)
–Send SPI command (1 bit): 1 (write command)
–Send SPI params length (15 bits) (in blocks of 16-bits): 0x14 (40 bytes)
–Send configuration parameters of G3 transmission (40 bytes) [example in CEN-A band]
•Slave (MISO): PL360 device responds with the Firmware Header (0x1122)
•IRQ is not used in this request operation
PL360
SPI Protocol
7.6.1.2 G3: Send Data
Figure 7-6. G3 Send Data SPI Array
In a transmission of data, the following can be seen:
•Master (MOSI):
–Send ID memory region(16 bits): 0x0002 (ATPL360_TX_DATA_ID)
–Send SPI command (1 bit): 1 (write command)
–Send SPI data length (15 bits) (in blocks of 16-bits): 0x04 (8 bytes)
–Send data of G3 transmission (8 bytes)
•Slave (MISO): PL360 device responds with the Firmware Header (0x1122)
•IRQ is not used in this request operation
7.6.2 G3: Read TX confirm Information
When message transmission is complete, the PL360 device reports the status of the last transmission.
For that purpose, IRQ is used to notify the PL360 Host Controller that an event has occurred.
–Send ID memory region(16 bits): 0x0001 (ATPL360_TX0_PARAM_ID)
–Send SPI command (1 bit): 1 (write command)
–Send SPI params length (15 bits) (in blocks of 16-bits): (param length + data length) / 2,
where param length is 12 bytes
–Send configuration parameters of PRIME transmission (12 bytes)
–Send data part of message (variable)
•Slave (MISO): PL360 responds with Firmware Header (0x1122)
IRQ is not used in this request operation.
7.6.5 PRIME: Read TX confirm Information (Buffer 0)
When message transmission is complete, the PL360 device reports the status of the last transmission.
For that purpose, IRQ is used to notify the PL360 Host Controller that an event has occurred.
Figure 7-14. PRIME TX Confirm Information SPI Sequence
PL360
SPI Protocol
In the figure above, the following can be seen:
•IRQ is used to notify of PL360 events
•First SPI transaction corresponds to the retrieval of event information from the PL360 device
•Second SPI transaction corresponds to the retrieval of confirmation data from the PL360 device (if
needed)
It is similar to the flow described in section 7.6.2.1 Get Events Information, but changing the firmware
descriptors for the ones applicable to the PRIME PL360 firmware.
7.6.5.2 Get Confirmation Data (Buffer 0)
Figure 7-16. PRIME Confirmation Data SPI Array
It is similar to the flow described in section 7.6.2.2 Get Confirmation Data, but changing the firmware
descriptors for the ones applicable to the PRIME PL360 firmware.
7.6.6 PRIME: Receive Message
Figure 7-17. PRIME Receive Message SPI Sequence
PL360
SPI Protocol
It is similar to the flow described in section 7.6.3 G3: Receive Message, but changing the firmware
descriptors for the ones applicable to the PRIME PL360 firmware.
In this case, two events are read simultaneously, ATPL360_RX_DATA_IND_FLAG_MASK and
ATPL360_RX_QPAR_IND_FLAG_MASK, so there are two consecutive SPI transactions in order to get
data and parameters information from the PL360 device.
It is similar to the flow described in section 7.6.3.1 Get Events Information and Data, but changing the
firmware descriptors for the ones applicable to the PRIME PL360 firmware.
7.6.6.2 Get Data Information
Figure 7-19. PRIME Get Data SPI Array
It is similar to the flow described in section 7.6.3.1 Get Events Information and Data, but changing the
firmware descriptors for the ones applicable to the PRIME PL360 firmware.
7.6.6.3 Get Parameters Information
Figure 7-20. PRIME Get Parameters SPI Array
PL360
SPI Protocol
It is similar to the flow described in section 7.6.3.2 Get Events Information and Parameters, but changing
the firmware descriptors for the ones applicable to the PRIME PL360 firmware.
7.6.7 Read Register Information
It is possible to get internal information from the PL360 device.
Figure 7-21. Read Register Information SPI Sequence
In the figure above, three SPI transactions can be seen:
Please note that all the provided application examples have been configured to work on
Microchip evaluation boards. When using other hardware, the firmware project must define a
Board Support Package (BSP) customized for that hardware.
Along with the PLC communication stacks, specific application examples are provided in order to show
how to integrate the PL360 Host Controller.
In addition, PHY examples using only the PL360 Host Controller are provided in order to evaluate some
low level parameters and to be used together with a Microchip PLC tool for demonstration purposes.
In case of a G3 stack, applications are provided for CENELEC A, CENELEC B and FCC bands (project
folders with suffixes “_cen_a”, “_cen_b” and “_fcc” in each example). Setting the appropriate band in each
project is made by means of conf_atpl360.h file, as explained in section 5.1 Configure Application.
In case of a PRIME stack, applications are provided for CENELEC A and FCC bands (the same project
folder is used in both bands depending on PRIME configured channel. See 12.3.4.27
ATPL360_REG_CHANNEL_CFG (0x4016)).
PL360
Example Applications
8.1 PHY Examples
8.1.1 PHY Tester
The PHY Tester is an application example that demonstrates the complete performance of the Microchip
PLC PHY layer. This example requires a board and a PC tool. In addition, the Microchip PLC PHY Tester
PC tool (available in the Microchip website) has to be installed on the user’s host PC to interface with the
boards.
The Microchip PLC PHY Tester PC tool configures the devices and performs communication tests.
This example uses the serial interface configured through UART0 at 230400bps.
8.1.2 PHY Sniffer
The PHY Sniffer is an application example to monitor data traffic in the PLC network and then send it via
serial communications to a PC tool and the Microchip PLC Sniffer PC tool (available in the Microchip
website), which has to be installed in the user’s host PC to interface with the board. This example
requires only one board and (obviously) a PLC network to be monitored.
This example uses the serial interface configured through UART0 at 230400bps.
8.1.3 TX Console
Due to PC timing, the Microchip PLC PHY Tester PC tool may present limitations in those applications or
tests that require a very short time interval between consecutive frame transmissions.
The PHY TX Console is an application example that demonstrates the complete performance of the
Microchip PLC PHY Layer avoiding the limitations of timing in the PC host. This way, users can perform
more specific PHY tests (e.g., short time interval between consecutive frames).
This application offers an interface to the user by means of a command console. In this console, users
can configure several transmission parameters such as modulation, frame data length and time interval
between frames. In the console it is also possible to test transmission/reception processes.
This chapter describes which hardware platforms are currently supported with the PL360 Host Controller
source code. Usually, a platform usually is comprised of three major components:
•An MCU
•A transceiver chip
•A specific board or even several boards that contain the MCU or the transceiver chip
9.1 Supported MCU Families
Platforms based in SAM4C family MCUs.
The dedicated code for each device of the family can be found in the corresponding subdirectories of the
FW package.
This appendix describes all the data structures and functions that are part of the PL360 Host Controller
component.
12.1 Common PHY API
12.1.1 Initialization Function
The PL360 Host Controller must always be initialized when the system starts the execution. The following
function initializes the hardware parameters and configures the controller descriptor:
The component descriptor offers the customer a set of functions to get access to the PL360 device. It is
defined as a structure of function pointers as follows:
•set_callbacks function is used to set upper layers functions to be executed when a PL360 Host
Controller event has been reported. For further information, please refer to the 12.1.2 Setting
Callbacks chapter.
•send_data function provides a mechanism to send a PLC message through the PL360 device.
For further G3 information, please refer to the G3 12.2.2 PHY-DATA.request chapter. For further
PRIME information, please refer to the PRIME 12.3.1 PHY-DATA.request chapter.
•get_config function provides a read access method to get PL360 internal data. For further
information, please refer to the 12.1.6.2 Get Configuration chapter.
•set_config function provides a write access method to set PL360 internal data. For further
information, please refer to the 12.1.6.1 Set Configuration chapter.
•send_addons_cmd function provides a mechanism to connect PLC Microchip tools to the PL360
device. All information received from these tools should be redirected to this function in order to
pass the information to the PL360 Host Controller
The PL360 Host Controller also needs to have access to hardware peripherals. A HAL wrapper structure
is used to separate this hardware and software dependency.
atpl360_dev_callbacks_tPointer to callbacks struct
The structure used as input of pf_set_callbacks_t function contains four fields which are the
pointers to the functions to be executed for the different PL360 Host Controller events:
typedef enum {
ATPL360_EXCEPTION_UNEXPECTED_SPI_STATUS = 0, /* SPI has detected an unexpected status */
ATPL360_EXCEPTION_SPI_CRITICAL_ERROR, /* SPI critical error. */
ATPL360_EXCEPTION_RESET, /* Reset device */
} atpl360_exception_t;
Tip: SPI critical error means that the PL360 firmware cannot be loaded into the PL360 device.
A possible reason for this would be that the SPI is not working properly.
12.1.3 Enable Function
Once the host descriptor has been initialized and the application callbacks have been set, the PL360
Host Controller must be enabled using the following function:
ul_binary_addressMemory address where the PL360 firmware binary file is located
ul_binary_lenSize of the PL360 firmware binary file
This function performs the following actions:
•Disable PLC interrupt
•Transfer firmware binary file to the PL360 device
•Check firmware integrity
•Enable PLC interrupt
12.1.4 Disable Function
The PL360 Host Controller provides a mechanism to disable the notification of PL360 Host Controller
events to the application in order to avoid interrupting the normal flow of the customer application. This
mechanism implies that the PLC activity is stopped in the PL360 device.
void atpl360_disable(void);
12.1.5 Event Handler Function
This function provides a mechanism to notify the PL360 Host Controller events to the customer
application using the previously configured callbacks.
The following function must be called every program cycle or at least once when the host MCU
application receives an interrupt from the PL360 embedded firmware:
us_param_idPIB ID (see 12.3.4 PIB Objects Specification and Access (PRIME) and
*px_valuePointer to parameter value to get
uc_lenLength of parameter
b_syncSet synchronous (True) or asynchronous mode (False)
The function returns 0 if the result is invalid, otherwise returns 1.
12.2 G3 PHY API
12.2.1 Bandplan Selection
At compilation time, the G3-PLC bandplan must be defined (i.e.: CENELEC A, CENELEC B, FCC or
ARIB) according to user needs.
In general_defs.h there are four constant options for configuring the bandplan:
/* ! CENELEC A Band Plan (24 - 500 kHz) */
#define ATPL360_WB_CENELEC_A 1
/* ! FCC Band Plan (24 - 500 kHz) */
#define ATPL360_WB_FCC 2
/* ! ARIB Band Plan (24 - 500 kHz) */
#define ATPL360_WB_ARIB 3
/* ! CENELEC-B Band Plan (98 - 122 kHz) */
#define ATPL360_WB_CENELEC_B 4
12.2.5 PIB Objects Specification and Access (G3))
The constant ATPL360_WB has to be set, in file conf_atpl360.h, to the value of one of the constant
options of general_defs.h so that the PHY layer is correctly configured.
TX_RESULT_NO_TX = 255, /* No transmission ongoing */
};
12.2.3 PHY-DATA.confirm
This data confirm callback executes the function set by the upper layer at the initialization of the PL360
Host Controller. The pointer to the function is set in:
This data indication callback executes the function set by the upper layer at the initialization of the PL360
Host Controller. The pointer to the function is set in:
Version number of PL360 embedded firmware in hexadecimal format. The format is 0xAABBCCDD,
where:
•AA: Corresponds to device model (0x36)
•BB: Corresponds to G3 band [0x01: CEN A, 0x02: FCC, 0x03: ARIB, 0x04: CEN B]
•CC: Major version number
•DD: Minor version number
Access: Read-only.
Value Range: 4 bytes.
Example Value: 0x36010200.
12.2.5.12 ATPL360_REG_TONE_MASK (0x4004)
Tone mask for static notching.
Access: Read-write.
Value Range: Depends on the number of carriers which are specified in the G3 band (one byte per
carrier).
PL360
Appendix A: PL360 Host Controller API
Default Value: 0.
12.2.5.13 ATPL360_REG_TONE_MAP_RSP_DATA (0x4005)
Tone Map response data. Best modulation and Tone Map combination to maximize baud-rate and
minimize frame error rate, based on last received message. See 12.2.5.67
ATPL360_REG_TONE_MAP_RSP_ENABLED_MODS (0x403E) to configure enabled modulations for the
selection algorithm.
The format is 0xAABBCCCCCC, where:
•AA: Modulation type
–BPSK: 0x00
–QPSK: 0x01
–8PSK: 0x02
–ROBO: 0x04
•BB: Modulation scheme
–Differential: 0x00
–Coherent: 0x01
•CCCCCC: Tone Map. 3 bytes (FCC, ARIB bands) or 1 byte (CEN_A, CEN_B bands)
Access: Read-only.
Value Range: 3 bytes (CEN_A, CEN_B bands) or 5 bytes (FCC, ARIB bands).
Number of times when the PL360 device received new data to transmit (send_data) and the PLC channel
is busy.
Access: Read-write.
Value Range: 4 bytes.
Default Value: 0.
12.2.5.19 ATPL360_REG_TX_BAD_LEN (0x400B)
Number of times when the PL360 device received new data to transmit (send_data) and the specified
length in transmission parameters is invalid.
Access: Read-write.
Value Range: 4 bytes.
Default Value: 0.
12.2.5.20 ATPL360_REG_TX_BAD_FORMAT (0x400C)
Number of times when the PL360 device received new data to transmit (send_data) and the transmission
parameters are not valid.
Access: Read-write.
Value Range: 4 bytes.
Default Value: 0.
12.2.5.21 ATPL360_REG_TX_TIMEOUT (0x400D)
Number of times when the PL360 device received new data to transmit (send_data) and it cannot
transmit data in the specified time provided by the transmission parameters.
Flag to indicate if automatic noise analyzer is enabled in the reception chain. If Automatic mode is
enabled, notch filter parameters (12.2.5.33 ATPL360_REG_RRC_NOTCH_ACTIVE (0x4019), 12.2.5.34
ATPL360_REG_RRC_NOTCH_INDEX (0x401A)) cannot be modified by the user. See 12.2.5.31
ATPL360_REG_TIME_BETWEEN_NOISE_CAPTURES (0x4017), 12.2.5.57
ATPL360_REG_RRC_NOTCH_THR_ON (0x4034), 12.2.5.58 ATPL360_REG_RRC_NOTCH_THR_OFF
(0x4035) to configure parameters related to the Auto-mode.
Access: Read-write.
Value Range: 1 byte [0: Disabled (Manual-mode), 1: Enabled (Auto-mode)].
It is recommended to keep the default value of this parameter. If reduced, the power
consumption could increase. Default value is optimum for power consumption and performance
of noise detection.
Time in microseconds to start a new noise capture after PDU reception/transmission.
Access: Read-write.
Value Range: 4 bytes.
Default Value: 3000 (3 milliseconds).
It is recommended to keep the default value of this parameter. If reduced, there could be
unexpected results.
12.2.5.33 ATPL360_REG_RRC_NOTCH_ACTIVE (0x4019)
Number of notched frequencies with RRC notch filter. For CEN_A, FCC and ARIB bands, up to 5 notched
frequencies are allowed. For CEN_B band, only one notched frequency is allowed.
Access: Depends on 12.2.5.30 ATPL360_REG_ENABLE_AUTO_NOISE_CAPTURE (0x4016) value:
Array of RRC notch filter index values in format unsigned Q7.8. The 7 integer bits indicate the carrier
index (0 –127) for which the notch filter is applied. The 8 decimal bits allow to apply the notch filter to a
frequency which is between two consecutive carriers.
To convert the notch index to frequency (in Hz), the following formula is applied:
F = INDEX * Fs / 65536 , where Fs is the sampling rate in Hz:
•CEN_A, CEN_B bands: Fs = 400000 Hz
•FCC, ARIB bands: Fs = 1200000 Hz
For example:
•CEN_A, INDEX = 8192 (0x2000): F = 8192 * 400000 / 65536 = 50000 Hz
•FCC, INDEX = 20544 (0x5040): F = 20544 * 1200000 / 65536 = 376172 Hz
PL360
Appendix A: PL360 Host Controller API
Access: Depends on 12.2.5.30 ATPL360_REG_ENABLE_AUTO_NOISE_CAPTURE (0x4016) value:
•1 (Auto-mode): Read-only
•0 (Manual-mode): Read-write
Value Range: 10 bytes (CEN_A, FCC, ARIB bands) or 2 bytes (CEN_B band). Each group of 2 bytes
corresponds to one notched frequency (Integer part: 0 - 127, Decimal part: 0-255). Number of valid
values depends on 12.2.5.33 ATPL360_REG_RRC_NOTCH_ACTIVE (0x4019).
Default Value: 0.
12.2.5.35 ATPL360_REG_NOISE_PEAK_POWER (0x401B)
Noise peak power. Power of the carrier with more noise power in dBuV. The value is updated only if Automode is enabled (12.2.5.30 ATPL360_REG_ENABLE_AUTO_NOISE_CAPTURE (0x4016)) or noise
capture is triggered through 12.2.5.42 ATPL360_REG_RRC_NOTCH_AUTODETECT (0x4024).
Deactivation threshold for narrow band noise (in dBμV quarters, uQ14.2).
Access: Read-write.
Value Range: 2 bytes.
Default Value: 254 (63.5 dBμV).
12.2.5.59 ATPL360_REG_CURRENT_GAIN (0x4036)
Current gain used. It can vary after every transmission if transmission AGC is enabled.
Access: Read-only.
Value Range: 2 bytes.
Default Value: Provided in atpl360_coup_cfg.h file.
12.2.5.60 ATPL360_REG_ZC_CONF_INV (0x4037)
Inverse mode for Zero Crossing Detector.
PL360
Appendix A: PL360 Host Controller API
Access: Read-write.
Value Range: 1 byte [0: Normal mode, 1: Inverted mode]
Default Value: 1.
12.2.5.61 ATPL360_REG_ZC_CONF_FREQ (0x4038)
Initial frequency in Hz for Zero Crossing Detector.
Access: Read-write.
Value Range: 1 byte.
Default Value: 50.
12.2.5.62 ATPL360_REG_ZC_CONF_DELAY (0x4039)
Time Delay in microseconds of external Zero Cross detection circuit.
Access: Read-write.
Value Range: 2 bytes.
Default Value: 176.
12.2.5.63 ATPL360_REG_NOISE_PER_CARRIER (0x403A)
Estimation of noise (in dBµV) in each carrier belonging to the corresponding band. It is measured every
time a noise capture is executed (see 12.2.5.30 ATPL360_REG_ENABLE_AUTO_NOISE_CAPTURE
Correlation threshold for synchronization (preamble detection). The format is uQ0.16. It represents
percentage with respect to the maximum ideal value of correlation (computed internally in PL360).
Access: Read-write.
Value Range: 2 bytes.
Default value: 0x7400 (45.3%).
It is recommended to keep the default value of this parameter in order to maintain expected
reception performance.
Estimation of clock frequency deviation on last received PDU. The estimated deviation is the difference
between transmitter and receiver devices. The format is sQ0.31 (signed). The unit is 0.001 ppm. To
convert to ppm, the read value has to be divided by 1000.
Access: Read-only.
Value Range: 4 bytes.
Default value: Not Applicable.
PL360
Appendix A: PL360 Host Controller API
12.3 PRIME PHY SAP
12.3.1 PHY-DATA.request
This function sends a frame using the PHY layer. This is done by means of a specific function provided by
the controller descriptor:
This data confirm callback executes the function set by the upper layer at the initialization of the PL360
Host Controller. The pointer to the function is set in:
ul_tx_timeInstant when frame transmission ended, referred to 1μs PHY counter
ul_rms_calcRMS_CALC value after transmission. Allows to estimate Tx power injected
uc_mod_typePRIME mode type (Related constants explained in 12.3.1 PHY-DATA.request)
PL360
Appendix A: PL360 Host Controller API
uc_tx_resultTx result (Constants listed in previous section)
uc_buffer_idIdentificator of the buffer used for transmitting
12.3.3 PHY-DATA.indication
This data indication callback executes the function set by the upper layer at the initialization of the PL360
Host Controller. The pointer to the function is set in:
–Signal Mode [Only valid if Band Mode = 1]: 0: Low level signals, 1: High level signals. In case
of low level signals, AGC is disabled. In case of high level signals, AGC is fixed to an internal
specific value
–Channel [Only valid if Band Mode = 0]: Select channel to capture from 1 to 8
•Start Time: Start time in microseconds referenced to PL360 internal timer
•Duration: Duration time in microseconds. Maximum duration depends on the selected Band Mode.
In case of channel mode, maximum duration is fixed to 80 seconds. In case of FCC band mode,
maximum duration is fixed to 30 seconds
Flag to indicate if automatic noise analyzer is enabled in the reception chain. If Automatic mode is
enabled, notch filter parameters (12.2.5.33 ATPL360_REG_RRC_NOTCH_ACTIVE (0x4019), 12.3.4.42
ATPL360_REG_RRC_NOTCH_INDEX (0x4025)) cannot be modified by the user. See 12.3.4.39
ATPL360_REG_TIME_BETWEEN_NOISE_CAPTURES (0x4022), 12.3.4.45
ATPL360_REG_RRC_NOTCH_THR_ON (0x4028), 12.3.4.46 ATPL360_REG_RRC_NOTCH_THR_OFF
(0x4029) to configure parameters related to the Auto-mode.
Access: Read-write.
Value Range: 1 byte [0: Disabled (Manual-mode), 1: Enabled (Auto-mode)].
It is recommended to keep the default value of this parameter. If reduced, the power
consumption could increase. Default value is optimum for power consumption and performance
of noise detection.
Time in microseconds to start a new noise capture after PDU reception/transmission.
Access: Read-write.
Value Range: 4 bytes.
Default Value: 3000 (3 milliseconds).
PL360
It is recommended to keep the default value of this parameter. If reduced, there could be
unexpected results.
12.3.4.41 ATPL360_REG_RRC_NOTCH_ACTIVE (0x4024)
Flag to indicate if RRC notch filter is active.
Access: Depends on 12.2.5.30 ATPL360_REG_ENABLE_AUTO_NOISE_CAPTURE (0x4016) value:
•1 (Auto-mode): Read-only
•0 (Manual-mode): Read-write
Value Range: 1 byte. [0: OFF, 1: ON].
Default Value: 0.
12.3.4.42 ATPL360_REG_RRC_NOTCH_INDEX (0x4025)
RRC notch filter index value in format unsigned Q9.7. The 9 integer bits indicate the carrier index for
which the notch filter is applied. The 7 decimal bits allow to apply the notch filter to a frequency which is
between two consecutive carriers. The index is mapped to the corresponding carrier considering baseband.
To convert the notch index to frequency (in Hz), the following formula is applied:
F = F’ + 65429.6875 + (Ch - 1) * 54687.5 , where Ch is the PRIME channel used (1-8, see 12.3.4.27
ATPL360_REG_CHANNEL_CFG (0x4016)) and F':
•If INDEX < 32768 : F' = INDEX * k
•If INDEX ≥ 32768 : F' = (INDEX-65536) * k
where k = 1000000 / (2048 * 128) = 3.814697265625 Hz
For example:
•Channel 1, INDEX = 64768 (0xFD00): F = (64768 - 65536) * k + 65429.6875 = 62500 Hz
Noise peak power. Power of the carrier with more noise power in dBuV. The value is updated only if Automode is enabled (12.3.4.38 ATPL360_REG_ENABLE_AUTO_NOISE_CAPTURE (0x4021)) or noise
capture is triggered through 12.3.4.44 ATPL360_REG_RRC_NOTCH_AUTODETECT (0x4027).
Number of times when the PL360 device received new data to transmit (send_data) and the PLC channel
is busy.
Access: Read-write.
Value Range: 4 bytes.
Default Value: 0.
12.3.4.52 ATPL360_REG_TX_BAD_LEN (0x402F)
Number of times when the PL360 device received new data to transmit (send_data) and the specified
length in transmission parameters is invalid.
Access: Read-write.
Value Range: 4 bytes.
Default Value: 0.
12.3.4.53 ATPL360_REG_TX_BAD_FORMAT (0x4030)
Number of times when the PL360 device received new data to transmit (send_data) and the transmission
parameters are not valid.
Access: Read-write.
Value Range: 4 bytes.
Default Value: 0.
12.3.4.54 ATPL360_REG_TX_TIMEOUT (0x4031)
Number of times when the PL360 device received new data to transmit (send_data) and it cannot
transmit data in the specified time provided by the transmission parameters.
Estimation of noise (in dBµV) in each carrier belonging to the corresponding band. It is measured every
time a noise capture is executed (see 12.3.4.38 ATPL360_REG_ENABLE_AUTO_NOISE_CAPTURE
The PHY layer calculates the electrical phase difference between transmitter and receiver for a given
frame. To do so, both devices have to be able to read the Zero Cross time of the mains.
The PL360 device has a dedicated input pin to be connected to a signal which provides such mains zero
cross.
Due to design reasons, the signal entering the PL360 device may not be fully synchronized with the real
mains zero cross. To handle this, a PIB is available (ATPL360_REG_ZC_CONF_DELAY) to set the delay,
in µs, between mains zero cross and the signal provided to the PL360 device. The delay has to be
measured between the highest point of the mains signal and the middle of the positive pulse provided to
the PL360 device (see Figure 13-1). Default value of this parameter is 176 µs.
Other PIBs for Zero Cross are:
•ATPL360_REG_ZC_CONF_INV: It indicates if the pulse is positive (value 0), as in Figure 13-1, or
negative (value 1). The default value is 1
•ATPL360_REG_ZC_CONF_FREQ: It is the expected frequency of the mains signal, in Hz. The
system is able to adapt itself to a different frequency of the mains signal, but the closer the
configured parameter is to the actual frequency, the faster the adaptation will be. The default value
is 50 Hz
Microchip provides online support via our web site at http://www.microchip.com/. This web site is used as
a means to make files and information easily available to customers. Accessible by using your favorite
Internet browser, the web site contains the following information:
•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 (FAQ), technical support requests,
online discussion groups, Microchip consultant 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
Customer Change Notification Service
Microchip’s customer notification service helps keep customers current on Microchip products.
Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata
related to a specified product family or development tool of interest.
To register, access the Microchip web site at http://www.microchip.com/. Under “Support”, click on
“Customer Change Notification” and follow the registration instructions.
Customer Support
Users of Microchip products can receive assistance through several channels:
•Distributor or Representative
•Local Sales Office
•Field Application Engineer (FAE)
•Technical Support
Customers should contact their distributor, representative or Field Application Engineer (FAE) for support.
Local sales offices are also available to help customers. A listing of sales offices and locations is included
in the back of this document.
Technical support is available through the web site 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 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, AnyRate, AVR, AVR logo, AVR Freaks, BitCloud,
chipKIT, chipKIT logo, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KeeLoq,
Kleer, LANCheck, LINK MD, maXStylus, maXTouch, MediaLB, megaAVR, MOST, MOST logo, MPLAB,
OptoLyzer, PIC, picoPower, PICSTART, PIC32 logo, Prochip Designer, QTouch, SAM-BA, SpyNIC, SST,
SST Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered trademarks of Microchip Technology
Incorporated in the U.S.A. and other countries.
ClockWorks, The Embedded Control Solutions Company, EtherSynch, Hyper Speed Control, HyperLight
Load, IntelliMOS, mTouch, Precision Edge, and Quiet-Wire 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, 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,
motorBench, 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.
Silicon Storage Technology is a registered trademark 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.
2018, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved.
ISBN: 978-1-5224-3623-2
Quality Management System Certified by DNV
ISO/TS 16949
Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer
fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures are for its PIC® MCUs and dsPIC
DSCs, KEELOQ® code hopping devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design and manufacture of development
systems is ISO 9001:2000 certified.