flash_convert_start_address flash地址转换_l3142600073的博客-爱代码爱编程
{
if (config == NULL)
{
return kStatus_FTFx_InvalidArgument;
}
if (config->flashDesc.index && config->flashDesc.feature.isIndBlock)
{
/* When required by the command, address bit 23 selects between main flash memory
* (=0) and secondary flash memory (=1).*/
config->opsConfig.convertedAddress = start - config->flashDesc.blockBase + 0x800000U;
}
else
{
config->opsConfig.convertedAddress = start; //0x001FE000
}
return kStatus_FTFx_Success;
}
将start地址传入FCCOB寄存器,FCCOB寄存器将判断23位是否为1或者为0,如果为0则视为不转换flash,
如果为1则操作的flash将为第二块flash。