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

C8051F502-IM 参数 Datasheet PDF下载

C8051F502-IM图片预览
型号: C8051F502-IM
PDF下载: 下载PDF文件 查看货源
内容描述: 混合信号ISP功能的Flash MCU系列 [Mixed Signal ISP Flash MCU Family]
分类和应用: 微控制器和处理器外围集成电路PC时钟
文件页数/大小: 312 页 / 2813 K
品牌: SILICON [ SILICON ]
 浏览型号C8051F502-IM的Datasheet PDF文件第126页浏览型号C8051F502-IM的Datasheet PDF文件第127页浏览型号C8051F502-IM的Datasheet PDF文件第128页浏览型号C8051F502-IM的Datasheet PDF文件第129页浏览型号C8051F502-IM的Datasheet PDF文件第131页浏览型号C8051F502-IM的Datasheet PDF文件第132页浏览型号C8051F502-IM的Datasheet PDF文件第133页浏览型号C8051F502-IM的Datasheet PDF文件第134页  
C8051F50x-F51x  
15.1.3. Flash Write Procedure  
Flash bytes are programmed by software with the following sequence:  
1. Disable interrupts (recommended).  
2. Erase the 512-byte Flash page containing the target location, as described in Section 15.1.2.  
3. Set the PSWE bit (register PSCTL).  
4. Clear the PSEE bit (register PSCTL).  
5. Write the first key code to FLKEY: 0xA5.  
6. Write the second key code to FLKEY: 0xF1.  
7. Using the MOVX instruction, write a single data byte to the desired location within the 512-byte sector.  
8. Clear the PSWE bit.  
Steps 5–7 must be repeated for each byte to be written. After Flash writes are complete, PSWE should be  
cleared so that MOVX instructions do not target program memory.  
15.1.4. Flash Write Optimization  
The Flash write procedure includes a block write option to optimize the time to perform consecutive byte  
writes. When block write is enabled by setting the CHBLKW bit (CCH0CN.0), writes to two consecutive  
bytes in Flash require the same amount of time as a single byte write. This is performed by caching the first  
byte that is written to Flash and then committing both bytes to Flash when the second byte is written. When  
block writes are enabled, if the second write does not occur, the first data byte written is not actually written  
to Flash. Flash bytes with block write enabled are programmed by software with the following sequence:  
1. Disable interrupts (recommended).  
2. Erase the 512-byte Flash page containing the target location, as described in Section 15.1.2.  
3. Set the CHBLKW bit (register CCH0CN).  
4. Set the PSWE bit (register PSCTL).  
5. Clear the PSEE bit (register PSCTL).  
6. Write the first key code to FLKEY: 0xA5.  
7. Write the second key code to FLKEY: 0xF1.  
8. Using the MOVX instruction, write the first data byte to the desired location within the 512-byte sector.  
9. Write the first key code to FLKEY: 0xA5.  
10.Write the second key code to FLKEY: 0xF1.  
11.Using the MOVX instruction, write the second data byte to the desired location within the 512-byte  
sector. The location of the second byte must be the next higher address from the first data byte.  
12.Clear the PSWE bit.  
13.Clear the CHBLKW bit.  
130  
Rev. 1.1  
 复制成功!