本帖最后由 纪国圣 于 2022-7-23 10:17 编辑
烧录的时候那0x20000 设置不了这么大?工程其他地方有没有修改?至于烧录后是否正确,写一个比较函数,如:const uint8_t data[] = {数据};
uint32_t flashAddr = 0u;
uint8_t *pDataAddr = data;
uint8_t *pFlashReadAddr = (uint8_t *)((uint32_t)QSPI_BUS_ADDRESS);
uint32_t i = 0;
for (i = 0;i < 最大的sector;i++)
{
pFlashReadAddr = (uint8_t *)((uint32_t)QSPI_BUS_ADDRESS + flashAddr);
/* Compare txBuffer and flash */
if (memcmp(pDataAddr, pFlashReadAddr, FLASH_SECTOR_SIZE) != 0)
{
失败
}
else
{
成功
}
flashAddr += FLASH_SECTOR_SIZE;
pDataAddr+= FLASH_SECTOR_SIZE;
}
|