AN ELNEC EN ISP-HCS12. Application note for In-System Programming of Motorola/Freescale HCS12 microcontrollers

Similar documents
The Programming Interface

ET-BASE AVR ATmega64/128

M68EVB908QL4 Development Board for Motorola MC68HC908QL4

How To Program A Microcontroller Board (Eb064) With A Psp Microcontroller (B064-74) With An Ios 2.5V (Power) And A Ppt (Power Control) (Power Supply) (

USBSPYDER08 Discovery Kit for Freescale MC9RS08KA, MC9S08QD and MC9S08QG Microcontrollers User s Manual

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Chapter 13. PIC Family Microcontroller

Quick Start Guide. TWR-MECH Mechatronics Board TOWER SYSTEM

WICE-SPI Hardware Operation Manual

STK User Guide

Designing VM2 Application Boards

Lab Experiment 1: The LPC 2148 Education Board

Introducing AVR Dragon

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

8-bit RISC Microcontroller. Application Note. AVR910: In-System Programming

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Switch board datasheet EB

Atmel Norway XMEGA Introduction

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

POCKET SCOPE 2. The idea 2. Design criteria 3

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

Section 28. In-Circuit Serial Programming (ICSP )

Chapter 6 PLL and Clock Generator

Lecture N -1- PHYS Microcontrollers

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

XPort Universal Demo Board User Guide

Fondamenti su strumenti di sviluppo per microcontrollori PIC

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

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

PICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

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

Voice Dialer Speech Recognition Dialing IC

The modular concept of the MPA-3 system is designed to enable easy accommodation to a huge variety of experimental requirements.

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

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

Application Module Student Learning Kit Users Guide featuring the Freescale MC9S08QG8

FlowKit in-circuit debug system

Serial port interface for microcontroller embedded into integrated power meter

Web Site: Forums: forums.parallax.com Sales: Technical:

Microcontrollers in Practice

AN-812 APPLICATION NOTE

EVAL-UFDC-1/UFDC-1M-16

3.2 inch QVGA TFT Color LCD User s Guide Version 1 & 2

Freescale Semiconductor, I

How to read this guide

MX PIC24F Educational Module User Manual

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

Allen-Bradley/Rockwell

User s Manual of Board Microcontroller ET-MEGA2560-ADK ET-MEGA2560-ADK

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

PolyBot Board. User's Guide V1.11 9/20/08

STF & STF201-30

CAN bus board. EB018

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

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

PROJECT PRESENTATION ON CELLPHONE OPERATED ROBOTIC ASSISTANT

How To Use An Ams 5812 Pressure Sensor With A Usb Starter Kit

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

revolution Contents: Introduction Power 28-pin Project Board with input/output cables

Z8 Encore! XP F082A Series Development Kit

Quick Start Guide. MRB-KW01 Development Platform Radio Utility Application Demo MODULAR REFERENCE BOARD

SBC8600B Single Board Computer

EasyPIC4 User s Manual

Freescale Semiconductor, I

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

Real Time Clock USB Evaluation Board V3.0

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

Application Note, V2.2.1, July 2003 AP OCDS Level 1 JTAG Connector. 16-Bit & 32-Bit Microcontrollers. AI Microcontrollers. Never stop thinking.

M52233DEMO Demonstration Board for Freescale MCF52233

MARTECH SPI Tools. MARTECH SPI Tools User Manual v1.0. User Manual

Printed Circuit Boards. Bypassing, Decoupling, Power, Grounding Building Printed Circuit Boards CAD Tools

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

IEC Algorithmic Alert Tone Demo

Atmel AVR1017: XMEGA - USB Hardware Design Recommendations. 8-bit Atmel Microcontrollers. Application Note. Features.

ABB Drives. User s Manual HTL Encoder Interface FEN-31

ABACOM - netpio.

FLYPORT Wi-Fi G

SPI and JTAG In-System Programming (ISP) guidelines for the Atmel ATmega AVR FLASH Microcontroller Family

CHAPTER 11: Flip Flops

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

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

_ v1.0. EVB-56x Evaluation & Development Kit for Motorola PowerPC MPC56x Microcontrollers USERS MANUAL. isystem, February /8.

GLOLAB Universal Telephone Hold

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

Application Note AN_299. FT800_FT801_Internal_Clock _Trimming

Von der Hardware zur Software in FPGAs mit Embedded Prozessoren. Alexander Hahn Senior Field Application Engineer Lattice Semiconductor

7a. System-on-chip design and prototyping platforms

VDIP1. Vinculum VNC1L Module. Datasheet

DATASHEET. ADAM Arduino Display Adaptor Module. Arduino Compatible Shield P/N: 4Display-Shield-FT843 For the 4D Systems 4DLCD-FT843 Display

An Introduction to MPLAB Integrated Development Environment

SPI I2C LIN Ethernet. u Today: Wired embedded networks. u Next lecture: CAN bus u Then: wireless embedded network

How To Use Nuc123 (Nuc123) For A Week

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

Ingar Fredriksen AVR Applications Manager. Tromsø August 12, 2005

AN4646 Application note

Transcription:

www.elnec.com AN ELNEC EN ISP-HCS12 Application note for In-System Programming of Motorola/Freescale HCS12 microcontrollers Version 07/2006 1

Introduction The HCS12(X) are cost effective rich featured MCUs based on 16 bit HCS12(X) CPU. A wide range of derivatives can be composed of standard on chip peripherals including: 2 32kB RAM, 0 4kB EEPROM, 32 512kB FLASH, SCI (Special Communication Interface), SPI (Serial Peripheral Interface), IIC (Inter Integrated Circuit) and additional modules like TIM (Timer Interface Module), ADT (Analog To Digital Converter), CRG (Clock and Reset Generator Module), BDC (Background Debug Controller), EMAC (Ethernet Media Access Controller), PWM (Pulse Width Modulation module), USB (Universal Serial Bus), etc. In system programming (ISP) of HCS12(X) microcontrollers is performed via the single wire BDM (Background Debug Mode). Bellow are the most important requirements and advices to get high reliability while working with our programmers. For further information look at the MCU specific datasheet. Version 07/2006 2

RESET BKGD EXTAL Q 1 R XP C X1 R PU R XTAL C X2 C R R A C X X X HCS12 VRH VRL A 1 C 1 1 XFC R FS C FP 2 PLL C FS C 2 2 PLL C PLL Figure 1. Typical HCS12 system connection *1 Used signals: Pin name Function Signal level X, A, R, VREGEN X, A, R, 1, 2, PLL 1, 2, PLL supply voltage 3.3 5.0 V *2 ground core supply pins for bypass capacitor connection 0 V 2.5 V *3 RESET\ reset input H, L MODA, MODB mode selection input PD *4 BKGD/MODC background debug communication i/o, mode selection input H, L, PU XFC pin for PLL circuitry filter ~ *5 EXTAL oscillator, clock input H, L XTAL oscillator output H, L *1) For exact pin names and passive component values look at the derivative specific datasheet. *2) Depends on specific HCS12 derivative. *3) Generated internally (if voltage regulator is enabled) *4) Internal pull-down, active during reset. Some package types haven't these pins bonded out. *5) Slightly altering analog signal. Table 1. HCS12 MCU ISP related signals description Version 07/2006 3

Recommended target circuit design In the following, you can find important notices applying to recommended connection of target MCU to the target system. Our programmers BDM comply with Motorola/Freescale BDM connection specification. So, 6-pin header with 2 pins unconnected can be used in design stage of target system. Purpose of the R1 resistor is to isolate the programmed chip from rest of target system. Recommended value of resistors for particular programmer is specified in Device info (see Figure 5). You can also use jumpers instead of the resistors. Algorithm expects, that pins MODA, MODB (if available) are neither PULLED HIGH nor tied to. During reset, BKGD is driven LOW, MODA, MODB is assumed to be internally PULLED DOWN, then the MCU enters Special Single Chip Mode. This allows programmer to communicate through BDM. ISP connector target device target system BKGD target check only CLOCK (optional) RESET C1 10u C2 100n reset circuit RESET X-tal oscillator BKGD EXTAL XTAL I1 MC9S12 R1 Figure 2. Recommended target circuit design using BDM interface Note: Because communication with target board is performed only by 1 wire (pin BKGD), programming speed may vary depending on system configuration and programmer control SW settings (from x-sec to x-minutes per 32kB of FLASH). We recommend to engage MCU's PLL circuitry to get MCU running on appropriate bus/bdm frequency. Because of high frequencies and fast signal transitions, please, do not omit the bypass capacitors as proposed by manufacturer. More information on this can be found in MCU's datasheet, section "PCB design recommendations" or "Recommended Printed Circuit Board Layout". Version 07/2006 4

Device operation options You can edit the Device operation options in menu Operation options of control program (Device->Device options->operation options <Alt+O>). In the case that your programmer supports target system power supply and you intend to use this option, it is needed to set supply voltage parameters according to your requirements. You may also select level of ISP signals after operation (see Figure 3). Description of particular parameters you can find in the menu Help <F1>. Figure 3. Settings ISP target supply <Alt+O> There are some additional options to give you more adjustability. Besides Target system power, the programmer can provide an optional clock signal (2 different frequencies). If you prefer to use your own system oscillator (or clock), there is another option, which allows you to get the best performance engaging MCU's PLL. This option is available in 3 different frequencies (in case of active PLL, please be sure, you have connected the PLL filter between XFC and PLL pins, otherwise the PLL frequency will be unstable and communication will fail). Notice: may be, the programmer will not be able to communicate through BDM at your system frequency. In this case, the only way to solve this problem is to engage MCU's PLL. Programmer will set PLL to give the appropriate BDM frequency. If you haven't provided any clock source to the MCU, it will run in self-clock mode at about 1MHz~5MHz. This can be fast enough, but only for small FLASH capacities *6. Figure 4. Additional options <Alt+O> *6) Remark: Programming algorithm skips blank ($FF) pages of FLASH and blank words of EEPROM areas to be programmed. Therefore, sometimes the programming procedure can take a shorter time as verification, and programming time may vary depending on programmed data. Version 07/2006 5

Table 2. shows all possible MCU clock sources/modes/settings while operating with our programmers. Oscillator Optional clock PLL MCU runs on no off off self-clock no off on self-clock no on off optional clock no on on PLL clock derived from optional clock yes off off oscillator clock yes off on PLL clock derived from oscillator *7 yes on off optional clock yes on on PLL clock derived from optional clock *7) Recommended Table 2. HCS12 clock source settings/dependence Version 07/2006 6

Device information Additional information about selected MCU, such as ISP connector pin numbering, recommended target circuit design for particular MCU etc., you can find in the menu Device info of control program (Device->Device info <Ctrl+F1>) (see Figure 6). Figure 6. Device info Version 07/2006 7

Good advices and troubleshooting Connecting programmer to target system: Turn off power supply of system before connecting/ disconnecting programmer to/from system. Before starting an operation: Before starting an operation with target MCU, please make sure, that the ISP cable is correctly connected to the target system and programmer. Also make sure that no device is inserted to ZIF socket of the programmer. Details about pins assign for each MCU and short description of circuit design you can find in control program (Device Info <Ctrl+F1>). Correctly selected values of resistor R1 provide reliable signal level recognition (for both, programmer and system) and ensure successful finishing of desired operation (see Recommended target circuit design). If something goes wrong: If the programmer reports signal interference error, may be, a signal interference occurred between programmer and target system. Please make sure, your design meets connection recommendations. Check the minimal values of resistor R1, from programmer's point of view (in order to programmer be able to put L/H level on the pin). If the programmer reports that the device does not respond, or the operation with MCU behaves suspiciously, check the following: 1. MODA, MODB mode selection inputs are neither Pulled-Up nor tied to. They are internally Pulled-Low to enable Normal or Special Single chip mode operation. 2. System frequency may result in BDM frequency, which don't comply with programmer's capability. If operations still give errors, you should engage MCU's PLL circuitry to achieve the appropriate BDM frequency. 3. RC network on RESET\ pin (if connected) hasn't long time constant. 4. If running on PLL, the PLL filter must be used (XFC, PLL). Be aware, that longer ISP cable (longer than 20cm/0,7ft) may cause an unpredictable signal interference. Make sure you are using correct cable. Version 07/2006 8

Revision history 07/2006: Initial Release. Version 07/2006 9