![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
Data Structures | |
| struct | memory_interface_t |
| Interface to memory operations. More... | |
| struct | memory_region_interface_t |
| Interface to memory operations for one region of memory. More... | |
| struct | memory_map_entry_t |
| Structure of a memory map entry. More... | |
| union | StandardVersion |
| Structure of version property. More... | |
| struct | kb_api_parameter_struct |
| API initialization data structure. More... | |
Macros | |
| #define | DEVICE_ID_MASK (0xffU) |
| Bit mask for device ID. More... | |
| #define | DEVICE_ID_SHIFT 0U |
| Bit position of device ID. More... | |
| #define | GROUP_ID_MASK (0xf00U) |
| Bit mask for group ID. More... | |
| #define | GROUP_ID_SHIFT 8U |
| Bit position of group ID. More... | |
| #define | MAKE_MEMORYID(group, device) ((((group) << GROUP_ID_SHIFT) & GROUP_ID_MASK) | (((device) << DEVICE_ID_SHIFT) & DEVICE_ID_MASK)) |
| Construct a memory ID from a given group ID and device ID. More... | |
| #define | GROUPID(memoryId) (((memoryId) & GROUP_ID_MASK) >> GROUP_ID_SHIFT) |
| Get group ID from a given memory ID. More... | |
| #define | DEVICEID(memoryId) (((memoryId) & DEVICE_ID_MASK) >> DEVICE_ID_SHIFT) |
| Get device ID from a given memory ID. More... | |
Typedefs | |
| typedef union StandardVersion | standard_version_t |
| Structure of version property. More... | |
|
typedef struct kb_api_parameter_struct | kp_api_init_param_t |
| API initialization data structure. | |
Enumerations | |
| enum | { kMemoryGroup_Internal = 0U, kMemoryGroup_External = 1U } |
| Memory group definition. More... | |
| enum | { kMemoryInternal = MAKE_MEMORYID(kMemoryGroup_Internal, 0U), kMemoryQuadSpi0 = MAKE_MEMORYID(kMemoryGroup_Internal, 1U), kMemoryIFR0, kMemoryFFR = MAKE_MEMORYID(kMemoryGroup_Internal, 5U), kMemorySemcNor = MAKE_MEMORYID(kMemoryGroup_Internal, 8U), kMemoryFlexSpiNor = MAKE_MEMORYID(kMemoryGroup_Internal, 9U), kMemorySpifiNor = MAKE_MEMORYID(kMemoryGroup_Internal, 0xAU), kMemoryFlashExecuteOnly = MAKE_MEMORYID(kMemoryGroup_Internal, 0x10U), kMemorySemcNand = MAKE_MEMORYID(kMemoryGroup_External, 0U), kMemorySpiNand = MAKE_MEMORYID(kMemoryGroup_External, 1U), kMemorySpiNorEeprom = MAKE_MEMORYID(kMemoryGroup_External, 0x10U), kMemoryI2cNorEeprom = MAKE_MEMORYID(kMemoryGroup_External, 0x11U), kMemorySDCard = MAKE_MEMORYID(kMemoryGroup_External, 0x20U), kMemoryMMCCard = MAKE_MEMORYID(kMemoryGroup_External, 0x21U) } |
| Memory device ID definition. More... | |
| enum | { kStatusGroup_Bootloader = 100, kStatusGroup_MemoryInterface = 102 } |
| Bootloader status group numbers. More... | |
| enum | { kStatusMemoryRangeInvalid = MAKE_STATUS(kStatusGroup_MemoryInterface, 0), kStatusMemoryReadFailed = MAKE_STATUS(kStatusGroup_MemoryInterface, 1), kStatusMemoryWriteFailed = MAKE_STATUS(kStatusGroup_MemoryInterface, 2), kStatusMemoryCumulativeWrite = MAKE_STATUS(kStatusGroup_MemoryInterface, 3), kStatusMemoryAppOverlapWithExecuteOnlyRegion, kStatusMemoryNotConfigured = MAKE_STATUS(kStatusGroup_MemoryInterface, 5), kStatusMemoryAlignmentError = MAKE_STATUS(kStatusGroup_MemoryInterface, 6), kStatusMemoryVerifyFailed = MAKE_STATUS(kStatusGroup_MemoryInterface, 7), kStatusMemoryWriteProtected = MAKE_STATUS(kStatusGroup_MemoryInterface, 8), kStatusMemoryAddressError = MAKE_STATUS(kStatusGroup_MemoryInterface, 9), kStatusMemoryBlankCheckFailed, kStatusMemoryBlankPageReadDisallowed, kStatusMemoryProtectedPageReadDisallowed, kStatusMemoryFfrSpecRegionWriteBroken, kStatusMemoryUnsupportedCommand } |
| Memory interface status codes. More... | |
| enum | { kStatus_UnknownCommand = MAKE_STATUS(kStatusGroup_Bootloader, 0), kStatus_SecurityViolation = MAKE_STATUS(kStatusGroup_Bootloader, 1), kStatus_AbortDataPhase = MAKE_STATUS(kStatusGroup_Bootloader, 2), kStatus_Ping = MAKE_STATUS(kStatusGroup_Bootloader, 3), kStatus_NoResponse = MAKE_STATUS(kStatusGroup_Bootloader, 4), kStatus_NoResponseExpected = MAKE_STATUS(kStatusGroup_Bootloader, 5), kStatus_CommandUnsupported = MAKE_STATUS(kStatusGroup_Bootloader, 6) } |
| Bootloader status codes. More... | |
Functions | |
| status_t | API_Init (api_core_context_t *coreCtx, const kp_api_init_param_t *param) |
| Initialize the IAP API runtime environment. | |
| status_t | API_Deinit (api_core_context_t *coreCtx) |
| Deinitialize the IAP API runtime environment. | |
| status_t | MEM_Init (api_core_context_t *coreCtx) |
| Initialize memory interface. More... | |
| status_t | MEM_Config (api_core_context_t *coreCtx, uint32_t *config, uint32_t memoryId) |
| Configure memory interface. More... | |
| status_t | MEM_Write (api_core_context_t *coreCtx, uint32_t start, uint32_t lengthInBytes, const uint8_t *buf, uint32_t memoryId) |
| Write memory. More... | |
| status_t | MEM_Fill (api_core_context_t *coreCtx, uint32_t start, uint32_t lengthInBytes, uint32_t pattern, uint32_t memoryId) |
| Fill memory with a word pattern. More... | |
| status_t | MEM_Flush (api_core_context_t *coreCtx) |
| Flush memory. More... | |
| status_t | MEM_Erase (api_core_context_t *coreCtx, uint32_t start, uint32_t lengthInBytes, uint32_t memoryId) |
| Erase memory. More... | |
| status_t | MEM_EraseAll (api_core_context_t *coreCtx, uint32_t memoryId) |
| Erase entire memory based on memoryId. More... | |
| struct memory_interface_t |
This is the main abstract interface to all memory operations.
| struct memory_region_interface_t |
| struct memory_map_entry_t |
| union StandardVersion |
| struct kb_api_parameter_struct |
| #define DEVICE_ID_MASK (0xffU) |
| #define DEVICE_ID_SHIFT 0U |
| #define GROUP_ID_MASK (0xf00U) |
| #define GROUP_ID_SHIFT 8U |
| #define MAKE_MEMORYID | ( | group, | |
| device | |||
| ) | ((((group) << GROUP_ID_SHIFT) & GROUP_ID_MASK) | (((device) << DEVICE_ID_SHIFT) & DEVICE_ID_MASK)) |
| #define GROUPID | ( | memoryId | ) | (((memoryId) & GROUP_ID_MASK) >> GROUP_ID_SHIFT) |
| #define DEVICEID | ( | memoryId | ) | (((memoryId) & DEVICE_ID_MASK) >> DEVICE_ID_SHIFT) |
| typedef union StandardVersion standard_version_t |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| anonymous enum |
| status_t MEM_Init | ( | api_core_context_t * | coreCtx | ) |
| kStatus_Fail | |
| kStatus_Success |
| status_t MEM_Config | ( | api_core_context_t * | coreCtx, |
| uint32_t * | config, | ||
| uint32_t | memoryId | ||
| ) |
| coreCtx | A pointer to the storage for the driver runtime state. |
| config | memory configure struct. |
| memoryId | Indicates the index of the memory type. Please refer to "Memory group definition" |
| status_t MEM_Write | ( | api_core_context_t * | coreCtx, |
| uint32_t | start, | ||
| uint32_t | lengthInBytes, | ||
| const uint8_t * | buf, | ||
| uint32_t | memoryId | ||
| ) |
| coreCtx | A pointer to the storage for the driver runtime state. |
| start | The start address of the desired flash memory to be programmed. For internal flash the address need to be 512bytes-aligned. |
| lengthInBytes | Number of bytes to be programmed. |
| buf | A pointer to the source buffer of data that is to be programmed into the flash. |
| memoryId | Indicates the index of the memory type. Please refer to "Memory group definition" |
| status_t MEM_Fill | ( | api_core_context_t * | coreCtx, |
| uint32_t | start, | ||
| uint32_t | lengthInBytes, | ||
| uint32_t | pattern, | ||
| uint32_t | memoryId | ||
| ) |
| coreCtx | A pointer to the storage for the driver runtime state. |
| start | The start address of the desired flash memory to be programmed. For internal flash the address need to be 512bytes-aligned. |
| lengthInBytes | Number of bytes to be programmed. |
| pattern | The data to be written into the specified memory area. |
| memoryId | Indicates the index of the memory type. Please refer to "Memory group definition" |
| status_t MEM_Flush | ( | api_core_context_t * | coreCtx | ) |
| status_t MEM_Erase | ( | api_core_context_t * | coreCtx, |
| uint32_t | start, | ||
| uint32_t | lengthInBytes, | ||
| uint32_t | memoryId | ||
| ) |
| coreCtx | A pointer to the storage for the driver runtime state. |
| start | The start address of the desired flash memory to be erased. |
| lengthInBytes | Number of bytes to be read. |
| memoryId | Indicates the index of the memory type. Please refer to "Memory group definition" |
| status_t MEM_EraseAll | ( | api_core_context_t * | coreCtx, |
| uint32_t | memoryId | ||
| ) |
| coreCtx | A pointer to the storage for the driver runtime state. |
| memoryId | Indicates the index of the memory type. Please refer to "Memory group definition" |