Infinity Suite
User Guide
Infinity Suite User Guide Page 2 / 121 © Atomic Programming Ltd 2015
Contents Infinity Suite ..................................................................................................................................................7
Introduction ...............................................................................................................................................7
An Overview of JTAG Principles ................................................................................................................7
Uses for the JTAG interface .......................................................................................................................8
Boundary scan testing ...........................................................................................................................8
In system programming.........................................................................................................................8
In circuit debugging ...............................................................................................................................8
Universal Hardware Platform ....................................................................................................................9
Supplied Cables .....................................................................................................................................9
Port Connections ................................................................................................................................ 11
Port 1: 14-pin Header ......................................................................................................................... 11
Port 2: 10-pin Header ......................................................................................................................... 12
Installing the drivers ............................................................................................................................... 12
LaunchPad .................................................................................................................................................. 13
Installing ................................................................................................................................................. 13
Features .................................................................................................................................................. 13
Starting an Application ........................................................................................................................... 15
INFINITY EXPRESS ....................................................................................................................................... 16
INTRODUCTION ...................................................................................................................................... 16
JAM & JBC PLAYERS ................................................................................................................................ 17
Command Line Examples ................................................................................................................... 18
SVF PLAYER ............................................................................................................................................. 18
Command Line Examples ................................................................................................................... 19
ALTERA FPGA .......................................................................................................................................... 19
Command Line Examples ................................................................................................................... 20
ALTERA EPCS ........................................................................................................................................... 20
Command Line Examples ................................................................................................................... 21
OPTIONS ................................................................................................................................................. 21
INFINITY MX32............................................................................................................................................ 22
Selecting the SCAN chain ........................................................................................................................ 22
Accessing the Device .............................................................................................................................. 24
Infinity Suite User Guide Page 3 / 121 © Atomic Programming Ltd 2015
Selecting from the toolbar ................................................................................................................. 24
Secure Devices .................................................................................................................................... 24
Options ................................................................................................................................................... 25
Command Line Options .......................................................................................................................... 25
INFINITY JN516X ......................................................................................................................................... 27
Programming the Boot and Application Sectors .................................................................................... 27
Device Settings ....................................................................................................................................... 28
Customer Fields ...................................................................................................................................... 29
Options ................................................................................................................................................... 30
Command Line Options .......................................................................................................................... 31
Connections ............................................................................................................................................ 32
Programming Board ............................................................................................................................... 33
INFINITY SCAN ............................................................................................................................................ 34
Configuring & Editing the JTAG scan chain ............................................................................................ 34
Setting up the Scan Chain ....................................................................................................................... 34
Setting up the Scan Chain for the Atomic Training Platform ............................................................. 35
Boundary Scan Operations ..................................................................................................................... 38
Sample ................................................................................................................................................ 38
Loop Mode ......................................................................................................................................... 39
Training & Comparisons ..................................................................................................................... 39
Device Information ............................................................................................................................. 40
Comparison Results ............................................................................................................................ 42
Clear Training...................................................................................................................................... 43
Training Mode .................................................................................................................................... 43
ActiveX Object ........................................................................................................................................ 44
End IfProduction Mode Plugin .......................................................................................................... 44
Products .............................................................................................................................................. 46
Operators ........................................................................................................................................... 46
Starting SCAN in Production Mode .................................................................................................... 47
Testing ................................................................................................................................................ 47
Reports ............................................................................................................................................... 48
Scan Compiler ......................................................................................................................................... 50
Overview............................................................................................................................................. 50
Running the Compiler ......................................................................................................................... 50
Infinity Suite User Guide Page 4 / 121 © Atomic Programming Ltd 2015
Compiling ............................................................................................................................................ 51
Associated Files .................................................................................................................................. 51
Running the Target Application .......................................................................................................... 52
INFINITY APEL ............................................................................................................................................. 53
Introduction ............................................................................................................................................ 53
What is APEL? ..................................................................................................................................... 53
The Need for APEL .............................................................................................................................. 53
APEL Modules ......................................................................................................................................... 56
Windows APEL Script Runner ............................................................................................................. 56
Console APEL Script Runner ............................................................................................................... 57
ActiveX Object .................................................................................................................................... 58
APEL Studio ......................................................................................................................................... 59
Script Wizard ...................................................................................................................................... 67
APEL Compiler .................................................................................................................................... 73
Using APEL in EXTEST Mode ................................................................................................................... 75
Using APEL in SAMPLE Mode ................................................................................................................. 77
APEL Studio Tutorial ............................................................................................................................... 78
Basic Debugging Features .................................................................................................................. 78
Running and Stepping ........................................................................................................................ 78
Inserting a Breakpoint ........................................................................................................................ 78
Editing a Pin on a Device .................................................................................................................... 82
Editing a Bus ....................................................................................................................................... 84
Editing a Variable ................................................................................................................................ 85
Viewing a Value in an Array ................................................................................................................ 86
Appendix A: Infinity Database .................................................................................................................... 88
Adding a New Part .................................................................................................................................. 89
Symbol Editor ......................................................................................................................................... 90
Symbol Details .................................................................................................................................... 91
Pin Tab ................................................................................................................................................ 91
Example 1: BGA49 .............................................................................................................................. 92
Example 2: TQFP44 ............................................................................................................................. 93
Outline Tab ......................................................................................................................................... 95
Excluded Tab ...................................................................................................................................... 95
Importing Parts ....................................................................................................................................... 96
Infinity Suite User Guide Page 5 / 121 © Atomic Programming Ltd 2015
Appendix B: Useful APEL Tricks .................................................................................................................. 97
How do I add a delay to a script? ........................................................................................................... 97
How long did my script take to run? ...................................................................................................... 97
How can I pass a parameter to a script? ................................................................................................ 97
How do I report that that a script ran correctly? ................................................................................... 98
Do I have to use the BUS statement to access a single pin? .................................................................. 98
Appendix C: Licensing ................................................................................................................................. 99
SCAN Features ........................................................................................................................................ 99
APEL Features ......................................................................................................................................... 99
Appendix D: APEL Language Reference.................................................................................................... 100
Appendix E: APEL COM Object Reference ................................................................................................ 101
Properties ............................................................................................................................................. 101
MaxSpeed ......................................................................................................................................... 101
SerialNumber .................................................................................................................................... 101
VCC ................................................................................................................................................... 101
Running............................................................................................................................................. 101
DataToDisplay ................................................................................................................................... 101
Text ................................................................................................................................................... 102
ProgramLoaded ................................................................................................................................ 102
Statements ........................................................................................................................................... 102
Display .............................................................................................................................................. 102
Load .................................................................................................................................................. 102
Start .................................................................................................................................................. 102
ClearCommandLineVariables ........................................................................................................... 103
AddCommandLineVariables ............................................................................................................. 103
Appendix F: SCAN COM Object Reference ............................................................................................... 104
Constants .............................................................................................................................................. 104
Properties ............................................................................................................................................. 105
ErrorNumber .................................................................................................................................... 105
ErrorString ........................................................................................................................................ 106
FailPin ............................................................................................................................................... 106
FailType ............................................................................................................................................ 107
FailCount ........................................................................................................................................... 108
LoopMode ........................................................................................................................................ 108
Infinity Suite User Guide Page 6 / 121 © Atomic Programming Ltd 2015
Passed ............................................................................................................................................... 109
PendingCount ................................................................................................................................... 110
SampleMode .................................................................................................................................... 110
Running............................................................................................................................................. 111
Statements ........................................................................................................................................... 112
Open ................................................................................................................................................. 112
Programmer ..................................................................................................................................... 112
Start .................................................................................................................................................. 113
StatusWindow .................................................................................................................................. 114
Production Mode Plugin ....................................................................................................................... 115
AddProduct ....................................................................................................................................... 115
AddUser ............................................................................................................................................ 115
DelUser ............................................................................................................................................. 116
ExportBoard ...................................................................................................................................... 117
ExportProduct................................................................................................................................... 117
ExportOperator ................................................................................................................................ 118
Login ................................................................................................................................................. 119
TestProduct ...................................................................................................................................... 119
Revision History ........................................................................................................................................ 121
Important Notice .................................................................................................................................. 121
Infinity Suite User Guide Page 7 / 121 © Atomic Programming Ltd 2015
Infinity Suite
Introduction Infinity Suite is a collection of JTAG tools designed to help in both development and production
environments. The software uses a universal hardware platform (currently the AP-114) to provide the
interface to the hardware. Some of the software suite can be downloaded without purchasing a license
whereas APEL and SCAN require a license. A free 30 day trial license is available. All Infinity software
must be used with hardware purchased from Atomic Programming Ltd.
An Overview of JTAG Principles
In the 1980s, the Joint Test Action Group (JTAG) developed specifications and techniques for boundary
scan testing which was formalised as the IEEE standard 1149.1 specification. By the use of a small
number of standard signals it is possible to perform testing and programming operations in situations
where previous techniques would have required physical access to pins of devices.
Devices that support JTAG testing techniques require four signals to be present on the board:
TCK - A clock signal which provides timing information
TDI - Serial data input pin for each device
TDO - Serial data output pin from each device
TMS - Controls the entry of data and instructions into devices
Some boards may also include an optional TRST (or test reset) signal that allows the JTAG chain to be
reset.
Normally, the TCK and TMS signals are common to all JTAG devices on a board with the TDI and TDO
signals connected in a 'daisy chain' configuration as follows:
Boards that only contain one device must still have the TDO signal returned to the JTAG connector in
order that data can be read back from that device. Some boards may include a separate JTAG connector
for each device. In this situation each device can be thought of as having its own individual chain.
The above configuration is called the JTAG Scan Chain and is shown in the Infinity software in a
simplified manner as follows:
Infinity Suite User Guide Page 8 / 121 © Atomic Programming Ltd 2015
The TDI and TDO blocks represent the TDI and TDO connections on the JTAG connector with arrows
representing the connections between devices in the chain. The TMS and TCK signals are not shown as
these are common to all devices.
Uses for the JTAG interface
There are a number of different reasons that a JTAG connector may be included on a board:
Boundary scan testing The most common use for JTAG is as a production test tool. In this mode the JTAG interface can be used
to test/drive signals on a board to check connectivity and test functionality. Infinity APEL and SCAN are
the modules that support production Test. Manufacturers for all JTAG Devices provide a Boundary Scan
Definition Language (BDSL) file describing the operation of the device. This file includes, among other
things, details of:
The names for the pins of the device
The packages used by the device
Details of the JTAG instructions the device accepts
The unique identification code for the device
How the data read back from the device should be interpreted
In system programming Devices which support programming commands over the JTAG interface can use these to reconfigure
the device. This can be a very efficient way of programming devices in a production environment and
can even be used to update device configurations in the field. Infinity Express, JN516X and PIC32MX are
all programming modules within the Infinity Suite. Infinity Express accepts files in a variety of formats
which are typically generated from vender specific tools.
In circuit debugging The third common use of a JTAG interface is to allow debugging to be performed in circuit for
microprocessors, microcontrollers or FPGAs with soft-core processors. In many cases this allows
functions traditionally only available with in-circuit emulators to be supported such as stepping through
code, setting breakpoints, inspecting variables etc. to be supported via the JTAG interface.
This feature requires a high level of knowledge not only about the board, its devices but also requires debugging software. Hence, this feature is usually used in a design environment by engineers developing the board. This software is not part of the Infinity Suite.
Infinity Suite User Guide Page 9 / 121 © Atomic Programming Ltd 2015
Universal Hardware Platform The AP-114 ISP/JTAG Programming System provides a single, portable, all-in-one solution for In-System
Programming (ISP) of both JTAG (IEEE1149.1 standard) and non-JTAG devices, Boundary Scan Testing,
JTAG debugging and out of system device programming. All applications within the Infinity Suite are
supported by the AP-114, and with the range of supplied cable assemblies, supports any required JTAG
pin out up to 14-pins. No other hardware is required for running the Infinity Suite.
The programmer is supplied with 2 IDC ports, which support 10- and 14-way JTAG connections. Both
ports can be configured in different modes, according to the requirements of the target device(s), and
this changes the configuration of the pinouts.
The most common JTAG format is the 10-pin Altera ByteBlaster, compatible with Altera JTAG, as well as
many others. This would be the primary cable used for Boundary Scan testing.
Port 2 supports the 14-pin Xilinx Parallel IV JTAG mode, as well as other modes requiring different pin-
counts. These are supported by a 14-way configurable multi-coloured ribbon cable which is supplied
with 2mm pitch flying leads for greater flexibility.
Supplied Cables 10-way 2.54mm pitch. Note that the alignment is indicated by the red core, which signifies pin 1.
Infinity Suite User Guide Page 10 / 121 © Atomic Programming Ltd 2015
14-way 2.54mm pitch. Note that the alignment is indicated by the red core, which signifies pin 1.
14-way 2mm pitch. Note that the alignment is indicated by the brown core, which signifies pin 1.
1. Brown
2. Red
3. Orange
4. Yellow
5. Green
6. Blue
7. Purple
8. Grey
9. White
10. Black
11. Brown
12. Red
13. Orange
14. Yellow
Infinity Suite User Guide Page 11 / 121 © Atomic Programming Ltd 2015
Port Connections
Some of the most common JTAG device pinouts are shown below. The programmer is configured to the
required pinout automatically, according to the device selected:
Port 1: 14-pin Header
Xilinx Parallel IV JTAG
Using the supplied grey 14-pin IDC cable, Port 1 is compatible with Xilinx JTAG devices
Pin Name Name Pin
1 VGND
Vref 2
3 GND TMS 4
5 GND TCK 6
7 GND TDO 8
9 TRST* TDI 10
11 GND Vsrc** 12
13 GND - 14
*TRST optional command for SVF player - pin made available if required ** Optional Vcc for Target platform. Current Limit: 50mA
Note: Vref => Target board Vcc supply
ISP Mode Connections for EEPROMs I2C mode (24 series EEPROMS)
Target Pin Pin Target
GND 1
2 Vcc
3 4
5 6 SCL
7 8 SDA
WP 9 10 SDA
11 12
13 14
A0, A1 & A2 should be tied to GND
SCL and SDA bother require a pullup resistor (between 2K2 and 10K)
Pins 8 & 10 need to be tied together
Tie WP low to stop Write Protection or leave NC
SPI MODE (25 & 95 series EEPROMS)
Target Pin Pin Target
GND 1
2 Vcc
3 4 nCS
5 6 CLK
7 8 SO
nWP 9 10 SI
nHOLD 11 12
13 14
nWP & nHOLD can be tied high on the target
Infinity Suite User Guide Page 12 / 121 © Atomic Programming Ltd 2015
MICROWIRE mode (93 Series EEPROMS)
Target Pin Pin Target
GND 1
2 Vcc
3 4 CS
5 6 CLK
7 8 DO
PIN6 9 10 DI
PIN7 11 12
13 14
The functionality of pins 6 and 7 on the target devices change between manufacturers. You can tie
these off if required but if you are unsure then tie them to pins 9 and 11 as shown
Port 2: 10-pin Header
Altera ByteBlaster - JTAG mode
Compatible with Altera JTAG and JAM/STAPL devices
Pin Name Name Pin
1 TCK
GND 2
3 TDO Vref 4
5 TMS TRST* 6
7 - - 8
9 TDI GND 10
*TRST optional command for SVF player - pin made available if required
Altera ByteBlaster - AS mode
Used for ISP programming of Altera EPCS FPGA configuration PROM devices
Pin Name Name Pin
1 DCLK
GND 2
3 CONF_DONE Vref 4
5 nCONFIG nCE 6
7 DATAOUT nCS 8
9 ASDI GND 10
Installing the drivers The AP-114 ISP/JTAG Programming System is supplied with a software CD that contains Infinity
Launchpad, plus all the required driver. If you do not have the disc, then the drivers can be downloaded
from the Drivers section of the Atomic Programming website…
http://www.atomicprogramming.com/support.php
Infinity Suite User Guide Page 13 / 121 © Atomic Programming Ltd 2015
LaunchPad Infinity LaunchPad is the starting place for all Infinity Applications.
Installing The Launchpad can be installed from the supplied CD or downloaded from the Software Downloads
section on http://www.atomicprogramming.com/support.php
You must be an administrator on your computer to do this. Installing the LaunchPad will also install all
drivers required for the USB Licensing dongles provided with APEL and SCAN.
The software is designed to run on Windows XP, Server2003, Vista, Server 2008, Windows 7, Server
2012 and Windows 8.
Features The LaunchPad screen is shown below.
It gives details of
1) What applications are installed
Next to each application is the version of the application that is installed otherwise it will show
‘Not Installed’
2) What licenses are available
Below the version number for each application is the license status for that application. Some
applications do not require a license to be purchased and will show ‘Perpetual License’. This
term does not mean that the software is guaranteed to be free for life, just that there is no
requirement to purchase a license on that version of the software.
Infinity Suite User Guide Page 14 / 121 © Atomic Programming Ltd 2015
The Launchpad also
1) Allows you to upgrade applications
Click on ‘Upgrade Applications’ in the Support section of the LaunchPad. If the software is up to
date then the following message is displayed
Otherwise you will see a list of installed applications where an update is available.
2) Upgrade the Infinity Device Database
Click in on this will download the latest database from the web. This does not actually install the
update. This happens the next time APEL or SCAN are started. Each part in the database will be
checked against the current version and any updates will be applied. You will not lose any parts
that have been added manually unless the part has been added to the database. Re-start APEL
or SCAN will give the following
3) Access documentation
Use this to access online application notes, Help and reference manuals
4) Access recent used files
Infinity SCAN (.apbs) and Infinity APEL (.apel) files that have previously been opened will be
listed in the OPEN section of the Launchpad.
Opening SCAN files will start Infinity SCAN and load the project. Opening APEL files will open
different applications depending upon your licence. If you have a STUDIO or STUDIO+ License
then the script will open in APEL Studio. If you have a RUNNER license then the script will open
in Windows APEL Script Runner.
Infinity Suite User Guide Page 15 / 121 © Atomic Programming Ltd 2015
Starting an Application To start each application you click on the applications name. If the application is not installed you will
get the option to download and install the application. You must be connected to the internet for this.
If the software is installed then the LaunchPad will check the License Status. If a valid License is found
then the Application will start. If no license is found then the following message will be displayed.
For APEL and SCAN you can install a thirty day license. This can only be installed once but will allow you
to evaluate the software. If there is an APEL STUDIO or STUDIO+ license available then APEL Studio will
be started when clicking on Infinity APEL. If a RUNNER license then the Windows APEL Script Runner will
start.
Infinity Suite User Guide Page 16 / 121 © Atomic Programming Ltd 2015
INFINITY EXPRESS
INTRODUCTION
Infinity Express is the default programming application, and is provided free of charge with the AP-114
ISP/JTAG Programming System. Together with the AP-114, Infinity Express offers a low cost, high
performance solution for all JTAG programming applications, replacing the various types of device
specific In-System/JTAG programmers with a single Universal Hardware platform, expandable with the
various software packages according to the required application.
This includes a replacement for the Altera ByteBlaster II system, allowing Altera FPGAs and EPCS Serial
Configuration devices to be programmed using the appropriate CDF or RPD file.
Like all Infinity applications, the software is accessed via the Infinity LaunchPad, which enables users to
keep track of their current software version, and check for any upgrades, as well as access recent files
and support documentation.
Infinity Express offers Universal JTAG programming using industry standard SVF and JAM/STAPL files. All
devices that are compatible with SVF or STAPL are supported by the SVF/JAM Players respectively.
Additionally, Jam-Byte Code (JBC) files can also be used to program PLDs, memories, and other
compliant devices in a JTAG chain.
Each application within Infinity Express can be accessed via Console command lines, and therefore easily
integrated into the users own system without the need to use the Infinity Express GUI.
Infinity Suite User Guide Page 17 / 121 © Atomic Programming Ltd 2015
JAM & JBC PLAYERS
STAPL (Standard Test and Programming Language) is a high level language designed specifically for CPLD
ISP programming. It is the JEDEC standard version of the original Jam Language created by Altera. The
Jam player utility takes a JAM/STAPL File and applies vectors for programming and testing devices in a
JTAG scan-chain.
Embedded system developers can also use the JAM Player to program devices in their system. A STAPL
"composer" is required to create the JAM/STAPL file, which is done as a stand-alone utility or as part of
an integrated software tool (e.g. Altera Quartus, Xilinx iMPACT etc.).
The Jam-Byte Code (JBC) File is simply a different implementation of the Jam/STAPL file. It is a binary
version of the JAM/STAPL File which is in ASCII text format. Like Jam/STAPL files, all Data &
Programming/Test algorithms are contained within the JBC file. The files are compiled using a JBC
Compiler - which takes a standard format JAM file created by the Altera Quartus II software, for example,
and converts them into the JBC file. This binary implementation results in smaller file sizes and shorter
programming times.
The JBC Player is used to program JBC files into programmable logic devices (PLDs), memories, and other
compliant devices in a JTAG chain. The JBC Player is also able to read and "play" older Jam Byte-Code
files based on Jam v1.1 syntax.
All devices that are compatible with Jam/STAPL are supported.
These applications are available as command line versions. Run ApSVFPlayer.exe from the command line
in ‘C:\Program Files (x86)\Atomic Programming\Infinity Express’ folder. The output from apJamplayer is
shown below:
Infinity Suite User Guide Page 18 / 121 © Atomic Programming Ltd 2015
The output from apJbcPlayer is shown below:
Command Line Examples 1) Run Idcode.jam in the samples folder in Infinity Express with all messages using the JAM player
ApJamPlayer –v –aread_idcode idcode.jam
2) Run Idcode.jbc in the samples folder in Infinity Express with all messages using the JBC player
ApJbcPlayer –v –aread_idcode idcode.jbc
SVF PLAYER The SVF Player takes Serial Vector Format (SVF) files and uses them to program or test most JTAG-
compliant devices.
An SVF file would be created using a stand-alone utility or as part of an integrated software tool (e.g.
Altera Quartus, Xilinx iMPACT etc.). Generally, SVF format files are used when programming ISP devices
via JTAG during in-circuit test flow using Automatic Test Equipment (ATE). Because of the way the file
format is constructed, SVF files produce longer programming times for CPLDs. It’s also sequential ASCII
text file format - it does not support loops, resulting in very large sequential based files. As a whole SVF
would really only be used for CPLDs if you were planning to production program CPLD devices through
in-circuit testers.
Infinity Suite User Guide Page 19 / 121 © Atomic Programming Ltd 2015
This application is available as a command line version. Run ApSVFPlayer.exe from the command line in
‘C:\Program Files (x86)\Atomic Programming\Infinity Express’ folder. The output is shown below:
Command Line Examples 1) Basic Programming with all messages
ApSVFPlayer –v ProgramDevice.svf
2) Programming and specifying programmer to use
ApSVFPlayer –v –p=APR4RKW6 ProgramDevice.svf
3) Programming and specifying the TCK spee
ApSVFPlayer –v –s=6000000 c:\temp\ProgramAnotherDevice.svf
ALTERA FPGA This application is specific to Altera devices and duplicates the functions provided by the Altera
ByteBlaster II system.
It is targeted for embedded JTAG configuration. It enables configuration files to be tested before
programming into Serial Configuration EPROM devices. The software driver allows configuration of
Infinity Suite User Guide Page 20 / 121 © Atomic Programming Ltd 2015
Altera's FPGAs in JTAG mode, using Raw Binary File (.RBF) format input files. A Chain Description File
(.CDF) generated by the Quartus II software is also required.
This application is available as a command line version. Run ApSVFPlayer.exe from the command line in
‘C:\Program Files (x86)\Atomic Programming\Infinity Express’ folder. The output is shown below:
Command Line Examples 1) Program all devices defined in project1.cdf with their binary files
ApAltJTAG project1.cdf
ALTERA EPCS This application is specific to Altera EPCS Serial Configuration devices and is targeted at embedded Serial
Configuration device programming.
It is used for in-system (ISP) programming Altera Devices EPCS1, EPCS4, EPCS16, EPCS64 & EPCS128.The
software takes Raw Programming Data (RPD) format files, which are generated by the Altera Quartus II
software, and programs the data into the selected serial configuration device.
Infinity Suite User Guide Page 21 / 121 © Atomic Programming Ltd 2015
Command Line Examples 1) Program am EPCS62 with test.rpd
ApEPCS –EPCS64 test.rpd
OPTIONS Use the Options button to set the JTAG TCK Clock Speed for the required application. This can be done
separately using the –s option in the individual programs.
The Find Hardware Button will
allow you to select the AP-114
that is used. This is to support
machines that have multiple AP-
114 that are connected to
different platforms
Infinity Suite User Guide Page 22 / 121 © Atomic Programming Ltd 2015
INFINITY MX32 Infinity MX32 provides JTAG Programming for Microchip PIC32MX devices.
The software supports programming of both the boot sector and program sectors of the devices. The
software supports devices that are part of a larger device chain and also supports multiple PIC32MX
devices in the same chain. As well as an interactive GUI, the software can also be driven by the
command line making it suitable for production use.
Selecting the SCAN chain The first step in programming the PIC is to establish which devices are on the JTAG chain. The PIC32MX
software is capable of programming the PIC even when this is not the only device in the JTAG chain. To
do this
1) Click Select from the toolbar. The following window will appear
Infinity Suite User Guide Page 23 / 121 © Atomic Programming Ltd 2015
2) Click Detect. The devices in the chain will appear
All of the other devices will appear in bypass mode. The PIC will appear in Programming Mode. If you
have more than one PIC in the chain then you can click on the PIC you intend to program and select
Program and then click Accept
Click the close button to close the Scan chain window. The main window should now show the device to
be programmed. Save the project to avoid having to repeat this procedure.
Infinity Suite User Guide Page 24 / 121 © Atomic Programming Ltd 2015
Accessing the Device
Selecting from the toolbar The toolbar shows five operations. These are Program, Verify, Erase, Read and Blank Check.
The Program, Verify, Erase and Blank Check have three drop down options. For each there will be a
Complete Device, Boot and Program option. Below show the program drop down menu.
After selecting one of the drop down options, the main button will then become that option. The
programming cycle will also verify the data programmed but it will NOT erase the device before
programming. This is because the boot sector should not be erased if you are just programming the
program sector. Click erase before programming the device if this is required.
Secure Devices If the data file for programming the PIC has the option to secure the device set then you will no longer
be able to download the PE to the PIC. The only way to reprogram the PIC is to select “Erase Complete
Device” for the Erase drop down menu.
Infinity Suite User Guide Page 25 / 121 © Atomic Programming Ltd 2015
Options Ignore Device Revision allows you to ignore
the top 4 bits of the JTAG ID ( the RevID). The bsdl files from Microchip always specify a RevID of 0. Other values are in production devices. Load Common File Allows you to specify One file that includes both the Boot and Program data. This the standard way for the data file to be generated from the Microchip tools. The File offsets can then be set for both sectors. If you are not using a common file the tool expect the data to be located at address 0 in both files. The PE (Programming Executive) is file (downloadable from the Microchip webpage) that is loaded into the PIC. The tool then communicates via JTAG with the PE to actually perform the operations. If you require a different PE or upgrade then the file can be specified here
Command Line Options The application can operate using the command line. The file PIC32MXFlashProgrammer.exe is located
in the C:\Program Files (x86)\Atomic Programming\Infinity PIC32MX folder and has the following
command line parameters:
PIC32MXFlashProgrammer <Options> <PROJECT.MXP>
-p Program and verify the application sector -bp Program and verify the boot sector -e Erase the application sector. This will occur before the programming
cycle regardless of the order on the command line. -be Erase the boot sector. This will occur before the programming cycle
regardless of the order on the command line. -v Verify the application sector. -bv Verify the boot sector. -b Blank check the application sector -bb Blank check the boot sector -s <SERNUM> Select the AP-114 to use by serial Number -c Console Mode. Suppress messageboxes. The errorlevel should be
checked upon completion -h Show the help Messagebox -<PROJECT.MXP> Specifies the project to use. This sets up the scan chain, boot and
program filenames and all of the options including PE and file offsets.
Infinity Suite User Guide Page 26 / 121 © Atomic Programming Ltd 2015
The following Error codes are returned
Error Errorlevel
ERR_OK 0
ERR_ERASE_ERROR -2
ERR_INVALID_PE_FILE -3
ERR_PE_DOWNLOAD -4
ERR_BAD_PROG_MODE -5
ERR_NOT_BLANK -6
ERR_INVALID_ID -7
ERR_PROJECT_SAVE -8
ERR_PROJECT_OPEN -9
ERR_VERIFY_ERROR -10
ERR_PROGFILE_ERROR -11
ERR_BOOTFILE_ERROR -12
ERR_NO_DEVICE_CHAIN -13
ERR_NO_DEVICE_SELECTED -14
ERR_READ -15
Infinity Suite User Guide Page 27 / 121 © Atomic Programming Ltd 2015
INFINITY JN516X Infinity JN516X provides JTAG programming support for the NXP JN516X devices. It supports
programming of both the boot and application sectors. The software also supports programming of the
customer MAC address and security, including features such as VBO voltage.
As well as an interactive GUI, the software can also be driven by the command line making it suitable for
production use.
Programming the Boot and Application Sectors The main programming is carried out on the Application and Boot Sector tabs.
In most cases the boot sector tab should be left alone. The NXP boot loader is pre-programmed during
production at NXP and there is no need to reprogram it here unless you wish to take the option to
develop your own boot loader. NOTE: Atomic Programming Ltd does not distribute the NXP boot loader
as part of the application so erasing this sector will render the device useless.
The Application Sectors tab has four similar buttons for programming, verify erasing and blank checking
the application sectors. Generally the application will be programmed starting at sector 0. This can be
changed if your intention is to store multiple images inside the flash.
Both a PASS and FAIL counter are included in the bottom left corner. These values are retained when
opening and closing the software. To reset each counter click on the count value and select Yes to reset.
The Log window on the right keeps you informed on your current programming operation.
Infinity Suite User Guide Page 28 / 121 © Atomic Programming Ltd 2015
Device Settings The Device Settings tab allows custom setting to be programmed into the device.
The device settings allow features such as the brownout voltage and encrypted flash features to be
programmed. See the NXP JN516X documentation for more details on these functions.
The Customer MAC address field allows a custom MAC address to be programmed in the device. If this
field is left blank then NXP software stacks will use the default MAC address. If the customer MAC
Address is programmed then the software will use this MAC address instead.
The device settings can be read from the JN5168 in software by using the Hardware API call:
PUBLIC bool_t bAHI_ReadCustomerSettings(
bool_t *pbJTAGdisable,
uint8 *pu8VBOthreshold,
uint8 *pu8CRP,
bool_t *pbEncryptedExternalFlash,
bool_t *pbDisableLoadFromExternalFlash);
The MAC Address can be read back using the API call:
PUBLIC bool_t bAHI_ReadMACID(
bool_t bReadCustomerMACID,
uint64 *pu64CustomerMACId);
Reads back the MAC address. Passing TRUE in bReadCustomerMACID causes the customer MAC address to be read, otherwise the default MAC address is read.
Infinity Suite User Guide Page 29 / 121 © Atomic Programming Ltd 2015
Customer Fields The Customer Fields Tab allows you to program the three customer fields that are available inside the
JN516X family
The Encryption Key field can be used (in conjunction with the ‘Encrypt External Flash’ option) to specify
the key for loading from external Flash. If this bit is not set in the options then this field can be used as
another customer field.
The customer fields can be read in the JN5168 software by using the Hardware API call
PUBLIC bool_t bAHI_ReadUserData(
uint8 u8UserFieldIndex,
uint32 au32userData[4]);
where u8UserFieldIndex is 0-2 which match the three customer fields. The encryption key can be using the API call
PUBLIC bool_t bAHI_ReadCustomerAESkey(
uint32 au32AESkey[4]);
Infinity Suite User Guide Page 30 / 121 © Atomic Programming Ltd 2015
Options The Options Tab allows you to select the AP-114 that will be used for programming.
Select the device to be programmed and tick the box if the application sectors need erasing before
programming.
To aid traceability in production you can save the results in a database. To save the results, create an SQL database as create a table as follow: --
-- Table structure for table `program6x`
--
CREATE TABLE IF NOT EXISTS `program6x` (
`DeviceIndex` mediumint(11) NOT NULL,
`MACID` text NOT NULL,
`FileName` text NOT NULL,
`BootSector` tinyint(1) NOT NULL,
`StartSector` int(11) NOT NULL,
`RESULT` tinyint(1) NOT NULL,
`TESTTIME` int(11) NOT NULL,
`TESTDATE` datetime NOT NULL,
`TYPE` int(11) NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=7161 DEFAULT CHARSET=latin1;
Infinity Suite User Guide Page 31 / 121 © Atomic Programming Ltd 2015
Command Line Options The application can operate using the command line. The file JN516XJTAGProgrammer.exe is located in
the C:\Program Files (x86)\Atomic Programming\Infinity JN516X folder and has the following command
line parameters:
-bp <bootfilename> Program and verify the <bootfilename> into the boot sector. If –be is set then the programming cycle occurs after the boot erase function
-ap <appfilename> Program and verify the <appfilename> into the application sector. If –ae is set then the programming cycle occurs after the application erase function. If the start sector is not specified then the default is 0.
-bv <bootfilename> Verify the <bootfilename> into the boot sector. -av <appfilename> Verify the <appfilename> into the application sector. If the
start sector is not specified then the default is 0. -be Erase Boot Sector -ae Erase Application Sectors -bb Blank Check Boot Sector -ab Blank Check Application Sectors -as N Specify the application start sector N. Use in conjunction
with –ap and -av -cfN <u32> <u32> <u32> <u32> Program the customer field N with the four u32 HEX values -ce <u32> <u32> <u32> <u32> Program the encryption key with the four u32 HEX values -mac <u64HEX> Program the customer Mac Address with <u64HEX> -p <SERIALNUM> Specify the AP-114 programmer to use -JN516N Where N can be 1, 4, 8 or 9. If this option is not specified then
the current default from the GUI is used.
The following values are returned
Error Errorlevel
ERR_OK 0
ERR_ERASE_ERROR -2
ERR_BAD_PROG_MODE -3
ERR_BAD_FILENAME -4
ERR_APPFILE_ERROR -5
ERR_BOOTFILE_ERROR -6
ERR_NOT_BLANK -7
ERR_VERIFY_ERROR -8
ERR_PARAM -9
Please Note: The SQL options are not configurable from the command line and must be set in the GUI.
Infinity Suite User Guide Page 32 / 121 © Atomic Programming Ltd 2015
Connections The following connections are required to connect the device for JTAG programming.
AP-114 Port 1 Name Pin on JN516X
1 TCK DIO4
2 GND GND
3 TDO DIO6
4 VCC VCC
5 TMS DIO5
6 ResetN ResetN
7 SPICLK DO0
8 - -
9 TDI DIO7
10 GND GND
Infinity Suite User Guide Page 33 / 121 © Atomic Programming Ltd 2015
Programming Board To support customers, Atomic also offers a 40QFN ZIF socketed board that can be used with the AP-114
programmer to program JN516X silicon. The AP-425 supports the NXP JN5161/4/8 Wireless
Microcontroller ICs. The board has a 40pin ZIF socket and needs to be connected to an AP-114 JTAG
programmer.
NOTE: Atomic programming also offers a programming service for JN516X silicon (including reeling of
the devices). Please contact Atomic Programming for details. Atomic also offers the facility to program
custom rows in the index sector. Contact us for details.
Infinity Suite User Guide Page 34 / 121 © Atomic Programming Ltd 2015
INFINITY SCAN Infinity SCAN is a graphical tool to perform boundary SCAN testing on PCBs. It differs from other similar
tools in that there is no requirement to import a netlist or ‘understand’ the target platform. SCAN can
learn about the board through training.
Configuring & Editing the JTAG scan chain The first step in using Infinity SCAN is to set up the scan chain. The JTAG Scan Chain window is shown at
the top of the screen. It represents the current configuration of devices in the Boundary Scan Chain on
the target board. Before any results can be obtained by the Boundary Scan software, it is important that
the Scan Chain is an accurate reflection of the devices on the board under test. If this has not been done
then the software may send incorrect commands and misinterpret data received causing misleading and
incorrect results.
Setting up the Scan Chain When setting up a new board, the general steps involved are as follows:
1. Connect the AP-114 to the target board and then apply power to the board.
2. Attempt an automatic detection of devices on the board. In the majority of cases this will
provide information about the number of devices on the board and their sequence in the
boundary scan chain.
3. Resolve any conflicts between potential devices and ensure that the correct package is selected
for each device.
Infinity Suite User Guide Page 35 / 121 © Atomic Programming Ltd 2015
4. Locate BSDL files for any unknown devices and add them to the device library.
5. Update the scan chain with any new devices that have been added.
6. Save the scan chain set-up in a Project File
This process may be iterative. In particular, if little is known about a board then it may not be possible to
determine which devices will be present on the boundary scan chain in order to determine if they need
to be added to the Infinity Database library.
Setting up the Scan Chain for the Atomic Training Platform As an example of the process, setting up the scan chain for the Atomic Training Platform is performed as
follows:
Step 1: Start the software
The AP-114 is connected to the JTAG connector on the Training Platform. Power is applied to the
training board via the USB port.
Running Infinity SCAN opens the boundary scan instrument and shows an empty scan chain.
Step 2: Automatic detection
Select DETECT to attempt an automatic detection of devices on the board. Usually this will provide
information about the number of devices on the board and their sequence in the scan chain. As package
information is not usually available from the electronic signature of the device, the specific device name
will almost always be required to be selected manually. This is the case with the Training Platform.
Infinity Suite User Guide Page 36 / 121 © Atomic Programming Ltd 2015
Step 3: Editing the details
Simply click on the device to bring up the EDIT DEVICE window:
Each of the devices are available in several different packages all of which share the same ID code.
Inspect the board to determine which of the available versions is fitted allows the correct entry to be
chosen from the Recommended Matches.
It is important that the correct package is selected in order that the correct pin results can be displayed.
Optionally assign a component reference to each device. This allows an operator to quickly identify a
device on the board from its entry in the chain. This can be done during step 3 or any time afterwards.
After references have been added for the training board, the scan chain will show them in each entry.
Then select Sample for the device to be included within the Scan Chain, or Bypass to remove the
selected part from the Scan Chain. A device that is bypassed will not return boundary scan results
speeding up data acquisition for remaining items in the chain. This can be useful if only one or two
devices in the chain are of interest and will allow results from other devices to be ignored. As with the
Component reference, this can be changed at any time by double-clicking on the device, or selecting and
clicking on EDIT.
Repeat the above steps all devices within the chain.
Infinity Suite User Guide Page 37 / 121 © Atomic Programming Ltd 2015
Step 4: Manually adding devices (if required)
With the Test Platform, all devices on the scan chain are already present in the library. If it is necessary
to add devices then click on ADD, locate the appropriate BSDL files and add them to the device library.
Alternatively, follow instructions in the Infinity Database Appendix and edit the associated entry in the
scan chain.
Step 5: Save the project
You can now save the scan chain set-up to a Boundary Scan Project File using FILE > SAVE PROJECT AS.
When saving a file, the details of the devices in the scan chain and their component references are
automatically stored along with any other comparison information. This allows details about a board to
be quickly and easily stored, and then recalled, as necessary.
Infinity Suite User Guide Page 38 / 121 © Atomic Programming Ltd 2015
Boundary Scan Operations The AP-114 monitors the state of the pins on devices in the boundary scan chain in their active
configuration. This allows a real-time snapshot of all of the pins to be captured and investigated without
requiring detailed knowledge of the board under test. However, it is important to understand that the
capture process is statistical and may not capture every possible state. For example, consider the
following diagram:
This shows four individual captures occurring one after the other for three pins. The time between
captures depends on a number of factors including the number of devices on the boundary scan chain,
the number of devices in bypass, the complexity of the devices and the speed of the computer being
used. With the capture timing shown above, it will appear to the software that Pin 1 is always high and
that Pin 2 is always low. In practice this is a highly exaggerated situation and in the majority of cases all
pin states will normally be seen within a few seconds. However, it does highlight how important it is to
allow enough time/captures to ensure reliable data is extracted from the target board.
Sample The Sample function allows data to be acquired from the AP-114 JTAG interface. The AP-114 can be
configured to acquire data for different periods of time. This can be adjusted according to your specific
requirements.
The following sample modes are available:
o Single: A single capture of the pins is taken, acquisition stops immediately after this has completed.
o Loop: Capture of pins occurs on a continuous basis until terminated by the operator or the Read Limit is reached, according to the Loop Mode
o Until Fail: Capture of pins occurs until the overall capture result fails. This is useful for capturing intermittent failures that may only occur after an extended period of time.
o Until Pass: Capture of pins occurs until the overall capture result passes on all pins. A pin failure will not stop capture - but the overall result will remain as Fail.
o Until Complete: This is similar to Until Pass but a pin failure will immediately stop capture.
Infinity Suite User Guide Page 39 / 121 © Atomic Programming Ltd 2015
The Until Fail, Until Pass and Until Complete modes of capture are only effective after training has been
completed. See Automatic Training for more information.
The Until Complete mode of operation is particularly useful for ensuring that the pins on a board have
been seen at all expected logic levels. For example, by setting the input high and input low states for a
clock pin to Ensure the capture will not complete until both states have been seen at least once. A board
in this situation where the clock is not connected or which is shorted to one or the other power rails will
not pass - even though both states are valid.
Loop Mode
The Sample Limit allows a sample operation to finish before a condition is met. The sample operation can be set to:
No Limit: Sampling will only terminate once the condition has been met. For Loop captures the read operation will continue until the operator stops the capture.
Time (s): Sampling will terminate when either the specified number of seconds has elapsed or the condition has been met.
Captures: Sampling will terminate after the specified number of captures have been taken.
The speed of capture depends on a number of factors including the number of devices on the scan chain, how many have been put into bypass and the speed of the computer running the software. In some situations, it may be preferable to ensure that at least a certain number of states have been seen regardless of the speed of acquisitions - in which case the Captures limit would be appropriate. In other situations, it may be sufficient to wait a certain period of time - particularly where the acquisition rate is high enough to warrant it.
Training & Comparisons A powerful aspect of the JTAG boundary scan testing is the ability to monitor devices on a board and
compare this information at a later point in time. Although expected results can be trained for each pin
individually, it is usually more convenient to perform some automatic or manual bulk training first and
then perform any minor adjustments.
Training and comparison information is shown in the Pin
Properties section.
There are two ways of looking at specific pin information. In
the Device Window, simply click on the pin you wish to look at.
Alternatively, once a sample loop has resulted in a failed state,
then the list of failed pins is displayed in the Pin Properties
window. Simply click on each failed pin to see the Pin Details. This
will also switch to the correct device in the Device Window if
appropriate.
This allows bulk training to be accessed, shows details for a
selected pin and shows any comparison failures.
Infinity Suite User Guide Page 40 / 121 © Atomic Programming Ltd 2015
Pin Properties
Each pin on a boundary scan device can be either an input to the device or an output from the device. In addition, the level on each pin can be either a logic high or a logic low. This means that there are five possible states for any one pin:
Low Input - The device is reading from the pin and it is currently at a low logic level
High Input - The device is reading from the pin and it is currently at a high logic level
Low Output - The device is driving the pin to a low logic level
High Output - The device is driving the pin to a high logic level
High Z - This state occurs when the output enabled has been disabled inside the device and it does not contain any logic for input mode so the pins cannot be read
Not every pin will contain electronics to support all states. For example, a pin which is always a clock input may not contain any circuitry within the device to allow that pin to drive any external signals so will only support Low Input and High Input states. Similarly, a pin which is always an output will never show the Low Input or High Input states.
The pin details section shows a count for each of the four possible states and an associated comparison setting for that state. There are four possible comparison settings that can be shown:
Untrained - No training has yet been performed on this pin either manually or automatically. If any one state for a pin shows Untrained then all states for that pin will show Untrained.
Allow - The state for this pin is allowed and counts towards an overall comparison pass.
Disallow - The state for this pin is not allowed and will give an immediate comparison failure for the pin, the device and the overall result.
Ensure - This is similar to Allow but the comparison will not pass until this state has been seen at least once.
The pin will fail if the AP-114 sees it in the low input or high input state as both states are set to Disallow. Any comparison for the pin will pass if either the high output or low output states are seen - but the pin will not be Complete until the pin has been seen in the low output state at least once.
Device Information The Graphical Pin Display in the Device Window provides a quick and easy method for viewing
information about all pins of a selected device in the JTAG scan chain.
Infinity Suite User Guide Page 41 / 121 © Atomic Programming Ltd 2015
The display shown above is a typical example of a TQFP device on the boundary scan chain. Not all pins
have information that can be captured using the JTAG boundary scan chain. These pins are known as
'linkage' pins and are typically pins such as power supply pins, analogue pins or pins used for the JTAG
interface itself. In the Graphical Pin Display, these are shown as grey pins and no results will be shown
for these pins.
Clicking on any individual pin shows its specific properties in the Pin Properties window.
There are 2 different display modes:
Sample Mode (default mode)
During Training and Sample operations, each pin may be in one of four states:
Low Input The device is reading from the pin and it is currently at a low
logic level. This is shown as Violet
High Input The device is reading from the pin and it is currently at a high
logic level. This is shown as Orange
Low Output The device is driving the pin to a low logic level. This is shown
as a Cyan
High Output The device is driving the pin to a high logic level. This is shown
as Blue
The results are updated immediately following an acquisition. In loop mode, the state of pins that are
changing will update after each individual acquisition is performed.
Test Mode
When training has been performed, this section allows the results of the pin comparisons for entries in
the scan chain to be quickly investigated.
Infinity Suite User Guide Page 42 / 121 © Atomic Programming Ltd 2015
In addition to the 'linkage' pins, which are shown in grey, there are four possible conditions for each pin:
Untrained Pins These are pins that could be trained but have no training on
them. These pins are shown in white
Comparison Pass These are pins that have passed the conditions associated with
that pin. These pins are shown in green
Comparison Fail These are pins that have failed the conditions associated with
that pin. These pins are shown in red
Incomplete Pins These are pins that have not completed the conditions associated
with that pin. These pins are shown in yellow
Comparison Results In addition to the detailed pin information, the boundary scan chain window above displays a top-level
summary of the comparison results for devices on the scan chain.
In the example shown here, U3 has at least one pin failing and is shown in red. All relevant pins of U2
have met all required conditions, and has passed. U1 has at least one pin that has not completed
comparisons and is shown in yellow.
Automatic Training Although as mentioned previously the states for each pin can be configured manually, it is usually more
efficient to perform training on many pins at once. Pressing the Train button displays the training
window:
Infinity Suite User Guide Page 43 / 121 © Atomic Programming Ltd 2015
The Training window has the following functions
Clear Training This allows any existing training results to be cleared. In effect it will set every state for every pin of the
devices on the boundary scan chain to 'Untrained'. This is useful to remove any old training information
before starting a new training session.
Training Mode The Automated Training is done by performing a sequence of reads automatically and updating the
comparison states. This can also be done several times to allow learned results to be combined. The
default learning time is set to 10 seconds but this can be increased to a maximum of 60 seconds or the
training can be performed several times. It is also possible to train for a pre-fined number of samples.
Comparison settings and results are shown on the main device window.
The results can be set to either Allow or Ensure. This is done by setting the required radio button.
The Allow result button will change the pin states of device pins to allow any results that have been seen
in the last read operation. This is done cumulatively to allow the state of the board to be trained
multiple times without affecting previous results. Pressing Ensure result has the same effect as Allow
result but the results are changed to Ensure instead of Allow.
Press Start to begin the automatic training operation. The training time is specified by the learn time
parameter. Automatic training will last this period regardless of how many captures are taken during
this time.
Note: It is important to understand when considering training that the capture of data over the boundary scan chain when monitoring device operations is a statistical one. See the section Boundary Scan Operations section for more information.
Once the software has been successfully trained, and each pin has been assigned the relevant properties
and required test states, then all of the settings can be stored for future use, and Production
Mode testing. Select FILE > SAVE PROJECT AS. Store the file in the required location. It will be saved with
a .apbs file extension. To recall a Project file, simply select FILE > OPEN PROJECT. The JTAG Scan Chain,
and all the training and pin information will be loaded ready for testing.
Infinity Suite User Guide Page 44 / 121 © Atomic Programming Ltd 2015
ActiveX Object The ActiveX (COM) Object allows SCAN functionality to be included in your own test environments such
as LabView or into scripts such as VbScript. A full reference for all of the available functions is given in
Appendix F. The ActiveX object does require that a SCAN license is available. Below is an example script
written in VbScript that runs a test using a project file called AtomicTrainingPlatform.apbs.
Dim ApObject Set ApObject = CreateObject("APBSCOM.Application") ApObject.SampleMode = ApObject.MODE_COMPLETE bResult = ApObject.OPEN("AtomicTrainingPlatform.apbs") If bResult Then ' Start the Test ApObject.Start() ' Show the Status Window. This will keep the user ' aware of how the test is performing ApObject.StatusWindow(True) ' Wait until the test is complete While ApObject.Running WEND ' Close the status Window ApObject.StatusWindow(False) ' Did the test run successfully? If ApObject.ErrorNumber <> 0 Then MsgBox ApObject.ErrorString,0,"SCAN COM Test" ' Did the test pass? Elseif ApObject.FailCount <> 0 Then For i = 1 To ApObject.FailCount MsgBox ApObject.FailPin(i-1),0,"SCAN COM Test" Next Else MsgBox "Test Passed",0,"SCAN COM Test" End If Else Msgbox ApObject.ErrorString,0,"SCAN COM Test" End If
Infinity Suite User Guide Page 45 / 121 © Atomic Programming Ltd 2015
Production Mode Plugin
The first step is to login. The default User name is "Admin", with a password of "Admin". Once logged in,
the password can be changed as required. This can be changed using the Options Button. If you are an
Admin then the following options window is displayed. This allows you to:
Edit the user name. Note: The “Admin” User name cannot be edited.
Edit the Admin Password
Give Admin Rights to other operators.
Delete operators.
If you do not have Admin rights then the Edit password window is displayed when you click the Options
Button.
Infinity Suite User Guide Page 46 / 121 © Atomic Programming Ltd 2015
Products Admin operators can add products to the system. These product describe:
The name of the product to be tested
The .apbs project file to be used for testing
Whether the project file is loaded before the test starts. This option is useful in development so that you can change edit your current project, go straight to the Production Mode and test without re-loading
The Operators that can test the product
The Sample Mode used for testing
Operators New Operators can be added from the main Production Window. Type in the new name in the Operator
box, and click-on the Login button. You will be asked to confirm if you want to add the new operator,
then you can add and confirm the required password.
The new operator will not yet be able to test any products. To do this an operator with admin rights
must log in and enable the operator to test that product. This stops operators from testing products for
which they have not been trained.
Infinity Suite User Guide Page 47 / 121 © Atomic Programming Ltd 2015
Starting SCAN in Production Mode The easiest way to start the Production Plugin is to select Production from the Tools Menus. This,
however, may not be suitable for productions environments. Starting Infinity SCAN with –PRODUCTION
before the project name will put SCAN straight into Production Mode. This means that making
alterations to the project is not possible. There is no training option, Loading and Saving Files has been
disabled and the operator is unable to edit the Scan chain. Instead the User is presented with the
Production Mode Test screen as their main interface preventing any curruption to the projects
Testing To test a board click enter the serial Number in the Serial Number Box and click Start. The serial number
entered does not have to be unique. This is to allow for re-testing of boards. While the test is running,
the status line at bottom will show how many Ensure conditions have not yet occurred. While testing
the pass/fail box will go yellow.
A PASS result will show as a green box.
The Last Product Tested section will show
the operator, the Product and Serial
Number of the boards tested.
The Status section will show how many
times that serial number has been tested
along with the test time (in seconds) and
the number of errors. An error occurs if a
pin shows a condition that must not
happen.
A Failed result will show as a RED box. If
the failed was not due to a test failure but
due to a system errors such as JTAG chain
error or missing AP-114 then the Last
Product Tested and Status Sections will
show no data as seen here.
All test results, pass or fail, are recorded in the database.
Infinity Suite User Guide Page 48 / 121 © Atomic Programming Ltd 2015
Reports Reports are available in three different types. These are
1) Product Reports. These report give details of
a. How many boards have been tested
b. How many passed
c. What failed on the boards that did not pass
d. Who tested them
e. Average test time
2) Board reports. This gives the detail test report for a board. If a board has been tested multiple
times then each test stored and the following results are available:
a. How many times the board was tested
b. Who tested it
c. What failed on the board each time is was tested
3) Operator Reports. These reports include information such as
a. Boards Tested. Which boards for which products were tested
b. When were they tested
c. How long did the operator take to test the product
Infinity Suite User Guide Page 49 / 121 © Atomic Programming Ltd 2015
Each of the three report types are available in three different formats. These are:
1) XML. This data is suitable for importing into many commercial reporting tools.
2) XLS. The report can generate files suitable for Excel.
3) CSV. This data is suitable for importing into other spreadsheet applications
Infinity Suite User Guide Page 50 / 121 © Atomic Programming Ltd 2015
Scan Compiler
Overview The Scan Compiler is available in the Tools Menu and allows Infinity SCAN projects to be compiled into
executables. These executables have the following features
1. They are portable and can be installed onto other computers
2. They protect source code and cannot be edited
3. They do not require SCAN or the Infinity Database to be installed on the target machine
Running the Compiler The compiler can be run from the Tools Menu in Infinity SCAN and with start with the image below.
The SCAN project to be compiled. Use the three dots to browse.
The output folder specifies where the files will be written. Again use the three dots to browse.
The Assembly Information allows you to specify the file details for the file executable
The “Select Icon” button allows you to specify the icon for the executable.
The Project Information allows you to specify the details of the main form of the final application.
Infinity Suite User Guide Page 51 / 121 © Atomic Programming Ltd 2015
Compiling After compilation there will be a set of files in the output folder. The main executable will have the same
name as the script but with a “.exe” extension.
Associated Files There will be other files in the folder with the executable. All of these will be needed to deploy the
application on another system. Simply zip the file up or create an install utility (using NSIS or similar)
that includes all of these files. No Infinity Database or Infinity Suite software needs to be installed on the
target machine.
Infinity Suite User Guide Page 52 / 121 © Atomic Programming Ltd 2015
Running the Target Application When you run the target application you will get a screen similar to the one below. The application title
and Button Text will match the information provided in the ‘Form Information’ section.
The final application appears different from the main SCAN window. This is because functions such as
training and defining the Scan chain are no longer required.
The Clear button will delete any previous results but is will not clear the scan chain or any pin rules. The
Setup button will show the standard hardware options windows and configuration is identical to Infinity
SCAN. The Start button will start testing the board.
While the test is running it is possible to look at the condition of the pins. Select the device in the scan
chain using the and buttons. The Device can then be viewed in the device window. Functionality
for the Device Window is identical to the Device Window in Infinity SCAN.
The Pending Events window will show the ENSURE conditions that have not yet occurred. The Failed
Pins Window will show the conditions that have occurred on pins that are not allowed.
Infinity Suite User Guide Page 53 / 121 © Atomic Programming Ltd 2015
INFINITY APEL
Introduction Infinity APEL is a JTAG (Atomic Programming) Embedded-test Language allows quick and easy testing
development of complex PCBs, including testing and programming of non-JTAG devices.
What is APEL? APEL is a high-level scripting language which can be used to directly control the IO Ports on devices that
are connected on the JTAG scan chain.
The Need for APEL So you have used Infinity SCAN to test most of your hardware but you find there is a component on the
board that is not on the JTAG chain but needs testing. Can we do it? Well with APEL you can. All JTAG
devices support a MODE called EXTEST where the IO pads can be controlled by the JTAG interface.
Infinity Suite User Guide Page 54 / 121 © Atomic Programming Ltd 2015
Consider the case where we had a board that was connected as follows:
Using APEL we could read the sensor, regardless of how the FPGA is configured with a script such as
FOR LOOP = 1 TO COUNT
EPM3032AT44.IO23 = "1"
LOAD
EPM3032AT44.IO23 = "0"
LOAD // This will sample the pins as well
RESULT = RESULT + EPM3032AT44.IO24 // Add the result to a string
NEXT
Perhaps there is a parallel FLASH device that needs programming i.e.
Well with APEL we can program the FLASH device without the FLASH Device being connected directly on
the JTAG chain even if the flash interface is connected across different devices on the JTAG chain.
OPEN INT, "PROGRAM.HEX", DATA_ARRAY
BUS ADDRESSBUS = {DEVICE1.IO30, DEVICE1.IO31 DEVICE1.IO32, DEVICE1.IO33 }
BUS DATABUS = { DEVICE2.IO34, DEVICE2.IO35, DEVICE2.IO36, DEVICE2.IO37 }
BUS WE = DEVICE1.IO38
FOR i = 1 TO LENGTH(DATA_ARRAY)
Infinity Suite User Guide Page 55 / 121 © Atomic Programming Ltd 2015
ADDRESSBUS = STRV(i-1,4,OUTPUT)
DATABUS = DATA_ARRAY[i-1]
WE = "0"
LOAD // PUT the address and data values on the PINS
WE = "1"
LOAD // Set WE high
WE = "0"
LOAD // Take it low again
NEXT
APEL can also be used to test boards in JTAG SAMPLE mode by writing scripts that test that inputs have
changed (clocks are present and databuses are toggling), waiting for configuration pins to toggle etc.
APEL allows variables, arrays and bus definitions and supports complex loops, functions, delays and
conditional execution.
The APEL Studio Script Editor provides breakpoints, single-step execution, Variable and Bus tracing and
editing and device chain visualisation. Write your own custom test sequences, generate script
automatically using the Script Wizard or use code provided by Atomic Programming.
ActiveX Object script control allows full integration of software into the user's GUI, and a Console mode
run scripts from command prompts. The APEL Compiler means scripts can be compiled to be run at
remote sites without having to release the source code.
Infinity Suite User Guide Page 56 / 121 © Atomic Programming Ltd 2015
APEL Modules The APEL package is a collection of modules
Windows APEL Script Runner This module is a windows application that allow you to run scripts using a RUNNER (or above) License.
The file menu allows to Load APEL scripts and to save the output window as a log file. The Output
window will show any messages in the script (i.e. PRINT statements). The Action Menu allows you to run
the script and access the options window.
Options
The options window allows you to select the AP-114 to use. You can also specify the maximum TCK
frequency. This value overrules any attempts in the script to set the clock frequency high than this. The
VCC pins overs the chance to bring out a 50mA supply from Port 1 Pin 12 on the AP-114 at a
programmable voltage between 1.8V and 3.3V. This supply can be used to power the target board. Note:
Attempting to take more than 50mA can damage the AP-114.
Infinity Suite User Guide Page 57 / 121 © Atomic Programming Ltd 2015
Console APEL Script Runner This module is a console application that allow you to run scripts using a RUNNER (or above) License.
Command Line Options
--H Help. Shows all the options --S <SERNUM> Select the AP-114 to use by serial Number --F <FREQ> Sets the maximum TCK frequency --VXX Sets Voltage on Port 1 Pin 12. Valid options are:
--V18 1.8V --V25 2.5V --V30 3.0V --V33 3.3V If parameter is not set then no voltage will be applied to the pin
<script> APEL script to run including full path and .apel extension
Examples
4) Running a Basic Script called runtest.apel
apel runtest.apel
5) Specifying the programmer to use
apel --SAPR4RKW6 runtest.apel
6) Specifying the maximum TCK speed to 1 MHz
apel --F1000000 --SAPR4RKW6 runtest.apel
Infinity Suite User Guide Page 58 / 121 © Atomic Programming Ltd 2015
ActiveX Object The ActiveX (COM) Object allows APEL functionality to be included in your own test environments such
as LabView or into scripts such as VbScript. A full reference for all of the available functions is given in
Appendix E. The ActiveX object does require that an APEL Runner or Studio license is available. Below is
an example script written in VbScript that runs a test using a project file called TestParams.apel and
passes three parameters to it.
DIM apelobj DIM response response ="" SET apelobj = CreateObject("apelCOM.Application") Wscript.echo "Starting" IF NOT apelobj.Load("TestParams.APEL") THEN Wscript.echo "Unable to Load project" WScript.Quit() END IF apelobj.ClearCommandLineVariables() apelobj.AddCommandLineVariable("C:\Temp\COMhex.hex") apelobj.AddCommandLineVariable("READ") apelobj.AddCommandLineVariable("1000") IF apelobj.ProgramLoaded THEN apelobj.Start() WHILE apelobj.Running IF apelobj.DataToDisplay() THEN response = response + apelobj.text() + vbcrlf END IF WEND IF apelobj.DataToDisplay() THEN response = response + apelobj.text() +vbcrlf END IF Wscript.echo response END IF SET apelobj = NOTHING
Infinity Suite User Guide Page 59 / 121 © Atomic Programming Ltd 2015
APEL Studio
Overview
APEL studio is a dockable IDE that allow the editing and debugging of APEL scripts.
The editor is a multiple file editor that supports syntax highlighting of many different file types with line
numbers and multiple undo/redo.
There are various windows within Studio that can be docked/undocked from the Main IDE. These
windows allow the use to debug scripts/ override values or state of pins of devices on the Scan Chain.
Variables Window
The variables windows show you the value and type of any defined variable. Each time you step over a
DIM statement then an additional variable will be displayed. The Variable window contains the
following fields:
Infinity Suite User Guide Page 60 / 121 © Atomic Programming Ltd 2015
Variable: The name of the variable
Type: One of the two types defined in APEL (Integer or string)
Array Index: (For arrays only). Edit the Index and the value filed will update with the value for that index
in the array
Value: the current value of the variable
The value field can be edited during debugging. This allows you to change the value. Click on the Value
field to edit the value.
Bus Window
The Bus window shows buses declared using the BUS statement in APEL. The windows show the name
of the bus, the pins that make up the bus and the current value of the bus. The bus can be edited by
clicking on the Value Field. Once changed the update will be immediately relected on the pins of the
target platform.
Output window
The output window shows the results of any PRINT statements in the APEL script.
Infinity Suite User Guide Page 61 / 121 © Atomic Programming Ltd 2015
Scan Chain Window
The Scan Chain Window shows the results of the CHAIN statement in the APEL scripts. It shows:
The order the devices appear on the scan chain
The device type and the Alias name. The Alias name allows you to differentiate between multiple devices of the same type on the Scan Chain. The name must be unique
The currently selected device is highlighted
Clicking on a device will select that device in the Device Window
Functions window
The functions window shows any functions that have been defined in the script. It shows
The name of the function (in bold)
A description (if available) of what the functions does
Any parameters passed to the function including a description and the parameter type
The final entry shows the returned type and a description (if available)
The description fields will only be filled if the function contains comments of the correct format before
the function is defined. The function for the example above is show below. It has three comments
defined. The first has the description of the function, the second is the description for a parameter in
the function (in this case Data) and the third is a description of the returned value from the function.
These comments are not required to make the script compile and function but will aid in the debug and
development of any script.
// Description : Clock as byte using I2C // Parameter : Data : Value to be written // Returns : string : Value of ACK Bit Function SendByte(Data as string) as string dim result as string for i = 1 to 8 I2CDATA = subst(Data,i-1,1) Load I2CCLK ="1" Load I2CCLK ="0" Load Next // Clock the ACK I2CDATA ="H" Load
Infinity Suite User Guide Page 62 / 121 © Atomic Programming Ltd 2015
I2CCLK ="1" Load result = I2CDATA I2CCLK ="0" Load EndFunction result
Device Window
The device window shows the selected device on the scan chain.
You can zoom in and out of the device using the magnifying glass.
The hand symbol will let you pan around the device
The cross will allow you to evaluate the value on each pin by hovering over it as shown below.
Clicking on the pin will take you to the Pins Window with that pin selected.
Pins Window
The pins window allows you to view and edit the state of each pin. The window will give a list of all of
the configurable pins on all of the devices on the scan chain. You can select a pin by expanding the tree
view and clicking on the pin or by clicking on the pins in the device windows. The bottom panel shows
the Alias Name, device, selected pin and current state. To change the state select from the drop down
list.
Infinity Suite User Guide Page 63 / 121 © Atomic Programming Ltd 2015
Toolbar and Shortcut Keys
The toolbar give speedy replacement to some of the menu items to aid in debugging and editing.
Toolbar Key Description Shortcut
New Text File [None]
Open Text File Ctrl + O
Save Text File Ctrl + S
Print Text File Ctrl + P
Cut Ctrl + X
Copy Ctrl +C
Paste Ctrl +V
Find Ctrl + F
Run until Breakpoint F5
Stop
Toggle Breakpoint F9
Step F10
Toggle ON/OFF Variables Window Alt+1
Toggle ON/OFF Bus Window Alt+2
Toggle ON/OFF Breakpoints Window Alt+3
Toggle ON/OFF Functions Window Alt+4
Toggle ON/OFF Scan Chain Window Alt+5
Toggle ON/OFF Output Window Alt+6
Toggle ON/OFF Pins Window Alt+7
Toggle ON/OFF Device Window Alt+8
Select Line Ctrl +S
Select All Ctrl +A
Find Next F3
Replace Ctrl + R
Go to Line Ctrl + G
Undo Ctrl + Z
Infinity Suite User Guide Page 64 / 121 © Atomic Programming Ltd 2015
Debugging
Debugging will start when pressing F5(Run) or F10(Step) on a file that is open in the editor. The file does
not need to be saved before debugging. The debugger works using the contents of the file being edited.
Options
There are various options available. These can be selected by selecting Options from the Tools Menu.
The options window is broken down into several panels. Select the correct panel from the list on the left
side.
Environment Panel
The Environment panel allows you to
Specify how APEL Studio Starts
o Reopen all files the we open previously
o Allow multiple instances to run. If you double click on an APEL file to open it with APEL
Studio and APEL Studio is already open, if this box is checked then the file will load in
the current Studio.
o Allows you to associate .APEL files with APEL Studio
Specify how files are saved
o Remove all TABs and replace with spaces when saving
o Strip spaces from the end of lines when saving
Define shortcuts to APEL Studio
o You can select Desktop, SendTo Menu, QuickLaunch Menu and Startup Menu
Specify Command line parameters to be used when debugging scripts
Infinity Suite User Guide Page 65 / 121 © Atomic Programming Ltd 2015
Syntax Panel
The Syntax Panel Allows you to edit /specify language definitions used in the editor. This allows you to
Define keywords, Functions and operators
Define colours for each as well as comments and strings
Define extensions associated with the syntax type
Supports multiline comments
Specify that Keywords and functions are bold text
Editor Panel
The Editor Panel options define how the editor operates. These options include
Background colour and debug line background colour
Defines the width of the TAB character or the option to convert TABs to spaces while you type
How files are backed up. This includes
o Specify how long between automatic backups. This will save the file with a .ABAK
extension automatically to prevent loss of work if the file has been edited and not saved.
A time of 0 switches off automatic backup
o When saving files, the previous version will be renamed with a .BAK extension if you
should need to return to the older revision.
Infinity Suite User Guide Page 66 / 121 © Atomic Programming Ltd 2015
Display Font Panel
The Display Font Panel lets you specify the font used in the editor. This will be Lucida Console Size 8 by
default.
Hardware Options
This option is in the Tools Menu. It allows you to specify hardware options for the AP-114. These include
Which AP-114 to use during debugging.
Maximum TCK speed.
Apply a 50mA to Port 1 pin 12 at the specified voltage (between 1.8 & 3.3V). This voltage will only be available during debug. Note: Attempting to take more than 50mA can damage the AP-114.
Infinity Suite User Guide Page 67 / 121 © Atomic Programming Ltd 2015
Script Wizard This user guide shows how the APEL Script wizard that is included in APEL Studio+ can be used to
automatically generate the CHAIN and BUS sections of your APEL script. This is achieved in three easy
steps
1. Define the Scan Chain
2. Creating the Buses
3. Creating the script
Syntax checks are also applied to the script allowing validation of existing scripts. These checks include
1. Do all the devices have an Alias name?
2. Are all of the Alias names unique?
3. Are all of the Bus names unique?
4. Do all the pins on the buses exist on the device chain?
5. Are any of the pins on more than one bus?
6. Does the specified package exist on the part?
7. Do the part names exist in the Infinity Library?
Stage 1: Defining the Scan Chain
The first step to creating a script is to define the Scan Chain. There are four ways of generating the Scan
chain
1. Click Detect Chain to automatically detect the scan chain. This method requires that an AP-114
programmer is connected to your system and that the AP-114 is also connected to the target
system. The power supply also needs to be connected to your target system.
2. Click Read Script to read in an existing .APEL script.
3. Click Read Scan File to read in an existing .APBS scan file created from Infinity SCAN. The scan
chain defined in that Training data is imported into the APEL Script Wizard.
4. Manually adding and deleting parts in the scan chain using Add Device and Remove Device.
Infinity Suite User Guide Page 68 / 121 © Atomic Programming Ltd 2015
Below we load in an existing APEL script that contains the lines
CHAIN xc9536xl_cs48.CS48.MAIN,EPM3032AL44.PLCC44.SUPPORT
BUS GLEDPORT = {MAIN.PB01_11,MAIN.PB01_13,MAIN.PB01_15,MAIN.PB00_16,MAIN.PB00_14,MAIN.PB00_12,MAIN.PB00_10, MAIN.PB00_08,MAIN.PB00_05}
BUS RLEDPORT = {MAIN.PB01_10,MAIN.PB01_12,MAIN.PB01_14,MAIN.PB01_16,MAIN.PB00_15,MAIN.PB00_13,MAIN.PB00_11, MAIN.PB00_09, MAIN.PB00_07}
The lines above show that the CHAIN command has two devices (a xc9536xl and an EPM3032) and also
has two buses (called GLEDPORT and RLEDPORT). We can see the scan chain defined in the example
below.
Once the Scan Chain is defined we can move onto the next stage. A scan chain must be defined at this
stage. The devices must exist in the Infinity library to move on from this step however no validation is
applied to the Alias name or the package definition at this stage.
It is possible to edit the device on the Scan Chain by double clicking on it. The following window will
appear.
Infinity Suite User Guide Page 69 / 121 © Atomic Programming Ltd 2015
Here we can perform the following operations
1. Change the device (including manufacturer and Device Family).
2. Modify the package
3. Change the Component Alias Name
The Matches Section gives a list of devices that have an identical JTAG ID and allows the device to be
easily changed. It may be necessary to confirm the correct device if the Scan Chain has been
automatically generated using the Detect Chain button. If more the one device matches the JTAG ID
then you will be required to confirm the device selection before moving onto stage 2.
Stage 2: Creating the Buses
Stage 2 allows us to define the buses that can be used on the script. We can see in the screenshot below
that the two buses defined in the script that was used in Stage 1 have now appeared in the list of bus
definitions.
The following facilities are available at this stage.
1. Clicking on a device in the Scan Chain will display that device in the Device window
2. Double clicking on the device in the Scan Chain will allow the device to be edited in a similar way
to Stage 1.
3. The Device Window gives the following facilities.
a. Zoom In/Out
b. Pan (using the hand tool)
c. View pin details (by selecting the Cross tool)
d. Centre the device.
Infinity Suite User Guide Page 70 / 121 © Atomic Programming Ltd 2015
The bus definitions window shows the defined buses and allows buses to be added, deleted and edited.
See Editing the Bus below. Here we can see the pin E3 has been selected. In this case the pin is used on
the GLEDPORT bus and is bit 0.
Device Window Colour Coding
The colours used in the Device window are defined below
Pin is not available on JTAG Chain
Pin is used on a bus
Pin is not used on a bus
Selected Pin
Pin is on a bus being edited using the pin wizard (see below)
Editing the Bus
There are two ways of editing/creating a bus. Manual editing allows the bus details to be entered into
the table directly. The second way is to use the Pin Wizard. This allows the pins to be selected by clicking
on the pin in the Device window. Buses are not restricted to one device and can be defined across all
devices in the Scan Chain.
Infinity Suite User Guide Page 71 / 121 © Atomic Programming Ltd 2015
Manual Editing
The easiest way to edit the bus is to click on the list of pins and manually enter the bus definitions, see
image below.
The Del Bus button will delete the selected bus in the Bus Definitions window. Both the Edit Bus and
Add Bus buttons will bring up the select Pins window shown below. The only difference is that Edit Bus
will load the existing bus details into the window.
The list of pins defined for the bus are shown LSB first. To
change the bit ordering you can use the UP and DOWN buttons.
The X button allows individual bits of the bus to be deleted.
The final button is the PinWizard function. Details of this mode
are given below.
Using the Pin Wizard
When clicking on the PinWizard Button on the Select Pins window, the PinWizard mode is entered. This
causes all of the pins that are currently listed on the bus to go white.
1) Clicking on an unused (cyan) pin will cause this pins to be added to the most significant bit of the
bus and will turn the pin white.
2) Clicking on a white pin will cause that pin to be removed from the bus and the pin will turn back
to cyan.
3) Clicking on an orange pin will have no effect as this pin is already used on another bus.
4) Click on the PinWizard Button to leave PinWizard Mode.
Infinity Suite User Guide Page 72 / 121 © Atomic Programming Ltd 2015
Once all buses are defined then click Next to move to Stage 3. At this point all entries will be validated
and any errors reported. These errors must be corrected before the wizard will let you move to Stage 3.
Stage 3: Creating the Script
Here we can choose to either create a new script or modify an existing one. If the initial Scan Chain was
created by reading an existing APEL script, then the Stage 3 default will be “Modify Existing Script” and
the default filename specified will be the original will be used. Otherwise the default will be to create a
new script and the filename will be blank. Use Browse to specify the filename.
The Preview window allows you to
1. View the script that will be created
2. Make an alterations to the script before saving
Click Finish to save the file and quit the wizard.
Infinity Suite User Guide Page 73 / 121 © Atomic Programming Ltd 2015
APEL Compiler The APEL Compiler is a tool that allows APEL Scripts to be compiled to generate Windows executables.
These executables have main advantages of
1. Infinity APEL does not require installing on a target machine
2. No source code needs to be released
The final executable is suitable for release to a contract manufacturer without compromising any design
data.
Building an Executable
Overview
The APEL compiler (available with APEL STUDIO+) allows scripts to be compiled into executables. These
executables have the following features
1. They are portable and can be installed onto other computers
2. They protect source code and cannot be edited
3. They do not require APEL or the Infinity Database to be installed on the target machine
Running the Compiler
The compiler can be run from the Atomic Programming/APEL menu and with start with the image below.
The APEL script is the file to be
compiled .Use the three dots to browse.
The output folder specifies where the
files will be written. Use the three dots to
browse.
The assembly information allows you to
specify the file details for the file
executable
The “Select Icon” button allows you to
specify the icon for the executable.
The Form Information allows you to
specify the details of the main form of
the final application. See image below
Infinity Suite User Guide Page 74 / 121 © Atomic Programming Ltd 2015
Compiling
After compilation there will be a set of files in the output folder. The main executable will have the same
name as the script but with a .exe extension.
Associated Files
There will be other files in the folder with the executable. All of these will be needed to deploy the
application on another system. Simply zip the file up or create an install utility (using NSIS or similar)
that includes all of these files.
Running the Target Application
When you run the target application you will get a screen similar to the one below. The application title
and Button Text will match the information provided in the ‘Form Information’ section
The Hardware setup will give you a similar screen to the one in APELStudio and the APEL Windows
Runner.
Infinity Suite User Guide Page 75 / 121 © Atomic Programming Ltd 2015
Using APEL in EXTEST Mode EXTEST mode allows us to override the internal logic on a device and drive/read the IO cells on the
boundary SCAN chain directly. We can use EXTEST mode in a number of different ways
1) Override outputs to drive signals. Example would be
a. Driving LEDS to know states to test them. An example using the Atomic Training board
(ATP) would be:
BUS LEDPORT = {MAIN.IO85,MAIN.IO86,MAIN.IO87,MAIN.IO88,MAIN.IO89,MAIN.IO90,MAIN.IO91,MAIN.IO92, MAIN.IO95,MAIN.IO96,MAIN.IO97,MAIN.IO98,MAIN.IO99,MAIN.IO100,MAIN.IO7,MAIN.IO1}
// Initialise all LEDS OFF LEDPORT = STRH("FFFF",16,OUTPUT)
dim j as integer dim counter as integer counter = 0 // rotate LEDS one way for j = 1 to 16
// Select bit to switch on counter = 1 << (j-1) // LEDS are active low so invert counter = NOT(counter) // Generate a 16 bit string of '0's and '1's based on the counter value LEDPORT = STRV(counter,16,OUTPUT) // Set the pins Load // add a delay clock 100000
next
b. Driving clock and data lines to validate device not on the Boundary SCAN chain. An
example function for clocking a byte of data on an I2C bus would be
Function SendByte(Data as string) as string dim result as string
for i = 1 to 8
I2CDATA = subst(Data,i-1,1) Load
I2CCLK ="1" Load I2CCLK ="0" Load
Next
// Clock the ACK I2CDATA ="H"
Load I2CCLK ="1"
Load result = I2CDATA
I2CCLK ="0" Load EndFunction result
Infinity Suite User Guide Page 76 / 121 © Atomic Programming Ltd 2015
c. Test connectivity between devices. Here we set one end of the signal to be an output
and the end to be an input. We can then check the connectivity by toggling one end and
measuring the other. In this example script we use the ATP to test the connectivity
between PortA on the AVR that is connected to the EPM3032A. The script is:
PRINT "Testing PA bus between ATMega164 and EPM3032A" CHAIN ATmega164P.TQFP.AVRDEVICE,EPM240T100.TQFP100.MAIN,EPM3032AT44.TQFP44.SUPPORT BUS PA_ATMEGA = {AVRDEVICE.PA(7),AVRDEVICE.PA(6),AVRDEVICE.PA(5),AVRDEVICE.PA(4),AVRDEVICE.PA(3), AVRDEVICE.PA(2),AVRDEVICE.PA(1),AVRDEVICE.PA(0)} BUS PA_EPM3032 = {SUPPORT.IO20,SUPPORT.IO21,SUPPORT.IO18,SUPPORT.IO15,SUPPORT.IO14,SUPPORT.IO13, SUPPORT.IO12,SUPPORT.IO10}
function CheckBus(SourceBus as string, TargetBus as string) as integer DIM RESULT as integer Dim count as integer Dim BitToTest as integer TargetBus =STRV(0,length(TargetBus),INPUT) // Generic way of doing it FOR count = 1 TO length(SourceBus) // Check each bit of the bus BitToTest = 1 << (count-1) // set a signal bit in the bus
// Convert decimal value to string of the form "00000001" // Length of the string must match the length of the bus
SourceBus = STRV(BitToTest,length(SourceBus),OUTPUT) LOAD // Set the source bits and set the Target pins to input LOAD // Read the bits back result = VALS(TargetBus) // Convert the bus result back to an integer value if BitToTest <> result then // Exit if error found Exitfunction Count endif NEXT endfunction 0 // Initialise all LEDS OFF BUS LEDPORT = {MAIN.IO85,MAIN.IO86,MAIN.IO87,MAIN.IO88,MAIN.IO89,MAIN.IO90,MAIN.IO91,MAIN.IO92,MAIN.IO95,MAIN.IO96,MAIN.IO97,MAIN.IO98,MAIN.IO99,MAIN.IO100,MAIN.IO7,MAIN.IO1} LEDPORT = STRH("FFFF",16,OUTPUT) Dim value as integer // Check Direction 1 value = CheckBus(PA_EPM3032,PA_ATMEGA) If value <> 0 Then Msgbox "Test Failed. Bus Pin " + DECV(value) END Endif // Check Other Direction // Dont need to check both directions in production but just showing off! value = CheckBus(PA_ATMEGA,PA_EPM3032) If value <> 0 Then Msgbox "Test Failed. Bus Pin " + DECV(value) END Endif Msgbox "All Tests Passed!"
Infinity Suite User Guide Page 77 / 121 © Atomic Programming Ltd 2015
Using APEL in SAMPLE Mode Although APEL has previously been shown running in EXTEST mode, it is capable of running just as
successfully in SAMPLE mode. In SAMPLE mode APEL does not drive any signals but is able to sample the
boundary SCAN chains in order to monitor their values. This can be useful to validate that a board is
running correctly.
This can be useful to
1) Wait for a signal to record a certain state (complete a boot process or measurement from a
sensor)
2) Implement internal tests that can be outputted on unused FPGA pins. Even though these pins
are not connected externally they can still be read as part of the boundary SCAN chain and are
therefore useful for test purposes. Note: On some FPGAs devices that are available on multiple
packages have unconnected IO lines on smaller packages. These IO are generally available as
part of the Boundary SCAN chain on all package variants and can be used as test pins.
Below is an example of a script that can be used to check whether a board has booted correctly
// Chain for the Atomic Training Board (ATP) CHAIN ATMEGA164P.TQFP.AVRDEVICE,EPM240T100.TQFP100.MAIN,EPM3032AT44.TQFP44.SUPPORT // Devices default to EXTEST Mode. Leave all devices in SAMPLE Mode SAMPLE AVRDEVICE SAMPLE MAIN SAMPLE SUPPORT // Using PortA.7 on the AVR to indicate successful start up. BUS BootComplete = {AVRDEVICE.PA(7)} FREQUENCY 50KHz TRST OFF PRINT "Waiting for Startup" // define some local variables DIM i as integer DIM passed as integer passed = 1 // default to failed // In APEL ‘H’ and ‘L’ are inputs and ‘0’ and ‘1’ are outputs // Set the pin to be an input before we start sampling BootComplete = "H" LOAD // Now wait for the signal to go low for i = 1 to 1000 LOAD if BootComplete = "L" then passed = 0 print "Boot completed successfully" endif Next End passed
Infinity Suite User Guide Page 78 / 121 © Atomic Programming Ltd 2015
APEL Studio Tutorial
Basic Debugging Features In this Example we will use the CheckSignals.APEL script with the Atomic Training Platform (ATP). The
Script will then check that all eight signals are connected correctly between two devices on the JTAG
Scan Chain.
This first step for the script is to define the scan chain for the ATP
CHAIN ATmega164P.TQFP.AVRDEVICE,EPM240T100.TQFP100.MAIN,EPM3032AT44.TQFP44.SUPPORT
If we look at U1 in the Schematic we can see that Port A is connected from Pin 37 to Pin30 with Pin 37
being the LSB so we can define a bus as follows
BUS PA_ATMEGA = {AVRDEVICE.PA(7),AVRDEVICE.PA(6),AVRDEVICE.PA(5), AVRDEVICE.PA(4),AVRDEVICE.PA(3),AVRDEVICE.PA(2),AVRDEVICE.PA(1), AVRDEVICE.PA(0)}
This bus is also connected to U3 pins 10,12,13,14,15,18,21 and 20.
BUS PA_EPM3032 = {SUPPORT.IO20,SUPPORT.IO21,SUPPORT.IO18,SUPPORT.IO15, SUPPORT.IO14, SUPPORT.IO13,SUPPORT.IO12,SUPPORT.IO10}
We then define a function that will test the buss connections and call that function to test the buss
connections.
Running and Stepping APEL studio allows APEL script to be debugged using the following keys
Run (Shortcut F5) Stop
Toggle Breakpoint (Shortcut F9) Step (Shortcut F10)
Inserting a Breakpoint To insert a breakpoint at line36 we place the cursor at line 36 and them press F9 (or click on the Toggle
Breakpoint button).
Infinity Suite User Guide Page 79 / 121 © Atomic Programming Ltd 2015
Pressing F5 (or clicking on the Run button) will cause the script to run until line 36 is hit. Make sure that
the AP-114 is connected correctly to both your PC and Training board before running the script.
We can now see that line 36 is highlighted and the script has stopped execution. Select the bus Window
and we can watch the bus value changing as we step over each line.
Infinity Suite User Guide Page 80 / 121 © Atomic Programming Ltd 2015
Press F10 to move to the first LOAD command and then press F10 again to move to the second LOAD
command and we see the following. SourceBus (PA_EPM3032) still has the value 00000001 assigned to
it on line 36. TargetBus (PA_ATMEGA) shows all inputs high. This means that the Output Drivers for this
bus have been correctly switched off during the first LOAD command. LEDPORT has all bits set to 1
therefore all of the LEDS are off.
We now press F10 again to execute the second LOAD command. We can now see that PA_ATMEGA now
has the value LLLLLLLH which shows that the output signals from the PA_EPM3032 bus have now been
sampled correctly.
Infinity Suite User Guide Page 81 / 121 © Atomic Programming Ltd 2015
We can also check this by viewing each device in the scan chain. Click on the ScanChain Window and
select the first device (ATMEGA164P). Here we can see that pin 37 is a High Input and pin 36 to 30 are
low inputs.
We can do the same thing by clicking in the third device (EPM3032AT44). Here we can see that pin 10 is
a High Output and that all other pins on the bus are low.
Infinity Suite User Guide Page 82 / 121 © Atomic Programming Ltd 2015
Editing a Pin on a Device At this point we can take the opportunity to toggle one of the pins. We select the second device in the
scan chain. From the schematic we know that that the first LED is on Pin1. This pin is currently a high
output (which switches the LED off). To change the pin select the Cross tool from the device toolbar and
click on pin 1.
This takes you to the Pins Window. Here we can see that the pin is IO1 and is currently set to a 1. To
change this, select O from this list.
Infinity Suite User Guide Page 83 / 121 © Atomic Programming Ltd 2015
At this point, the Device window will appear and Pin 1 will change to a Low Output. The first LED will
also illuminate.
Click on the Bus window and this will confirm that the bottom bit of the bus is set to zero.
Infinity Suite User Guide Page 84 / 121 © Atomic Programming Ltd 2015
Editing a Bus Now that the bottom bit of the bus is set Low. We can easily edit other pins on the bus by editing the
Bus Value directly. Click on the Value Part the LEDPORT on the Bus Window. In this example we have set
bit to zero.
Below we can see the effect of changing the bus. The third bit is defined in our Bus statement as
MAIN.IO100. We can now see that Pin 100 has also gone low and a second LED is lit on our board.
Infinity Suite User Guide Page 85 / 121 © Atomic Programming Ltd 2015
Editing a Variable We have now stepped down to line 41 and have variables Result and BitToTest both set to 1.
We can edit on of these variables by clicking on the Value section of the Variables window.
We can now edit the value. In this case we have entered 23.
Infinity Suite User Guide Page 86 / 121 © Atomic Programming Ltd 2015
If we now step to the next line we can see that the If condition has failed and the script is about to exit
the function.
Viewing a Value in an Array In this example we have created an Array of integers called Address. At line nine we have set the eighth
(zero based array) element to 54, but this value is not displayed in the Variables window. This is because
the Array index is set to zero so the value for Address[0] is not initialised.
To view the array value, set the Array Index to 7 by clicking on the array index value.
Infinity Suite User Guide Page 87 / 121 © Atomic Programming Ltd 2015
Now we can see that the element does indeed have the value 54.
Infinity Suite User Guide Page 88 / 121 © Atomic Programming Ltd 2015
Appendix A: Infinity Database The Infinity Database is a list of parts that have been created by importing BSDL files into the database.
These parts are using in all Infinity Suite Modules. The library can be edited from Infinity APEL (Library
option in the File Menu) or from Infinity Scan (Device Library in the Tools Menu or the Library button in
the Scan Chain Window)
Library Editor allows both parts and symbols that are stored within the Library to be edited or to create
new parts. It also allows parts to be imported using readily available BSDL files.
NOTE: In the Infinity Database ‘packages’ and ‘symbols’ have a different meaning. A Package is the name
of the package listed for a particular device in its BSDL file (For example a device have 3 packages listed
(DIP, PLCC TQFP). Symbols are the graphical representation of a package. In this case only a DIP symbol
and a QFP symbol are required. The DIP package will use the DIP symbol and the TQFP and PLCC
packages will use the QFP symbol. From within SCAN and APEL only the package will be used as listed in
the BSDL file.
The database is common to all users on the machine and is keep in the “All Users” Windows profile. On
Windows 7, for example, this means that the database is stored in “C:\Users\All Users\Atomic
Programming\Infinity\JTAG Library”. The Parts.Lib file contains a list of all of the devices in the database
and how the packages are mapped onto symbols files. Inside the Parts folder is a list of .part files. These
contains the details of the boundary scan chain for each device. The symbols are stored in the Packages
folder and have a .package extension.
From within the Part Properties window, you
can:
Change Manufacturer Name
Change Device Family Name
Rename the Part
Rename each package
Change the symbol that the package uses
All this is done by pressing Enter in the
correct Combo box once you have typed in
the new selection. New parts can also be
imported using BSDL files.
Clicking on the Symbols tab allows you to
edit and add new symbols, using the Symbol
Editor. You can also see have many parts in
the library are using each symbol
Infinity Suite User Guide Page 89 / 121 © Atomic Programming Ltd 2015
Adding a New Part When a device is connected in the JTAG scan chain that does not exist in the device library, a new device
can be created.
From the LIBRARY EDITOR, select the PARTS tab, and click on IMPORT BSDL. The BSDL files will have a
BSDL or BSD file extension. Both can be used without name changes for importing.
The following screen in shown following the import function:
Infinity Suite User Guide Page 90 / 121 © Atomic Programming Ltd 2015
The manufacturer and family information is not included in the BSD file so these will default to
unspecified. Simply select the Manufacturer and Family from the drop down menus, or type in the
correct name as shown below. You will also need to select the correct symbol from the list of available
symbols for each package on the device. If the symbol does not exist then you will need to create it
using the SYMBOL EDITOR. Currently boundary cell types BC_0 to BC_10 (and the LV counterparts
LV_BC_0 to LV_BC_10) are supported.
Click Accept to complete the Import.
Symbol Editor The symbol editor is selected by selecting the Symbols tab.
The Symbol Editor is then launched by either double-clicking on the symbol name you want to edit, or
by pressing Add Symbol. The highlighted selection is used as a base for the new symbol. If no symbol is
highlighted, this will default to the symbol at Index 1 (in this case BF957).
Please note that it is strongly recommended that a symbol is selected that most resembles the device you
wish to add as this will save a large amount of time.
Infinity Suite User Guide Page 91 / 121 © Atomic Programming Ltd 2015
You can also see have many parts are using any listed symbol. Should any symbol not have any parts
associated with it, then it can be deleted simply be highlighting it, and then pressing the Delete key
The Symbol Editor is divided into sub-windows.
Symbol Details
The Details section allow you to
a) Change the name of the symbol (essential for all new symbols)
b) Change the size of the margin around the device as it is displayed.
Pin Tab
This is the most complex part of the symbol design - which it is why it is recommended to use the
symbol that is most similar to the part you are creating. After changing any setting, click on Update to
see the result of the change to the symbol.
There are three Block types - round, horizontal and vertical. The round ones are used in BGA devices,
and the horizontal/vertical ones used in PLCC and TQFP devices.
Infinity Suite User Guide Page 92 / 121 © Atomic Programming Ltd 2015
It is probably easier to understand if we use examples.
Example 1: BGA49
Block Type: Circle (BGA pins)
Origin: This is the location of the top-left pin, measured in pixels from the
outline
Pin Size: The size of the pin, in pixels. Change the first pins size value to
20 and then click update, try setting the second value to 20 and click
update. Set them back to 10 when done.
For circle pins, both the 'Col' and 'Row' data is used
a) Count specifies the number of pins. Try setting Col/count to 8 and
click update
b) Step is distance between pins. Try changing to 30 and click update.
By reducing the step and pin sizes, it is possible to get a greater number
of pins into the same outline.
For example, change the count to 8 and 8, reduce the pin size to 6 & 6,
and the step size to 12 & 12, then click Update.
Prefix: this the name of the first pin.
Prefix Step: tells the prefix how to change value for each pin. If it is a
decimal digit, setting this to '1' counts up by 1 and '-1' counts down by 1.
For ASCII characters this value has no effect. The order is predefined with
certain characters missing (I,O,S,X,Z) - try changing Prefix (Row) to 7 and
the prefix Step(row) to -1
Infinity Suite User Guide Page 93 / 121 © Atomic Programming Ltd 2015
Example 2: TQFP44
Block Type: Rows are vertical blocks. Columns are horizontal blocks
There are four groups of pins (called blocks for this symbol). The first group has a horizontal block type
so the 'row' data is not used. The other three blocks are shown below. Horizontal groups have no 'col'
data.
Infinity Suite User Guide Page 94 / 121 © Atomic Programming Ltd 2015
For each block the origin and pin size is as per Example 1 above. Try selecting the first block and then
changing the pins size from 10x5 to 20x5 and then click update. For this first group you can see there are
11 pins. Again the step determines the distance between the pins. The prefix is the first number and this
number is counting up on the first block. If we click on the third block, we will see that the Prefix is 33
and it counts down.
The text direction is the left/right alignment of the text next to the horizontal pins (in columns). This tells
you whether the pin number should go left or right of the pin. For vertical pins the text option changes
to top/bottom (for above of below the pin) .
Infinity Suite User Guide Page 95 / 121 © Atomic Programming Ltd 2015
Outline Tab
This tab is used to define the outline of the
symbol
1. Change the background colour of the device
2. Change the outline colour and width
3. The Number of Points is is the number of items in the list.
You can edit each of the points in the list
- as an example edit the BGA49 part and change all the 115's
to 120 by clicking on each value in the list
4. The Create Default Outline button creates an outline based
on the position of the pins
Excluded Tab
This tab lists the pins to be excluded on the
device. These would normally be the pins that do
not actually exist on the package.
a) To exclude pins - select the pin by clicking on it
on the device (the pin will turn will go yellow). To
select more than one press ctrl when clicking.
Now click the Exclude Pins button. The excluded
pins now appear as a list within the Excluded tab.
b) To delete pins from the exclude list (ie, put
them back on the device). Select the pins in the
list (you can use CTRL and/or SHIFT to select
multiple pins) then press Delete on the keyboard
Once all the changes have been made, and the
new Symbol name has been added, click Save to
add the new Symbol to the library.
Infinity Suite User Guide Page 96 / 121 © Atomic Programming Ltd 2015
Importing Parts Import parts allows devices and Symbol files that have been created on another machine to be imported
into the database without the need for the BSDL file. To import parts onto a second machine
1) Copy .part and .package files onto a memory stick to copy onto the new machine
2) Click “Import Parts” and then select the file to import. NOTE: do no copy the files into the database
area on the new machine. They can be left on the memory stick. During the import process the software
will create the files in the database area. Select all the files that need importing and click Open.
Infinity Suite User Guide Page 97 / 121 © Atomic Programming Ltd 2015
Appendix B: Useful APEL Tricks
How do I add a delay to a script? To add delay to a script you should use the CLOCK statement. The exact length of the delay can be
calculated as count x 1/(TCK frequency). The TCK frequency is specified using the FREQUENCY statement.
Examples
CLOCK 1000
CLOCK counter
How long did my script take to run? Add the following to the end of the script.
dim mytime as integer
mytime = TIME()
PRINT " Total :" + DECV(myTIME) + " Seconds"
How can I pass a parameter to a script? To set the command line parameters in Studio then go to the options Window
On the command line, Windows Runner and for any compiled executables, just add them after the
filename. For example
APEL params.apel c:\temp\Read.hex WRITE 1000
For the COM object two functions exist. Use ClearCommandLineVariables() to remove existing
parameters and use AddCommandLineVariable(<StringValue>) to add parameters before calling
Start().
To access the command line parameter when running the script a string array called param will be
defined and can be accessed as follows
Dim i as integer
If length(param)<> 0 then
Infinity Suite User Guide Page 98 / 121 © Atomic Programming Ltd 2015
For i = 1 to length(param)
print param[i-1]
next
endif
How do I report that that a script ran correctly? The following error values are used as standard
Error State Value
Success 0
File Error 1
Syntax Error in script 2
To report your own status you can add a parameter to the END statement. This will allow you to report
Test PASSED/FAILED/PROGRAMMED etc. i.e.
END 23 // Report Error 23 when exiting
Do I have to use the BUS statement to access a single pin? No. Some people do as it helps to describe the pins but both examples below are valid
BUS I2CCLK = {PIC.RD10} BUS I2CDATA = {PIC.RD11} for i = 1 to 8
I2CDATA = subst(Data,i-1,1) Load I2CCLK ="1" Load I2CCLK ="0" Load
Next Can also be written as for i = 1 to 8 PIC.RD11= subst(Data,i-1,1) Load
PIC.RD10="1" Load PIC.RD10="0" Load Next
Infinity Suite User Guide Page 99 / 121 © Atomic Programming Ltd 2015
Appendix C: Licensing
SCAN Features SCAN is available in two different flavours. These are SCAN and SCAN+. The table below gives details of
the modules included with both versions:
Infinity SCAN Features SCAN SCAN+
Automatic Scan-Chain Detect
Atomic Libraries
Training
Maximum Devices in Scan Chain 10 100
COM Object
Production Mode
SCAN is the standard product. SCAN+ is designed for production environments where the testing can be
automated using the COM object or the Production Mode module.
APEL Features APEL is available in three different flavours. These are Runner, Studio and Studio+. The table below
gives details of the modules included with each version:
Infinity APEL Features Runner Studio Studio+
Windows APEL Script Runner
Console APEL Script Runner
COM Object
Script Editor
Debugger
Script Wizard & Compiler
Atomic Script Library
The runner license is designed to be used in production environments to allow script to be run using the
Console/Windows and Com Object modules. Application compiled using the APEL compiler also require
a Runner license to run.
The Studio license is designed for developers as it includes the editor and debugger.
The Studio+ License also includes the Script Wizard (useful for generating script automatically) and the
compiler that can be used to create Executables so that applications can be sent to third parties (such as
production and assembly houses) without the need to release the source code. The Script library is a set
of additional script that can speed up development.
Infinity Suite User Guide Page 100 / 121 © Atomic Programming Ltd 2015
Appendix D: APEL Language Reference The APEL Language Reference Manual (APELReferenceManual_1V1.pdf) is available from the Atomic
website (www.atomicprogramming.com)
Direct Link: http://www.atomicprogramming.com/technical.php?action=dl&dl_id=62
Infinity Suite User Guide Page 101 / 121 © Atomic Programming Ltd 2015
Appendix E: APEL COM Object Reference
Properties The following properties are available
MaxSpeed Gets/Sets the maximum clock speed of the JTAG clock
TYPE: Integer - Frequency in Hz
SerialNumber Gets/Sets the serial number of the AP-114 to use
TYPE: String – Text containing the Serial Number displayed on the back of the AP-114
VCC Gets/Sets the VCC voltage to use
TYPE:integer
VOFF = 0
V18 = 1
V25 = 2
V30 = 3
V33 = 4
Running READONLY : Returns is the script is running
TYPE: Boolean
True : Script is running
False: Script is not running
DataToDisplay READONLY : Does APEL have any text to display?
TYPE: Boolean
True : Yes : use the TEXT property to get the text
False: There are no messages to display
Infinity Suite User Guide Page 102 / 121 © Atomic Programming Ltd 2015
Text READONLY : Text message from the APEL Engine.
TYPE: String - Text to be displayed
ProgramLoaded READONLY : IS there a script Loaded?
TYPE: Boolean
True : Yes
False: No
Statements
Display Adds text to message
Parameters
String – Message to Display
Returns
None.
Load Loads a script into the APEL engine
Parameters
String - Filename of script to load
Returns
Boolean – True is successful.
Start Run the script
Parameters
None
Returns
Boolean – True is successful.
Infinity Suite User Guide Page 103 / 121 © Atomic Programming Ltd 2015
ClearCommandLineVariables Clear the params string array
Parameters
None
Returns
Boolean – True is successful.
AddCommandLineVariables Run the script
Parameters
String – parameter to pass to the script
Returns
Boolean – True is successful.
Infinity Suite User Guide Page 104 / 121 © Atomic Programming Ltd 2015
Appendix F: SCAN COM Object Reference This reference guide enables the user to access all the commands of the Infinity SCAN Software without
running the standard GUI.
Constants The following constants have been defined
SampleMode Constants
MODE_SINGLE
MODE_LOOP
MODE_UNTILFAIL
MODE_UNTILPASS
MODE_COMPLETE Error Constants
RR_NOERROR
ERR_LOADERROR
ERR_NODEVICES
ERR_PROGRAMMERERROR
ERR_INCOMPLETECHAIN
ERR_INVALIDSERNUM
ERR_NOTLOGGEDIN
ERR_PRODUCTERROR
ERR_CANCELLED
ERR_INVALIDFILENAME
Export Constants
EXPORTMODE_XML
EXPORTMODE_EXCEL
EXPORTMODE_CSV
0
1
2
3
4
0
1
2
3
4
5
6
7
8
9
0
1
2
Infinity Suite User Guide Page 105 / 121 © Atomic Programming Ltd 2015
Properties Properties that are available in Infinity SCAN
ErrorNumber Returns the error number when accessing the BoundaryScan Engine
Type
Integer
Remarks
Read Only. These errors are system errors and not errors during testing. To recover thie test errors
see FailCount. Error number will be one of the following :
Error Value Description
ERR_NOERROR
ERR_LOADERROR
ERR_NODEVICES
ERR_PROGRAMMERERROR
ERR_INCOMPLETECHAIN
ERR_INVALIDSERNUM
ERR_NOTLOGGEDIN
ERR_PRODUCTERROR
0
1
2
3
4
5
6
7
OK
Unable to Load Training File
No devices in chain. Probably due to unknown devices in the
Scan Chain
Communications Error with Programmer
Unable to read the device in the chain from the Library
Serial Number entered is invalid
Running Production Test when not logged in
Could match product name in TestProduct
Example
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
If bResult Then
ApObject.Start()
If ApObject.ErrorNumber <> ERR_NOERROR Then
// Wait until the Operation has completed
While ApObject.Running
Wend
End If
End If
Infinity Suite User Guide Page 106 / 121 © Atomic Programming Ltd 2015
ErrorString
Returns the Error String when accessing the BoundaryScan Engine
Type
String
Remarks
Read Only. These errors are system errors and not errors during testing. The ErrorString will match
the ErrorNumber Property
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
If bResult Then
ApObject.Start()
If ApObject.ErrorNumber <> ERR_NOERROR Then
// Wait until the Operation has completed
While ApObject.Running
Wend
Else
MsgBox ApObject.ErrorString
End If
End If
FailPin Returns the list of failures on the BUT (Board Under Test)
Type
String
Remarks
Read Only. This property returns the list of pins that failed the test. You can use this property in
conjunction with the FailCount Property to list the failed pins.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
Wend
Infinity Suite User Guide Page 107 / 121 © Atomic Programming Ltd 2015
// Display Failures
If ApObject.FailCount <> 0 Then
FOR i = 1 to ApObject.FailCount
MsgBox (ApObject.FailPin(i-1))
NEXT
End If
End If
FailType Returns the type of error reported on a failed pin on the BUT (Board Under Test)
Type
String
Remarks
Read Only. This property reports the type of error of a failed pin. This error will be one of the
following
> High Input
> High Output
> High Z
> Low Input
> Low Output
You can use this property in conjunction with the FailPin Property to list the failed pins and the reason
for failure.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
Wend
// Display Failures
If ApObject.FailCount <> 0 Then
FOR i = 1 to ApObject.FailCount
MsgBox (ApObject.FailPin(i-1) + " Reason : " + ApObject.FailPin(i-1))
NEXT
End If
End If
Infinity Suite User Guide Page 108 / 121 © Atomic Programming Ltd 2015
FailCount Returns the errors on the BUT (Board Under Test)
Type
Integer
Remarks
Read Only. This property reports the number of Test Errors. You can use this property in
conjunction with the FailPin Property to list the failed pins.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
Wend
// Display Failures
If ApObject.FailCount <> 0 Then
FOR i = 1 to ApObject.FailCount
MsgBox (ApObject.FailPin(i-1))
NEXT
End If
End If
LoopMode Gets/Sets the time in Seconds used by the MODE_LOOP SampleMode
LOOPMODE (Value, Mode)
Arguments
Value
Integer. Set time in seconds if Mode = FALSE and number of samples if Mode = TRUE
Mode
Boolean. FALSE set the loop mode to count seconds. TRUE sets the loop mode to count samples.
Remarks
These values are only valid when the SampleMode is set to MODE_LOOP.
Infinity Suite User Guide Page 109 / 121 © Atomic Programming Ltd 2015
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
ApObject.SampleMode = MODE_LOOP
ApObject.LoopMode(60,False) // Run for 60 Seconds
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
Wend
End If
Passed Returns the state on the BUT (Board Under Test)
Type
Boolean
Remarks
Read Only. Returns True if the BUT passed.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
Wend
// Display Failures
If not ApObject.Passed Then
FOR i = 1 to ApObject.FailCount
MsgBox (ApObject.FailPin(i-1))
NEXT
End If
End If
Infinity Suite User Guide Page 110 / 121 © Atomic Programming Ltd 2015
PendingCount Returns the number of conditions of type Ensure that have not occured.
Type
Integer
Remarks
Read Only. This property gives a figure for how many conditions still need to be met before the board
passes.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
MsgBox (Str(ApObject.PendingCount))
Wend
End If
SampleMode
Set the sample mode used for testing a BUT (Board Under Test)
Type
Integer
Remarks
This property should be set to one of the following values
MODE_SINGLE
MODE_LOOP
MODE_UNTILFAIL
MODE_UNTILPASS
MODE_UNTILCOMPLETE
0
1
2
3
4
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
ApObject.SampleMode = MODE_UNTILCOMPLETE
Infinity Suite User Guide Page 111 / 121 © Atomic Programming Ltd 2015
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
Str(ApObject.PendingCount))
Wend
End If
Running
Gets the state of the BoundaryScan Engine
Type
Boolean
Remarks
Read Only. Returns True if the Boundary Scan Engine is running.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
Wend
End If
Infinity Suite User Guide Page 112 / 121 © Atomic Programming Ltd 2015
Statements
Open Loads the training data into the BoundaryScan Engine
OPEN (FileName)
Arguments
FileName
Name of the .APBS file to to loaded.This name can include a full path (if required)
Returns
Boolean. Returns True is the Training data loaded correctly
Remarks
Loads the training data into the BoundaryScan Engine
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
Programmer Selects the programmer to use and defines the speed allow support for more than one programmer
operating at any one time
Programmer(SerialNumber,Speed)
Arguments
SerialNumber
String. Serial number of the programmer to use
Speed
Integer. Speed of the TCLK in Hz
Returns
None
Remarks
If you just wish to specify the speed then set the serial number to empty quotes. If you set the speed to
zero then the maximum speed of TCK will be applied. For the AP-114 programmer this maximum is
6MHz.
Infinity Suite User Guide Page 113 / 121 © Atomic Programming Ltd 2015
Example
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
ApObject.Programmer("",0) ' Select any Programmer and set
the speed to maximum
ApObject.Programmer("APR4RMT5
Start
Starts the BoundaryScan Engine.
START
Arguments
None
Remarks
The Open Statement should already have been called to load the required training file into the Engine.
The SampleMode should also be set prior to this statement
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
ApObject.SampleMode = MODE_UNTILCOMPLETE
If bResult Then
ApObject.Start()
// Wait until the Operation has completed
While ApObject.Running
Wend
// Display Failures
If ApObject.FailCount <> 0 Then
FOR i = 1 to ApObject.FailCount
MsgBox (ApObject.FailPin(i-1))
NEXT
End If
End If
Infinity Suite User Guide Page 114 / 121 © Atomic Programming Ltd 2015
StatusWindow Shows/Hides the current Status Window
StatusWindow Visible
Arguments
Visible
Boolean. True - Displays the window
Returns
None
Remarks
Shows a small windows that gives current status details on the BoundaryScan Engine
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Open("Test.apbs")
ApObject.SampleMode = MODE_UNTILCOMPLETE
If bResult Then
ApObject.Start()
ApObject.StatusWindow(True)
// Wait until the Operation has completed
While ApObject.Running
Wend
ApObject.StatusWindow(False)
End If
Infinity Suite User Guide Page 115 / 121 © Atomic Programming Ltd 2015
Production Mode Plugin
AddProduct Adds a new product to the list of products defined for production testing
AddProduct(ProductName, LoadProject, SampleMode , ProjectName)
Arguments
ProductName
String. Name of the product to be added
LoadProject
Boolean. True indicates that the SampleMode and ProjectName should be applied to the
BoundaryScanEngine when TestProduct is called
SampleMode
Integer. Test Mode - See SampleMode for details
ProjectName
String. Name of the .APBS file to to loaded when this product is selected for testing. This name can
include a full path (if required)
Returns
Boolean : True indicates that the new product was added successfully.
Remarks
Adds a new product for testing
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
ApObject.AddProduct("Product 2", True,
MODE_UNTILCOMPLETE, "Product2TrainingData.apbs")
bResult = ApObject.Login("A N Other")
If bResult Then
ApObject.TestProduct("Product 2", "0000001")
End If
AddUser
Adds an operator to the list of operators defined for production testing
AddUser (Name, Password)
Infinity Suite User Guide Page 116 / 121 © Atomic Programming Ltd 2015
Arguments
Name
String. Operator Name
Password
String. Password that will be required for that user to Log in
Returns
Boolean : True indicates that the user was added successfully.
Remarks
The User is recorded for each production test, so this allows new users to be added.
Example written in VbScript Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
ApObject.AddUser("AN Other","Default")
ApObject.Login("A N Other")
DelUser Deletes an operator to the list of operators defined for production testing
DelUser (Name)
Arguments
Name
String. Operator name to delete
Returns
Boolean : True indicates that the operator was deleted successfully.
Remarks
Test results for the operator will still be kept.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
ApObject.DelUser("AN Other")
ApObject.Login("A N Other")
Infinity Suite User Guide Page 117 / 121 © Atomic Programming Ltd 2015
ExportBoard
Generates a report on an individual product
ExportBoard (ExportMode, Filename, Product, SerialNumber)
Arguments
ExportMode
Integer. Document Type as defined below
EXPORT_XML 0
EXPORT_EXCEL 1
EXPORT_CSV 2
FileName
String. Filename of the document created
Product
String. Product Name.
SerialNumber
String. Serial Number of board.
Remarks
This will silently overwrite existing files. You do not have to be logged in to generate reports. If
SerialNumber = "" then the report will include all serialnumbers for that product type.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
ApObject.ExportBoard(ApObject.EXPORT_XML, "C:\Test\BoardReport.xml", "Atomic Training
Platform", "AAAA0001")
ExportProduct Generates a report on a individual product
ExportBoard (ExportMode, Filename, Product, SerialNumber)
Arguments
ExportMode
Integer. Document Type as defined below
EXPORT_XML 0
EXPORT_EXCEL 1
EXPORT_CSV 2
Infinity Suite User Guide Page 118 / 121 © Atomic Programming Ltd 2015
FileName
String. Filename of the document created
Product
String. Product Name.
SerialNumber
String. Serial Number of board.
Remarks
This will silently overwrite existing files. You do not have to be logged in to generate reports. If
SerialNumber = "" then the report will include all serialnumbers for that product type.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
ApObject.ExportBoard(ApObject.EXPORT_XML, "C:\Test\BoardReport.xml", "Atomic
Training Platform", "AAAA0001")
ExportOperator
Generates a report on an operator in the product database
ExportOperator (ExportMode, Filename, OperatorName)
Arguments
ExportMode
Integer. Document Type as defined below
EXPORT_XML 0
EXPORT_EXCEL 1
EXPORT_CSV 2
FileName
String. Filename of the document created
OperatorName
String. Name of the User.
Remarks
This will silently overwrite existing files. You do not have to be logged in to generate reports.
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
ApObject.ExportProduct(ApObject.EXPORT_XML,"C:\Test\OperatorReport.xml","A N
Other")
Infinity Suite User Guide Page 119 / 121 © Atomic Programming Ltd 2015
Login Logs in the user for Production Mode
LOGIN (OperatorName)
Arguments
OperatorName
String. The default name to display on the Login Window
Remarks
Production Mode Only. The operator must log in BEFORE the TestProduct Statement can be executed
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Login("A N Other")
If bResult Then
ApObject.TestProduct("Product 1", "AP2010-1000001")
End If
TestProduct Starts testing a product from the list of products defined for production testing
TestProduct(ProductName, SerialNumber)
Arguments
ProductName
String. Name of the product to be tested
SerialNumber
String. Serial number of the board to be tested
Returns
None
Remarks
Start testing a product. You must be logged in first. The test results are then logged in the production
database for this product
Example written in VbScript
Dim ApObject
Set ApObject = CreateObject("APBSCOM.Application")
bResult = ApObject.Login("A N Other")
If bResult Then
Infinity Suite User Guide Page 120 / 121 © Atomic Programming Ltd 2015
ApObject.TestProduct("Product 1", "AP2010-1000001")
ApObject.StatusWindow(True)
// Wait until the Operation has completed
While ApObject.Running
Wend
ApObject.StatusWindow(False)
End If
Infinity Suite User Guide Page 121 / 121 © Atomic Programming Ltd 2015
Revision History Version Date Description
1.0 4-Dec-2015 First Release
Important Notice Atomic Programming Ltd. reserves the right to make corrections, modifications, enhancements, improvements and other changes to its products and services at any time, and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders, and should verify that such information is current and complete. All products are sold subject to Atomic Programming’s terms and conditions of sale, available at the time of order acknowledgment. Information relating to device applications, and the like, is intended as suggestion only and may be superseded by updates. It is the customer’s responsibility to ensure that their application meets their own specifications. Atomic Programming Ltd. makes no representation and gives no warranty relating to advice, support or customer product design.
Atomic Programming Ltd assumes no responsibility or liability for the use of any of its products, conveys no license or title under any patent, copyright to these products, and makes no representations or warranties that these products are free from patent, copyright or mask work infringement, unless otherwise specified.
Atomic Programming Ltd’s products are not intended for use in life support systems/appliances or any systems where product malfunction can reasonably be expected to result in personal injury, death, severe property damage or environmental damage. Customers of Atomic Programming Ltd. using or selling Atomic Programming products for use in such applications do so at their own risk and agree to fully indemnify Atomic Programming for any damages resulting from such use.
All trademarks are the property of their respective owners.
Atomic Programming Ltd
13 Springfield Avenue
Sheffield. S7 2GA
Tel/Fax: +44(0)114 221 8588
www.atomicprogramming.com
Designed and manufactured in the UK