![NXP Semiconductors Kinetis KE1xZ256 Reference Manual Download Page 517](http://html1.mh-extra.com/html/nxp-semiconductors/kinetis-ke1xz256/kinetis-ke1xz256_reference-manual_1721813517.webp)
Reads certain regions of IFR determined by the start address, length, and option.
For targets that do not support FLASH_ReadResource, the value of the
FLASH_ReadResource pointer is 0.
Prototype:
status_t FLASH_ReadResource(
flash_config_t *config, uint32_t start, uint32_t *dst, uint32_t lengthInBytes,
flash_read_resource_option_t option);
Table 22-63. Parameters
Parameter
Description
Config
Pointer to
flash_config_t
data structure in memory, to store driver runtime state.
Start
Index for a certain Program Once Field.
dst
Pointer to the destination buffer of data that stores data reads from IFR.
Lengthinbytes
The length, in bytes (not words or long words), to be read. Must be word-aligned.
Option
The resource option which indicates the area that needs be read back.
• 0 IFR
• 1 Version ID of the flash module
Table 22-64. Possible status response
Value
Constant
Description
4
kStatus_InvalidArgument
Config or dst pointers are NULL.
101
kStatus_FLASH_AlignmentError
Start, lengthInBytes, or option is invalid.
103
kStatus_FLASH_AccessError
The following situation causes this response:
1. Command is not available under current mode/
security.
2. An invalid index is supplied.
3. An invalid resource option.
4. Address is out-of-rage for the targeted
resource.
5. Address is not long word aligned.
115
kStatus_FLASH_CommandNotSupported
This function is not supported.
0
kStatus_Success
This function has performed successfully.
Example:
uint32_t temp[256];
status_t status = FLASH_ReadResource(&flashInstance, 0, &temp[0], 256, 0);
NOTE
See the FTFA chapter in RM for detailed information regarding
the start, length, and option choices.
Chapter 22 Kinetis ROM Bootloader
Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018
NXP Semiconductors
517
Summary of Contents for Kinetis KE1xZ256
Page 2: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 2 NXP Semiconductors...
Page 178: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 178 NXP Semiconductors...
Page 356: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 356 NXP Semiconductors...
Page 410: ...Interrupts Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 410 NXP Semiconductors...
Page 604: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 604 NXP Semiconductors...
Page 634: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 634 NXP Semiconductors...
Page 674: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 674 NXP Semiconductors...
Page 820: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 820 NXP Semiconductors...
Page 1030: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1030 NXP Semiconductors...
Page 1052: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1052 NXP Semiconductors...
Page 1066: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1066 NXP Semiconductors...
Page 1268: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1268 NXP Semiconductors...
Page 1314: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1314 NXP Semiconductors...
Page 1316: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1316 NXP Semiconductors...