![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
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 | standard_version_t |
| Structure of version property. More... | |
| struct | kp_api_init_param_t |
| 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... | |
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 | |
| Memory interface status codes. More... | |
| enum | |
| 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 standard_version_t |
| struct kp_api_init_param_t |
| #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) |
| 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 | ||
| ) |
| config | A pointer to the storage for the driver runtime state. |
| memoryId | Indicates the index of the memory type. Please refer to "Memory group definition" |
| kStatus_Success | |
| #kStatus_CommandUnsupported | |
| kStatus_InvalidArgument | |
| kStatus_FLASH_ModifyProtectedAreaDisallowed | |
| #kStatusMemoryRangeInvalid | |
| kStatus_Fail | |
| kStatus_OutOfRange | |
| kStatus_SPI_BaudrateNotSupport |
| status_t MEM_Write | ( | api_core_context_t * | coreCtx, |
| uint32_t | start, | ||
| uint32_t | lengthInBytes, | ||
| const uint8_t * | buf, | ||
| uint32_t | memoryId | ||
| ) |
| address | The start address of the desired flash memory to be programmed. For internal flash the address need to be 512bytes-aligned. |
| length | Number of bytes to be programmed. |
| buffer | 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" |
| kStatus_Success | |
| kStatus_Fail | |
| #kStatusMemoryRangeInvalid | |
| #kStatus_CommandUnsupported | |
| kStatus_FLASH_AlignmentError | |
| #kStatusMemoryCumulativeWrite | |
| kStatus_FLASH_InvalidArgument | |
| kStatus_FLASH_AddressError | |
| kStatus_FLASH_ModifyProtectedAreaDisallowed | |
| kStatus_FLASH_CommandFailure | |
| kStatus_FLASH_CommandNotSupported | |
| kStatus_FLASH_EccError | |
| kStatus_FLASH_RegulationLoss | |
| kStatus_FLASH_Success | |
| kStatus_FLASH_ReadHidingAreaDisallowed | |
| kStatus_FLASH_CompareError | |
| #kStatusMemoryNotConfigured | |
| #kStatusMemoryVerifyFailed |
| status_t MEM_Fill | ( | api_core_context_t * | coreCtx, |
| uint32_t | start, | ||
| uint32_t | lengthInBytes, | ||
| uint32_t | pattern, | ||
| uint32_t | memoryId | ||
| ) |
| address | The start address of the desired flash memory to be programmed. For internal flash the address need to be 512bytes-aligned. |
| length | Number of bytes to be programmed. |
| pattern | The data to be written into the specified memory area. |
| 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 | ||
| ) |
| address | The start address of the desired flash memory to be erased. |
| length | Number of bytes to be read. |
| memoryId | Indicates the index of the memory type. Please refer to "Memory group definition" |
| kStatus_Success | |
| #kStatusMemoryRangeInvalid | |
| #kStatusMemoryAddressError | |
| kStatus_FLASH_InvalidArgument | |
| kStatus_FLASH_AlignmentError | |
| kStatus_FLASH_Success | |
| kStatus_FLASH_AddressError | |
| kStatus_FLASH_EraseKeyError | |
| kStatus_FLASH_ModifyProtectedAreaDisallowed | |
| kStatus_Fail | |
| kStatus_FLASH_CommandFailure | |
| kStatus_FLASH_CommandNotSupported | |
| kStatus_FLASH_EccError | |
| kStatus_FLASH_RegulationLoss | |
| #kStatusMemoryNotConfigured | |
| #kStatusMemoryVerifyFailed |
| status_t MEM_EraseAll | ( | api_core_context_t * | coreCtx, |
| uint32_t | memoryId | ||
| ) |
| memoryId | Indicates the index of the memory type. Please refer to "Memory group definition" |
| kStatus_Success | |
| kStatus_Fail | |
| #kStatus_CommandUnsupported | |
| kStatus_FLASH_InvalidArgument | |
| kStatus_FLASH_AlignmentError | |
| kStatus_FLASH_Success | |
| kStatus_FLASH_AddressError | |
| kStatus_FLASH_EraseKeyError | |
| kStatus_FLASH_CommandFailure | |
| kStatus_FLASH_CommandNotSupported | |
| kStatus_FLASH_EccError | |
| kStatus_FLASH_RegulationLoss | |
| kStatus_FLASH_ModifyProtectedAreaDisallowed | |
| #kStatusMemoryVerifyFailed | |
| #kStatusMemoryNotConfigured | |
| kStatus_InvalidArgument |