加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flash 命令时序 16位数据

发布时间:2020-12-15 06:57:14 所属栏目:百科 来源:网络整理
导读:?int Erase_Entire_Chip { ??????? WORD far *Temp; ??????? /*? Issue the Chip Erase command to 39VF160? */ ??????? Temp? = (WORD far *)0xC0005555; /* set up address to be C000:5555h? */ ??????? *Temp = 0xAAAA;???????????????? /* write data 0
?int Erase_Entire_Chip
{
??????? WORD far *Temp;

??????? /*? Issue the Chip Erase command to 39VF160? */

??????? Temp? = (WORD far *)0xC0005555; /* set up address to be C000:5555h? */
??????? *Temp = 0xAAAA;???????????????? /* write data 0xAAAA to the address */
??????? Temp? = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh? */
??????? *Temp = 0x5555;???????????????? /* write data 0x5555 to the address */
??????? Temp? = (WORD far *)0xC0005555; /* set up address to be C000:5555h? */
??????? *Temp = 0x8080;???????????????? /* write data 0x8080 to the address */
??????? Temp? = (WORD far *)0xC0005555; /* set up address to be C000:5555h? */
??????? *Temp = 0xAAAA;???????????????? /* write data 0xAAAA to the address */
??????? Temp? = (WORD far *)0xC0002AAA; /* set up address to be C000:2AAAh? */
??????? *Temp = 0x5555;???????????????? /* write data 0x5555 to the address */
??????? Temp? = (WORD far *)0xC0005555; /* set up address to be C000:5555h? */
??????? *Temp = 0x1010;???????????????? /* write data 0x1010 to the address */
??????? Delay_100_Milli_Seconds();????? /* Delay Tsce time????????????????? */
}
试试看吧。
估计是因为需要16Bits操作的原因吧,ST自己的范例文件是写入16位的数据
虽然Datasheet上表格是8位的数据
?
?Writeflash(0x5555,0xAAAA);?Writeflash(0x2AAA,0x5555);?Writeflash(0x5555,0x8080);?Writeflash(0x5555,0x1010);

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读