Hi,
I use K64, IAR Workbench, with KSDK2.0.
I'm confused about parameter of FLASH_ReadOnce(flash_config_t * config, uint32_t index, uint32_t * dst, uint32_t lengthInBytes)
In API Reference Manual parameter description is no Parameter "index", instead there ist "start".
I got the following code working.
But I'm insecure about the Parameter "index".
Can someone please make things clearer?!?
Best regards
Manfred
FLASH_GetProperty(&flashDriver, kFLASH_propertyPflashBlockBaseAddr, &pflashBlockBase);
FLASH_GetProperty(&flashDriver, kFLASH_propertyPflashTotalSize, &pflashTotalSize);
FLASH_GetProperty(&flashDriver, kFLASH_propertyPflashSectorSize, &pflashSectorSize);
FLASH_GetProperty(&flashDriver, kFLASH_propertyDflashTotalSize, &dflashTotalSize);
FLASH_GetProperty(&flashDriver, kFLASH_propertyDflashBlockBaseAddr, &dflashBlockBase);
FLASH_GetProperty(&flashDriver, kFLASH_propertyEepromTotalSize, &eepromTotalSize);
result = FLASH_ReadOnce(&flashDriver, 0, ulTestBufferRead, sizeof(ulTestBufferRead));
if (kStatus_FLASH_Success != result)
{
__no_operation();
}
FLASH_ProgramOnce(&flashDriver, 0, ulTestBuffer, 8 );
result = FLASH_ReadOnce(&flashDriver, 0, ulTestBufferRead, sizeof(ulTestBufferRead));
if (kStatus_FLASH_Success != result)
{
__no_operation();
}