![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a driver for the In Application Programming (IAP) module of MCUXpresso SDK devices.
The driver provides a set of functions to call the on-chip in application programming interface. User code executing from on-chip RAM can call these functions to read information like part id; read and write flash, EEPROM and FAIM.
The function IAP_ReadPartID() reads the part id of the board.
The function IAP_ReadBootCodeVersion() reads the boot code Version.
The function IAP_ReadUniqueID() reads the unique id of the boards.
The function IAP_ReinvokeISP() reinvokes the ISP mode.
The function IAP_ReadFactorySettings() reads the factory settings.
The function IAP_PrepareSectorForWrite() prepares a sector for write or erase operation. Then, the function IAP_CopyRamToFlash() programs the flash memory.
The function IAP_EraseSector() erases a flash sector while the function IAP_ErasePage() erases a flash page.
The function IAP_BlankCheckSector() is used to blank check a sector or multiple sectors of on-chip flash memory.
The function IAP_Compare() is used to compare the memory contents at two locations. The user can compare several bytes (must be a multiple of 4) content in two different flash locations.
The function IAP_ReadFlashSignature() can get the 32-bits signature of the entire flash and the function IAP_ExtendedFlashSignatureRead() can calculate the signature of one or more flash pages.
The function IAP_ReadEEPROMPage() reads the 128 bytes content of an EEPROM page and IAP_WriteEEPROMPage() writes 128 bytes content in an EEPROM page
The function IAP_ReadEEPROMPage() reads the 32 bits content of an FAIM page and IAP_WriteEEPROMPage() writes 32 bits content in an FAIM page
Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/iap/iap_basic/
Refer to the driver example codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/iap/iap_flash/
Refer to the driver example codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/iap/iap_eeprom/
Refer to the driver example codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/iap/iap_faim/
Files | |
file | fsl_iap.h |
Driver version | |
#define | FSL_IAP_DRIVER_VERSION (MAKE_VERSION(2, 0, 4)) |
Version 2.0.4. More... | |
Basic operations | |
status_t | IAP_ReadPartID (uint32_t *partID) |
Read part identification number. More... | |
status_t | IAP_ReadBootCodeVersion (uint32_t *bootCodeVersion) |
Read boot code version number. More... | |
void | IAP_ReinvokeISP (uint8_t ispType, uint32_t *status) |
Reinvoke ISP. More... | |
status_t | IAP_ReadUniqueID (uint32_t *uniqueID) |
Read unique identification. More... | |
#define FSL_IAP_DRIVER_VERSION (MAKE_VERSION(2, 0, 4)) |
anonymous enum |
enum _iap_commands |
status_t IAP_ReadPartID | ( | uint32_t * | partID | ) |
This function is used to read the part identification number.
partID | Address to store the part identification number. |
kStatus_IAP_Success | Api has been executed successfully. |
status_t IAP_ReadBootCodeVersion | ( | uint32_t * | bootCodeVersion | ) |
This function is used to read the boot code version number.
bootCodeVersion | Address to store the boot code version. |
kStatus_IAP_Success | Api has been executed successfully. |
note Boot code version is two 32-bit words. Word 0 is the major version, word 1 is the minor version.
void IAP_ReinvokeISP | ( | uint8_t | ispType, |
uint32_t * | status | ||
) |
This function is used to invoke the boot loader in ISP mode. It maps boot vectors and configures the peripherals for ISP.
ispType | ISP type selection. |
status | store the possible status. |
kStatus_IAP_ReinvokeISPConfig | reinvoke configuration error. |
note The error response will be returned when IAP is disabled or an invalid ISP type selection appears. The call won't return unless an error occurs, so there can be no status code.
status_t IAP_ReadUniqueID | ( | uint32_t * | uniqueID | ) |
This function is used to read the unique id.
uniqueID | store the uniqueID. |
kStatus_IAP_Success | Api has been executed successfully. |