📄 upsd_flash.h
字号:
/* upsd_flash.h
Header file for uPSD 3200 flash I/O routines
Note: Please edit the addresses shown to match your system memory map
Copyright (c) 2002 ST Microelectronics
This example demo code is provided as is and has no warranty,
implied or otherwise. You are free to use/modify any of the provided
code at your own risk in your applications with the expressed limitation
of liability (see below) so long as your product using the code contains
at least one uPSD products (device).
LIMITATION OF LIABILITY: NEITHER STMicroelectronics NOR ITS VENDORS OR
AGENTS SHALL BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA,
INTERRUPTION OF BUSINESS, NOR FOR INDIRECT, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER THIS AGREEMENT OR
OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
--------------------------------------------------------------------------*/
#define PSD_REG_BASE (unsigned int) 0x0200 // base address of PSD8XXFX control registers. This area is
// 256 bytes.
// Addresses to use to invoke embedded algorithm in FLASH memory. Modify these addresses.
// It is advised to pick a Flash memory address that is common to all memory pages.
#define FLASH_COMMON_XAAA (volatile unsigned char xdata *) 0x9AAA
#define FLASH_COMMON_X555 (volatile unsigned char xdata *) 0x9555
// Addresses to use to invoke embedded algorithm in FLASH boot memory. Modify these addresses.
// It is advised to pick a Flash memory address that is common to all memory pages.
#define FLASH_BOOT_XAAA (volatile unsigned char xdata *) 0x9AAA
#define FLASH_BOOT_X555 (volatile unsigned char xdata *) 0x9555
#define NVM_DATA_POLL 0x80
#define NVM_ERROR 0x20
#define NVM_DATA_TOGGLE 0x40
unsigned char flash_write_with_poll(
volatile unsigned char xdata *addr, unsigned char dat);
//unsigned char flash_erase_bulk(
// volatile unsigned char xdata* flash_bulk_erase_address);
//unsigned char flash_boot_write_with_poll(
// volatile unsigned char xdata *addr, unsigned char dat);
//unsigned char flash_boot_erase_bulk(
// volatile unsigned char xdata* flash_boot_bulk_erase_address);
unsigned char flash_erase_sector(
volatile unsigned char xdata* sector_erase_address);
/*unsigned char flash_write_with_toggle(unsigned char *addr,unsigned char dat);
void flash_reset(void);
unsigned char flash_read_id(unsigned char *flash_id_address);
unsigned char flash_boot_write_with_toggle(volatile unsigned char *addr,
unsigned char dat);
void flash_boot_reset(void);
unsigned char flash_boot_read_id(volatile unsigned char *flash_boot_id_address);
unsigned char flash_boot_read_sector_protect(void);
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -