HiK64 Kinetis SDK flash driver : FLASH_ReadResource  return error Status_FLASH_InvalidArgument

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

HiK64 Kinetis SDK flash driver : FLASH_ReadResource  return error Status_FLASH_InvalidArgument

855 次查看
eliar
Contributor II

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!

标签 (1)
0 项奖励
4 回复数

522 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi Eli:

I think you can check your parameters. Please refer to the API reference

pastedImage_1.png

pastedImage_2.png

Regards

Daniel

0 项奖励

522 次查看
geoff_s
Contributor III

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.

0 项奖励

522 次查看
danielchen
NXP TechSupport
NXP TechSupport

My Manul is:

pastedImage_3.png

Regards

Daniel

0 项奖励

522 次查看
geoff_s
Contributor III

Ok.  I didn't realise there was a separate SDK document for the K64's.

0 项奖励