21ic问答首页 - 280049的Flash写入失效原因
280049的Flash写入失效原因 赏100家园币
z_jzhao2022-11-21
当在当前地0x8DFFC写入4个字,都正常写入,接着在0x85000写入一个字后,却发现没有写入,但返回的状态位却是正确的,为什么会没有写入;代码如下:
u32FlashAddr = APP_TESTADDR; //0x8DFFC
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 4,0, 0,Fapi_AutoEccGeneration);
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); //写入正常
u32FlashAddr = APP_TESTADDR; //0x85000
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 1,0, 0,Fapi_AutoEccGeneration);
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); //写入异常
u32FlashAddr = APP_TESTADDR; //0x8DFFC
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 4,0, 0,Fapi_AutoEccGeneration);
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); //写入正常
u32FlashAddr = APP_TESTADDR; //0x85000
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 1,0, 0,Fapi_AutoEccGeneration);
while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); //写入异常
赞0
评论
2023-01-08
您需要登录后才可以回复 登录 | 注册