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.

[SOS] 28377D FLASH API 使用问题

我在调用Fapi_issueProgrammingCommand() 对地址0x831C6 进行编程时,由于地址是C6 开始,所以我的编程字节数是:2个16Bits,但是感觉没能编进去,而且奇怪的是该API 也没有报错;

我知道手册上有说最多只能128bits,且地址要求128bits 对齐,

按理来说按照我这个设置,编程完成后恰好是对齐到128bits的末尾,但为什么Flash 并没有被刷写呢?

  • SECTIONS
    {
    .text : > FLASH, PAGE = 0, ALIGN(4)
    .cinit : > FLASH, PAGE = 0, ALIGN(4)
    .const : > FLASH, PAGE = 0, ALIGN(4)
    .econst : > FLASH, PAGE = 0, ALIGN(4)
    .pinit : > FLASH, PAGE = 0, ALIGN(4)
    .switch : > FLASH, PAGE = 0, ALIGN(4)
    }

    应该是需要这么设置一下,否则数据就直接被对待为0xFFFF了;

  • 手册上确实说了,
    Fapi_AutoEccGeneration – This mode will program the supplied data in Flash along with automatically
    generated ECC. The ECC is calculated for every 64-bit data aligned on a 64-bit memory boundary.
    Hence, when using this mode, all the 64 bits of the data should be programmed at the same time for a
    given 64-bit aligned memory address. Data not supplied is treated as all 1s (0xFFFF).
    也就是不支持的数据就不进行编程了,这也就导致Verify 不通过;