![]() |
LPCOpen Platform for LPC18XX/43XX microcontrollers
18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
|
Macros | |
| #define | IAP_PREWRRITE_CMD 50 |
| #define | IAP_WRISECTOR_CMD 51 |
| #define | IAP_ERSSECTOR_CMD 52 |
| #define | IAP_BLANK_CHECK_SECTOR_CMD 53 |
| #define | IAP_REPID_CMD 54 |
| #define | IAP_READ_BOOT_CODE_CMD 55 |
| #define | IAP_COMPARE_CMD 56 |
| #define | IAP_REINVOKE_ISP_CMD 57 |
| #define | IAP_READ_UID_CMD 58 |
| #define | IAP_ERASE_PAGE_CMD 59 |
| #define | IAP_SET_BOOT_FLASH 60 |
| #define | IAP_EEPROM_WRITE 61 |
| #define | IAP_EEPROM_READ 62 |
| #define | IAP_CMD_SUCCESS 0 |
| #define | IAP_INVALID_COMMAND 1 |
| #define | IAP_SRC_ADDR_ERROR 2 |
| #define | IAP_DST_ADDR_ERROR 3 |
| #define | IAP_SRC_ADDR_NOT_MAPPED 4 |
| #define | IAP_DST_ADDR_NOT_MAPPED 5 |
| #define | IAP_COUNT_ERROR 6 |
| #define | IAP_INVALID_SECTOR 7 |
| #define | IAP_SECTOR_NOT_BLANK 8 |
| #define | IAP_SECTOR_NOT_PREPARED 9 |
| #define | IAP_COMPARE_ERROR 10 |
| #define | IAP_BUSY 11 |
| #define | IAP_PARAM_ERROR 12 |
| #define | IAP_ADDR_ERROR 13 |
| #define | IAP_ADDR_NOT_MAPPED 14 |
| #define | IAP_CMD_LOCKED 15 |
| #define | IAP_INVALID_CODE 16 |
| #define | IAP_INVALID_BAUD_RATE 17 |
| #define | IAP_INVALID_STOP_BIT 18 |
| #define | IAP_CRP_ENABLED 19 |
Typedefs | |
| typedef void(* | IAP_ENTRY_T )(unsigned int[5], unsigned int[4]) |
Functions | |
| uint8_t | Chip_IAP_PreSectorForReadWrite (uint32_t strSector, uint32_t endSector, uint8_t bankNum) |
| Prepare sector for write operation. More... | |
| uint8_t | Chip_IAP_CopyRamToFlash (uint32_t dstAdd, uint32_t *srcAdd, uint32_t byteswrt) |
| Copy RAM to flash. More... | |
| uint8_t | Chip_IAP_EraseSector (uint32_t strSector, uint32_t endSector, uint8_t bankNum) |
| Erase sector. More... | |
| uint8_t | Chip_IAP_BlankCheckSector (uint32_t strSector, uint32_t endSector, uint8_t bankNum) |
| Blank check a sector or multiples sector of on-chip flash memory. More... | |
| uint32_t | Chip_IAP_ReadPID (void) |
| Read part identification number. More... | |
| uint8_t | Chip_IAP_ReadBootCode (void) |
| Read boot code version number. More... | |
| uint8_t | Chip_IAP_Compare (uint32_t dstAdd, uint32_t srcAdd, uint32_t bytescmp) |
| Compare the memory contents at two locations. More... | |
| uint8_t | Chip_IAP_ReinvokeISP (void) |
| IAP reinvoke ISP to invoke the bootloader in ISP mode. More... | |
| uint32_t | Chip_IAP_ReadUID (void) |
| Read the unique ID. More... | |
| uint8_t | Chip_IAP_ErasePage (uint32_t strPage, uint32_t endPage) |
| Erase a page or multiple papers of on-chip flash memory. More... | |
| uint8_t | Chip_IAP_SetBootFlashBank (uint8_t bankNum) |
| Set active boot flash bank. More... | |
| #define IAP_ADDR_ERROR 13 |
Address is not on word boundary
Definition at line 73 of file iap_18xx_43xx.h.
| #define IAP_ADDR_NOT_MAPPED 14 |
Address is not mapped in the memory map
Definition at line 74 of file iap_18xx_43xx.h.
| #define IAP_BLANK_CHECK_SECTOR_CMD 53 |
Blank check sector
Definition at line 48 of file iap_18xx_43xx.h.
| #define IAP_BUSY 11 |
Flash programming hardware interface is busy
Definition at line 71 of file iap_18xx_43xx.h.
| #define IAP_CMD_LOCKED 15 |
Command is locked
Definition at line 75 of file iap_18xx_43xx.h.
| #define IAP_CMD_SUCCESS 0 |
Command is executed successfully
Definition at line 60 of file iap_18xx_43xx.h.
| #define IAP_COMPARE_CMD 56 |
Compare two RAM address locations
Definition at line 51 of file iap_18xx_43xx.h.
| #define IAP_COMPARE_ERROR 10 |
Source and destination data not equal
Definition at line 70 of file iap_18xx_43xx.h.
| #define IAP_COUNT_ERROR 6 |
Byte count is not multiple of 4 or is not a permitted value
Definition at line 66 of file iap_18xx_43xx.h.
| #define IAP_CRP_ENABLED 19 |
Code read protection enabled
Definition at line 79 of file iap_18xx_43xx.h.
| #define IAP_DST_ADDR_ERROR 3 |
Destination address is not on a correct boundary
Definition at line 63 of file iap_18xx_43xx.h.
| #define IAP_DST_ADDR_NOT_MAPPED 5 |
Destination address is not mapped in the memory map
Definition at line 65 of file iap_18xx_43xx.h.
| #define IAP_EEPROM_READ 62 |
EEPROM READ command
Definition at line 57 of file iap_18xx_43xx.h.
| #define IAP_EEPROM_WRITE 61 |
EEPROM Write command
Definition at line 56 of file iap_18xx_43xx.h.
| #define IAP_ERASE_PAGE_CMD 59 |
Erase page
Definition at line 54 of file iap_18xx_43xx.h.
| #define IAP_ERSSECTOR_CMD 52 |
Erase Sector command
Definition at line 47 of file iap_18xx_43xx.h.
| #define IAP_INVALID_BAUD_RATE 17 |
Invalid baud rate setting
Definition at line 77 of file iap_18xx_43xx.h.
| #define IAP_INVALID_CODE 16 |
Unlock code is invalid
Definition at line 76 of file iap_18xx_43xx.h.
| #define IAP_INVALID_COMMAND 1 |
Invalid command
Definition at line 61 of file iap_18xx_43xx.h.
| #define IAP_INVALID_SECTOR 7 |
Sector number is invalid or end sector number is greater than start sector number
Definition at line 67 of file iap_18xx_43xx.h.
| #define IAP_INVALID_STOP_BIT 18 |
Invalid stop bit setting
Definition at line 78 of file iap_18xx_43xx.h.
| #define IAP_PARAM_ERROR 12 |
nsufficient number of parameters or invalid parameter
Definition at line 72 of file iap_18xx_43xx.h.
| #define IAP_PREWRRITE_CMD 50 |
Prepare sector for write operation command
Definition at line 45 of file iap_18xx_43xx.h.
| #define IAP_READ_BOOT_CODE_CMD 55 |
Read Boot code version
Definition at line 50 of file iap_18xx_43xx.h.
| #define IAP_READ_UID_CMD 58 |
Read UID
Definition at line 53 of file iap_18xx_43xx.h.
| #define IAP_REINVOKE_ISP_CMD 57 |
Reinvoke ISP
Definition at line 52 of file iap_18xx_43xx.h.
| #define IAP_REPID_CMD 54 |
Read PartID command
Definition at line 49 of file iap_18xx_43xx.h.
| #define IAP_SECTOR_NOT_BLANK 8 |
Sector is not blank
Definition at line 68 of file iap_18xx_43xx.h.
| #define IAP_SECTOR_NOT_PREPARED 9 |
Command to prepare sector for write operation was not executed
Definition at line 69 of file iap_18xx_43xx.h.
| #define IAP_SET_BOOT_FLASH 60 |
Set active boot flash bank
Definition at line 55 of file iap_18xx_43xx.h.
| #define IAP_SRC_ADDR_ERROR 2 |
Source address is not on word boundary
Definition at line 62 of file iap_18xx_43xx.h.
| #define IAP_SRC_ADDR_NOT_MAPPED 4 |
Source address is not mapped in the memory map
Definition at line 64 of file iap_18xx_43xx.h.
| #define IAP_WRISECTOR_CMD 51 |
Write Sector command
Definition at line 46 of file iap_18xx_43xx.h.
| typedef void(* IAP_ENTRY_T)(unsigned int[5], unsigned int[4]) |
Definition at line 82 of file iap_18xx_43xx.h.
| uint8_t Chip_IAP_BlankCheckSector | ( | uint32_t | strSector, |
| uint32_t | endSector, | ||
| uint8_t | bankNum | ||
| ) |
Blank check a sector or multiples sector of on-chip flash memory.
| strSector | : Start sector number |
| endSector | : End sector number |
| bankNum | : Flash Bank number |
Definition at line 95 of file iap_18xx_43xx.c.
| uint8_t Chip_IAP_Compare | ( | uint32_t | dstAdd, |
| uint32_t | srcAdd, | ||
| uint32_t | bytescmp | ||
| ) |
Compare the memory contents at two locations.
| dstAdd | : Destination of the RAM address of data bytes to be compared |
| srcAdd | : Source of the RAM address of data bytes to be compared |
| bytescmp | : Number of bytes to be compared |
| uint8_t Chip_IAP_CopyRamToFlash | ( | uint32_t | dstAdd, |
| uint32_t * | srcAdd, | ||
| uint32_t | byteswrt | ||
| ) |
Copy RAM to flash.
| dstAdd | : Destination flash address where data bytes are to be written |
| srcAdd | : Source flash address where data bytes are to be read |
| byteswrt | : Number of bytes to be written |
| dstAdd | : Destination FLASH address where data bytes are to be written |
| srcAdd | : Source RAM address where data bytes are to be read |
| byteswrt | : Number of bytes to be written |
| uint8_t Chip_IAP_ErasePage | ( | uint32_t | strPage, |
| uint32_t | endPage | ||
| ) |
Erase a page or multiple papers of on-chip flash memory.
| strPage | : Start page number |
| endPage | : End page number |
| uint8_t Chip_IAP_EraseSector | ( | uint32_t | strSector, |
| uint32_t | endSector, | ||
| uint8_t | bankNum | ||
| ) |
Erase sector.
| strSector | : Start sector number |
| endSector | : End sector number |
| bankNum | : Flash Bank number |
Definition at line 80 of file iap_18xx_43xx.c.
| uint8_t Chip_IAP_PreSectorForReadWrite | ( | uint32_t | strSector, |
| uint32_t | endSector, | ||
| uint8_t | bankNum | ||
| ) |
Prepare sector for write operation.
| strSector | : Start sector number |
| endSector | : End sector number |
| bankNum | : Flash Bank number |
Definition at line 51 of file iap_18xx_43xx.c.
| uint8_t Chip_IAP_ReadBootCode | ( | void | ) |
| uint32_t Chip_IAP_ReadPID | ( | void | ) |
| uint32_t Chip_IAP_ReadUID | ( | void | ) |
Read the unique ID.
Definition at line 156 of file iap_18xx_43xx.c.
| uint8_t Chip_IAP_ReinvokeISP | ( | void | ) |
| uint8_t Chip_IAP_SetBootFlashBank | ( | uint8_t | bankNum | ) |
Set active boot flash bank.
| bankNum | : Flash bank number |
Definition at line 181 of file iap_18xx_43xx.c.
1.8.3.1