Section 33. Programming and Diagnostics

Similar documents
The Boundary Scan Test (BST) technology

ARM Ltd 110 Fulbourn Road, Cambridge, CB1 9NJ, UK.

In-System Programming Design TM. Guidelines for ispjtag Devices. Introduction. Device-specific Connections. isplsi 1000EA Family.

CHAPTER 11: Flip Flops

Section 33. Programming and Diagnostics

Production Flash Programming Best Practices for Kinetis K- and L-series MCUs

isppac-powr1220at8 I 2 C Hardware Verification Utility User s Guide

Fondamenti su strumenti di sviluppo per microcontrollori PIC

TABLE OF CONTENTS. xiii List of Tables. xviii List of Design-for-Test Rules. xix Preface to the First Edition. xxi Preface to the Second Edition

JTAG Applications. Product Life-Cycle Support. Software Debug. Integration & Test. Figure 1. Product Life Cycle Support

A DIY Hardware Packet Sniffer

2.0 Command and Data Handling Subsystem

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

In-System Programmability

The Advanced JTAG Bridge. Nathan Yawn 05/12/09

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

USER GUIDE EDBG. Description

SPI Flash Programming and Hardware Interfacing Using ispvm System

Microprocessor & Assembly Language

Non-Contact Test Access for Surface Mount Technology IEEE

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

An Introduction to MPLAB Integrated Development Environment

M CORE 14-PIN ENHANCED BACKGROUND DEBUG INTERFACE (14EBDI) USER S MANUAL

Implementation Details

MAX II ISP Update with I/O Control & Register Data Retention

Test Driven Development of Embedded Systems Using Existing Software Test Infrastructure

Single 2.5V - 3.6V or 2.7V - 3.6V supply Atmel RapidS serial interface: 66MHz maximum clock frequency. SPI compatible modes 0 and 3

DKWF121 WF121-A B/G/N MODULE EVALUATION BOARD

Using the Agilent 3070 Tester for In-System Programming in Altera CPLDs

National CR16C Family On-Chip Emulation. Contents. Technical Notes V

Testing of Digital System-on- Chip (SoC)

Testing and Programming PCBA s during Design and in Production

Embedded Multi-Media Card Specification (e MMC 4.5)

TERMINAL Debug Console Instrument

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

(Refer Slide Time: 00:01:16 min)

What is a System on a Chip?

dlan Green PHY Module

Tutorial for MPLAB Starter Kit for PIC18F

FlowKit in-circuit debug system

Boundary-Scan Tutorial

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

PLL frequency synthesizer

MICROPROCESSOR AND MICROCOMPUTER BASICS

8-Bit Microcontroller with Flash. Application Note. Using a Personal Computer to Program the AT89C51/C52/LV51/LV52/C1051/C2051

Computer Organization & Architecture Lecture #19

Serial port interface for microcontroller embedded into integrated power meter

A STUDY OF INSTRUMENT REUSE AND RETARGETING IN P1687

Getting Started with PIC24F/PIC24H Programming and Interfacing in C

A New Chapter for System Designs Using NAND Flash Memory

Operating Manual Ver.1.1

ET-BASE AVR ATmega64/128

Section 14. Compare/Capture/PWM (CCP)

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

How to read this guide

The components. E3: Digital electronics. Goals:

a8251 Features General Description Programmable Communications Interface

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

DS2401 Silicon Serial Number

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

STEPPER MOTOR SPEED AND POSITION CONTROL

TSL INTEGRATED OPTO SENSOR

JTAG-HS2 Programming Cable for Xilinx FPGAs. Overview. Revised January 22, 2015 This manual applies to the HTAG-HS2 rev. A

AN-812 APPLICATION NOTE

S7 for Windows S7-300/400

PowerPC Microprocessor Clock Modes

Systems I: Computer Organization and Architecture

The Programming Interface

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

HC(S)08-System for Development and Training

SPROG DCC Decoder Programmer

Chapter 4 T1 Interface Card

Using Xbee in Serial Communication

Lecture-3 MEMORY: Development of Memory:

Using Altera MAX Series as Microcontroller I/O Expanders

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

Chapter 10. Boundary Scan and Core-Based Testing

Altera Error Message Register Unloader IP Core User Guide

Secure My-d TM and Mifare TM RFID reader system by using a security access module Erich Englbrecht (info@eonline.de) V0.1draft

Digital Signal Controller (DSC) Development Tools

SDLC Controller. Documentation. Design File Formats. Verification

Welcome to the tutorial for the MPLAB Starter Kit for dspic DSCs

MorphIO: An I/O Reconfiguration Solution for Altera Devices

DS1621 Digital Thermometer and Thermostat

UG103.8 APPLICATION DEVELOPMENT FUNDAMENTALS: TOOLS

DsPIC HOW-TO GUIDE Creating & Debugging a Project in MPLAB

8051 MICROCONTROLLER COURSE

In-Vehicle Networking

Massachusetts Institute of Technology

Programming Logic controllers

Manchester Encoder-Decoder for Xilinx CPLDs

Programming A PLC. Standard Instructions

Lecture 8: Synchronous Digital Systems

Open Flow Controller and Switch Datasheet

Transcription:

Section 33. and Diagnostics HGHLGHTS This section of the manual contains the following topics: 33.1 ntroduction... 33-2 33.2 n-ircuit Serial (SP )... 33-2 33.3 Enhanced n-ircuit Serial... 33-3 33.4 JTAG Boundary Scan... 33-4 33.5 Related Application Notes... 33-11 33.6 Revision History... 33-12 33 and Diagnostics 2006 Microchip Technology nc. Advance nformation DS39716A-page 33-1

P24F Family Reference Manual 33.1 NTRDUTN P24F devices provide a complete range of programming and diagnostic features that can increase the flexibility of any application using them. These features allow system designers to include: Simplified field programmability using two-wire interfaces Enhanced debugging capabilities Boundary scan testing for device and board diagnostics P24F devices incorporate three different programming and diagnostic modalities that provide a range of useful functions to the application developer. They are summarized in Table 33-1. Table 33-1: SP omparison of P24F and Diagnostic Features Feature nterface Device ntegration Functions Enhanced SP (ESP) JTAG PGx and PGDx pins TD, TD, TMS and TK pins ntegrated with device core Hardware integrated with device core; firmware-based control Peripheral to device core, partly integrated with / logic, debugging, diagnostics (BST) 33.2 N-RUT SERAL PRGRAMMNG (SP ) n-ircuit Serial (SP) is Microchip s original solution to providing microcontroller programming in the target application. riginally introduced for 8-bit P16 devices, it is used for virtually all Microchip microcontrollers. SP is also the most direct method to program the device, whether the controller is embedded in a system or loaded into a device programmer. 33.2.1 SP nterface SP uses two pins as the core of its interface. The programming data line (PGD) functions as both an input and an output, allowing programming data to be read in and device information to be read out on command. The programming clock line (PG) is used to clock in data and control the overall process. Most P24F devices have more than one pair of PG and PGD pins; these are multiplexed with other / or peripheral functions. ndividual SP pin pairs are indicated by number (e.g., PG1/PGD1, etc.), and are generically referred to as PGx and PGDx. The multiple PGx/PGDx pairs provide additional flexibility in system design by allowing users to incorporate SP on the pair of pins that is least constrained by the circuit design. All PGx and PGDx pins are functionally tied together and behave identically, and any one pair can be used for successful device programming. The only limitation is that both pins from the same pair must be used. n addition to the PGx and PGDx pins, SP requires that all voltage supply and ground pins on the device must be connected, as well as voltage regulator pins (ENVREG or DSVREG). The MLR pin, which is used with PGx to enter and control the programming process, must also be connected to the programming device. 33.2.2 SP peration SP uses a combination of internal hardware and external control to program the target device. data and instructions are provided on PGD. SP uses a special set of 4-bit commands to control the overall process, combined with standard P24F instructions to execute the actual writing of the program memory. PGD also returns data to the external programmer when responding to queries. ontrol of the programming process is achieved by manipulating PG and MLR. Entry into and exit from mode involves applying (or removing) voltage to MLR while supplying a code sequence to PGD and a clock to PG. Any one of the PGx/PGDx pairs can be used to enter programming. During programming, the clock train on PG is also used to indicate the difference between 4-bit commands, programming control commands and payload data to be programmed. DS39716A-page 33-2 Advance nformation 2006 Microchip Technology nc.

Section 33. and Diagnostics The internal process is regulated by a state machine built into the P24F core logic; however, overall control of the process must be provided by the external programming device. Microchip programming devices, such as the MPLAB PM 3 (used with MPLAB DE software), include the necessary hardware and algorithms to manage the programming process for P24F. Users who are interested in a more detailed description, or who are considering designing their own programming interface for P24F devices, should consult the appropriate P24F device programming specification. 33.2.3 SP and n-ircuit Debugging SP also provides a hardware channel for the n-ircuit Debugger (D) which allows externally controlled debugging of software. Using the appropriate hardware interface and software environment, users can force the device to single-step through its code, track the actual content of multiple registers and set software breakpoints. To use D, an external system that supports D must load a debugger executive program into the microcontroller. This is automatically handled by many debugger tools, such as the MPLAB D 2. For P24F devices, the program is loaded into the executive program memory, located at 800000h through 8007FFh in the configuration memory space. While memory at these addresses is implemented, and code can be executed from these addresses, the executive memory space is not available to the user during normal operating modes. Because of its location, use of the debugger executive has no impact on the size of the application being examined. The executive memory space allows the entire program memory to be used for program code, without needing to leave reserve space for application debugging. n addition, its use means that the program memory contents in normal and debug states is identical, which helps to simplify troubleshooting. n contrast with programming, only one of the SP ports may be used for D. Depending on the particular P24F device, there may be two or more SP ports that can be selected for this function. The active SP debugger port is selected by the S onfiguration bit(s). For information on specific devices, refer to the appropriate device data sheet. 33.3 ENHANED N-RUT SERAL PRGRAMMNG The Enhanced SP protocol is an extension of the original SP. t uses the same physical interface as the original, but changes the location and execution of programming control. SP uses a simple state machine to control each step of the programming process; however, that state machine is controlled by an external programmer. n contrast, Enhanced SP uses an on-board bootloader, known as the program executive, to manage the programming process. While overall device programming is still overseen by an external programmer, the program executive manages most of the things that must be directly controlled by the programmer in standard SP. The program executive implements its own command set, wider in range than the original SP, that can directly erase, program and verify the microcontroller s program memory. This avoids the need to repeatedly run SP command sequences to perform simple tasks. As a result, Enhanced SP is capable of programming or reprogramming a device more quickly than the original SP. Like the D debugger executive, the program executive does not reside in the user program space; it is also loaded into the executive program memory (800000h through 8007FFh). Since the debugger and Enhanced SP executives both use this memory space, D is not available while Enhanced SP is being used. The program executive is not preprogrammed into P24F devices. f Enhanced SP is needed, the user must use standard SP to program the executive to the executive memory space. This can be done directly by the user, or automatically, using a compatible Microchip programming system. For additional information on Enhanced SP and the program executive, refer to the appropriate P24F device programming specification. 33 and Diagnostics 2006 Microchip Technology nc. Advance nformation DS39716A-page 33-3

P24F Family Reference Manual 33.4 JTAG BUNDARY SAN As the complexity and density of board designs increases, testing electrical connections between the components on fully assembled circuit boards poses many challenges. To address these challenges, the Joint Test Action Group (JTAG) developed a method for boundary scan testing that was later standardized as EEE 1149.1-2001, EEE Standard Test Access Port and Boundary Scan Architecture. Since its adoption, many microcontroller manufacturers have added device programming to the capabilities of the test port. The JTAG boundary scan method is the process of adding a Shift register stage adjacent to each of the component s / pins. This permits signals at the component boundaries to be controlled and observed, using a defined set of scan test principles. An external tester or controller provides instructions and reads the results in a serial fashion. The external device also provides common clock and control signals. Depending on the implementation, access to all test signals is provided through a standardized 4-pin or 5-pin interface. n system-level applications, individual JTAG enabled components are connected through their individual testing interfaces (in addition to their more standard application-specific connections). Devices are connected in a series or daisy-chained fashion, with the test output of one device connected exclusively to the test input of the next device in the chain. nstructions in the JTAG boundary scan protocol allow the testing of any one device in the chain, or any combination of devices, without testing the entire chain. n this method, connections between components, as well as connections at the boundary of the application, may be tested. A typical application incorporating the JTAG boundary scan interface is shown in Figure 33-1. n this example, a P24F microcontroller is daisy-chained to a second JTAG compliant device. Note that the TD line from the external tester supplies data to the TD pin of the first device in the chain (in this case, the microcontroller). The resulting test data for this two-device chain is provided from the TD pin of the second device to the TD line of the tester. This section describes the JTAG module and its general use. Users interested in using the JTAG interface for device programming should refer to the appropriate P24F device programming specification for more information. Figure 33-1: verview of P24F-Based JTAG ompliant Application Showing Daisy-haining of omponents P24F-Based Application P24F P24F (or other JTAG compliant device) JTAG ontroller TD TD TK TMS TD TD TK TMS Standard JTAG onnector TD TD TK TMS TRST (optional) DS39716A-page 33-4 Advance nformation 2006 Microchip Technology nc.

Section 33. and Diagnostics n P24F family devices, the hardware for the JTAG boundary scan is implemented as a peripheral module (i.e., outside of the PU core) with additional integrated logic in all / ports. A logical block diagram of the JTAG module is shown in Figure 33-2. t consists of the following key elements: TAP nterface Pins (TD, TMS, TK and TD) TAP ontroller nstruction Shift register and nstruction Register (R) Data Registers Figure 33-2: JTAG Logical Block Diagram nstruction Shift Register TD Selector (MUX) TD TD TMS TK TAP ontroller apture-r Shift-R Update-R apture-dr Shift-DR Update-DR nstruction Register nstruction Decode Data Registers utput Data Sampling Register Bypass Register Device D Register 33 MHP Scan Data MHP ommand Shift Register MHP ommand Register Boundary Scan ell Registers Data Selector (MUX) and Diagnostics 33.4.1 Test Access Port (TAP) and TAP ontroller The Test Access Port (TAP) on the P24F device family is a general purpose port that provides test access to many built-in support functions and test logic defined in EEE Standard 1149.1. The TAP is disabled by programming the JTAGEN bit in onfiguration Word 1 (the TAP, by default, is enabled in the bit s unprogrammed state). While enabled, the designated / pins become dedicated TAP pins. See the appropriate P24F device data sheet for details about disabling/enabling the JTAG module and identifying JTAG control pins. The P24F family implements a 4-pin JTAG interface with these pins: TK (Test lock nput): Provides the clock for test logic. TMS (Test Mode Select nput): Used by the TAP to control test operations. TD (Test Data nput): Serial input for test instructions and data. TD (Test Data utput): Serial output for test instructions and data. To minimize / loss due to JTAG, the optional TAP Reset (TRST) input pin, specified in the standard, is not implemented on P24F devices. For convenience, a soft TAP Reset has been included in the TAP controller, using the TMS and TK pins. To force a port Reset, apply a logic high to the TMS pin for at least 5 rising edges of TK. Note that device Resets (including PR) do not automatically result in a TAP Reset; this must be done by the external JTAG controller using the soft TAP Reset. 2006 Microchip Technology nc. Advance nformation DS39716A-page 33-5

P24F Family Reference Manual The TAP controller on the P24F family devices is a synchronous finite state machine that implements the standard 16 states for JTAG. Figure 33-3 shows all the module states of the TAP controller. All Boundary Scan Test (BST) instructions and test results are communicated through the TAP via the TD pin in a serial format, Least Significant bit first. Figure 33-3: TAP ontroller Module State Diagram Test-Logic Reset Run-Test/dle Select-DR-Scan Select-R-Scan apture-dr apture-r Shift-DR Exit 1-DR Shift-R Exit 1-R Pause-DR Pause-R Exit 2-DR Exit 2-R Update-DR Update-R By manipulating the state of TMS and the clock pulses on TK, the TAP controller can be moved through all of the defined module states to capture, shift and update various instruction and/or data registers. Figure 33-3 shows the state changes on TMS as the controller cycles through its state machine. Figure 33-4 shows the timing of TMS and TK while transitioning the controller through the appropriate module states for shifting in an instruction. n this example, the sequence shown demonstrates how an instruction is read by the TAP controller. All TAP controller states are entered on the rising edge of the TK pin. n this example, the TAP controller starts in the Test-Logic Reset state. Since the state of the TAP controller is dependent on the previous instruction, and therefore could be unknown, it is good programing practice to begin in the Test-Logic Reset state. When TMS is asserted low on the next rising edge of TK, the TAP controller will move into the Run-Test/dle state. n the next two rising edges of TK, TMS is high; this moves the TAP controller to the Select-R-Scan state. n the next two rising edges of TK, TMS is held low; this moves the TAP controller into the Shift-R state. An instruction is shifted in to the nstruction Shift register via the TD on the next four rising edges of TK. After the TAP controller enters this state, the TD pin goes from a high-impedance state to active. The controller shifts out the initial state of the nstruction Register (R) on the TD pin, on the falling edges of TK, and continues to shift out the contents of the nstruction Register while in the Shift-R state. The TD returns to the high-impedance state on the first falling edge of TK upon exiting the shift state. n the next three rising edges of TK, the TAP controller exits the Shift-R state, updates the nstruction Register and then moves back to the Run-Test/dle state. Data, or another instruction, can now be shifted in to the appropriate Data or nstruction Register. DS39716A-page 33-6 Advance nformation 2006 Microchip Technology nc.

Section 33. and Diagnostics Figure 33-4: TAP State Transitions for Shifting in an nstruction TK TMS nstruction Data (LSB) TD TAP State Test_Logic Reset Run_Test dle Select_DR_Scan Select_R_Scan apture_r Shift_R Exit_R Update_R Run_Test dle TD 1 2 3 Note 1: TD pin is always in a high-impedance state, until the first falling edge of TK, in either the Shift_R or Shift_DR states. 2: TD is no longer high-impedance; the initial state of the nstruction Register (R) is shifted out on the falling edge of TK. 3: TD returns to high-impedance again on the first falling edge of TK in the Exit_R state. 33 33.4.2 JTAG Registers The JTAG module uses a number of registers of various sizes as part of its operation. n terms of bit count, most of the JTAG registers are single-bit register cells, integrated into the / ports. Regardless of their location within the module, none of the JTAG registers are located within the device data memory space, and cannot be directly accessed by the user in normal operating modes. 33.4.2.1 NSTRUTN SHFT REGSTER AND NSTRUTN REGSTER The nstruction Shift register is a 4-bit shift register used for selecting the actions to be performed and/or what data registers to be accessed. nstructions are shifted in, Least Significant bit first, and then decoded. A list and description of implemented instructions is given in Section 33.4.4 JTAG nstructions. and Diagnostics 33.4.2.2 DATA REGSTERS nce an instruction is shifted in and updated into the nstruction Register, the TAP controller places certain data registers between the TD and TD pins. Additional data values can then be shifted into these data registers as needed. The P24F device family supports three data registers: BYPASS Register: A single-bit register which allows the boundary scan test data to pass through the selected device to adjacent devices. The BYPASS register is placed between the TD and TD pins when the BYPASS instruction is active. Device D Register: A 32-bit part identifier. t consists of an 11-bit manufacturer D assigned by the EEE (29h for Microchip Technology), device part number and device revision identifier. When the DDE instruction is active, the Device D register is placed between the TD and TD pins. The device data D is then shifted out on to the TD pin, on the next 32 falling edges of TK, after the TAP controller is in the Shift-DR. MHP ommand Shift Register: An 8-bit shift register that is placed between the TD and TD pins when the MHP_MD instruction is active. This shift register is used to shift in Microchip commands. 2006 Microchip Technology nc. Advance nformation DS39716A-page 33-7

P24F Family Reference Manual 33.4.3 Boundary Scan Register (BSR) The BSR is a large shift register that is comprised of all the / Boundary Scan ells (BSs), daisy-chained together (Figure 33-5). Each / pin has one BS, each containing 3 BS registers: an input cell, an output cell and a control cell. When the SAMPLE/PRELAD or EXTEST instructions are active, the BSR is placed between the TD and TD pins, with the TD pin as the input and the TD pin as the output. The size of the BSR depends on the number of / pins on the device. For example, the P24FJ128GA010 has 82 / pins. With 3 BS registers for each of the 82 /s, this yields a Boundary Scan register length of 246 bits. nformation on the / port pin count of other P24F devices can be found in their specific device data sheets. Figure 33-5: Daisy-hained Boundary Scan ell Registers on a P24F Microcontroller BS with Three Register ells: nput ell () ontrol ell () utput ell () / Pin P24F nternal Logic TAP ontroller TD TMS TK TD 33.4.3.1 BUNDARY SAN ELL (BS) The function of the BS is to capture and override / input or output data values when JTAG is active. The BS consists of three Single-Bit apture register cells and two Single-Bit Holding register cells. The capture cells are daisy-chained to capture the port s input, output and control (output-enable) data, as well as pass JTAG data along the Boundary Scan register. ommand signals from the TAP controller determine if the port of JTAG data is captured, and how and when it is clocked out of the BS. The first register either captures internal data destined to the output driver, or provides serially scanned in data for the output driver. The second register captures internal output-enable control from the output driver and also provides serially scanned in output-enable values. The third register captures the input data from the / s input buffer. DS39716A-page 33-8 Advance nformation 2006 Microchip Technology nc.

Section 33. and Diagnostics Figure 33-6 shows a typical BS and its relationship to the / port s structure. Figure 33-6: Boundary Scan ell and ts Relationship to the / Port Boundary Scan ell Port / ell JTAG Enable JTAG locks Port utput JTAG SD from Previous BS Port utput Enable from utput Multiplexor JTAG SD to Next BS apture Update Port utput Data Data ut Enable utputbuffer / Pin Port nput nput Buffer 33 33.4.4 JTAG nstructions P24F family devices support the mandatory instruction set specified by EEE 1149.1, as well as several optional public instructions defined in the specification. These devices also implement instructions that are specific to Microchip devices. The mandatory JTAG instructions are: BYPASS (0Fh): Used for bypassing a device in a test chain; this allows the testing of off-chip circuitry and board-level interconnections. SAMPLE/PRELAD (01h): aptures the / states of the component, providing a snapshot of its operation. EXTEST (03h): Allows the external circuitry and interconnections to be tested, by either forcing various test patterns on the output pins, or capturing test results from the input pins. The optional JTAG instructions implemented in P24F devices are: DDE (02h): auses the 32-bit device identification word to be shifted out on the TD pin. HGHZ (04h): Places the device into a state in which all / pins are in a high-impedance state (driven inactive). The manufacturer-specific JTAG commands used for JTAG device programming are: MHP_SAN (07h): Places the device in and manages various JTAG modes. MHP_MD (08h): Alerts the TAP controller that a programming instruction specific to Microchip follows. The data following MHP_MD is placed in the MHP ommand Shift register and parsed as an instruction. There are currently two instructions implemented for use with MHP_MD: JTAG_MLR (01h): Performs a device Master lear Reset while the JTAG interface is active; functionally equivalent to a hardware MLR. The TAP interface itself is not reset. JTAG_MUX (02h): Switches the JTAG interface to SP operation. After this command, TD and TD assume the PGD functions (split input and output, respectively), and TK functions as PG. and Diagnostics 2006 Microchip Technology nc. Advance nformation DS39716A-page 33-9

P24F Family Reference Manual 33.4.5 Boundary Scan Testing (BST) Boundary Scan Testing (BST) is the method of controlling and observing the boundary pins of the JTAG compliant device, like those of the P24F family, utilizing software control. BST can be used to test connectivity between devices by daisy-chaining JTAG compliant devices to form a single scan chain. Several scan chains can exist on a PB to form multiple scan chains. These multiple scan chains can then be driven simultaneously to test many components in parallel. Scan chains can contain both JTAG compliant devices and non-jtag compliant devices. A key advantage of BST is that it can be implemented without physical test probes; all that is needed is a 4-wire or 5-wire interface and an appropriate test platform. Since JTAG boundary scan has been available for many years, many software tools exist for testing scan chains without the need for extensive physical probing. The main drawback to BST is that it can only evaluate digital signals and circuit continuity; it cannot measure input or output voltage levels or currents. 33.4.5.1 RELATED JTAG FLES To implement BST, all JTAG test tools will require a Boundary Scan Description Language (BSDL) file. BSDL is a subset of VHDL (VHS Hardware Description Language), and is described as part of EEE Std. 1149.1. The device-specific BSDL file describes how the standard is implemented on a particular device and how it operates. The BSDL file for a particular device includes the following: The pinout and package configuration for the particular device The physical location of the TAP pins The Device D register and the device D The length of the nstruction Register The supported BST instructions and their binary codes The length and structure of the Boundary Scan register The boundary scan cell definition Device-specific BSDL files are available at Microchip s web site, www.microchip.com. The name for each BSDL file is the device name and silicon revision. For example, P24FJ128GA010_A2.BSD, is the BSDL file for the P24FJ128GA010, silicon revision A2. 33.4.6 JTAG Device The JTAG interface can also be used to program P24F family devices in their target applications. Using the JTAG interface allows application designers to include a dedicated test and programming port into their applications, with a single 4-pin interface, without imposing the circuit constraints that the SP interface may require. JTAG device programming actually uses the standard SP method over the four pins of the TAP interface. When triggered by the appropriate JTAG command sequence, the TD, TD and TK pins assume the functions of the PGD and PG pins. Aside from this pin remapping, SP programming over the JTAG interface behaves exactly as it does over the standard SP interface. Because of the added time overhead for switching the TAP interface, JTAG device programming takes slightly longer than standard SP programming over the PG and PGD pins. Enhanced SP programming is not available with JTAG programming. DS39716A-page 33-10 Advance nformation 2006 Microchip Technology nc.

Section 33. and Diagnostics 33.5 RELATED APPLATN NTES This section lists application notes that are related to this section of the manual. These application notes may not be written specifically for the P24F device family, but the concepts are pertinent and could be used with modification and possible limitations. The current application notes related to the programming and diagnostics are: Title Application Note # No related application notes at this time. Note: Please visit the Microchip web site (www.microchip.com) for additional application notes and code examples for the P24F family of devices. 33 and Diagnostics 2006 Microchip Technology nc. Advance nformation DS39716A-page 33-11

P24F Family Reference Manual 33.6 REVSN HSTRY Revision A (December 2006) This is the initial released revision of this document. DS39716A-page 33-12 Advance nformation 2006 Microchip Technology nc.