//擦除Flash的第14页的第0块 P_Flash_CMD->W = 0xAAAA; //写控制命令 P_Flash_CMD->W = 0x5511; //写入块擦除命令 //要檫除的块任一地址写入任意数据,则擦除此块 P_WordAdr = (unsigned int *)0xF000; *P_WordAdr = 0x5555; |
//擦除Flash的第14页的第0块 //写控制命令 P_Flash_CMD->W = 0xAAAA; //写入块擦除命令 P_Flash_CMD->W = 0x5511; //0xF000单元写入数据0x5555 P_WordAdr = (unsigned int *)0xF000; *P_WordAdr = 0x5555; |
// 写数据到 0xF001~0xF060的连续单元中,设这段空间已经擦//除过。 P_WordAdr = (unsigned int *)0xF001; uiData = 11; P_Flash_CMD->W = 0xAAAA; //写控制命令 for(i = 1;i <= 96;i ++) { P_Flash_CMD->W = 0x5544; //写入连续数据写命令 *P_WordAdr = uiData; //写入数据 uiData ++; P_WordAdr ++; } P_Flash_CMD->W = 0xFFFF; //结束数据写入操作 |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |