你好:
用28035的flash储存数据,利用仿真器下载程序到flash后运行能够顺利用API函数擦除flash,而掉电重新上电后就不能成功擦除了,返回STATUS_FAIL_PRECONDITION,请问这情况如何解决??
Young Hu:
您好!
按照下面的步骤试试。
processors.wiki.ti.com/…/FAQs
Precondition Failure
Q: Why is the following the error message generated,"Flash API Error #21 The Erase operation failed the precondition step" while using the CCS flash plugin? ===
A: The most likely cause of this error is accidently stopping the flash erase process before it successfully completes. The error indicates a bad sector or sectors in flash memory. Verify the bad sector(s) by performing the following to avoid using them.
. Invoke the flash plug-in, CCS->Tools-> On-chip programmer.
. Perform the erase operation only on all the sectors. You should see the same error.
. Perform the erase operation only on each individual sectors. By performing this, you should see which of your flash sectors are bad.
你好:
用28035的flash储存数据,利用仿真器下载程序到flash后运行能够顺利用API函数擦除flash,而掉电重新上电后就不能成功擦除了,返回STATUS_FAIL_PRECONDITION,请问这情况如何解决??
pengyu xu:
您好,请问您的问题解决了么?在调试阶段我也碰到了类似的问题,调用28035_API函数向FLASH扇区写入数据之前需要先进行对应扇区的擦除,在仿真器烧录后运行调试都正常,擦除和烧写实验成功,可是程序脱离仿真环境复位重新加载以后,调用Flash_Erase()函数返回错误代码#21,对应STATUS_FAIL_PRECONDITION,Flash_DepRecover()函数调用也无法解决这个问题,现在这个问题很急,但是一时找不到解决的办法,还请您回复帮助,多谢。
TI中文支持网

