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.
我写入8个数据后,再读出来,发现读出来的数据存在错误。
程序:
void Internal_FLASH_read(uint32 addr, uint8* buff, uint8 len)
{
memcpy(buff, addr, len);
}
write_buff[16]={0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35,0x35};
uint8 read_buff[16]={0};
Internal_FLASH_read(0xF0200000,read_buff, 8);
结果:
1、没有写入时读出的结果:
2、写入后读出的结果:
用Fapi_doMarginReadByByte 函数读出来的数据也是这种情况,
是不是写的问题。
您可以在写入之后使用memory browser来查看一下
问题解决了,再调用函数Fapi_issueProgrammingCommand(uint32_t* pu32StartAddress,
uint8_t* pu8DataBuffer,
uint8_t u8DataBufferSizeInBytes,
uint8_t* pu8EccBuffer,
uint8_t u8EccBufferSizeInBytes,
Fapi_FlashProgrammingCommandsType oMode)写入数据时,参数oMode 设为Fapi_AutoEccGeneration就没问题了。