欢迎访问ic37.com |
会员登录 免费注册
发布采购

C8051F363 参数 Datasheet PDF下载

C8051F363图片预览
型号: C8051F363
PDF下载: 下载PDF文件 查看货源
内容描述: 混合信号ISP功能的Flash MCU系列 [Mixed Signal ISP Flash MCU Family]
分类和应用:
文件页数/大小: 288 页 / 2659 K
品牌: SILABS [ SILICON LABORATORIES ]
 浏览型号C8051F363的Datasheet PDF文件第131页浏览型号C8051F363的Datasheet PDF文件第132页浏览型号C8051F363的Datasheet PDF文件第133页浏览型号C8051F363的Datasheet PDF文件第134页浏览型号C8051F363的Datasheet PDF文件第136页浏览型号C8051F363的Datasheet PDF文件第137页浏览型号C8051F363的Datasheet PDF文件第138页浏览型号C8051F363的Datasheet PDF文件第139页  
C8051F360/1/2/3/4/5/6/7/8/9
13. Flash Memory
All devices include either 32 kB (C8051F360/1/2/3/4/5/6/7) or 16 kB (C8051F368/9) of on-chip, reprogram-
mable Flash memory for program code or non-volatile data storage. The Flash memory can be pro-
grammed in-system through the C2 interface, or by software using the MOVX write instructions. Once
cleared to logic ‘0’, a Flash bit must be erased to set it back to logic ‘1’. Bytes should be erased (set to
0xFF) before being reprogrammed. Flash write and erase operations are automatically timed by hardware
for proper execution. During a Flash erase or write, the FLBUSY bit in the FLSTAT register is set to ‘1’
(see SFR Definition 14.5). During this time, instructions that are located in the prefetch buffer or the branch
target cache can be executed, but the processor will stall until the erase or write is completed if instruction
data must be fetched from Flash memory. Interrupts that have been pre-loaded into the branch target
cache can also be serviced at this time, if the current code is also executing from the prefetch engine or
cache memory. Any interrupts that are not pre-loaded into cache, or that occur while the core is halted, will
be held in a pending state during the Flash write/erase operation, and serviced in priority order once the
Flash operation has completed. Refer to Table 13.2 for the electrical characteristics of the Flash memory.
13.1. Programming the Flash Memory
The simplest means of programming the Flash memory is through the C2 interface using programming
tools provided by Silicon Labs or a third party vendor. This is the only means for programming a non-initial-
ized device. For details on the C2 commands to program Flash memory, see Section “24. C2 Interface” on
The Flash memory can be programmed from software using the MOVX write instruction with the address
and data byte to be programmed provided as normal operands. Before writing to Flash memory using
MOVX, Flash write operations must be enabled by setting the PSWE Program Store Write Enable bit
(PSCTL.0) to logic ‘1’. This directs the MOVX writes to Flash memory instead of to XRAM, which is the
default target. The PSWE bit remains set until cleared by software. To avoid errant Flash writes, it is rec-
ommended that interrupts be disabled while the PSWE bit is logic ‘1’.
Flash memory is read using the MOVC instruction. MOVX reads are always directed to XRAM, regardless
of the state of PSWE.
Note: To ensure the integrity of the Flash contents, the on-chip V
DD
Monitor must be enabled in any
system that includes code that writes and/or erases Flash memory from software. Furthermore,
there should be no delay between enabling the V
DD
Monitor and enabling the V
DD
Monitor as a
reset source. Any attempt to write or erase Flash memory while the V
DD
Monitor disabled will
cause a Flash Error device reset.
A write to Flash memory can clear bits but cannot set them; only an erase operation can set bits in Flash.
A byte location to be programmed must be erased before a new value can be written.
Write/Erase timing is automatically controlled by hardware. Note that on the 32 k Flash devices, 1024
bytes beginning at location 0x7C00 are reserved. Flash writes and erases targeting the reserved area
should be avoided.
13.1.1. Flash Lock and Key Functions
Flash writes and erases by user software are protected with a lock and key function. The Flash Lock and
Key Register (FLKEY) must be written with the correct key codes, in sequence, before Flash operations
may be performed. The key codes are: 0xA5, 0xF1. The timing does not matter, but the codes must be
written in order. If the key codes are written out of order, or the wrong codes are written, Flash writes and
Rev. 1.0
135