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
Содержание Kinetis KE1xZ256
Страница 2: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 2 NXP Semiconductors...
Страница 56: ...SysTick Clock Configuration Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 56 NXP Semiconductors...
Страница 62: ...Interrupt channel assignments Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 62 NXP Semiconductors...
Страница 124: ...Application information Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 124 NXP Semiconductors...
Страница 130: ...Initialization application information Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 130 NXP Semiconductors...
Страница 178: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 178 NXP Semiconductors...
Страница 356: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 356 NXP Semiconductors...
Страница 368: ...Module clocks Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 368 NXP Semiconductors...
Страница 410: ...Interrupts Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 410 NXP Semiconductors...
Страница 562: ...Power supply supervisor Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 562 NXP Semiconductors...
Страница 592: ...General security features Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 592 NXP Semiconductors...
Страница 604: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 604 NXP Semiconductors...
Страница 622: ...Application Information Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 622 NXP Semiconductors...
Страница 634: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 634 NXP Semiconductors...
Страница 674: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 674 NXP Semiconductors...
Страница 690: ...Module Signal Description Tables Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 690 NXP Semiconductors...
Страница 712: ...Functional description Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 712 NXP Semiconductors...
Страница 820: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 820 NXP Semiconductors...
Страница 1030: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1030 NXP Semiconductors...
Страница 1052: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1052 NXP Semiconductors...
Страница 1066: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1066 NXP Semiconductors...
Страница 1268: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1268 NXP Semiconductors...
Страница 1314: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1314 NXP Semiconductors...
Страница 1316: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1316 NXP Semiconductors...