TI PLC Development Kit User Guide

Add to my manuals
83 Pages

advertisement

TI PLC Development Kit User Guide | Manualzz

TI PLC Development Kit User Guide

Version 0.92

April 9, 2012

Copyright

Texas Instruments Incorporated, 2009-2012

The information and/or drawings set forth in this document and all rights in and to inventions disclosed herein and patents which might be granted thereon disclosing or employing the materials, methods, techniques, or apparatus described herein are the exclusive property of Texas Instruments. No disclosure of information or drawings shall be made to any other person or organization without the prior consent of

Texas Instruments.

Texas Instruments Proprietary Information

Table of Contents

Table of Contents ............................................................................. 2

1.0

TI PLC Development Kit Overview ............................................ 4

Features ........................................................................................................................................................... 4

PLC Development Kit Components ................................................................................................................. 5

System Installation Requirements .................................................................................................................. 6

Software Installation ....................................................................................................................................... 7

Hardware Setup .............................................................................................................................................. 7

1.5.1. G3 PLC Point-to-Point HW Setup .......................................................................................................... 9

1.5.2. PLC-DK Default Jumper/Connector Settings ......................................................................................... 9

2.0

Using Demo Application – Zero Configuration GUI (ZCG) ........ 12

Configuration................................................................................................................................................. 12

Main Screen................................................................................................................................................... 15

Hot Keys ........................................................................................................................................................ 15

System Info Panel .......................................................................................................................................... 16

PHY Parameters Panel ................................................................................................................................... 17

Statistics Panel .............................................................................................................................................. 18

Log Panel ....................................................................................................................................................... 19

Sending Text Messages ................................................................................................................................. 20

Files Transfers ................................................................................................................................................ 22

3.0

Using the Intermediate Mode.................................................. 24

User Interface ................................................................................................................................................ 24

System Configuration .................................................................................................................................... 25

Getting System Information .......................................................................................................................... 28

Control Set Up ............................................................................................................................................... 28

Configuring PHY Parameters ......................................................................................................................... 30

Get/Set MAC PIB ........................................................................................................................................... 32

2

Get PHY PIB ................................................................................................................................................... 34

Testing PHY Performance .............................................................................................................................. 34

Sending and Receiving Message ................................................................................................................... 35

Sending and Receiving File ............................................................................................................................ 36

1. 3.11 Monitor Message Function .......................................................................................................... 39

3.12 Flash Firmware ...................................................................................................................................... 40

4.0

Using the G3 Host Application ................................................. 42

Running “G3_HostApplication” ..................................................................................................................... 42

Configuring G3_HostApplication Parameters .............................................................................................. 43

Configuring Host_CLI Parameters ................................................................................................................ 45

Example of “Host Application Emulation” Testing for Linear Chain ............................................................. 46

“HostAppEmu” Testing with other Multi-node Topologies .......................................................................... 51

5.0

System Trouble Shoot ............................................................. 53

Trouble shoot for USB to Serial Dongle Communications ............................................................................ 53

Trouble shoot for Zero Configuration GUI Tool to Device Communications ................................................ 54

Trouble shoot for Building Example projects ................................................................................................ 54

APPENDIX A – Code Composer Studio Installation and Setup ........ 55

APPENDIX B – Download Flash Upgrade Binary to F28069 Using CCS56

APPENDIX C – Download PLC Binary to F28069 Using CCS ............. 57

APPENDIX D - PLC-DK Hardware Resource Usages ......................... 58

APPENDIX E – PHY Example Project for F28069 ............................. 61

APPENDIX F – PHY Example Project for F28M35x .......................... 66

APPENDIX G – G3 ADP Example Project ......................................... 71

APPENDIX H– G3 Host Application Example Project ....................... 73

APPENDIX I – Host Message Exchange Example ............................ 74

APPENDIX J– File/Message Transfer Packet Example .................... 76

APPENDIX K – Download PLC Binary to F28069 Using CodeSkin .... 79

APPENDIX L – Download PLC Binary to F28M35x Using CCS .......... 81

APPENDIX M – Running Zero-Configuration GUI with F28M35x ..... 83

3

1.0 TI PLC Development Kit Overview

Features

Figure 1 TI PLC Development Kit

1

The TI PLC Development Kit for G3 contains the following main components and supported features:

DSP control card with Texas Instruments F28069 microcontroller

2

1

Docking board Revision E and AFE board Revision B are shown here.

2

In the case of G3 FCC band, F28M35x control card and Discrete AFE should be used.

4

AFE daughter card with Texas Instruments integrated powerline communications analog front-end

AFE031

Examples of operating frequency range are shown below:

CENELEC FCC ARIB

Band A B BC BCD Low High Full Low High

Frequency (kHz) 35.9 -

90.6

98.4-

121.9

98.4 -

137.5

98.4 -

146.9

145.3 314 -

-314 478.1

145.3 – 10 -

478.1 200

200 - 450

Data rates from 5.592 kbps to 34.16 kbps (@36 tones per symbol) for Cenelec A band and upto 289 kbps for FCC band

Transmission with OFDM and FEC

Number of used data carriers up to 36 for Cenelec and 72 for FCC

Differential Phase modulation (ROBO/DBPSK/DQPSK/D8PSK)

Reed Solomon encode/decode and Repetition code

Convolutional encoder/Viterbi decoder

Bit interleaving for noise effect reduction

CRC5 in FCH and CRC16 in data for error detection

Data randomization for uniform power distribution

Tone mask for SFSK co-existence

Adaptive tone mapping and transmit power control

Automatic gain control

Zero-crossing detection

Supports G3 PHY, MAC and adaptation layer

RS-232 interface for diagnostic port interface

Serial interface for host data port interface: UART, SPI, etc.

LEDs and test points for firmware and hardware debug

USB/JTAG for custom firmware download

PLC Development Kit Components

The development kit includes the following hardware:

Two sets of development board, each set contains: o 1 F28069 or F28M35x MCU control card: flashed with G3 PLC image of: g3_plc_F2806x_AFE031.out (for F28069) g3_plc_F28M35x.out (for F28M35x) o 1 docking station o 1 AFE board

5

The development kit includes the following software:

G3 PLC Binaries o G3 PHY and lower MAC project binary image

(g3_plc_F2806x_AFE031.out for F28069)

(g3_plc_F28M35x.out for F28M35x)

G3 PLC Software Libraries for F28069 o G3 PHY Library: phy_vcu_afe031.lib o G3 stack (MAC/ADP) Library: g3_stack.lib o G3 task Library: g3_task.lib o G3 AFE Library: hal_afe031_f2806x.lib o F28069 Support libraries: csl_f2806x.lib, uart_f2806x.lib, bfm.lib

G3 PLC Software Libraries for F28M35x o G3 PHY Library: phy_vcu_fcc.lib o G3 Stack (MAC/ADP) Library: g3_stack.lib o G3 Task Library: g3_task.lib o G3 AFE Library: hal_afe031_f28m35x.lib o F28M35x Support libraries: csl_f28m35x_c28.lib, csl_f28m35x_m3.lib, uart_f28m35x.lib, bfm.lib

PC Software/GUI o Zero Configuration GUI v2.66

Example projects: o G3 PHY project: example of using PHY lib only o G3 ADP project: example of using ADP lib o G3 Host Appplication Project: Example of emulated eMeter application on Host

The development kit includes the following documentations:

G3 SW API Specifications o HAL API Spec o PHY API Spec o MAC API Spec o Host Message Protocol Spec

G3 HW documentations o AFE daughter card schematics and Gerber files o Docking board schematics and Gerber files o BOM

System Installation Requirements

To install SW package on PC to communicate with the PLC Development Kit, your computer must meet the following minimum requirements:

Microsoft® Windows® XP (SP2) or Windows 2000 (SP4)

Pentium® IV 1GHz processor

6

Microsoft .Net Framework 3.5 SP1

128 MB RAM (256MB RAM recommended)

USB 2.0 interface (If using JTAG debug interface)

CD-ROM drive

Screen resolution 1024x768 (or better)

1MB of free space on the HDD for the applications and more for LOG files.

Software Installation

To install the G3 PLC software package, run the Zero Configuration installer, “ZeroConfiguration_Setup.msi” that is included in the CD.

The G3 PLC software package includes the followings:

1. Software documentation and API specification (G3 PHY/G3 MAC) under “doc” directory

2. Hardware documents (Docking board and AFE daughter card) under “HW” directory

3. Software binaries under “SW” directory: a. g3_plc_F2806x_AFE031.out – This image supports G3 PHY, MAC and ADP for F28069 b. g3_plc_F28M35x.out – This image supports G3 PHY, MAC and ADP for F28M35x

4. Example projects under “SW” directory zip files a. G3 PHY example project – Demonstrates the usage of PHY library API (for F28069 and

F28M35x) b. G3 ADP example project – Demonstrates the usage of ADP library API (only for F28069) c. Host application example project – demonstrate the usage of host message protocol to communicate to PLC (for F28069 and F28M35x) d. CM3 IPC HCT example project – demonstrate CM3 host example to communicate to PLC on

C28x via IPC (only for F28M35x)

5. Tools a. Zero Configuration installer – This installs the Zero Configuration GUI.

Hardware Setup

The following shows steps of how to setup PLC-DK hardware (make sure system is un-powered):

1. Insert the F28069 control card in connector J1 on the docking station

2. Insert the AFE card on the docking board. Connector J2 (AFE card) to connector J4 (docking station).

Connector J3 (AFE card) to J10 (docking station)

3. Connect 12V DC power supply to 12V power jack (make sure the board power supply switch is OFF)

4. Connect power cables to connector TB1.

7

5. Connect the serial cable to the serial connector on the docking station. Note that a NULL modem cable (TX/RX cross connected) is used between host PC UART port and the PLC-DK. Note that for

Dock HW Rev-C, a ribbon cable is provided for serial connection and for Dock HW Rev-E, null modem serial cable should be used.

6. Turn on the board power supply switch (ON/OFF Switch)

7. Check that the LED on the F28069 control card is blinking

8

1.5.1. G3 PLC Point-to-Point HW Setup

Host PC

USB cable

Connected to SCI-B

Power Line

USB cable

Connected to SCI-B

Figure 2 PLC-DK Point-to-Point HW Setup

The PLC-DK can be used to demonstrate point-to-point or point-to-multipoint communication over power line. This is to be used with the Zero Configuration GUI or the PLC Quality Monitor GUI Tools to test

PHY/MAC operability and send data between the two boards over the power line media

3

. It requires 2 PCs, and 2 null modem cables or 2 USB cables.

The default setting for the Zero Configuration is to use the USB cables.

If the host PC can be configured to use two serial ports or two USB ports, then the demo setup can be demonstrated on a single PC, using different serial ports to communicate with each PLC.

1.5.2. PLC-DK Default Jumper/Connector Settings

The PLC Development Kit provided is configured with the default jumper/connector positions. The following three tables describe the connector/jumper name, descriptions, default positions and other options if available.

3

Note that the DSP control cards are pre-loaded with “g3_plc_F2806x_AFE031.out” and ready to be used.

9

AFE

Connector/Jumper

J4

J6

J7

J8

J9

Descriptions

DAC/PWM selection

RX filter input selection

Default Position

2-3 DAC

1-2 from PGA1

RX PGA1 input selection

RX PGA2 input selection

1-2 from front end

1-2 from RX filter

ADC input selection 1-2 from PGA2 output

Table 1 PLC AFE Connector/Jumper

PLC Dock

Connector/Jumper Descriptions

J1

J2

J3

J5

J6

J7

J8

J9

J10

J12

J13, J14, J15, J16

J17

J18, J19, J20, J21

J22

DSP Control Card

SCI-A

F28335 Boot Options

ECAP Channel

Selection

SCI-CCAN Bus

GPIO Test Pin

Transformer

Connection

External Isolated

RS232 Power

AC Mains

ADC Input Selection

SPI-A / McBSP-B to

AFE031 Selection

AC Mains

SPI-A/McBSP-A to

PGA AFE031 Selection

Output Capacitor Band

Selection

Default Position Options

Connector

Connector

Open

2-3

Open

1-2

2-3

1-2

2-3

Boot from Flash

Boot from SPI-A

Boot from SCI-A

ECAP1

ECAP3

Connector

Open

Open

1-2

2-3

1-2

1-2

Close

Close

Close

1-2

3-4

1-2

2-3

2

4

6

Open

Close

Open

Close

Open

Close

1-2

2-3

1-2

2-3

Open

Close

GPIO1

GPIO3

GPIO4

T1/ T2 Not Used

T1/ T2 Is Used

External Power NOT used for RS232

External Power used for RS232

Mains Not Connected

Mains Connected

ADC-A1 (F28069)

ADC-A0 (F28335)

SPI – A Select

(F2803x)

McBSP B Select

(F28335)

Mains Not Connected

Mains Connected

SPI McBSP- A to

AFE (F28069) PGA

McBSP Other to

PGAAFE

(F28335/03x)

CENELEC/FCC

Less Than 20kHz

10

J23

J24

J25

M3

JP1

TB1

Transformer Primary

Ratio Configuration

Selection

Output Inductor Band

Selection

1-3

7-8

Transformer Secondary

Ratio Configuration

Selection

2-4

AFE Daughter Card

Power Supply

Connector

Connector

Power Line Connector

Table 2 PLC Dock Connector/Jumper

2-4

1-3

3-4

1-2

3-4

5-6

7-8

T1 – 1:3, T2 – 1.5:1

T1 – 1:2

CENELEC B/C

Less than 20kHz

FCC

CENELEC A

T1 – 1:4 & 1:2, T2 –

1.5:1

USB/JTAG/SCI

Macro

J1

J2

J3

J4

J5

Descriptions

Boot Selection

JTAG

N/A

USB/SCI-B

Selection

XDS100 Reset

Default Position

Open

Connector

Open

Close

Open

Open

Close

Open

Close

Open

Close

Options

Boot from Flash

Boot from SCI-A

Connected to GPIO34

SCI-B Not Connected to USB

SCI-B Connected to USB

XDS100 Held in RESET

XDS100 operating

Table 3 PLC USB/JTAG/SCI Macro

USB/JTAG/SCI

Macro

SW1-1/2/3/4

SW3-1

SW3-2

J16/J17/J18

Descriptions Setting Options

Boot selection Off

Boot from CM3 flash then C28 flash

UART TX off off on off on

SCI-A from docking board

SCI-A from USB-JTAG port

SCI-A from docking board

SCI-A from USB-JTAG port UART RX off

C28 IO connection connect row-A and row-B IO ports routed to DIMM side

Table 4 F28M35x (Concerto) Control Card Connector/Jumper

11

2.0 Using Demo Application – Zero Configuration GUI (ZCG)

The Zero Configuration GUI (ZCG) is a windows application that the PLC-DK user may immediately start performing text and file transfers, examine the current system information, display the PHY parameters, change the PHY modulation, display the file and text transfer statistics, and display and save log information.

Configuration

There is no software or PLC configuration is needed to use the Zero Configuration GUI. The only assumption is that the USB ports (SCI-B) on the PLC are being used .

The first available COMM port on the PC, which may be a USB to Serial Port or a standard COMM port, will be used to connect to the PCL.

If no available serial ports are found on the PC the ZCGUI will display an error.

If the PLC is reset while connected to the ZCG the ZCG must be restarted or reconnected using the Serial

Port Connection menu.

12

If there is no response on the COMM port selected, the Zero Configuration GUI will display a timeout error and remain active.

If the PLC is connected to another COMM port you may use the use the “Serial Port Connection” drop down menu to connect to the desired COMM port. If the PLC is not connected, connect the PLC to the desired port and try again. If the PLC is connected to the correct COMM port reset the PLC.

If the PLC is connected by the PLC serial ports instead of the default USB ports this message will be displayed.

If you wish to use the PLC serial ports instead of the USB ports the Zero Configuration GUI configuration file must be changed. This is a XML file that has a number of configuration items that may be changed and some that should not be changed.

To change the default PLC port to be used, change the “DefaultSCIPort” to “SCI_A” (PLC serial port connection) or to “SCI_B” (PLC USB port connection) in the configuration file.

The Zero Configuration GUI configuration file will be found here:

“C:\Program Files\Texas Instruments\PLC Application Suite\ PLC_Application_Suite.exe.config”.

Below is the table of the items that may be changed and their description.

13

XML Tag

ConnectionAttempts

DefaultG3Security

FileTransferPageSize

CloseAllOnExit

DefaultSCIPort

Description Default

Value

Range of Values

This is the number of retries the

GUI will attempt to connect, initialize, and configure the PLC before displaying the failed initialization message box.

This will set the default security value for G3 data messages.

Security G3 for data transfers is normally enabled for G3 firmware versions greater than 1.3.1.0. This setting can override this behavior and disable security. If the version is less than 1.3.1.0 the security is disabled even if this value is enabled.

3 1- ####

Disabled Enabled

Disabled

1 – Max Packet Size This is the number of bytes transferred at a time during a file transfer. This does not count the extra data sent in the data packet during a file transfer. 24 bytes of the data packet is used for the file transfer protocol.

256

If this is set to true than all instances of the Zero Configuration

GUI will close when any instance on a PC is closed.

False True or False

This is the default SCI port to use.

The data and diagnostic ports must be set to the same port for the file transfer

SCI_B SCI_A

SCI_B

14

Main Screen

The ZCG consists of the main screen where text and file transfers may be performed. The tabs on the right display significant information about the PLC.

The COMM port attached to is displayed in the title bar. The first available and unopened COMM port is automatically chosen. The “Serial Port Connection” drop down menu may be used to change the selection to another COMM port.

From this screen you can perform text message transfers and file transfers with another PLC controlled by the Zero Configuration GUI.

You may also change the mode by using the ‘Mode’ drop down menu. There are two modes, Zero

Configuration and Intermediate.

The Zero Configuration mode is the mode described. Any available COMM port 1-## will work with the Zero

Configuration GUI. The comm port number does not have to be less than 10.

The intermediate mode runs from a different dialog and gives the user many more configuration options and functions to perform.

Hot Keys

15

There are several hot keys available. The alpha key is not case sensitive.

<Control I> will close this GUI and execute the PLC Quality Monitor GUI as the intermediate tool.

<Control R> will reset the file transfer statistics. The Statistics received in the Link Quality Report are not reset. This key stroke combo will reset the statistics screen regardless of what screen has focus in the GUI..

<Control T> will toggle the expert mode menu items on/off depending on their current state.

<Control S> will send a System Information request to the PLC and update the System Info panel when received.

System Info Panel

The PLC System information is displayed in the first tab. Right clicking on the System Info panel will expose a context menu with one menu item “Refresh System Information”. This will resend a system information request to the PLC and refresh the system info panel with the updated information.

Pressing “Ctrl S” will perform the same function without displaying the context menu.

Any value changed will be displayed in red text.

16

PHY Parameters Panel

The PHY TX and RX parameters are displayed in the second tab.

The TX modulation may be changed using the radio boxes. Changing the modulation schemes will affect the reliability and baud rate of the power line transmission.

17

Statistics Panel

The Statistic panel displays information concerning the text and file transfer. Items that have changed are displayed in red.

Right clicking on the Statistics panel will expose a context menu with a single menu item “Reset Application

Totals”. This will reset totals.

Pressing “Ctrl R” will perform the same function without displaying the context menu.

18

Log Panel

The log panel will hold about 100,000 characters then it will refresh the display. This prevents the panel from consuming large amounts of memory and keeps the log panel responsive to new input.

The Log panel by default displays very little information but right clicking on the log panel will display the log context menu. Using this menu you can enable the display of the formatted messages that are being sent and received by the Zero Configuration GUI. Below is the table of features exposed by the log pane context menu.

Enable Message Data Display

Enable Logging to a File

This will enable the log panel to display the message transfers, sending and receiving. Depending on the other options selected the raw data, formatted data, or both will be displayed. By default this option is turned off.

When selected the user will be prompted for a file to save the logged information. When enabled all messaged data, sent and received will be saved and will be written to the log.

19

Log Full Message Data

Log Condensed Data

Log Raw Message Data

Clear Display

Save to File

Sending Text Messages

This will display the formatted message data in the log panel.

No data will be displayed unless the “Enable Message Data

Display” is enabled.

This will only display the message type and no actual message data. This reduces the amount of data logged to the screen.

This will display the unformatted message data as a byte stream.

This will clear the log panel. This does not affect data being logged to a file.

This will save the current contents of the log panel to a file of the user’s choosing.

To transfer text between two connected PLC devices using the Zero Configuration GUI, simply type your text in the small text box and click on the “Send Message” button. Pressing ‘Enter’ while entering the text will not send the text message but add a line to your text.

20

When the text is sent the text is moved to the top text box and displayed by the receiving PLC

The form on the left is the sender and the form on the right is the PLC message box receiving the text. You may send text from either PLC device.

If the text transfer fails the message box below will be displayed.

21

Files Transfers

The file transfer function is contained in the bottom left hand corner.

Click on the ‘Browse’ button to display the standard windows file chooser dialog to choose the file you wish to transfer. Only one file at a time may be chosen for the file transfer.

After the file is chosen, click on the ‘Transfer File’ button.

The other PLC must also be controlled by the Zero Configuration GUI.

When the transfer starts the GUI will display a progress bar on both Zero Configuration GUIs. The GUI below is the receiving Zero Configuration GUI and displays the path and file name where the received file is being copied. The user is not allowed to change the directory path of the received file.

When the file transfer is complete the message box below will be displayed on both Zero Configuration

GUIs.

22

If the file transfer fails the on of following message boxes will be displayed by the sending GUI.

The file transfer may be canceled by clicking on the ‘Cancel’ button on either GUI.

23

3.0 Using the Intermediate Mode

The Intermediate mode is a diagnostic tool that the user may use to provide graphical displays, system information, PHY and MAC parameter configurations and statistics.

User Interface

The PLC quality monitor consists of the following:

Main Menu – All operations are initiated from the main menu with toolbars, buttons and context menus.

Graphical Displays o PHY Parameters – PHY parameters configuration (see details below) o RSSI graph – Plot is in dBuV. Note this is limited between 70 dBuV and 98 dBuV. o SNR graph – Plot is in dB. o Bit Error Rate graph – Plots of PHY layer bit error rate, one line for each MCS o Packet Error Rate graph – Plots of PHY layer packet error rate, one line for each MCS

PHY statistics – This panel provides statistics in the physical link.

24

Transfer statistics – This panel provides statistics when file transfer is in operation.

System Information – This panel provides system version information and System/PHY/MAC configurations.

System Configuration

The system configuration provides a way to configure the PLC device (Menu -> Options -> Set System

Config).

The following describes the configuration settings:

Hardware Revision – Docking board revision ID (default: Rev.D)

Firmware Version – Firmware version ID

Device Type – The current type of the device o G3 – G3 standard

Device Mode - The current mode of the device. o G3 – for host eMeter applications such as hostAPPEMU running in PC and communicate with TI PLC at ADP layer through UART based on TI Host Message Protocol. It does not perform network registration and attach automatically o Point-to-Point – using the end-to-end setup between the two PLC devices. This mode interfaces with the eMeter GUI performing its functions such as PHY testing, File Transfer,

Message Transfer, etc.

25

 o MAC mode – for host eMeter applications such as hostAPPEMU running in PC and communicate with TI PLC at PRIME MAC layer through UART based on TI Host Message

Protocol. o Embedded AppEmu mode – For host eMeter application running the Embedded AppEmu.

Serial Ports o Data port

 The Data Port is the serial port the PLC device used for host and PLC communication following “plcSUITE host message protocol”. This can be either SCI-A or SCI-B on

Rev C. hardware and newer. This port is used by a host application (hostAPPEMU) to communicate with the PLC device. o Diagnostic port

 The Diagnostic Port is the serial port the PLC device uses to transfer diagnostic messages to the PLC Quality Monitor or Logger Tools. This can be either SCI-A or

SCI-B on Rev C. hardware and newer. If using IEC432/LLC, the Diagnostic port can be shared with Data port if required, however, if using IPv4, the Data port and

Diagnostic port must be different and cannot be shared.

Note that SCI-B shall not be selected for docking board HW prior to Revision C

Address o Extended Address (eight hex bytes)

PHY Parameters o Enable Tonemask Request o Enable Coherent Modulation – Note this feature is not yet supported in Release v5.0.x.x

26

The following example illustrates how to change the device type from “MAC” to “Point-to-Point”:

1. Menu -> Options -> Set System Config

2. Pull down menu from Device Type

3. Select Point to Point

4. Click OK

27

Getting System Information

The Get System Info option (Menu->Options->Get System Info) retrieves the current System Information values from the PLC-DK. These are represented in the System Information view. These values may be set using the Set System Config (Menu->Options->Set System Config). You may also right click in the System

Info panel to display the context menu.

Control Set Up

The Control Setup option (Menu->Options->Control Set up) allows the followings:

Channel status update - Select “Enable Synchronization Parameters” check box for status display in statistic window.

Link quality report update - Select “Enable Link Quality Report” check box for RSSI/SNR/BER/PER display in the statistics window.

MAC statistic update – Select “Enable MAC statistics” check box for MAC statistics display in

MAC statistic window. Note this is not supported.

Update period in seconds – Enter duration between statistics updates, 3 is recommended.

28

Note that if both transmit and receive PLC LQM tool is running on the same PC, it is recommended to use a larger update periods (e.g. 3 seconds) to avoid too many traffic between device and host PC.

29

Configuring PHY Parameters

The PHY parameters configuration (Menu->Options->PHY parameters) is used for configuring the PHY transmitter (Red Box below) and receiver parameters (Green Box below).

The following describes the PHY TX parameters that can be configured:

TMR check box – Enable tone map request o Coherent Modulation – Enable coherent modulation (Note this feature is not yet supported in Release v5.0.x.x)

Modulation – ROBO, DBPSK, DQPSK. Note this field is ignored if sweep MCS is selected.

Level – From 0 to 32, with 32 the maximum

Tone Mask – Tone Mask is always enabled. o The tone masks and associated subbands are maintained in an XML file

“AvailableToneMask.xml”. Each mask octet represents 8 tones with LSB being the lowest tone number. The octets are arranged as lowest 8 tones (tone index 0 to 7) to highest 8 tones in the frequency band. To enable a another tone mask add it to this xml file. o The RX and TX tone masks will always be the same

The following describes the PHY TX parameters that can be configured for PHY Tx test mode only:

Test Mode - When enabled, it configures the transmitter in test mode and it transmits fixed data pattern (selected in data pattern box) for BER testing

30

Sweep MCS – When enabled, test will sweep through all MCS for the packets transmitted. The order of MCS used is ROBO, DBPSK and DQPSK.

Sweep PPDU length - When enabled, test will sweep through all valid PPDU length in increasing order for the MCS used.

Continuous – When enabled, test will continuously transmit PPDUs as specified. When disabled, test will transmit the “Number of PPDUs per setting” (see below) as specified and stop.

Data Pattern – When PHY test mode is enabled, data pattern for the packet payload to be transmitted can be selected. The following data patterns are available: o A ramp data pattern from 0 to 255 o A fixed data byte set by octet value

The data pattern is repeated for the duration of the payload.

PPDU length – PPDU length in bytes. Note this field will be ignored when sweep PPDU length is selected. It is also governed by maximum length allowed for the selected modulation scheme.

Inter-PPDU time – The gap time between PPDU in unit of 1 millisecond.

Number of PPDUs per setting – The number of PPDU per setting during MCS sweep, PPDU length sweep or MCS/PPDU length sweep.

The following describes the PHY Rx Parameters can be configured:

AGC – If selected, receiver performs automatic gain control. If unselected, manual gain setting is used. Valid gain values are from 0 to 7 with step of 6dB.

Tone Mask – Tone Mask is always enabled. o The tone masks and associated subbands are maintained in an XML file

“AvailableToneMask.xml”. Each mask octet represents 8 tones with LSB being the lowest tone number. The octets are arranged as lowest 8 tones (tone index 0 to 7) to highest 8 tones in the frequency band. To enable a another tone mask add it to this xml file. o The RX and TX tone masks will always be the same

The following describes the PHY Rx Parameters can be configured in PHY Rx Test mode only:

Test Mode - When enabled, receiver will start comparing receive packet using the data pattern selected and compute BER for BER testing.

Data Pattern – When test mode is enabled, it can select data pattern used for comparison in computing BER. A ramp data patter from 0 to 255 or a fixed data byte set by octet value. Note this should be identical to the selection in the transmitter for valid BER result.

The following describes the PHY System Parameters:

AGC Gain Min – Minimum AGC gain in dB

AGC Gain Max – Maximum AGC gain in dB

AGC Gain Step – Step size of AGC in dB

31

Get/Set MAC PIB

MAC PIB (G3 MAC standard Section 2.4 – Constants and PIB Attributes) can be configured as follows (Menu-

>Function->Set MAC PIBs):

MAC PIB (G3 MAC standard Section 2.4 – Constants and PIB Attributes) and ADP NIB (G3 MAC standard

Section 3.1 – Information PIB Attributes) can be retrieved as follows (Menu->Function->Get MAC PIBs/Get

ADP NIBs):

32

33

Get PHY PIB

PHY PIB can be retrieved as follows (Menu->Function->Get PHY PIBs):

Testing PHY Performance

The PHY performance can be tested in a point-to-point configuration. One modem should be configured as transmitter in test mode and the other modem as receiver in test mode (Menu->Options->PHY Parameters).

The HW should be set up as described in Section 1.5. An example for PHY test with ROBO, PPDU length of 70 bytes with data pattern of ramp and inter-PPDU interval of 20 ms in continuous mode is shown.

Note it does not support concurrent bi-directional data transfer in PHY test mode .

34

By enabling the channel status and link quality report and setting report period (as described in Section 2.3), the PHY performance (SNR/RSSI/PER/BER) will be displayed in the graphs and the statistics will be displayed in the statistics panel.

Sending and Receiving Message

The Send Message function (Menu->Function->Send Message) sends a small text message from the one device to another in point-to-point configuration. It is intended to test and verify communication between the two systems in a point-to-point configuration.

Note that this operation would require the device mode to be “Point to Point”. Both the transmitting and receiving device must be set to “Point to Point” following steps described in Section 2.3

Note that the connection type such as ARQ enabled, PAC enabled or security profile used for the message send can be modified via System configuration settings using steps described in Section 2.3.

When this option is selected, you may fill in a message and press send, and the other host will display the message.

35

Note that the connection type such as ARQ enabled, PAC enabled or security profile used for the message send can be modified via System configuration settings using steps described in Section 2.3.

Sending and Receiving File

The Send File function (Menu->Function->Send File) sends file from one device to another in a point-topoint configuration.

Note that this operation would require both devices to be set to “Point to Point” mode.

Both the transmitting and receiving device must be set to “Point to Point” following steps described in

Section 2.3

Note that the connection type such as ARQ enabled, PAC enabled or security profile used for file transfer can be modified via System configuration settings using steps described in Section 2.3.

This function is not a guaranteed error-free delivery (the file received may have dropped packets) and is a means to push data from one board to another. The receiver will note both payload CRC and missing packet errors and will attempt to notify the sender of these errors.

36

There are two modes for file transfer, stream and non-stream. Stream mode streams packets to the receiver without waiting for the receiver to acknowledge receipt. At the end of a Stream mode transfer missing packets will be requested by the receiving side to complete the transfer. In non-stream mode the receiver must ACK each packet before the sender will send the next.

The packet size may also be specified. This value represents the data packet size, not including protocol headers. If an invalid size is entered, when Send is pressed, the following error will be displayed.

Once the file transfer begins, the Transfer Information section reflects transfer statistics.

37

The transfer may be aborted by either the sender or receiver. The sender or receiver may abort by pressing the Cancel button.

38

1. 3.11 Monitor Message Function

The monitor message function allows you to display formatted messages in the same was as in the log panel but will display only the filtered messages you desire.

39

You are able to monitor as many or as few messages as you like using a check list box.

This includes all diag and the PLC host messages.

You are able to choose sent messages, received messages, or both.

The filtering is done by the message id or the message id and message class.

The difference is when you filter by the message id the requests and data returned are both displayed since the ids are the same. An example of this is selecting any data transfer message. This will display the data transfer message, the data confirm, and any data indication message since all have the same id.

If you filter by id and message class you can choose to see only requests, or the data received. Using the above example you can choose to see the data transfer, confirm or indication individually. This filters down to exact the message type you want to see.

Messages from the device are in red. Messages sent to the device are in blue.

When saving the display to a file via the context menu, the file is saved in a rich text format (*.rtf) to maintain the color and tab formatting.

If “Enable Logging to File” is selected the log data is saved to a file but without the formatting.

You can display the full message details or the condensed one line version and this is the version logged to file if enabled.

The raw message format is not currently implemented.

3.12 Flash Firmware

The flash firmware function (Menu->Function->Flash Firmware) downloads the new firmware image to the

DSP control card (instead of via JTAG using CCS flash programming as described in Appendix B).

Note if this is the first time running the “Flash Firmware” function on an old HW (RevB and older), the

procedures described in APPENDIX B – Download Flash Upgrade Binary to F28069 Using CCS should be

completed first before continuing .

The following steps should be used:

2. Enter the G3 application “sbin record file” and press the Begin Flash button, you will see that Flash upgrade application is erasing the Flash.

40

For example, the “g3_plc_aes_F206x_AFE031.sbin” should be used for the G3 service node test

3. After Flash is erased, you will see the programming is in progress (packet by packet).

4. After programming is complete, you will see the following window. The new downloaded firmware will boot up.

41

4.0 Using the G3 Host Application

The G3_HostApplication demonstrates how to create and maintain G3 network connections and perform eMeter tests where the basenode will send and receive data from each of the service nodes. The application is geared towards network-level testing comprising of multiple hops, and also allows for MAC and higher layer functionality testing such as network discovery and join, and emulate application level traffic based testing across multiple hops.

The G3_HostApplication is controlled by command line parameters and an external program Host_CLI which can monitor the G3_HostApplication state, connections, and start the eMeter test. The Host_CLI (Host

Command Line Interface) sends commands to the G3_HostApplication via a socket interface.

Running “G3_HostApplication”

The latest G3 binary should be flashed onto the F28069 and the HW should be set up as described in Section

1.5. The base-node and each service-node will be connected to a PC running the “G3_HostAppliction.exe” .

The G3_HostApplication will communicate with the PLC through the UART using TI Host Message Protocol.

This demo includes the following procedures (see Appendix G for message sequences):

1. Base-node performs network start

2. Service-nodes perform network discovery

3. Service nodes perform attach (network join)

4. The Host_CLI can be used to command the base-node to send data packets to each service-node transfer to service nodes emulating emeter reading traffic.

5. Service-node echoes data packets to the base-node

6. Above steps will be repeated for all the meter emulation traffic

7. Service-nodes can detach and attach on command from the Host_CLI.

8. Service-nodes can also automatically reattach depending the parameters used with the

G3_HostApplication.

9. If a config file is used the parameters should be placed one per line.

42

Configuring G3_HostApplication Parameters

The application has several command line options available. The command line parameters are not case sensitive.

Help log

Resetlog=<y,n> config=filename port=# data=# diag=# band=# tonemask=# modulation=# txlevel=## node=<s,b> discover=# panid=#### security=<on, off> auto=<on, off>

G3_HostApplication [command line arguments]

Print this help

Log file name

Reset the log file if any, (default=n)

Read command line parameters from configuration

Data Port (A=SCI-A, B=SCI-B),(default=SCI-B), (h=#)

Diag Port (A=SCI-A, B=SCI-B),(default=SCI-B), (h=#)

Set Band Selection (0=Cenelec, 1=Cenelec/FCC,

0 = Cenelec A 36

1 = Cenelec A 25

2 = Cenelec B

3 = Cenelec BC

4 = Cenelec BCD

5 = FCC Low Band

6 = FCC High Band

7 = FCC Full Band

Set the modulation, default is ROBO

0 = ROBO

1 = BPSK

2 = QPSK

3 = 8PSK

TX Level (1-32)

G3 Mode, s= service node, b= base node

Discovery Network Duration in seconds . Default is node, default is on.

The extended address in hex for the node. Default xadd=##.##.##.##.##.##.##.## tuntap=[TunTap_Driver_Name] testdetach=# socketport=#

Run Detach Test, #=number seconds to wait to socket port used to communication with the venid=#### prodid=############ Product Id, up to 15 alpha-numeric characters

43

psk=##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.## or psk=################################ gmk=##.##.##.##.##.##.##.##.##.##.##.##.##.##.##.## or gmk=################################ gmkindex=#

16 byte hex PSK key. No leading ‘0x’ or spaces in the digits. Each digit must be two chars , i.e. 1 = 01 and represents one byte.

16 byte hex GMK key. No leading ‘0x’ or spaces in the digits. Each digit must be two chars , i.e. 1 = 01 and represents one byte. This is valid on the base node only

GMK Key index to be used. This is valid on the base node only.

44

Configuring Host_CLI Parameters

The Host_CLI can be used to monitor the G3_HostApplication and/or send commands to the

G3_HostApplication. Commands include performing the emeter test, detach service-node, attach servicenode. The base-node can also detach service nodes when given the extended address or can detach all service nodes.

Below is the list of command line parameters for the Host_CLI.

Help log=filename resetlog=<y,n> config=filename noinit ipv4 port=# node-<s,b> stats=<#>

Host_CLI [command line arguments]

Print this help

Log file name

Reset the log file if any, the default is n

Read command line parameters from configuration file.

Do not initialize the PLC

IPv4 address of the G3_HostApplication to send commands or detach=<extendedAddress>

Attach exit routereq=<####> pathreq=<####> emeter payload=<###> messages=<###> retries=<#> retrydelay=<#> intercycledlay=<#>

Attached to service node or base node

Display stats from G3_HostApplication. If # is specified then they will be repeated every # seconds. If the G3_HostApplication is attached to a base-node then stats for all connected service nodes will be displayed.

Detach service node. The extended address is in hex

12.34.56.78.AB.BC.CD.EF. If attached to a service node no extended address is required. If attached to a base node and no extended address is specified all service nodes will be detached.

If attached to a base node and the extended address is specifed only that service node will be detached.

Service node only command. Will issue a command to the attached service node to discover and attach to the base node.

Will cause the Host_CLI to exit after issuing commands to the

G3_HostApplication.

Route Request command issued for service node ####. If the service node is not specified the all nodes will be queried.

Path Request command issued for service node ####. If the service node is not specified the all nodes will be queried

Start the emeter testing

Length of payload to test, default is 20 bytes

Number of messages per test, default is one

Number of times to retry a failed messages, default is three

Time to wait between failed messages, default is 15 seconds

Time in seconds between test cycles, default is 60 seconds

45

maxfails=<#> testcycles=<#>

Number of consecutive messages failures that will halt the tests to a node, the default is five.

Number of complete meter tests to run, the default is inifinite. destinations=<##.##.##.##.##.##.##.##> destinations=<####,####,####> stopmeter

List of destination addresses to send messages to. The default is all service nodes. This will allow the user to specify which service nodes to include in the test. This is not implemented in this release.

Stop the e-meter test.

Example of “Host Application Emulation” Testing for Linear Chain

To start a 4-hop linear chain network testing using hostAppEmu, it is recommended to adopt the following steps:

0) Set up the 4-hop network as shown in the following.

Service node 1

Service node 2

Service node 3

Service node 4

Base node

Power strip

Power strip

Power strip

Power strip

Attenuator

50db

Attenuator

50db

Attenuator

50db

Attenuator

50db

To ensure the multi-hop nature in the connectivity, it is recommended to test the setup with PLC link quality monitor. While using the link quality monitor, it should be the case that a node is able to talk to its immediate parent and child but not to any other node. For e.g. Service Node 2 should be able to perform message/ file transfer with Service Node 3 and Service Node 1, but not to the Base Node and Service Node

4.

1) Start the PAN coordinator. The following window shows the example of starting G3_HostApplication for a

PAN coordinator, connecting through COM port 8, SCI-B:

>g3_hostapplication port=8 host=1 diag=1 node=b socketport=30001 xadd=xadd=FF.FF.FF.FF.FF.FF.FF.01 logfile=basenode.log resetlog

If a config file is used the parameters would look like this

>g3_hostapplication config=basenode.txt

The contents of the basenode.txt are: host=1 diag=1 port=8 logfile=c:\testparameters\basenode.log resetlog

46

socketport=30001 node=b xadd=FF.FF.FF.FF.FF.FF.FF.01

The socketport is the socket port address that will be used by the Host_CLI to communication to the

G3_HostApplication.

2) Start a SN. When starting multiple Service Nodes you may set the service node long addresses using the –

L option or let the node randomly choose one randomly. While assigning long addresses, we need to ensure that they are different for each service node. The following window shows the example of starting

G3_HostApplication for a SN, connecting through COM port 9, SCI-B:

>g3_hostapplication port=9 host=1 diag=1 node=s xadd= FF.FF.FF.FF.FF.FF.FF.04 socketport=30004 logfile=c:\testparameters\servicenode-30004.log resetlog auto=off

If a config file is used the parameters are:

>g3_hostapplication config=servicenode.txt

The contents of the configuration file are: auto=off host=1 diag=1 logfile=c:\testparameters\servicenode-30004.log resetlog socketport=30004 node=s xadd=FF.FF.FF.FF.FF.FF.FF.04

The socketport is the socket port address that will be used by the Host_CLI to communication to the

G3_HostApplication. If the service node and base node G3_HostApplications are running on the same PC the socketport addresses must be different or the second exe will abort. Two processes on the same PC cannot create servers listening on the same port for connections.

3) Once the base node and service nodes are started the Host_CLI may be used to issue commands.

Using Host_CLI instance with the following command line will continuously monitor the base node or service nodes activity every 10 seconds.

>Host_CLI ipv4=192.168.1.5 port=30001 logfile=c:\TestParameters\Monitor-Basenode.log resetlog stats=10

Using a config file:

>Host_CLI config=monitor.txt

The configuration file contains: ipv4=192.168.1.5 port=30001

47

logfile=Monitor-Basenode.log resetlog stats=10

The following is a configuration file used to start the emeter test.

>Host_CLI config=emeter.txt

The configuration file contains: socketport=30001 logfile=emeter.log resetlog emeter payload=20 messages=10 retries=3 intermeterdelay=30 maxfails=5 testcycles=10 exit

Up to four different service nodes can be started and run the G3_HostApplication simultaneously with the same PAN coordinator node. Please remember to set the long addresses to be different before start the application.

Below is the sample output of a Host_CLI monitoring the base node during an emeter test:

48

49

Below is the output from a service node during the emeter test:

50

“HostAppEmu” Testing with other Multi-node Topologies

The hostappemu application can be used for testing other multi-node and/or multi-hop topologies. The hostappemu application has been used for testing the network discovery, join and leave, and e-meter data transfer testing for the following two network topologies (as well).

Base Node

Service Node 4 Service Node 1 Service Node 2 Service Node 3

Single Hop Network

Base Node

Att 1

Service Node 1

Hybrid Network

Service Node 2

Att 2

Service Node 3

Att 3

Service Node 4

51

The procedure to verify the network topology should be performed in a similar fashion as described in the example by using PLC link quality monitor. Also, other procedures such as the configuration of the hostappemu for each use case are similar to the one shown in example.

52

5.0 System Trouble Shoot

Trouble shoot for USB to Serial Dongle Communications

When the USB to serial dongle is plugged into the PC, the enumerated COM port can be found from system properties->Hardware->device manager as follows:

Note that the enumerated COM port may be changed. Change the com port assignment by selecting the corresponding serial port, right click and click on

“properties”. Then select the “features” panel and the a COM port can changed.

53

Note that it is recommended to power off the device prior to unplugging the

USB serial dongle from the PC.

Trouble shoot for Zero Configuration GUI Tool to Device

Communications

To check that the ZCG tool is communicating to the device, check that it can read system information following steps in Section 2.4.

If USB serial converter is being used, check that the correct COM port has been selected. Note that the COM port may not be enumerated to the same port number when its unplugged an re-plugged or a new USB port is being used .

If ZCG tool has previously been communicating to the device and it was kept opened while device has been reset or power cycled, it is recommended to close the ZCG tool and re-opened.

Trouble shoot for Building Example projects

When importing example projects, pls check that the cgtool version provided in

TI_PLC_G3_Demo\ccs_setup\cgtools is installed

When building example projects where DSP BIOS is used, please check that the bios platform files provided in TI_PLC_G3_Demo\ccs_setup\dspbios is installed.

54

APPENDIX A – Code Composer Studio Installation and Setup

1. Install Code Composer Studio (CCS)

2. Connect USB cable to USB connector on the docking station.

3. Launch CCS. If CCS is installed, XDS100 emulation is installed and CCS is to configure to use XDS100 emulator.

4. Connect to target and CCS is ready to be used.

55

APPENDIX B – Download Flash Upgrade Binary to F28069 Using

CCS

If the PLC device does not have the firmware upgrade binary image pre-flashed in the HW device, we can use the CCS to flash the firmware upgrade image. Refer to the following link on instructions in programming flash. http://focus.ti.com/lit/an/spraal3/spraal3.pdf

The On-Chip Flash Programmer settings are as follows (uncheck the sector B, C, E, F, G and H):

The image “flash_upgrade.out” should be downloaded. Once this is complete, the eMeter GUI tool

“Flash Firmware” function described in Section 4.11 can be used.

56

APPENDIX C – Download PLC Binary to F28069 Using CCS

If the PLC binary is to be flashed via CCS, the following steps should be used.

The On-Chip Flash Programmer settings are as follows (uncheck the sector B, C, D):

57

APPENDIX D - PLC-DK Hardware Resource Usages

Table 5 PLC-DK GPIO pins configurations

GPIO PIN

GPIO00

GPIO01

GPIO02

GPIO03

GPIO04

GPIO05

GPIO06

GPIO07

GPIO22

GPIO23

GPIO24

GPIO25

GPIO26

GPIO27

GPIO28

GPIO29

GPIO30

GPIO31

GPIO32

GPIO33

GPIO34

GPIO35

GPIO36

GPIO37

GPIO38

GPIO08

GPIO09

GPIO10

GPIO11

GPIO12

GPIO13

GPIO14

GPIO15

GPIO16

GPIO17

GPIO18

GPIO19

GPIO20

GPIO21

Connected to

PWM_1A

TP

PWM_2A

TP

TP

DAC

LED_AFE3

ZeroCross 1

ZeroCross 2

AFE Shutdown

SCI (SCITXDB)

SCI (SCIRXDB)

SPI (SPISIMOA)

SPI (SPISOMIA)

SPI (SPICLK)

SPI (SPISTEA)

McBSP (MDXA)

McBSP (MDRA)

McBSP (MCLKXA)

McBSP (MFSXA)

SCI (SCIRXDA)

SCI (SCITXDA)

CAN RX

CAN TX

(I2C) SDAA

(I2C) SCLA

LED3

Pull Up

Enabled

Enabled

Enabled

Disabled

Disabled

Enabled

Disabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Disabled

Enabled

Enabled

Disabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

Enabled

G3 Build Usage

Transmit

Transmit

XINT1, HALT

XINT2, TFLAG

DAC

Received packet indicator

Zero crossing capture

Zero crossing capture

AFE031 Shutdown

UART host port

UART host port

PGA (option)

PGA (option)

PGA (option)

PGA (option)

F28069 AFE031 connection

F28069 AFE031 connection

F28069 AFE031 connection

F28069 AFE031 connection

UART diagnostic port

UART diagnostic port

CAN Bus Rx Port

CAN Bus Tx Port

EEPROM

EEPROM

System heart beat (toggle at 1 sec rate)

58

Disabled

Alternate Zero Cross Input

GPIO39

GPIO40

Enabled

Enabled

Table 5 PLC F28M35x (Concerto) GPIO pins configurations

F28M35X Signal Name

PA0_GPIO0

PA2_GPIO2

PD4_GPIO20

PD5_GPIO21

Interface

EPWM

EPWM

SPI(DMA)

SPI(DMA)

PD6_GPIO22

PD7_GPIO23

PB1_GPIO09

PE4_GPIO28

SPI(DMA)

SPI(DMA)

ECAP

SCIA

PE5_GPIO29

ADC1_B0

PA7_GPIO7

PB4_GPIO12

SCIA

ADC

GPIO

GPIO

C28_GPIO6/PA6_GPIO6 GPIO

C28_GPIO32/PF0_GPIO32 I2C

C28_GPIO33/PF1_GPIO33 I2C

Usage

PLC TX signal

PLC TX signal

DAC/Control

DAC/Control

DAC/Control

DAC/Control

ZeroCrossing

Comm

Comm

PLC RX signal

DAC Control

SD Control

INT Control

EEPROM

EEPROM

Table 7 PLC-DK Peripherals and Interrupts Usage

Peripherals PRIME Build Usage

32-bit CPU Timers

SCI

Timer 0

Timer 1

Timer 2

Watchdog Timer

ADC

McBSP

McBSPA

1. During packet transmission

- Trigger Tx DMA to ePWM/HRPWM @ 500 kHz

2. CSMA

- Track PRIME frame structure

Absolute timer (PRIME PHY Time Stamp)

DSP-BIOS Systick

TBD (Reset)

Rx ADC samples @ 250 kHz

AFE031 inteface (SPI mode)

SCIA

I2C

Ecap

SCIB

Diagnostic port

Host port

Interface to EEPROM

Interrupt

PIE 1.7

INT14

PIE 9.1 - Rx

PIE 9.2 - Tx

PIE 9.3 - Rx

PIE 9.4 - Tx

59

DMA eCAP3 eCAP4

Zero crossing measure

Zero crossing measure

Channel 1 ADC

Channel 2 DAC (McBSPA)

Table 8 PLC-DK Flash Configurations and Usage

PIE 7.1

PIE 7.2

Sectors Size (words)

A 32K

B

C

D

E

F

G

H

32K

32K

32K

32K

32K

32K

32K

G3 Build Usage

Code Start Image

G3 Image firmware upgrade image

60

APPENDIX E – PHY Example Project for F28069

The PHY examples demonstrate the calling of PHY library API when HW is setup with 2 devices connected via power line. One device will send one packet and wait for one receive packet and then transmit another packet. This alternates between Tx and Rx. The packet is of size of 73 bytes with a repeating ramp data pattern using the followings:

Modulation: DBPSK

Tonemask: Enabled

PPDU payload length: 73 bytes (40 symbols)

1. Unzip ti_g3_phy_example.zip

2. Start CCS4 and create new workspace

3. In CCS4, import G3 phy test project into workspace (Menu Project->Import Existing CCS/CCE Eclipse

Project)

4. In CCS4, Build project (Menu Project->Project->Build Project)

5. In CCS4, launch debugger for the selected target configuration (Release_F2806x_AFE031)

6. In CCS4 debugger, connect target (Menu->Target->Connect target)

7. In CCS4, Load test_tx_rx_f2806x.out (Menu->Target->Load Program)

8. In CCS4, Reset, Run (Menu->Target->->Run) and LED flashes.

9. Load the same code to the second board.

10. Connect the two boards via power line cables. Both boards should be alternating between Rx and Tx and the LEDs should be blinking.

61

Source File Description

• Test bench

– Project file: .cdtbuild, .cdtproject, .project, .ccsproject

– Test bench: test_tx_rx.c demonstrates alternating G3 PHY Tx and PHY rx using provided PHY library

– OS files: test_tx_rx_f2806x.tcf (DSP BIOS version 5.41.10.36 or above)

– Linker command files: G3_BIOS_flash_F2806x.cmd, F2806x_Headers_BIOS.cmd, test_tx_rx_f2806xcfg.cmd (BIOS generated)

– Test example for flash

• Header files

– PHY common: phy.h

– PHY Tx: phy_tx.h

– PHY Rx: phy_rx.h

– HAL: hal_afe.h

– Chip support library header files

• Libraries

– PHY lib: phy_vcu_afe031.lib

– HAL lib: hal_afe031_f2806x.lib

– Chip Support lib: csl_f2806x.lib

– HRPWM Calibration lib: SFO_TI_Build_V6b_FPU.lib

PHY Library Demonstration

• The PHY library example project demonstrates packet transmission and reception at the physical layer in a TDD fashion.

• Flash 2 F28069 boards with PHY library example executable.

• Connect via powerline

• Sequence of operation

– Board A sends a packet

– Board B receives packet and sends a packet back to board A

– This will be repeated.

– LED on DSP control card will blink if packet transmission and reception is ongoing

Hardware Resource Usage

The PHY library uses the following HW resources:

DMA Channels o Channel 1 – Receive ADC input o Channel 2 – Transmit DAC (McBSPA) output

CPU Timers o Timer 0 – G3 PHY TX sampling timer o Timer 1 – G3 PHY system timer 20-bits in 10us increment o Timer 2 – G3 BIOS timer

62

GPIO a. GPIO 12 – AFE031 shutdown b. GPIO 7 – DAC c. GPIO 20/21/22/23 - McBSPA

PHY Library Test Bench Steps

• HW initialization (F28069 specifics)

• Flash configuration

• ISR Installation (done through BIOS)

– DMA channel 1 (PHY_rx_dma_bios_isr)

– DMA channel 2 (PHY_tx_dma_bios_isr)

• AFE initialization

– HAL_afeTxInit

– HAL_afeRxInit

• PHY library initialization

– PHY_txInit

– PHY_rxInit

• Generate packet for transmission

• Start PHY Rx to listen to line

– PHY_rxStart(0xFFFF, cb_ppdu)

Callback for PHY_rxStart - cb_ppdu

If status is success, process RX PPDU if needed. In this example

Start a TX packet

Toggle LED

63

Install callback for RX bit processing start

 Post SWI to start RX bit processing in the callback

Install callback for TX bit processing start

 Post semaphore to start TX bit processing in the callback

Start packet transmission

– PHY_txPreparePpdu(&PHY_tx_ppdu_s, cb_tx);

– PHY_txPpdu(&PHY_tx_ppdu_s, cb_tx);

Callback for PHY_txPpdu - cb_tx

LET toggling in this example.

• Enable system interrupt

ISR Descriptions

• DMA1 Channel ISR – Incoming ADC samples ready for process @ symbol rate interrupt void PHY_rx_dintch1_isr(void)

{

/* Call HAL AFE function for RX DMA handling */

HAL_afeRxDmaCh1IntFunc();

/* post RX SWI */

SWI_post(&SWI_PHY_RX);

}

• DMA2 Channel ISR – Outgoing PWM completed @ symbol rate interrupt void PHY_tx_dintch2_isr(void)

{

/* Call HAL AFE API for TX DMA handling */

HAL_afeTxDmaCh2IntFunc();

/* Post TX SWI */

SWI_post(&PHY_TX_SWI);

}

Tx SWI

PHY_tx_swi_proc() -- Calls PHY API for TX symbol processing (PHY_txSmRun(1)).

Tx Thread

PHY_tx_thread() -- Calls PHY API for TX bit processing when TX semaphore is available

(PHY_txSmRun(0)).

64

Rx SWIs

• PHY_RX_SWI() -- Wait for DMA channel 1 ready (incoming ADC samples ready)

– Perform PHY Rx symbol processing

• PHY_rxSmRun(PHY_RX_PROC_SYMB)

• PHY_RX2_SWI() – Starts RX bit processing

• PHY_rxSmRun(PHY_RX_PROC_BIT)

65

APPENDIX F – PHY Example Project for F28M35x

The PHY examples demonstrate the calling of PHY library API when HW is setup with 2 devices connected via power line. One device will send one packet and wait for one receive packet and then transmit another packet. This alternates between Tx and Rx. The packet is of size of 73 bytes with a repeating ramp data pattern using the followings:

Modulation: DBPSK

Tonemask: Enabled

PPDU payload length: 73 bytes (40 symbols)

11. Unzip ti_g3_phy_example.zip

12. Start CCS4 and create new workspace

13. In CCS4, import G3 phy test project into workspace (Menu Project->Import Existing CCS/CCE Eclipse

Project)

14. In CCS4, Build project (Menu Project->Project->Build Project)

15. In CCS4, launch debugger for the selected target configuration (Debug_F28M35x)

16. In CCS4 debugger, connect target (Menu->Target->Connect target)

17. In CCS4, Load test_tx_rx_f28m35x.out (Menu->Target->Load Program)

18. In CCS4, Reset, Run (Menu->Target->->Run) and LED flashes.

19. Load the same code to the second board.

20. Connect the two boards via power line cables. Both boards should be alternating between Rx and Tx and the LEDs should be blinking.

66

Source File Description

• Test bench

– Project file: .cdtbuild, .cdtproject, .project, .ccsproject

– Test bench: test_tx_rx.c demonstrates alternating G3 PHY Tx and PHY rx using provided PHY library

– OS files: test_tx_rx_f28m35x.tcf (DSP BIOS version 5.41.10.36 or above)

– Linker command files: G3_BIOS_flash_F28M35x.cmd, F28m35x_Headers_BIOS.cmd, test_tx_rx_f28m35xcfg.cmd (BIOS generated)

– Test example for flash

• Header files

– PHY common: phy.h

– PHY Tx: phy_tx.h

– PHY Rx: phy_rx.h

– HAL: hal_afe.h

– Chip support library header files

• Libraries

– PHY lib: phy_vcu_fcc.lib

– HAL lib: hal_afe_f28m35x.lib

– Chip Support lib: csl_f28m35x_m3.lib

– HRPWM Calibration lib: SFO_TI_Build_V6b_FPU.lib

PHY Library Demonstration

• The PHY library example project demonstrates packet transmission and reception at the physical layer in a TDD fashion.

• Flash 2 F28M35x boards with PHY library example executable.

• Connect via powerline

• Sequence of operation

– Board A sends a packet

– Board B receives packet and sends a packet back to board A

– This will be repeated.

– LED on DSP control card will blink if packet transmission and reception is ongoing

Hardware Resource Usage

The PHY library uses the following HW resources:

DMA Channels o Channel 1 – Receive ADC input o Channel 2 – Transmit PWM_1A output o Channel 3 – Transmit PWM_2A output

 CPU Timers o Timer 0 – G3 PHY TX sampling timer o Timer 1 – G3 PHY system timer 20-bits in 10us increment o Timer 2 – G3 BIOS timer

67

GPIO d. GPIO 00 – PWM_1A e. GPIO 02 – PWM_2A f. GPIO 12 – OPA Enable

PHY Library Test Bench Steps

• HW initialization (F28M35x specifics)

• Flash configuration

• ISR Installation (done through BIOS)

– DMA channel 1 (PHY_rx_dma_bios_isr)

– DMA channel 2 (PHY_tx_dma_bios_isr)

• AFE initialization

– HAL_afeTxInit

– HAL_afeRxInit

• PHY library initialization

– PHY_txInit

– PHY_rxInit

• Generate packet for transmission

• Start PHY Rx to listen to line

– PHY_rxStart(0xFFFF, cb_ppdu)

Callback for PHY_rxStart - cb_ppdu

If status is success, process RX PPDU if needed. In this example

Start a TX packet

Toggle LED

68

Install callback for RX bit processing start

 Post SWI to start RX bit processing in the callback

Install callback for TX bit processing start

 Post semaphore to start TX bit processing in the callback

Start packet transmission

– PHY_txPreparePpdu(&PHY_tx_ppdu_s, cb_tx);

– PHY_txPpdu(&PHY_tx_ppdu_s, cb_tx);

Callback for PHY_txPpdu - cb_tx

LET toggling in this example.

• Enable system interrupt

ISR Descriptions

• DMA1 Channel ISR – Incoming ADC samples ready for process @ symbol rate interrupt void PHY_rx_dintch1_isr(void)

{

/* Call HAL AFE function for RX DMA handling */

HAL_afeRxDmaCh1IntFunc();

/* post RX SWI */

SWI_post(&SWI_PHY_RX);

}

• DMA2 Channel ISR – Outgoing PWM completed @ symbol rate interrupt void PHY_tx_dintch2_isr(void)

{

/* Call HAL AFE API for TX DMA handling */

HAL_afeTxDmaCh2IntFunc();

/* Post TX SWI */

SWI_post(&PHY_TX_SWI);

}

Tx SWI

PHY_tx_swi_proc() -- Calls PHY API for TX symbol processing (PHY_txSmRun(1)).

Tx Thread

PHY_tx_thread() -- Calls PHY API for TX bit processing when TX semaphore is available

(PHY_txSmRun(0)).

69

Rx SWIs

• PHY_RX_SWI() -- Wait for DMA channel 1 ready (incoming ADC samples ready)

– Perform PHY Rx symbol processing

• PHY_rxSmRun(PHY_RX_PROC_SYMB)

• PHY_RX2_SWI() – Starts RX bit processing

• PHY_rxSmRun(PHY_RX_PROC_BIT)

70

APPENDIX G – G3 ADP Example Project

The ADP example demonstrates the calling of ADP library API when HW is setup with a service node and G3

DC connected via power line. The device first attaches to the DC and when it is done it waits for data transfer from DC. Once the device receives a packet from DC, it sends the packet back to the DC.

Source File Description

• Test bench

– Project file: .cdtbuild, .cdtproject, .project, .ccsproject

– Test bench: appemu_task.c/appemu_main.c/g3_main.c: demonstrates echoing back DC data using provided ADP library

• Header files

– HAL: hal_afe.h

– PHY: phy.h, phy_rx.h, phy_rx_swi.h, phy_tx.h, phy_tx_swi.h, g3_phy.h

– MAC: mac_config.h, mac_pib.h, g3_mac.h, mac.h

– ADP: adp.h, adp_nib.h, g3_adp.h

– AppEmu: appemu.h, appemu_api.h, appemu_fsm.h

– Chip support library header files

• Libraries

– G3 PHY lib: phy_vcu_afe031.lib

– G3 MAC/ADP lib: g3_stack.lib

– G3 Task lib: g3_task.lib g3_main.c

• Initialize HW/SW configuration

• Set device mode to SYS_CFG_DEVICE_MODE_G3_APPEMU with Auto mode appemu_main.c

• AppEMU_Init()

– AppEmu Timer initialization

• APPEMU_initTimer()

– Hook up ADP function

• ADP_RX_packet_start()

• ADP_alarmEvent_register()

– Start Network Discovery

• AppEMUL_startIdleTimer()

• APPEMU_procMsg()

– APPEMU_proc_ADP_DISCOVER()

– APPEMU_proc_ADP_ATTACH()

– APPEMU_proc_ADP_Detach_Indicate()

– APPEMU_proc_ADP_DETACH()

– APPEMU_proc_ADP_Data_Indicate()

– APPEMU_proc_ADP_Data_Confirm()

– APPEMU_proc_Idle_Timeout()

71

– APPEMU_procAttachWaitTimeout()

– APPEMU_procDiscoveryStartTimeout() appemu_task.c

• MBX_pend()

– If there is received message, call APPEMU_procMsg(). appemu_adp_msg.c

• This includes all the ADP API call routines.

72

APPENDIX H– G3 Host Application Example Project

The Host Example Project is the host based eMeter Application Emulator. It is written as an external host application that communicates to the PLC device via Host Messages over the serial port.

G3 Host Application is a Windows console application. The project is a Visual Studio 2010 solution.

1. Unzip TI_G3_HOSTAPP_EXAMPLE.zip

2. From Visual Studio 2010, open the HostApplications.sln Solution file.

3. Rebuild the project (Build->Rebuild Solution)

4. Once the project has built, the G3 Host Application executable (G3_HostApplication.exe) may be run.

5. Reference the section above detailing the command line options and operation.

The following shows an example of Host Message Exchange sequence for network start/join and data transfer:

Base Node

HOST

LOAD_SYSTEM_CONFIG.req

reply to host message

LOAD_SYSTEM_CONFIG.reply

reply to PLC message

Base Node

Embedded

ADP/ MAC

SHUT_DOWN.req

reply to host message

Rest_Typ e =

0x0000

SHUT_DOWN.reply

reply to PLC message

Rest_Typ e =

0x0000

Service

Node

Embedded

ADP/MAC

Service Node

LOAD_SYSTEM_CONFIG.req

reply to host message

LOAD_SYSTEM_CONFIG.reply

reply to PLC message

HOST

SHUT_DOWN.req

reply to host message

SHUT_DOWN.reply

reply to PLC message

PAN Discovery (if PAN ID not known)

NETWORK_START.req

reply to host message

NETWORK_START.confirm

reply to PLC message

PANID is set to ADP/MAC

PIB is set to MAC

PHY :

RXON

PAN Discovery (if PAN ID not known)

MAC DATA (dummy LBP Join)

ATTACH .req

reply to host message

ATTACH .indication

Or no indication to HOST?

EAP protocol packets are exchanged, embedded in dummy LBP packets

MAC DATA (dummy LBP Accept)

MAC aquire

NetworkAddress

ATTACH .confirm

reply to PLC message

DATA_XFER.

req reply to host message

MAC DATA

DATA_XFER.indication

reply to PLC message

73

APPENDIX I – Host Message Exchange Example

We are providing a simple host interface between PLC modem and host processor. As a reference, host message exchange example is given below, describing how the host processor can communicate to PLC modem to initialize the network connection.

(G3 service node (normal mode) with non-automatic flag)

Host

PLC

Modem

Configure host/diag ports to SCI-A

Configure device mode(=normal mode)

/Auto mode(=0)

Configure G3 long address

Soft reset

Delay 2 seconds after getting reply

LOAD_SYSTEM_CONFIG.request

(Msg Type: 0x0C, Config_Type: 0x0001)

LOAD_SYSTEM_CONFIG.reply (0x0C)

LOAD_SYSTEM_CONFIG.request

(Msg Type: 0x0C, Config_Type: 0x0003)

LOAD_SYSTEM_CONFIG.reply (0x0C)

LOAD_SYSTEM_CONFIG.request

(Msg Type: 0x0C, Config_Type: 0x0008)

LOAD_SYSTEM_CONFIG.reply (0x0C)

SHUT_DOWN.request (0x05)

SHUT_DOWN.reply (0x05)

Set G3 PHY TX Parameters (optional)

Set G3 PHY RX Parameters (optional)

Network Discover (Active Scan)

Attach to a specific PAN ID

L_SDU data (including IPv6 header/address)

SET_INFO.request

(Msg Type: 0x04, INFO_Type: 0x0002)

SET_INFO.reply (0x04)

SET_INFO.request

(Msg Type: 0x04, INFO_Type: 0x0003)

SET_INFO.reply (0x04)

DISCOVER.request

(Msg Type: 0x12, Discover Type: 0x00)

DISCOVER.confirm (0x12)

ATTACH.request (0x10)

ATTACH.confirm (0x10)

DATA_TRANSFER.request (0x00)

DATA_TRANSFER.confirm (0x00)

.

.

.

DATA_TRANSFER.indication (0x00)

74

(G3 Base node)

Configure host/diag ports to SCI-A

Host

Configure device mode(=normal mode)

/Auto mode(=0)

Configure G3 long address

Soft reset

Delay 2 seconds after getting reply

Set G3 PHY TX Parameters (optional)

Set G3 PHY RX Parameters (optional)

Start network with a specific PANID

L_SDU data (including IPv6 header/address)

LOAD_SYSTEM_CONFIG.request

(Msg Type: 0x0C, Config_Type: 0x0001)

LOAD_SYSTEM_CONFIG.reply (0x0C)

LOAD_SYSTEM_CONFIG.request

(Msg Type: 0x0C, Config_Type: 0x0003)

LOAD_SYSTEM_CONFIG.reply (0x0C)

LOAD_SYSTEM_CONFIG.request

(Msg Type: 0x0C, Config_Type: 0x0008)

LOAD_SYSTEM_CONFIG.reply (0x0C)

SHUT_DOWN.request (0x05)

SHUT_DOWN.reply (0x05)

SET_INFO.request

(Msg Type: 0x04, INFO_Type: 0x0002)

SET_INFO.reply (0x04)

SET_INFO.request

(Msg Type: 0x04, INFO_Type: 0x0003)

SET_INFO.reply (0x04)

NETWORK_START.request (0x08)

NETWORK_START.confirm (0x08)

.

.

.

ATTACH.indication (0x10)

.

.

.

DATA_TRANSFER.request (0x00)

DATA_TRANSFER.confirm (0x00)

.

.

.

DATA_TRANSFER.indication (0x00)

PLC

Modem

75

APPENDIX J– File/Message Transfer Packet Example

The zero-configuration GUI provides two simple applications: message transfer and file transfer. These applications operate in a point to point configuration. The HW should be set up as described in Section

1.5.1.These applications communicate with the host message protocol on top of Prime software stack via

UART. The basic packet format used for file/message transfer follows that described in PLC Suite Host

Message Protocol Specification. Here, some packet examples are provided.

Message Transfer

Example 1: Data Transfer Request (“HI”)

Octet

Data (in hex)

0

00

1

81

2

20

Header (Host Message Protocol)

3

00

4

8C

5

0A

6

B6

Description

Message

Type (Data

Transfer)

ORG=1,

RPY=0,

REV=0,

SEQ=1

Length(LSB) Length(MSB)

Header

CRC16

(LSB)

Header

CRC16

(MSB)

*Length=Header CRC(2B)+Payload CRC(2B)+NSDU_Handle(1B)+QoS/Priority/D-route(1B)+Data Payload(26B)=32B

Payload

CRC16

(LSB)

Octet

Data (in hex)

8

00

Description

NSDU

Handle

* status 0x00000000: success

9

00

QoS/Priority/

D-route

10

AA

Payload (Host Message Protocol)

11

AA

Type (Message Transfer

App)

12

00

13

00

Subtype (Transfer)

14

00

Status

7

E2

Payload

CRC16

(MSB)

15

00

Octet

Data (in hex)

Octet

Data (in hex)

Description

16

00

24

00

Status

17

00

25

00

Page number (MSB)

18

01

26

01

Payload (Host Message Protocol)

19 20

00 00

Message Id (=1)

Payload (Host Message Protocol)

27

00

28

00

21

00

29

00

(LSB) Total # of pages (MSB)

22

01

(LSB) Page number

30

02

23

00

31

00

(LSB)Message size (=2B)

Payload (Host Message Protocol)

Octet

Data (in hex)

32

00

33

00

34

48

35

49

Description Message size (MSB) “H” “I”

*Blue color: Application Protocol Data Unit, which is part of message control protocol payload.

File Transfer

Example 1: File Transfer (the first packet)

Octet

Data (in hex)

Description

0

00

Message

Type (Data

Transfer)

1

81

ORG=1,

RPY=0,

REV=0,

SEQ=1

2

2D

Header (Host Message Protocol)

3

00

Length(LSB) Length(MSB)

4

D0

Header

CRC16

(LSB)

5

7C

Header

CRC16

(MSB)

*Length=Header CRC(2B)+Payload CRC(2B)+NSDU_Handle(1B)+QoS/Priority/D-route(1B)+Data Payload(39B)=45B

6

47

Payload

CRC16

(LSB)

Octet

Data (in hex)

Description

8

01

NSDU

9

00

10

BB

Payload (Host Message Protocol)

11

BB

QoS/Priority/ Type (File Transfer App)

12

00

13

00

Subtype (Transfer)

14

00

Status

7

54

Payload

CRC16

(MSB)

15

00

76

Handle

* status 0x00000000: success

Octet

Data (in hex)

16

00

Status

D-route

17

00

18

01

Payload (Host Message Protocol)

19

00

20

00

Message Id (=1)

21

00

Octet

Data (in hex)

Description

24

00

25

00

Page number (MSB)

*page number 0x00000000: the first page

Octet

Data (in hex)

Description

32

00

33

00

Message size (MSB)

26

13

34

43

Payload (Host Message Protocol)

27

00

28

00

Payload (Host Message Protocol)

35

3A

36

5C

File message

37

67

Octet

Data (in hex)

Description

40

73

41

65

42

74

Payload (Host Message Protocol)

43

75

File message

44

70

Octet

Data (in hex)

Description

48

67

Payload (Host Message Protocol)

*Blue color: Application Protocol Data Unit, which is part of message control protocol payload.

29

00

(LSB) Total # of pages (MSB)

45

2E

Example 2: File Transfer (the last packet)

22

00

23

00

(LSB) Page number

30

77

31

12

(LSB)Message size (=4.7KB)

38

33

46

6C

39

5F

47

6F

Octet 0 1 2

Header (Host Message Protocol)

3 4 5 6

Data (in hex) 00 84 95 00 84 00 49

Description

Message

Type (Data

Transfer)

ORG=1,

RPY=0,

REV=0,

SEQ=4

Length(LSB) Length(MSB)

Header

CRC16

(LSB)

Header

CRC16

(MSB)

Payload

CRC16

(LSB)

*Length=Header CRC(2B)+Payload CRC(2B)+NSDU_Handle(1B)+QoS/Priority/D-route(1B)+Data Payload(143B)=149B

10

BB

Payload (Host Message Protocol)

11 12

BB 00

13

00

14

00

Octet

Data (in hex)

8

01

Description

NSDU

Handle

* status 0x00000000: success

Octet

Data (in hex)

16

00

Status

9

00

QoS/Priority/

D-route

17

00

Type (File Transfer App)

18

01

Subtype (Transfer)

Payload (Host Message Protocol)

19 20

00 00

Message Id (=1)

21

00

22

13

Status

7

EB

Payload

CRC16

(MSB)

15

00

23

00

(LSB) Page number

Octet

Data (in hex)

Description

*page number 0x00000013: the last page

Octet

Data (in hex)

Description

24

00

Page number (MSB)

32

00

25

00

33

00

Message size (MSB)

26

Payload (Host Message Protocol)

27 28 29

13 00 00 00

(LSB) Total # of pages (MSB)

34

09

Payload (Host Message Protocol)

35

09

36

09

File message

37

20

Payload (Host Message Protocol)

30

77

(LSB)Message size (=4.7KB)

38

20

31

12

39

20

77

Octet

Data (in hex)

40 41 42 43 44

Description File message

*Blue color: Application Protocol Data Unit, which is part of message control protocol payload.

45 … 176

78

APPENDIX K – Download PLC Binary to F28069 Using CodeSkin

1. Install Texas Instruments Prime Development Package from USB stick or www.ti.com/plc.

2. Download, install and start the latest C2Prog from http://www.codeskin.com

.

3. Connect PLC board to host using USB cable.

4. Power up PLC board by applying 15V to the board

5. Program the *.hex (located in c:\Texas Instruments\<PackageName>\SW\bin) as shown in Figure below. Select “28069,67,66” in the Target pull-down and “JTAG” in the Options pull-down.

6. Click on the Configure Ports button and set the JTAG port to “XDS100v1”

79

7. Start flashing the F28069

8. Once this is done close the program and remove the power cycle the board

9. You can now use the new firmware with the corresponding Zero-Configuration GUI or PLC host tools

(PQM).

10. Please repeat the following procedure with the second PLC board.

80

APPENDIX L – Download PLC Binary to F28M35x Using CCS

1. Create the Concerto Target Configuration a. In CCS, go to View > Target Configuration b. Click the New icon to create a New target configuration c. Give a name to your configuration (e.g., ConcertoXDS100.ccxml) d. Configure the target : i. Connection (scroll down) Texas Instruments XDS100v2 USB Emulator ii. Device (check box) F28M35H52C1 e. Note: if you do not see F28M35H52C1 then it is likely that the CCS you have installed does not have the ARM tools. These are required for Concerto. f. Save configuration

81

2. Go to view-> Target configurations

3. Launch the Target Configuration

4. Connect the F28M35x control card to host using USB cable.

5. Flash the f/w (flash_m3.out/g3_plc_F28M35x.out) on Cortex_M3_0 part and C28xx_0 part, respectively.

82

APPENDIX M – Running Zero-Configuration GUI with F28M35x

1. Switch off SW3-2 on the F28M35x control card, which allows you to use zero-configuration GUI via

SCI-A port on the docking board.

2. Change the GUI configuration by setting the DefaultSCIPort to SCI-A in C:\Program Files\Texas

Instruments\PLC Application Suite\PLC_Application_Suite.exe.config.

3. Connect the PLC board to the host via serial cable (SCI-A).

4. If you want to use FCC band, change the J24 (on the docking board) to 5-6.

83

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals