FLASH操作需求说明:
第一次上电 操作FLASH_BANK1_SEC6 0x096000
首先使用API接口,擦除FLASH_BANK1_SEC6
Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,0x96000);
然后使用API接口,向地址0x096000 写入数据
Fapi_issueProgrammingCommand(
Uint32 *pu32StartAddress, // = 0x96000
Uint16 *pu16DataBuffer, // = ui16[8]
Uint16 u16DataBufferSizeInWords, // = 8
Uint16 *pu16EccBuffer, // =NONE
Uint16 u16EccBufferSizeInBytes, // =NONE
Fapi_FlashProgrammingCommandsType oMode // = Fapi_DataOnly
);
下电再上电,不执行擦除操作
使用API接口,向地址0x096008 写入数据
Fapi_issueProgrammingCommand(
Uint32 *pu32StartAddress, // = 0x96008
Uint16 *pu16DataBuffer, // = ui16[8]
Uint16 u16DataBufferSizeInWords, // = 8
Uint16 *pu16EccBuffer, // =NONE
Uint16 u16EccBufferSizeInBytes, // =NONE
Fapi_FlashProgrammingCommandsType oMode // = Fapi_DataOnly
);
操作结果,是0x096000的数据正常写入,但是下电在上电向0x96008地址写数据是失败,Fapi_issueProgrammingCommand返回的错误信息为“Fapi_Error_AsyncIncorrectEccBufferLength”
请问我这样操作可以吗?如果不可以这样操作,要怎样操作才能实现的目的:在不同的时间向同一扇区的不同地址写入数据。