User`s manual
SDK 2 Programmer’s Guide Programming Notes
5-2
Flash ROM Access
NPort PCG contains a block of flash memory that is available for data buffering, or to store a
small amount of data. To make the operating system more efficient, there is no file system.
Flash ROM Structure
The flash ROM structure is illustrated below.
NPort 5200-P have 160 KB of user program space. There are two modes for accessing data stored
in the flash ROM.
1. Block mode
The API “flash_xxxx( )” runs in block mode. The entire user area is treated as a block, with
sequential addresses used for each byte of data. The location of data in the flash is specified
by an offset address.
2. Bank mode
The API “sys_flashxxx( )” runs in bank mode. Each bank contains 32 KB of flash memory.
The location of data in the flash is specified by a combination of bank and offset addresses.
Bank 1
Bank 2
Bank 3
Bank 4
System Area
User Area
Bank 0
32k Bytes
160k Bytes
Block mode
API
Offset address
Bank mode
API
Offset address
Bank:Offset Offset
0x00:0x00
–
0x00:0x7fff
0x01:0x00
–
0x00:0x7fff
0x02:0x00
–
0x00:0x7fff
0x03:0x00
–
0x00:0x7fff
0x04:0x00
–
0x00:0x7fff
0x00
–
0x27fff
NPort 5200-P Flash
ROM system
*
Flash ROM structure for
Nport PCG