Cypress技术william hill官网
直播中

吴思锋

7年用户 175经验值
私信 关注
[问答]

MB95f778L SA0擦除和写入

大家好,
我需要擦除和写的SA0扇区在M95F77 8L,但我不能写的数据到那个,可以有任何人帮助我在此。
下面我提到我的示例代码擦除和写入数据。(同样的代码工作以及SA3部门)
注:
启用SSEN位。
SWR00= 0x0F;
扇区擦除:
{
γ-WaITynop-();
γ-WaITynop-();
FSRYWRE=1;
γ-WaITynop-();
γ-WaITynop-();
Sure0} =双闪光灯;
αi();
*((uint8_t *)((sectorstartaddress &;0xf000)| 0x0aaa))= 0xaa;
*((uint8_t *)((sectorstartaddress &;0xf000)| 0x0554))= 0x55;
*((uint8_t *)((sectorstartaddress &;0xf000)| 0x0aaa))= 0x80;
*((uint8_t *)((sectorstartaddress &;0xf000)| 0x0aaa))= 0xaa;
*((uint8_t *)((sectorstartaddress &;0xf000)| 0x0554))= 0x55;
*((uTn8*t*)扇区起始地址)=0x30;
γ-WaITynop-();
γ-WaITynop-();
αi();
}
部门写作:
{
αi();
FSRYWRE=1;
γ-WaITynop-();
γ-WaITynop-();
Sure0} =双闪光灯;
*((Unt8*T*)(地址和0xF000)0x0AAA)=0xAA;
*((Unt8*T*)(地址和0xF000)0x055 4)=0x55;
*((Unt8*T*)(地址和0xF000)0x0AAA)=0xA0;
*((uTn8*t*)(地址))=u8DATA;
γ-WaITynop-();
γ-WaITynop-();
而(!)FSRY-RDY;
αi();
}
谢谢
阿尼尔-库马尔-维米拉

以上来自于百度翻译


     以下为原文
  Hello All,
I need to Erase and Write the SA0 Sector in MB95F778L, but i am not able write the data into that,can any one help me on this please.

below i mentioned my example code for erasing and writing the data.(This same code is working well for SA3 sector)
Note::
SSEN bit is enabled.
SWRE0 = 0x0F;

For Sector erasing::
{
  __wait_nop();
  __wait_nop();
  FSR_WRE = 1;
  __wait_nop();
  __wait_nop();
SWRE0 |= DUALFLASH_APPL_WEN_MASK;
  __DI();
  *((uint8_t*)((SectorStartAddress & 0xF000) | 0x0AAA)) = 0xAA;
  *((uint8_t*)((SectorStartAddress & 0xF000) | 0x0554)) = 0x55;
  *((uint8_t*)((SectorStartAddress & 0xF000) | 0x0AAA)) = 0x80;
  *((uint8_t*)((SectorStartAddress & 0xF000) | 0x0AAA)) = 0xAA;
  *((uint8_t*)((SectorStartAddress & 0xF000) | 0x0554)) = 0x55;
  *((uint8_t*)SectorStartAddress) = 0x30;
  __wait_nop();
  __wait_nop();
  __EI();
}

For Sector Writting:
{
  __DI();
FSR_WRE = 1;
  __wait_nop();
  __wait_nop();
  SWRE0 |= DUALFLASH_APPL_WEN_MASK;
  *((uint8_t*)((Address & 0xF000) | 0x0AAA)) = 0xAA;
  *((uint8_t*)((Address & 0xF000) | 0x0554)) = 0x55;
  *((uint8_t*)((Address & 0xF000) | 0x0AAA)) = 0xA0;
*((uint8_t*)(Address)) = u8Data;
__wait_nop();
__wait_nop();
while (!FSR_RDY);
__EI();
}

Thanks
Anil Kumar VEMULA

回帖(1)

王睦羽

2018-9-7 11:14:09
你好,
当您试图更新SA0位置时,哪个引导程序执行擦除/写入命令,在SA1还是SA2?
我希望在SA1的引导加载程序发出擦除/写入命令来更新SA3和SA0。
M957070的双操作快闪存储器由两个银行组成,不能在同一时间在同一银行中被擦除/编程和读取(指令提取)。
SA0和SA1位于同一银行,SA2和SA3位于另一银行。
因此,SA1上的引导加载程序可以擦除/写入SA3,但不能执行SA0。
SA2上的引导加载程序可以擦除/写入SA0,但不能执行SA3。
请尝试在SA2上从Bootloader删除/写入SA0。

以上来自于百度翻译


     以下为原文
  Hello,
 
When you tried to update the SA0 location, which bootloader executed the erase/write commands, at SA1 or SA2?
I expect that the bootloader at SA1 issued the erase/write commands to update SA3 and SA0.
 
The dual operation flash memory of MB95770 consists of two banks and cannot be erased/programmed and read (instruction-fetched) at the same time in bank on the same side.
SA0 and SA1 are located in the same bank, while SA2 and SA3 are located in another bank.
So, the bootloader at SA1 can erase/write the SA3, but cannot do the SA0.
The bootloader at SA2 can erase/write the SA0, but cannot do the SA3.
 
Please try erase/write the SA0 from the bootloader at SA2.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分