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!
Hi Eli:
I think you can check your parameters. Please refer to the API reference
Regards
Daniel
Daniel, which SDK manual are you using ? The SDK v2 manual that I have (titled "Kinetis SDK v.2.0 API Reference Manual", Rev 0, Jan 2016) has the C90TFS Flash Driver in Chapter 19, and there is no reference in that chapter to a ReadResource command.
My Manul is:
Regards
Daniel
Ok. I didn't realise there was a separate SDK document for the K64's.