參數(shù)資料
型號: HOW
英文描述: How to check the Flash Version on M16C/62Application Note 99K/MAY.26.03
中文描述: 如何檢查M16C/62Application注意99K/MAY.26.03的Flash版本
文件頁數(shù): 4/5頁
文件大?。?/td> 99K
代理商: HOW
REB05B0002-0102Z
May 2003
Page 4 of
5
M16C/62 Group
How to check the Flash Version on M16C/62
5.0 Programming Code
This example program is a function written in generic C. So it should work with any C compiler. According to
the return code the functions for Flash programming in CPU programming mode should be selected. These
functions can be derived for example from the appropriate bootloader programs.
#define FIDR_ADDR_1
#define FIDR_ADDR_2
(*(unsigned int *)0x1B4)
(*(unsigned int *)0x3B4)
// FIDR on M16C/62P series
// FIDR on M16C/62A,M,N series
#define FLASH_TYPE_M16C62N
#define FLASH_TYPE_M16C62P
#define FLASH_TYPE_M16C62A_M
0x00
0x02
0x03
// value of FIDR for M16C/62N
// value of FIDR for M16C/62P
// value of FIDR for M16C/62A or M16C/62M
#define DUMMY_VALUE
0xFF
// value to write to Flash Identification register
#define FIDR_BITMASK
0x03
// Only 2 LSBs count
unsigned char CheckFlashVersion (void)
{
unsigned char FlashType;
// return value
FIDR_ADDR_1 = DUMMY_VALUE;
FlashType = FIDR_ADDR_1;
FlashType &= FIDR_BITMASK;
// write FF to 01B4h
// read out value
// mask out all other bits
if (FlashType == FLASH_TYPE_M16C62P)
{
return (FlashType);
}
else
{
FIDR_ADDR_2 = DUMMY_VALUE;
FlashType = FIDR_ADDR_2;
FlashType &= FIDR_BITMASK;
// It is M16C/62P
// write FF to 03B4h
// read out value
// mask out all other bits
if(FlashType == FLASH_TYPE_M16C62N)
{
return(FlashType);
}
else
{
return(FLASH_TYPE_M16C62A_M); // It is M16C/62A or M16C/62M
}
// It is M16C/62N
}
}
相關(guān)PDF資料
PDF描述
HP1-5FR4 Optoelectronic
HP529 1.8V~13V|一顆可預(yù)燒內(nèi)碼之跳碼編碼積體電路。HP529內(nèi)部提供了一非線性編碼系統(tǒng),能夠使每一次使用皆會產(chǎn)生一組新的亂碼以增進(jìn)系統(tǒng)之使用安全性。
HP6-X8X4D4D-O Multi-Output AC-DC Front End
HP6-X4X4D4D-O Multi-Output AC-DC Front End
HP6-X4X8D2D-O Multi-Output AC-DC Front End
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
HOX1023 制造商:Honeywell Sensing and Control 功能描述:Fiber Optic Transmitters, Receivers, Transceivers Fiber Optic Products
HOX1086-B 制造商:Honeywell Sensing and Control 功能描述:
HOX1086-R 制造商:Honeywell Sensing and Control 功能描述:Fiber Optic Products
HP 制造商:Middle Atlantic Products 功能描述:
HP 222,400GR 制造商:MOBIL 功能描述:GREASE, HIGH QUALITY, 400G