error_8xx.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * @brief Error code returned by LPC8xx Boot ROM drivers/library functions
  3. *
  4. * @note
  5. * Copyright(C) NXP Semiconductors, 2012
  6. * All rights reserved.
  7. *
  8. * @par
  9. * Software that is described herein is for illustrative purposes only
  10. * which provides customers with programming information regarding the
  11. * LPC products. This software is supplied "AS IS" without any warranties of
  12. * any kind, and NXP Semiconductors and its licensor disclaim any and
  13. * all warranties, express or implied, including all implied warranties of
  14. * merchantability, fitness for a particular purpose and non-infringement of
  15. * intellectual property rights. NXP Semiconductors assumes no responsibility
  16. * or liability for the use of the software, conveys no license or rights under any
  17. * patent, copyright, mask work right, or any other intellectual property rights in
  18. * or to any products. NXP Semiconductors reserves the right to make changes
  19. * in the software without notification. NXP Semiconductors also makes no
  20. * representation or warranty that such application will be suitable for the
  21. * specified use without further testing or modification.
  22. *
  23. * @par
  24. * Permission to use, copy, modify, and distribute this software and its
  25. * documentation is hereby granted, under NXP Semiconductors' and its
  26. * licensor's relevant copyrights in the software, without fee, provided that it
  27. * is used in conjunction with NXP Semiconductors microcontrollers. This
  28. * copyright, permission, and disclaimer notice must appear in all copies of
  29. * this code.
  30. */
  31. #ifndef __ERROR_8XX_H__
  32. #define __ERROR_8XX_H__
  33. /** @defgroup ROMAPI_ERRORCODES_8XX CHIP: LPC8xx ROM API error codes
  34. * @ingroup ROMAPI_8XX
  35. * @{
  36. */
  37. /** Error code returned by Boot ROM drivers/library functions
  38. *
  39. * Error codes are a 32-bit value with :
  40. * - The 16 MSB contains the peripheral code number
  41. * - The 16 LSB contains an error code number associated to that peripheral
  42. *
  43. */
  44. typedef enum
  45. {
  46. /**\b 0x00000000*/ LPC_OK = 0, /**< enum value returned on Successful completion */
  47. /**\b 0x00000001*/ LPC_ERROR, /**< enum value returned on general error (I2C) */
  48. /* ISP related errors */
  49. ERR_ISP_BASE = 0x00000000,
  50. /**\b 0x00000001*/ ERR_ISP_INVALID_COMMAND = ERR_ISP_BASE + 1,
  51. /**\b 0x00000002*/ ERR_ISP_SRC_ADDR_ERROR, /*!< Source address not on word boundary */
  52. /**\b 0x00000003*/ ERR_ISP_DST_ADDR_ERROR, /*!< Destination address not on word or 256 byte boundary */
  53. /**\b 0x00000004*/ ERR_ISP_SRC_ADDR_NOT_MAPPED,
  54. /**\b 0x00000005*/ ERR_ISP_DST_ADDR_NOT_MAPPED,
  55. /**\b 0x00000006*/ ERR_ISP_COUNT_ERROR, /*!< Byte count is not multiple of 4 or is not a permitted value */
  56. /**\b 0x00000007*/ ERR_ISP_INVALID_SECTOR,
  57. /**\b 0x00000008*/ ERR_ISP_SECTOR_NOT_BLANK,
  58. /**\b 0x00000009*/ ERR_ISP_SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION,
  59. /**\b 0x0000000A*/ ERR_ISP_COMPARE_ERROR,
  60. /**\b 0x0000000B*/ ERR_ISP_BUSY, /*!< Flash programming hardware interface is busy */
  61. /**\b 0x0000000C*/ ERR_ISP_PARAM_ERROR, /*!< Insufficient number of parameters */
  62. /**\b 0x0000000D*/ ERR_ISP_ADDR_ERROR, /*!< Address not on word boundary */
  63. /**\b 0x0000000E*/ ERR_ISP_ADDR_NOT_MAPPED,
  64. /**\b 0x0000000F*/ ERR_ISP_CMD_LOCKED, /*!< Command is locked */
  65. /**\b 0x00000010*/ ERR_ISP_INVALID_CODE, /*!< Unlock code is invalid */
  66. /**\b 0x00000011*/ ERR_ISP_INVALID_BAUD_RATE,
  67. /**\b 0x00000012*/ ERR_ISP_INVALID_STOP_BIT,
  68. /**\b 0x00000013*/ ERR_ISP_CODE_READ_PROTECTION_ENABLED,
  69. /* I2C related errors */
  70. ERR_I2C_BASE = 0x00060000,
  71. /**\b 0x00060001*/ ERR_I2C_NAK = ERR_I2C_BASE + 1, /*!< NAK */
  72. /**\b 0x00060002*/ ERR_I2C_BUFFER_OVERFLOW, /*!< Buffer overflow */
  73. /**\b 0x00060003*/ ERR_I2C_BYTE_COUNT_ERR, /*!< Byte count error */
  74. /**\b 0x00060004*/ ERR_I2C_LOSS_OF_ARBRITRATION, /*!< Loss of arbitration */
  75. /**\b 0x00060005*/ ERR_I2C_SLAVE_NOT_ADDRESSED, /*!< Slave not addressed */
  76. /**\b 0x00060006*/ ERR_I2C_LOSS_OF_ARBRITRATION_NAK_BIT, /*!< Loss arbritation NAK */
  77. /**\b 0x00060007*/ ERR_I2C_GENERAL_FAILURE, /*!< General failure */
  78. /**\b 0x00060008*/ ERR_I2C_REGS_SET_TO_DEFAULT, /*!< Set to default */
  79. /**\b 0x00060009*/ ERR_I2C_TIMEOUT, /*!< I2C Timeout */
  80. /* UART related errors */
  81. /**\b 0x00080001*/ ERR_NO_ERROR = LPC_OK, /*!< Receive is busy */
  82. ERR_UART_BASE = 0x00080000,
  83. /**\b 0x00080001*/ ERR_UART_RXD_BUSY = ERR_UART_BASE + 1, /*!< Receive is busy */
  84. /**\b 0x00080002*/ ERR_UART_TXD_BUSY, /*!< Transmit is busy */
  85. /**\b 0x00080003*/ ERR_UART_OVERRUN_FRAME_PARITY_NOISE, /*!< Overrun, Frame, Parity , Receive Noise error */
  86. /**\b 0x00080004*/ ERR_UART_UNDERRUN, /*!< Underrun */
  87. /**\b 0x00080005*/ ERR_UART_PARAM, /*!< Parameter error */
  88. } ErrorCode_t;
  89. /**
  90. * @}
  91. */
  92. #endif /* __ERROR_8XX_H__ */