LPCOpen Platform for LPC18XX/43XX microcontrollers: C:/w/lpcopen_docs/software/lpc_core/lpc_chip/chip_common/error.h File Reference

| LPCOpen Platform for LPC18XX/43XX microcontrollers 18XX43XX LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Enumerations
error.h File Reference

Go to the source code of this file.

## Macros
#define | offsetof(s, m) (int) &(((s *) 0)->m)
#define | COMPILE_TIME_ASSERT(pred)

## Enumerations
enum | ErrorCode_t { LPC_OK =0, ERR_FAILED = -1, ERR_TIME_OUT = -2, ERR_BUSY = -3, ERR_ISP_BASE = 0x00000000, ERR_ISP_INVALID_COMMAND = ERR_ISP_BASE + 1, ERR_ISP_SRC_ADDR_ERROR, ERR_ISP_DST_ADDR_ERROR, ERR_ISP_SRC_ADDR_NOT_MAPPED, ERR_ISP_DST_ADDR_NOT_MAPPED, ERR_ISP_COUNT_ERROR, ERR_ISP_INVALID_SECTOR, ERR_ISP_SECTOR_NOT_BLANK, ERR_ISP_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION, ERR_ISP_COMPARE_ERROR, ERR_ISP_BUSY, ERR_ISP_PARAM_ERROR, ERR_ISP_ADDR_ERROR, ERR_ISP_ADDR_NOT_MAPPED, ERR_ISP_CMD_LOCKED, ERR_ISP_INVALID_CODE, ERR_ISP_INVALID_BAUD_RATE, ERR_ISP_INVALID_STOP_BIT, ERR_ISP_CODE_READ_PROTECTION_ENABLED, ERR_ISP_INVALID_FLASH_UNIT, ERR_ISP_USER_CODE_CHECKSUM, ERR_ISP_SETTING_ACTIVE_PARTITION, ERR_ISP_IRC_NO_POWER, ERR_ISP_FLASH_NO_POWER, ERR_ISP_EEPROM_NO_POWER, ERR_ISP_EEPROM_NO_CLOCK, ERR_ISP_FLASH_NO_CLOCK, ERR_ISP_REINVOKE_ISP_CONFIG, ERR_API_BASE = 0x00010000, ERR_API_INVALID_PARAMS = ERR_API_BASE + 1, ERR_API_INVALID_PARAM1, ERR_API_INVALID_PARAM2, ERR_API_INVALID_PARAM3, ERR_API_MOD_INIT, ERR_SPIFI_BASE = 0x00020000, ERR_SPIFI_DEVICE_ERROR =ERR_SPIFI_BASE+1, ERR_SPIFI_INTERNAL_ERROR, ERR_SPIFI_TIMEOUT, ERR_SPIFI_OPERAND_ERROR, ERR_SPIFI_STATUS_PROBLEM, ERR_SPIFI_UNKNOWN_EXT, ERR_SPIFI_UNKNOWN_ID, ERR_SPIFI_UNKNOWN_TYPE, ERR_SPIFI_UNKNOWN_MFG, ERR_SPIFI_NO_DEVICE, ERR_SPIFI_ERASE_NEEDED, SEC_AES_NO_ERROR =0, ERR_SEC_AES_BASE = 0x00030000, ERR_SEC_AES_WRONG_CMD =ERR_SEC_AES_BASE+1, ERR_SEC_AES_NOT_SUPPORTED, ERR_SEC_AES_KEY_ALREADY_PROGRAMMED, ERR_SEC_AES_DMA_CHANNEL_CFG, ERR_SEC_AES_DMA_MUX_CFG, SEC_AES_DMA_BUSY, ERR_USBD_BASE = 0x00040000, ERR_USBD_INVALID_REQ = ERR_USBD_BASE + 1, ERR_USBD_UNHANDLED, ERR_USBD_STALL, ERR_USBD_SEND_ZLP, ERR_USBD_SEND_DATA, ERR_USBD_BAD_DESC, ERR_USBD_BAD_CFG_DESC, ERR_USBD_BAD_INTF_DESC, ERR_USBD_BAD_EP_DESC, ERR_USBD_BAD_MEM_BUF, ERR_USBD_TOO_MANY_CLASS_HDLR, ERR_CGU_BASE = 0x00050000, ERR_CGU_NOT_IMPL =ERR_CGU_BASE+1, ERR_CGU_INVALID_PARAM, ERR_CGU_INVALID_SLICE, ERR_CGU_OUTPUT_GEN, ERR_CGU_DIV_SRC, ERR_CGU_DIV_VAL, ERR_CGU_SRC, ERR_I2C_BASE = 0x00060000, ERR_I2C_BUSY = ERR_I2C_BASE, ERR_I2C_NAK, ERR_I2C_BUFFER_OVERFLOW, ERR_I2C_BYTE_COUNT_ERR, ERR_I2C_LOSS_OF_ARBRITRATION, ERR_I2C_SLAVE_NOT_ADDRESSED, ERR_I2C_LOSS_OF_ARBRITRATION_NAK_BIT, ERR_I2C_GENERAL_FAILURE, ERR_I2C_REGS_SET_TO_DEFAULT, ERR_I2C_TIMEOUT, ERR_I2C_BUFFER_UNDERFLOW, ERR_I2C_PARAM, ERR_OTP_BASE = 0x00070000, ERR_OTP_WR_ENABLE_INVALID = ERR_OTP_BASE+1, ERR_OTP_SOME_BITS_ALREADY_PROGRAMMED, ERR_OTP_ALL_DATA_OR_MASK_ZERO, ERR_OTP_WRITE_ACCESS_LOCKED, ERR_OTP_READ_DATA_MISMATCH, ERR_OTP_USB_ID_ENABLED, ERR_OTP_ETH_MAC_ENABLED, ERR_OTP_AES_KEYS_ENABLED, ERR_OTP_ILLEGAL_BANK, ERR_UART_BASE = 0x00080000, ERR_UART_RXD_BUSY = ERR_UART_BASE+1, ERR_UART_TXD_BUSY, ERR_UART_OVERRUN_FRAME_PARITY_NOISE, ERR_UART_UNDERRUN, ERR_UART_PARAM, ERR_UART_BAUDRATE, ERR_CAN_BASE = 0x00090000, ERR_CAN_BAD_MEM_BUF = ERR_CAN_BASE+1, ERR_CAN_INIT_FAIL, ERR_CANOPEN_INIT_FAIL, ERR_SPIFI_LITE_BASE = 0x000A0000, ERR_SPIFI_LITE_INVALID_ARGUMENTS = ERR_SPIFI_LITE_BASE+1, ERR_SPIFI_LITE_BUSY, ERR_SPIFI_LITE_MEMORY_MODE_ON, ERR_SPIFI_LITE_MEMORY_MODE_OFF, ERR_SPIFI_LITE_IN_DMA, ERR_SPIFI_LITE_NOT_IN_DMA, PENDING_SPIFI_LITE, ERR_CLK_BASE = 0x000B0000, ERR_CLK_NOT_IMPL =ERR_CLK_BASE+1, ERR_CLK_INVALID_PARAM, ERR_CLK_INVALID_SLICE, ERR_CLK_OUTPUT_GEN, ERR_CLK_DIV_SRC, ERR_CLK_DIV_VAL, ERR_CLK_SRC, ERR_CLK_PLL_FIN_TOO_SMALL, ERR_CLK_PLL_FIN_TOO_LARGE, ERR_CLK_PLL_FOUT_TOO_SMALL, ERR_CLK_PLL_FOUT_TOO_LARGE, ERR_CLK_PLL_NO_SOLUTION, ERR_CLK_PLL_MIN_PCT, ERR_CLK_PLL_MAX_PCT, ERR_CLK_OSC_FREQ, ERR_CLK_CFG, ERR_CLK_TIMEOUT, ERR_CLK_BASE_OFF, ERR_CLK_OFF_DEADLOCK, ERR_PWR_BASE = 0x000C0000, PWR_ERROR_ILLEGAL_MODE =ERR_PWR_BASE+1, PWR_ERROR_CLOCK_FREQ_TOO_HIGH, PWR_ERROR_INVALID_STATE, PWR_ERROR_INVALID_CFG, PWR_ERROR_PVT_DETECT, ERR_DMA_BASE = 0x000D0000, ERR_DMA_ERROR_INT =ERR_DMA_BASE+1, ERR_DMA_CHANNEL_NUMBER, ERR_DMA_CHANNEL_DISABLED, ERR_DMA_BUSY, ERR_DMA_NOT_ALIGNMENT, ERR_DMA_PING_PONG_EN, ERR_DMA_CHANNEL_VALID_PENDING, ERR_DMA_PARAM, ERR_DMA_QUEUE_EMPTY, ERR_DMA_GENERAL, ERR_SPI_BASE = 0x000E0000, ERR_SPI_BUSY =ERR_SPI_BASE, ERR_SPI_RXOVERRUN, ERR_SPI_TXUNDERRUN, ERR_SPI_SELNASSERT, ERR_SPI_SELNDEASSERT, ERR_SPI_CLKSTALL, ERR_SPI_PARAM, ERR_SPI_INVALID_LENGTH, ERR_ADC_BASE = 0x000F0000, ERR_ADC_OVERRUN =ERR_ADC_BASE+1, ERR_ADC_INVALID_CHANNEL, ERR_ADC_INVALID_SEQUENCE, ERR_ADC_INVALID_SETUP, ERR_ADC_PARAM, ERR_ADC_INVALID_LENGTH, ERR_ADC_NO_POWER, ERR_DM_BASE = 0x00100000, ERR_DM_NOT_ENTERED =ERR_DM_BASE+1, ERR_DM_UNKNOWN_CMD, ERR_DM_COMM_FAIL }

## Macro Definition Documentation

#define COMPILE_TIME_ASSERT | ( |  | pred | ) |

Value:
switch (0) { \
case 0: \
case pred:; }

Definition at line 268 of file error.h.

#define offsetof | ( |  | s,
|  |  | m
| ) |  | (int) &(((s *) 0)->m)

Definition at line 265 of file error.h.

## Enumeration Type Documentation

enum ErrorCode_t

Error code returned by Boot ROM drivers/library functions

Error codes are a 32-bit value with :

- The 16 MSB contains the peripheral code number
- The 16 LSB contains an error code number associated to that peripheral

Enumerator
LPC_OK | 0x00000000 enum value returned on Success
ERR_FAILED | 0xFFFFFFFF enum value returned on general failure
ERR_TIME_OUT | 0xFFFFFFFE enum value returned on general timeout
ERR_BUSY | 0xFFFFFFFD enum value returned when resource is busy
ERR_ISP_BASE |
ERR_ISP_INVALID_COMMAND |
ERR_ISP_SRC_ADDR_ERROR |
ERR_ISP_DST_ADDR_ERROR |
ERR_ISP_SRC_ADDR_NOT_MAPPED |
ERR_ISP_DST_ADDR_NOT_MAPPED |
ERR_ISP_COUNT_ERROR |
ERR_ISP_INVALID_SECTOR |
ERR_ISP_SECTOR_NOT_BLANK |
ERR_ISP_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION |
ERR_ISP_COMPARE_ERROR |
ERR_ISP_BUSY |
ERR_ISP_PARAM_ERROR |
ERR_ISP_ADDR_ERROR |
ERR_ISP_ADDR_NOT_MAPPED |
ERR_ISP_CMD_LOCKED |
ERR_ISP_INVALID_CODE |
ERR_ISP_INVALID_BAUD_RATE |
ERR_ISP_INVALID_STOP_BIT |
ERR_ISP_CODE_READ_PROTECTION_ENABLED |
ERR_ISP_INVALID_FLASH_UNIT |
ERR_ISP_USER_CODE_CHECKSUM |
ERR_ISP_SETTING_ACTIVE_PARTITION |
ERR_ISP_IRC_NO_POWER |
ERR_ISP_FLASH_NO_POWER |
ERR_ISP_EEPROM_NO_POWER |
ERR_ISP_EEPROM_NO_CLOCK |
ERR_ISP_FLASH_NO_CLOCK |
ERR_ISP_REINVOKE_ISP_CONFIG |
ERR_API_BASE |
ERR_API_INVALID_PARAMS | 0x00010001 Invalid parameters
ERR_API_INVALID_PARAM1 | 0x00010002 PARAM1 is invalid
ERR_API_INVALID_PARAM2 | 0x00010003 PARAM2 is invalid
ERR_API_INVALID_PARAM3 | 0x00010004 PARAM3 is invalid
ERR_API_MOD_INIT | 0x00010005 API is called before module init
ERR_SPIFI_BASE |
ERR_SPIFI_DEVICE_ERROR |
ERR_SPIFI_INTERNAL_ERROR |
ERR_SPIFI_TIMEOUT |
ERR_SPIFI_OPERAND_ERROR |
ERR_SPIFI_STATUS_PROBLEM |
ERR_SPIFI_UNKNOWN_EXT |
ERR_SPIFI_UNKNOWN_ID |
ERR_SPIFI_UNKNOWN_TYPE |
ERR_SPIFI_UNKNOWN_MFG |
ERR_SPIFI_NO_DEVICE |
ERR_SPIFI_ERASE_NEEDED |
SEC_AES_NO_ERROR |
ERR_SEC_AES_BASE |
ERR_SEC_AES_WRONG_CMD |
ERR_SEC_AES_NOT_SUPPORTED |
ERR_SEC_AES_KEY_ALREADY_PROGRAMMED |
ERR_SEC_AES_DMA_CHANNEL_CFG |
ERR_SEC_AES_DMA_MUX_CFG |
SEC_AES_DMA_BUSY |
ERR_USBD_BASE |
ERR_USBD_INVALID_REQ | 0x00040001 invalid request
ERR_USBD_UNHANDLED | 0x00040002 Callback did not process the event
ERR_USBD_STALL | 0x00040003 Stall the endpoint on which the call back is called
ERR_USBD_SEND_ZLP | 0x00040004 Send ZLP packet on the endpoint on which the call back is called
ERR_USBD_SEND_DATA | 0x00040005 Send data packet on the endpoint on which the call back is called
ERR_USBD_BAD_DESC | 0x00040006 Bad descriptor
ERR_USBD_BAD_CFG_DESC | 0x00040007 Bad config descriptor
ERR_USBD_BAD_INTF_DESC | 0x00040008 Bad interface descriptor
ERR_USBD_BAD_EP_DESC | 0x00040009 Bad endpoint descriptor
ERR_USBD_BAD_MEM_BUF | 0x0004000a Bad alignment of buffer passed.
ERR_USBD_TOO_MANY_CLASS_HDLR | 0x0004000b Too many class handlers.
ERR_CGU_BASE |
ERR_CGU_NOT_IMPL |
ERR_CGU_INVALID_PARAM |
ERR_CGU_INVALID_SLICE |
ERR_CGU_OUTPUT_GEN |
ERR_CGU_DIV_SRC |
ERR_CGU_DIV_VAL |
ERR_CGU_SRC |
ERR_I2C_BASE |
ERR_I2C_BUSY |
ERR_I2C_NAK |
ERR_I2C_BUFFER_OVERFLOW |
ERR_I2C_BYTE_COUNT_ERR |
ERR_I2C_LOSS_OF_ARBRITRATION |
ERR_I2C_SLAVE_NOT_ADDRESSED |
ERR_I2C_LOSS_OF_ARBRITRATION_NAK_BIT |
ERR_I2C_GENERAL_FAILURE |
ERR_I2C_REGS_SET_TO_DEFAULT |
ERR_I2C_TIMEOUT |
ERR_I2C_BUFFER_UNDERFLOW |
ERR_I2C_PARAM |
ERR_OTP_BASE |
ERR_OTP_WR_ENABLE_INVALID |
ERR_OTP_SOME_BITS_ALREADY_PROGRAMMED |
ERR_OTP_ALL_DATA_OR_MASK_ZERO |
ERR_OTP_WRITE_ACCESS_LOCKED |
ERR_OTP_READ_DATA_MISMATCH |
ERR_OTP_USB_ID_ENABLED |
ERR_OTP_ETH_MAC_ENABLED |
ERR_OTP_AES_KEYS_ENABLED |
ERR_OTP_ILLEGAL_BANK |
ERR_UART_BASE |
ERR_UART_RXD_BUSY |
ERR_UART_TXD_BUSY |
ERR_UART_OVERRUN_FRAME_PARITY_NOISE |
ERR_UART_UNDERRUN |
ERR_UART_PARAM |
ERR_UART_BAUDRATE |
ERR_CAN_BASE |
ERR_CAN_BAD_MEM_BUF |
ERR_CAN_INIT_FAIL |
ERR_CANOPEN_INIT_FAIL |
ERR_SPIFI_LITE_BASE |
ERR_SPIFI_LITE_INVALID_ARGUMENTS |
ERR_SPIFI_LITE_BUSY |
ERR_SPIFI_LITE_MEMORY_MODE_ON |
ERR_SPIFI_LITE_MEMORY_MODE_OFF |
ERR_SPIFI_LITE_IN_DMA |
ERR_SPIFI_LITE_NOT_IN_DMA |
PENDING_SPIFI_LITE |
ERR_CLK_BASE |
ERR_CLK_NOT_IMPL |
ERR_CLK_INVALID_PARAM |
ERR_CLK_INVALID_SLICE |
ERR_CLK_OUTPUT_GEN |
ERR_CLK_DIV_SRC |
ERR_CLK_DIV_VAL |
ERR_CLK_SRC |
ERR_CLK_PLL_FIN_TOO_SMALL |
ERR_CLK_PLL_FIN_TOO_LARGE |
ERR_CLK_PLL_FOUT_TOO_SMALL |
ERR_CLK_PLL_FOUT_TOO_LARGE |
ERR_CLK_PLL_NO_SOLUTION |
ERR_CLK_PLL_MIN_PCT |
ERR_CLK_PLL_MAX_PCT |
ERR_CLK_OSC_FREQ |
ERR_CLK_CFG |
ERR_CLK_TIMEOUT |
ERR_CLK_BASE_OFF |
ERR_CLK_OFF_DEADLOCK |
ERR_PWR_BASE |
PWR_ERROR_ILLEGAL_MODE |
PWR_ERROR_CLOCK_FREQ_TOO_HIGH |
PWR_ERROR_INVALID_STATE |
PWR_ERROR_INVALID_CFG |
PWR_ERROR_PVT_DETECT |
ERR_DMA_BASE |
ERR_DMA_ERROR_INT |
ERR_DMA_CHANNEL_NUMBER |
ERR_DMA_CHANNEL_DISABLED |
ERR_DMA_BUSY |
ERR_DMA_NOT_ALIGNMENT |
ERR_DMA_PING_PONG_EN |
ERR_DMA_CHANNEL_VALID_PENDING |
ERR_DMA_PARAM |
ERR_DMA_QUEUE_EMPTY |
ERR_DMA_GENERAL |
ERR_SPI_BASE |
ERR_SPI_BUSY |
ERR_SPI_RXOVERRUN |
ERR_SPI_TXUNDERRUN |
ERR_SPI_SELNASSERT |
ERR_SPI_SELNDEASSERT |
ERR_SPI_CLKSTALL |
ERR_SPI_PARAM |
ERR_SPI_INVALID_LENGTH |
ERR_ADC_BASE |
ERR_ADC_OVERRUN |
ERR_ADC_INVALID_CHANNEL |
ERR_ADC_INVALID_SEQUENCE |
ERR_ADC_INVALID_SETUP |
ERR_ADC_PARAM |
ERR_ADC_INVALID_LENGTH |
ERR_ADC_NO_POWER |
ERR_DM_BASE |
ERR_DM_NOT_ENTERED |
ERR_DM_UNKNOWN_CMD |
ERR_DM_COMM_FAIL |

Definition at line 46 of file error.h.