📄 nv_flashhal.h
字号:
/*****************************************************************************
* This file contains header information for the NV_flashHAL file.
*
* (c) Copyright 2006, Freescale, Inc. All rights reserved.
*
* Freescale Semiconductor Confidential Proprietary
*
* No part of this document must be reproduced in any form - including copied,
* transcribed, printed or by any electronic means - without specific written
* permission from Freescale Semiconductor Danmark A/S.
*****************************************************************************/
#ifndef _NV_FLASHHAL_H_
#define _NV_FLASHHAL_H_
#include "NV_Data.h"
#if (gNV_FlashIncluded_d)
#include "icg.h"
/*****************************************************************************
******************************************************************************
* Public macros
******************************************************************************
*****************************************************************************/
/* Supported HCS08 flash commands */
#define FlashBlankCheckCmd_c 0x05 /* Check whatever all bytes in the
flash is erased "0xFF",Not used */
#define FlashByteWriteCmd_c 0x20 /* Program a single byte to a location */
#define FlashBurstWriteCmd_c 0x25 /* Program multiple bytes to flash
not used */
#define FlashSectorEraseCmd_c 0x40 /* Erase a single physical sector
512 bytes. 120 pages/sectors */
#define FlashMassEraseCmd_c 0x41 /* Erase all sectors (whole flash)
not used */
#define FlashReadyForCmdMask_c 0x80
#define FlashCmdErrorMask_c 0x30
#define FlashCmdCompleteMask_c 0x80
#define FlashSectorSize_c 512 /* bytes/sector */
#define DummyData_c 0x55 /* Just a dummy data value */
#define HCS08SectorSize_c 9 /* 512 bytes, 2^9=512 used instead
of division */
#define WaitForCmdToComplete \
__asm nop;\
__asm nop;\
__asm nop;\
__asm nop;
#define FCNFGValue_c 0 /* Writes to 0xFFB0-0xFFB7 are interpreted as
the start of a Flash programming or erase command.*/
/* Define a value at selected bus clock */
#ifdef USE_62_5KHZ_CLKO /* (8 MHz bus clock) */
#define FCDIVValue_c (0x40 + 0x05) /* Set Flash clock to 166,7KHz */
#endif USE_62_5KHZ_CLKO
#ifdef USE_32_78KHZ_CLKO_AT_16_78HMZ /* (16,78 MHz bus clock) */
#define FCDIVValue_c (0x40 + 0x0A) /* Set Flash clock to 190,6KHz */
#endif USE_32_78KHZ_CLKO_AT_16_78HMZ
#ifdef EXT_CRYSTAL_4MHZ_AT_8MHZ /* (8 MHz bus clock) */
#define FCDIVValue_c (0x40 + 0x05) /* Set Flash clock to 166,7KHz */
#endif EXT_CRYSTAL_4MHZ_AT_8MHZ
#ifdef EXT_CRYSTAL_9_216MHZ_AT_9_216MHZ /* (9,216 MHz bus clock) */
#define FCDIVValue_c (0x40 + 0x05) /*Set Flash clock to 192KHz */
#endif EXT_CRYSTAL_9_216MHZ_AT_9_216MHZ
#ifdef USE_62_5KHZ_CLKO_AT_16MHZ /* (16 MHz bus clock) */
#define FCDIVValue_c (0x40 + 0x0A) /* Set Flash clock to 181KHz */
#endif USE_62_5KHZ_CLKO_AT_16MHZ
extern const uint8_t gZdoNVRAM[];
extern const uint8_t gSspNVRAM[];
extern const uint8_t gApsNVRAM[];
extern const uint8_t gNwkNVRAM[];
#endif /*(gNV_FlashIncluded_d)*/
#endif _NV_FLASHHAL_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -