AnsweredAssumed Answered

HiK64 Kinetis SDK flash driver : FLASH_ReadResource  return error Status_FLASH_InvalidArgument

Question asked by Eli Arad on Sep 25, 2016
Latest reply on Oct 31, 2016 by geoff_s

Hi

 

I am working on the kinetis K64 controller with SDK 2.0

started with the flash driver example. 

the write success ok , but now i want to read back using the function 

FLASH_ReadResource

So i call to:

result = FLASH_ReadResource(&flashDriver, destAdrss, data1, sizeof(data1), kFLASH_resourceOptionFlashIfr);
if (kStatus_FLASH_Success != result)
{
      showError(result);
     PRINTF("Error Flash 310\r\n");
}

 

and i am getting error of   kStatus_FLASH_InvalidArgument

It is NOT from this code inside the function:

 


if ((config == NULL) || (dst == NULL))
{
return kStatus_FLASH_InvalidArgument;
}

 

 

BUT from this code:

 

returnCode = flash_check_resource_range(start, lengthInBytes, flashInfo.resourceCmdAddressAligment, option);
if (returnCode != kStatus_FLASH_Success)
{
      PRINTF("flash_check_resource_range = %d\r\n" , returnCode);         HERE IS THE ERROR
     return returnCode;
}

 

Can you please help me to read data back?

 

Thanks!

Outcomes