21ic问答首页 - 280049的flash写入,写入4个字或8个字,跟地址有关系吗?
280049的flash写入,写入4个字或8个字,跟地址有关系吗?
z_jzhao2022-11-21
1、为什么写入8个字或写入4个字,跟地址有关,如下 u32FlashAddr = APP_TESTADDR; //地址:0x8443c
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 8,0, 0, Fapi_AutoEccGeneration);
//写8个字异常写入Flash时返回Fapi_Error_AsyncIncorrectDataBufferLength
u32FlashAddr = APP_TESTADDR; //地址:0x8443c
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 4,0, 0, Fapi_AutoEccGeneration);
//同样的地址换成写入4个字却正常
另外、更换一个地址,写入8个字也是正常的
u32FlashAddr = APP_TESTADDR; //地址:0x84438
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 8,0, 0, Fapi_AutoEccGeneration); //换个地址写8个字正常
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 8,0, 0, Fapi_AutoEccGeneration);
//写8个字异常写入Flash时返回Fapi_Error_AsyncIncorrectDataBufferLength
u32FlashAddr = APP_TESTADDR; //地址:0x8443c
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 4,0, 0, Fapi_AutoEccGeneration);
//同样的地址换成写入4个字却正常
另外、更换一个地址,写入8个字也是正常的
u32FlashAddr = APP_TESTADDR; //地址:0x84438
oReturnCheck = Fapi_issueProgrammingCommand((Uint32 *)u32FlashAddr, u16FlasshDat, 8,0, 0, Fapi_AutoEccGeneration); //换个地址写8个字正常
您需要登录后才可以回复 登录 | 注册