This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F280049的FLASH为何不能通过读出全FFFF判断为空?

文档sprui33b中3.12.9.1介绍的原因如下:这句话应该如何理解?

When the target flash is erased, it reads as all 1's. This state is called 'blank.' The erase function must be
executed before programming. The user should NOT skip erase on sectors that read as 'blank' because
these sectors may require additional erasing due to marginally erased bits columns. The FSM provides an
“Erase Sector” command to erase the target sector. The erase function erases the data and the ECC
together. This command is implemented by the following Flash API function:

即使sector读出全部0xFFFF,ECC区域可能不是为空?

  • 280049的FLASH与之前的C2000系列器件变化很大,擦除粒度降低到4k*16,增加了ECC,对用户来说,新增加的ECC增加了FLASH使用的复杂度。为何之前的C2000不需要ECC呢?之前的C2000器件没有ECC使用也很正常。一般ECC只用在NAND FLASH,这次280049是FLASH底层升级了吗?
  • 我的理解是增加了位宽 位宽中包括数据+ECC
    比如DDR中64bit数据+8bit的ECC校验 同时读出72bit数据
    校验和数据是一一对应的 NAND FLASH中是坏块管理吧
  • 你的理解没问题。

    我的疑问主要是以前的C2000型号没有ECC也工作得很好,280049增加ECC好处在哪里?坏处很明显,明显增加了复杂度,不利于客户使用。

    如果是因为底层FLASH硬件从NOR切换成NAND,必须有ECC,那么就可以理解了。即使是这样,也应该尽量把ECC封装到内部,不要暴露给客户,接口的稳定性非常重要,这次的FlashAPI全部修改了(连编码风格都变了,巨长的函数命名,匈牙利命名法,设计者是微软跳槽过来的?)和之前的C2000没有一点关系,让客户固件更新底层软件非常麻烦。