📄 jtagup.h
字号:
// $Header: $
// Copyright Askey Computer Corp. 2003
/*
* JTAGup.h - General header for JtaguP
*
*
*
* History:
* 29-Aug-2003 Lucas Kuo
*
*/
#ifndef __JTAGUP_H__
#define __JTAGUP_H__
typedef unsigned short int word;
typedef unsigned char byte;
// Instructions for the JTAG control signal register
#define IR_CNTRL_SIG_16BIT 0xC8 // 0x13 original values
#define IR_CNTRL_SIG_CAPTURE 0x28 // 0x14
#define IR_CNTRL_SIG_RELEASE 0xA8 // 0x15
// Instructions for the JTAG Fuse
#define IR_PREPARE_BLOW 0x44 // 0x22
#define IR_EX_BLOW 0x24 // 0x24
// Instructions for the JTAG data register
#define IR_DATA_16BIT 0x82 // 0x41
#define IR_DATA_QUICK 0xC2 // 0x43
// Instructions for the JTAG PSA mode
#define IR_DATA_PSA 0x22 // 0x44
#define IR_SHIFT_OUT_PSA 0x62 // 0x46
// Instructions for the JTAG address register
#define IR_ADDR_16BIT 0xC1 // 0x83
#define IR_ADDR_CAPTURE 0x21 // 0x84
#define IR_DATA_TO_ADDR 0xA1 // 0x85
// Bypass instruction
#define IR_BYPASS 0xFF // 0xFF
// JTAG identification value for all existing Flash-based MSP430 devices
#define JTAG_ID 0x89
#define DEVICE_ID 0xF149
// Constants for data formats, dedicated addresses
#define F_BYTE 8 //IR bits lengh
#define F_WORD 16 //DR bits lengh
#define V_RESET 0xFFFE
// Constants for runoff status
#define STATUS_ERROR 0 // false
#define STATUS_OK 1 // true
#define STATUS_ACTIVE 2
#define STATUS_IDLE 3
// Constants for flash erasing modes
#define ERASE_MASS 0xA506
#define ERASE_MAIN 0xA504
#define ERASE_SGMT 0xA502
#define MAX_IN_LENGTH 100 // max length for user input strings
#define LPT1 0x3bc // hardware base address for parallel port
#define LPT2 0x378 // the search order is LPT1 then 2 then 3
#define LPT3 0x278 // first valid address found is used (re-order if needed for multiple ports)
#define IGNORE_PORT 0 // Flag used when accessing the parallel port
#define READ_PORT 1 // READ_PORT = 'read port', IGNORE_PORT = 'ignore port',
// using IGNORE_PORT will speed access
#define FREQUENCY 2400 // CPU frequency in MHz
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -