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.

28377D FLASH API ECC 问题

各位好:

          冒昧问个问题,28377D在使用Flash API 写flash(即使用 Fapi_issueProgrammingCommand() )时,能否用ECC并且每次仅写入1个地址?

          Flash API手册中关于Fapi_AutoGeneration模式的描述中并没有字长限制,如下:

          Fapi_AutoGeneration – This will program the supplied data portion in Flash along with automatically generated ECC. The ECC is calculated for the data width of the bank and data not supplied is treated as 0xFF. The data restrictions for Fapi_DataOnly also exist for this option.

          下面是我实验的几种情况:

           (1)使用Fapi_AutoEccGeneration,每次写1个地址,中间大部分地址都没有写进去,但函数的返回值并没有提示错误

         

              (2)使用Fapi_AutoEccGeneration,每次写2个地址,同上:

               (3)使用Fapi_DataOnly,每次写1个地址,写入无误:

                因为在写bootloader,在TI论坛看到要读取执行Flash,编写Flash时必须要使用ECC

                望解答!

                非常感谢!

  • 参考一下Flash API 的user guide:
    www.ti.com/.../spnu629a.pdf
    上面有描述:
    It is permissible to program the data and ECC separately. However, each 64-bit data word and 16-bit
    ECC word may only be programmed once per write/erase cycle.
    写入长度是有要求的。
    另外,可以参考一下FLASH API 的FAQ:
    processors.wiki.ti.com/.../C2000_Flash_FAQ

    BR
    Emma
  • 你好,想问一下,你的CAN程序接收如果在初始化里面设置好后,后面改了CAN的ID和长度,寄存器是否还可以得到?还是CAN使用了FIFO模式?

    目前从官方给的例程来看,设置CAN一些配置信息在下面函数里

    CAN_setupMessageObject(uint32_t base, uint32_t objID, uint32_t msgID,
    CAN_MsgFrameType frame, CAN_MsgObjType msgType,
    uint32_t msgIDMask, uint32_t flags, uint16_t msgLen)

    这个函数通常在CAN初始化中被设置

    如果我不用FIFO模式,那么CAN接收来的数据,如果不是初始化设置的ID和长度。寄存器是否可以识别?

    之前试的CAN发送如果在初始化里面设置好,那么发送的函数就不能改写长度和ID号。除非再次调用

    感觉这一点此芯片非常不灵活。