fsp_common_api.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. /*
  2. * Copyright (c) 2020 - 2025 Renesas Electronics Corporation and/or its affiliates
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef FSP_COMMON_API_H
  7. #define FSP_COMMON_API_H
  8. /***********************************************************************************************************************
  9. * Includes
  10. **********************************************************************************************************************/
  11. #include <assert.h>
  12. #include <stdint.h>
  13. /* Includes FSP version macros. */
  14. #include "fsp_version.h"
  15. /*******************************************************************************************************************//**
  16. * @ingroup RENESAS_COMMON
  17. * @defgroup RENESAS_ERROR_CODES Common Error Codes
  18. * All FSP modules share these common error codes.
  19. * @{
  20. **********************************************************************************************************************/
  21. /**********************************************************************************************************************
  22. * Macro definitions
  23. **********************************************************************************************************************/
  24. /** This macro is used to suppress compiler messages about a parameter not being used in a function. The nice thing
  25. * about using this implementation is that it does not take any extra RAM or ROM. */
  26. #define FSP_PARAMETER_NOT_USED(p) (void) ((p))
  27. /** Determine if a C++ compiler is being used.
  28. * If so, ensure that standard C is used to process the API information. */
  29. #if defined(__cplusplus)
  30. #define FSP_CPP_HEADER extern "C" {
  31. #define FSP_CPP_FOOTER }
  32. #else
  33. #define FSP_CPP_HEADER
  34. #define FSP_CPP_FOOTER
  35. #endif
  36. /** FSP Header and Footer definitions */
  37. #define FSP_HEADER FSP_CPP_HEADER
  38. #define FSP_FOOTER FSP_CPP_FOOTER
  39. /* Common macro for FSP header files. There is also a corresponding FSP_FOOTER macro at the end of this file. */
  40. FSP_HEADER
  41. /** Macro to be used when argument to function is ignored since function call is NSC and the parameter is statically
  42. * defined on the Secure side. */
  43. #define FSP_SECURE_ARGUMENT (NULL)
  44. /**********************************************************************************************************************
  45. * Typedef definitions
  46. **********************************************************************************************************************/
  47. /** Common error codes */
  48. typedef enum e_fsp_err
  49. {
  50. FSP_SUCCESS = 0,
  51. FSP_ERR_ASSERTION = 1, ///< A critical assertion has failed
  52. FSP_ERR_INVALID_POINTER = 2, ///< Pointer points to invalid memory location
  53. FSP_ERR_INVALID_ARGUMENT = 3, ///< Invalid input parameter
  54. FSP_ERR_INVALID_CHANNEL = 4, ///< Selected channel does not exist
  55. FSP_ERR_INVALID_MODE = 5, ///< Unsupported or incorrect mode
  56. FSP_ERR_UNSUPPORTED = 6, ///< Selected mode not supported by this API
  57. FSP_ERR_NOT_OPEN = 7, ///< Requested channel is not configured or API not open
  58. FSP_ERR_IN_USE = 8, ///< Channel/peripheral is running/busy
  59. FSP_ERR_OUT_OF_MEMORY = 9, ///< Allocate more memory in the driver's cfg.h
  60. FSP_ERR_HW_LOCKED = 10, ///< Hardware is locked
  61. FSP_ERR_IRQ_BSP_DISABLED = 11, ///< IRQ not enabled in BSP
  62. FSP_ERR_OVERFLOW = 12, ///< Hardware overflow
  63. FSP_ERR_UNDERFLOW = 13, ///< Hardware underflow
  64. FSP_ERR_ALREADY_OPEN = 14, ///< Requested channel is already open in a different configuration
  65. FSP_ERR_APPROXIMATION = 15, ///< Could not set value to exact result
  66. FSP_ERR_CLAMPED = 16, ///< Value had to be limited for some reason
  67. FSP_ERR_INVALID_RATE = 17, ///< Selected rate could not be met
  68. FSP_ERR_ABORTED = 18, ///< An operation was aborted
  69. FSP_ERR_NOT_ENABLED = 19, ///< Requested operation is not enabled
  70. FSP_ERR_TIMEOUT = 20, ///< Timeout error
  71. FSP_ERR_INVALID_BLOCKS = 21, ///< Invalid number of blocks supplied
  72. FSP_ERR_INVALID_ADDRESS = 22, ///< Invalid address supplied
  73. FSP_ERR_INVALID_SIZE = 23, ///< Invalid size/length supplied for operation
  74. FSP_ERR_WRITE_FAILED = 24, ///< Write operation failed
  75. FSP_ERR_ERASE_FAILED = 25, ///< Erase operation failed
  76. FSP_ERR_INVALID_CALL = 26, ///< Invalid function call is made
  77. FSP_ERR_INVALID_HW_CONDITION = 27, ///< Detected hardware is in invalid condition
  78. FSP_ERR_INVALID_FACTORY_FLASH = 28, ///< Factory flash is not available on this MCU
  79. FSP_ERR_INVALID_STATE = 30, ///< API or command not valid in the current state
  80. FSP_ERR_NOT_ERASED = 31, ///< Erase verification failed
  81. FSP_ERR_SECTOR_RELEASE_FAILED = 32, ///< Sector release failed
  82. FSP_ERR_NOT_INITIALIZED = 33, ///< Required initialization not complete
  83. FSP_ERR_NOT_FOUND = 34, ///< The requested item could not be found
  84. FSP_ERR_NO_CALLBACK_MEMORY = 35, ///< Non-secure callback memory not provided for non-secure callback
  85. FSP_ERR_BUFFER_EMPTY = 36, ///< No data available in buffer
  86. FSP_ERR_INVALID_DATA = 37, ///< Accuracy of data is not guaranteed
  87. /* Start of RTOS only error codes */
  88. FSP_ERR_INTERNAL = 100, ///< Internal error
  89. FSP_ERR_WAIT_ABORTED = 101, ///< Wait aborted
  90. /* Start of UART specific */
  91. FSP_ERR_FRAMING = 200, ///< Framing error occurs
  92. FSP_ERR_BREAK_DETECT = 201, ///< Break signal detects
  93. FSP_ERR_PARITY = 202, ///< Parity error occurs
  94. FSP_ERR_RXBUF_OVERFLOW = 203, ///< Receive queue overflow
  95. FSP_ERR_QUEUE_UNAVAILABLE = 204, ///< Can't open s/w queue
  96. FSP_ERR_INSUFFICIENT_SPACE = 205, ///< Not enough space in transmission circular buffer
  97. FSP_ERR_INSUFFICIENT_DATA = 206, ///< Not enough data in receive circular buffer
  98. /* Start of SPI specific */
  99. FSP_ERR_TRANSFER_ABORTED = 300, ///< The data transfer was aborted.
  100. FSP_ERR_MODE_FAULT = 301, ///< Mode fault error.
  101. FSP_ERR_READ_OVERFLOW = 302, ///< Read overflow.
  102. FSP_ERR_SPI_PARITY = 303, ///< Parity error.
  103. FSP_ERR_OVERRUN = 304, ///< Overrun error.
  104. /* Start of CGC Specific */
  105. FSP_ERR_CLOCK_INACTIVE = 400, ///< Inactive clock specified as system clock.
  106. FSP_ERR_CLOCK_ACTIVE = 401, ///< Active clock source cannot be modified without stopping first.
  107. FSP_ERR_NOT_STABILIZED = 403, ///< Clock has not stabilized after its been turned on/off
  108. FSP_ERR_PLL_SRC_INACTIVE = 404, ///< PLL initialization attempted when PLL source is turned off
  109. FSP_ERR_OSC_STOP_DET_ENABLED = 405, ///< Illegal attempt to stop LOCO when Oscillation stop is enabled
  110. FSP_ERR_OSC_STOP_DETECTED = 406, ///< The Oscillation stop detection status flag is set
  111. FSP_ERR_OSC_STOP_CLOCK_ACTIVE = 407, ///< Attempt to clear Oscillation Stop Detect Status with PLL/MAIN_OSC active
  112. FSP_ERR_CLKOUT_EXCEEDED = 408, ///< Output on target output clock pin exceeds maximum supported limit
  113. FSP_ERR_USB_MODULE_ENABLED = 409, ///< USB clock configure request with USB Module enabled
  114. FSP_ERR_HARDWARE_TIMEOUT = 410, ///< A register read or write timed out
  115. FSP_ERR_LOW_VOLTAGE_MODE = 411, ///< Invalid clock setting attempted in low voltage mode
  116. /* Start of FLASH Specific */
  117. FSP_ERR_PE_FAILURE = 500, ///< Unable to enter Programming mode.
  118. FSP_ERR_CMD_LOCKED = 501, ///< Peripheral in command locked state
  119. FSP_ERR_FCLK = 502, ///< FCLK must be >= 4 MHz
  120. FSP_ERR_INVALID_LINKED_ADDRESS = 503, ///< Function or data are linked at an invalid region of memory
  121. FSP_ERR_BLANK_CHECK_FAILED = 504, ///< Blank check operation failed
  122. FSP_ERR_HUK_ZEROIZATION = 505, ///< W-HUK zeroization is in progress
  123. /* Start of CAC Specific */
  124. FSP_ERR_INVALID_CAC_REF_CLOCK = 600, ///< Measured clock rate < reference clock rate
  125. /* Start of IIRFA Specific */
  126. FSP_ERR_INVALID_RESULT = 700, ///< The result of one or more calculations was +/- infinity.
  127. /* Start of GLCD Specific */
  128. FSP_ERR_CLOCK_GENERATION = 1000, ///< Clock cannot be specified as system clock
  129. FSP_ERR_INVALID_TIMING_SETTING = 1001, ///< Invalid timing parameter
  130. FSP_ERR_INVALID_LAYER_SETTING = 1002, ///< Invalid layer parameter
  131. FSP_ERR_INVALID_ALIGNMENT = 1003, ///< Invalid memory alignment found
  132. FSP_ERR_INVALID_GAMMA_SETTING = 1004, ///< Invalid gamma correction parameter
  133. FSP_ERR_INVALID_LAYER_FORMAT = 1005, ///< Invalid color format in layer
  134. FSP_ERR_INVALID_UPDATE_TIMING = 1006, ///< Invalid timing for register update
  135. FSP_ERR_INVALID_CLUT_ACCESS = 1007, ///< Invalid access to CLUT entry
  136. FSP_ERR_INVALID_FADE_SETTING = 1008, ///< Invalid fade-in/fade-out setting
  137. FSP_ERR_INVALID_BRIGHTNESS_SETTING = 1009, ///< Invalid gamma correction parameter
  138. /* Start of JPEG Specific */
  139. FSP_ERR_JPEG_ERR = 1100, ///< JPEG error
  140. FSP_ERR_JPEG_SOI_NOT_DETECTED = 1101, ///< SOI not detected until EOI detected.
  141. FSP_ERR_JPEG_SOF1_TO_SOFF_DETECTED = 1102, ///< SOF1 to SOFF detected.
  142. FSP_ERR_JPEG_UNSUPPORTED_PIXEL_FORMAT = 1103, ///< Unprovided pixel format detected.
  143. FSP_ERR_JPEG_SOF_ACCURACY_ERROR = 1104, ///< SOF accuracy error: other than 8 detected.
  144. FSP_ERR_JPEG_DQT_ACCURACY_ERROR = 1105, ///< DQT accuracy error: other than 0 detected.
  145. FSP_ERR_JPEG_COMPONENT_ERROR1 = 1106, ///< Component error 1: the number of SOF0 header components detected is other than 1, 3, or 4.
  146. FSP_ERR_JPEG_COMPONENT_ERROR2 = 1107, ///< Component error 2: the number of components differs between SOF0 header and SOS.
  147. FSP_ERR_JPEG_SOF0_DQT_DHT_NOT_DETECTED = 1108, ///< SOF0, DQT, and DHT not detected when SOS detected.
  148. FSP_ERR_JPEG_SOS_NOT_DETECTED = 1109, ///< SOS not detected: SOS not detected until EOI detected.
  149. FSP_ERR_JPEG_EOI_NOT_DETECTED = 1110, ///< EOI not detected (default)
  150. FSP_ERR_JPEG_RESTART_INTERVAL_DATA_NUMBER_ERROR = 1111, ///< Restart interval data number error detected.
  151. FSP_ERR_JPEG_IMAGE_SIZE_ERROR = 1112, ///< Image size error detected.
  152. FSP_ERR_JPEG_LAST_MCU_DATA_NUMBER_ERROR = 1113, ///< Last MCU data number error detected.
  153. FSP_ERR_JPEG_BLOCK_DATA_NUMBER_ERROR = 1114, ///< Block data number error detected.
  154. FSP_ERR_JPEG_BUFFERSIZE_NOT_ENOUGH = 1115, ///< User provided buffer size not enough
  155. FSP_ERR_JPEG_UNSUPPORTED_IMAGE_SIZE = 1116, ///< JPEG Image size is not aligned with MCU
  156. /* Start of touch panel framework specific */
  157. FSP_ERR_CALIBRATE_FAILED = 1200, ///< Calibration failed
  158. /* Start of IIRFA specific */
  159. FSP_ERR_IIRFA_ECC_1BIT = 1300, ///< 1-bit ECC error detected
  160. FSP_ERR_IIRFA_ECC_2BIT = 1301, ///< 2-bit ECC error detected
  161. /* Start of IP specific */
  162. FSP_ERR_IP_HARDWARE_NOT_PRESENT = 1400, ///< Requested IP does not exist on this device
  163. FSP_ERR_IP_UNIT_NOT_PRESENT = 1401, ///< Requested unit does not exist on this device
  164. FSP_ERR_IP_CHANNEL_NOT_PRESENT = 1402, ///< Requested channel does not exist on this device
  165. /* Start of USB specific */
  166. FSP_ERR_USB_FAILED = 1500,
  167. FSP_ERR_USB_BUSY = 1501,
  168. FSP_ERR_USB_SIZE_SHORT = 1502,
  169. FSP_ERR_USB_SIZE_OVER = 1503,
  170. FSP_ERR_USB_NOT_OPEN = 1504,
  171. FSP_ERR_USB_NOT_SUSPEND = 1505,
  172. FSP_ERR_USB_PARAMETER = 1506,
  173. /* Start of Message framework specific */
  174. FSP_ERR_NO_MORE_BUFFER = 2000, ///< No more buffer found in the memory block pool
  175. FSP_ERR_ILLEGAL_BUFFER_ADDRESS = 2001, ///< Buffer address is out of block memory pool
  176. FSP_ERR_INVALID_WORKBUFFER_SIZE = 2002, ///< Work buffer size is invalid
  177. FSP_ERR_INVALID_MSG_BUFFER_SIZE = 2003, ///< Message buffer size is invalid
  178. FSP_ERR_TOO_MANY_BUFFERS = 2004, ///< Number of buffer is too many
  179. FSP_ERR_NO_SUBSCRIBER_FOUND = 2005, ///< No message subscriber found
  180. FSP_ERR_MESSAGE_QUEUE_EMPTY = 2006, ///< No message found in the message queue
  181. FSP_ERR_MESSAGE_QUEUE_FULL = 2007, ///< No room for new message in the message queue
  182. FSP_ERR_ILLEGAL_SUBSCRIBER_LISTS = 2008, ///< Message subscriber lists is illegal
  183. FSP_ERR_BUFFER_RELEASED = 2009, ///< Buffer has been released
  184. /* Start of 2DG Driver specific */
  185. FSP_ERR_D2D_ERROR_INIT = 3000, ///< D/AVE 2D has an error in the initialization
  186. FSP_ERR_D2D_ERROR_DEINIT = 3001, ///< D/AVE 2D has an error in the initialization
  187. FSP_ERR_D2D_ERROR_RENDERING = 3002, ///< D/AVE 2D has an error in the rendering
  188. FSP_ERR_D2D_ERROR_SIZE = 3003, ///< D/AVE 2D has an error in the rendering
  189. /* Start of ETHER Driver specific */
  190. FSP_ERR_ETHER_ERROR_NO_DATA = 4000, ///< No Data in Receive buffer.
  191. FSP_ERR_ETHER_ERROR_LINK = 4001, ///< ETHERC/EDMAC has an error in the Auto-negotiation
  192. FSP_ERR_ETHER_ERROR_MAGIC_PACKET_MODE = 4002, ///< As a Magic Packet is being detected, and transmission/reception is not enabled
  193. FSP_ERR_ETHER_ERROR_TRANSMIT_BUFFER_FULL = 4003, ///< Transmit buffer is not empty
  194. FSP_ERR_ETHER_ERROR_FILTERING = 4004, ///< Detect multicast frame when multicast frame filtering enable
  195. FSP_ERR_ETHER_ERROR_PHY_COMMUNICATION = 4005, ///< ETHERC/EDMAC has an error in the phy communication
  196. FSP_ERR_ETHER_RECEIVE_BUFFER_ACTIVE = 4006, ///< Receive buffer is active.
  197. /* Start of ETHER_PHY Driver specific */
  198. FSP_ERR_ETHER_PHY_ERROR_LINK = 5000, ///< PHY is not link up.
  199. FSP_ERR_ETHER_PHY_NOT_READY = 5001, ///< PHY has an error in the Auto-negotiation
  200. /* Start of BYTEQ library specific */
  201. FSP_ERR_QUEUE_FULL = 10000, ///< Queue is full, cannot queue another data
  202. FSP_ERR_QUEUE_EMPTY = 10001, ///< Queue is empty, no data to dequeue
  203. /* Start of CTSU Driver specific */
  204. FSP_ERR_CTSU_SCANNING = 6000, ///< Scanning.
  205. FSP_ERR_CTSU_NOT_GET_DATA = 6001, ///< Not processed previous scan data.
  206. FSP_ERR_CTSU_INCOMPLETE_TUNING = 6002, ///< Incomplete initial offset tuning.
  207. FSP_ERR_CTSU_DIAG_NOT_YET = 6003, ///< Diagnosis of data collected no yet.
  208. FSP_ERR_CTSU_DIAG_LDO_OVER_VOLTAGE = 6004, ///< Diagnosis of LDO over voltage failed.
  209. FSP_ERR_CTSU_DIAG_CCO_HIGH = 6005, ///< Diagnosis of CCO into 19.2uA failed.
  210. FSP_ERR_CTSU_DIAG_CCO_LOW = 6006, ///< Diagnosis of CCO into 2.4uA failed.
  211. FSP_ERR_CTSU_DIAG_SSCG = 6007, ///< Diagnosis of SSCG frequency failed.
  212. FSP_ERR_CTSU_DIAG_DAC = 6008, ///< Diagnosis of non-touch count value failed.
  213. FSP_ERR_CTSU_DIAG_OUTPUT_VOLTAGE = 6009, ///< Diagnosis of LDO output voltage failed.
  214. FSP_ERR_CTSU_DIAG_OVER_VOLTAGE = 6010, ///< Diagnosis of over voltage detection circuit failed.
  215. FSP_ERR_CTSU_DIAG_OVER_CURRENT = 6011, ///< Diagnosis of over current detection circuit failed.
  216. FSP_ERR_CTSU_DIAG_LOAD_RESISTANCE = 6012, ///< Diagnosis of LDO internal resistance value failed.
  217. FSP_ERR_CTSU_DIAG_CURRENT_SOURCE = 6013, ///< Diagnosis of Current source value failed.
  218. FSP_ERR_CTSU_DIAG_SENSCLK_GAIN = 6014, ///< Diagnosis of SENSCLK frequency gain failed.
  219. FSP_ERR_CTSU_DIAG_SUCLK_GAIN = 6015, ///< Diagnosis of SUCLK frequency gain failed.
  220. FSP_ERR_CTSU_DIAG_CLOCK_RECOVERY = 6016, ///< Diagnosis of SUCLK clock recovery function failed.
  221. FSP_ERR_CTSU_DIAG_CFC_GAIN = 6017, ///< Diagnosis of CFC oscillator gain failed.
  222. /* Start of SDMMC specific */
  223. FSP_ERR_CARD_INIT_FAILED = 40000, ///< SD card or eMMC device failed to initialize.
  224. FSP_ERR_CARD_NOT_INSERTED = 40001, ///< SD card not installed.
  225. FSP_ERR_DEVICE_BUSY = 40002, ///< Device is holding DAT0 low or another operation is ongoing.
  226. FSP_ERR_CARD_NOT_INITIALIZED = 40004, ///< SD card was removed.
  227. FSP_ERR_CARD_WRITE_PROTECTED = 40005, ///< Media is write protected.
  228. FSP_ERR_TRANSFER_BUSY = 40006, ///< Transfer in progress.
  229. FSP_ERR_RESPONSE = 40007, ///< Card did not respond or responded with an error.
  230. /* Start of FX_IO specific */
  231. FSP_ERR_MEDIA_FORMAT_FAILED = 50000, ///< Media format failed.
  232. FSP_ERR_MEDIA_OPEN_FAILED = 50001, ///< Media open failed.
  233. /* Start of CAN specific */
  234. FSP_ERR_CAN_DATA_UNAVAILABLE = 60000, ///< No data available.
  235. FSP_ERR_CAN_MODE_SWITCH_FAILED = 60001, ///< Switching operation modes failed.
  236. FSP_ERR_CAN_INIT_FAILED = 60002, ///< Hardware initialization failed.
  237. FSP_ERR_CAN_TRANSMIT_NOT_READY = 60003, ///< Transmit in progress.
  238. FSP_ERR_CAN_RECEIVE_MAILBOX = 60004, ///< Mailbox is setup as a receive mailbox.
  239. FSP_ERR_CAN_TRANSMIT_MAILBOX = 60005, ///< Mailbox is setup as a transmit mailbox.
  240. FSP_ERR_CAN_MESSAGE_LOST = 60006, ///< Receive message has been overwritten or overrun.
  241. FSP_ERR_CAN_TRANSMIT_FIFO_FULL = 60007, ///< Transmit FIFO is full.
  242. /* Start of SF_WIFI Specific */
  243. FSP_ERR_WIFI_CONFIG_FAILED = 70000, ///< WiFi module Configuration failed.
  244. FSP_ERR_WIFI_INIT_FAILED = 70001, ///< WiFi module initialization failed.
  245. FSP_ERR_WIFI_TRANSMIT_FAILED = 70002, ///< Transmission failed
  246. FSP_ERR_WIFI_INVALID_MODE = 70003, ///< API called when provisioned in client mode
  247. FSP_ERR_WIFI_FAILED = 70004, ///< WiFi Failed.
  248. FSP_ERR_WIFI_SCAN_COMPLETE = 70005, ///< Wifi scan has completed.
  249. FSP_ERR_WIFI_AP_NOT_CONNECTED = 70006, ///< WiFi module is not connected to access point
  250. FSP_ERR_WIFI_UNKNOWN_AT_CMD = 70007, ///< DA16XXX Unknown AT command Error
  251. FSP_ERR_WIFI_INSUF_PARAM = 70008, ///< DA16XXX Insufficient parameter
  252. FSP_ERR_WIFI_TOO_MANY_PARAMS = 70009, ///< DA16XXX Too many parameters
  253. FSP_ERR_WIFI_INV_PARAM_VAL = 70010, ///< DA16XXX Wrong parameter value
  254. FSP_ERR_WIFI_NO_RESULT = 70011, ///< DA16XXX No result
  255. FSP_ERR_WIFI_RSP_BUF_OVFLW = 70012, ///< DA16XXX Response buffer overflow
  256. FSP_ERR_WIFI_FUNC_NOT_CONFIG = 70013, ///< DA16XXX Function is not configured
  257. FSP_ERR_WIFI_NVRAM_WR_FAIL = 70014, ///< DA16XXX NVRAM write failure
  258. FSP_ERR_WIFI_RET_MEM_WR_FAIL = 70015, ///< DA16XXX Retention memory write failure
  259. FSP_ERR_WIFI_UNKNOWN_ERR = 70016, ///< DA16XXX unknown error
  260. /* Start of SF_CELLULAR Specific */
  261. FSP_ERR_CELLULAR_CONFIG_FAILED = 80000, ///< Cellular module Configuration failed.
  262. FSP_ERR_CELLULAR_INIT_FAILED = 80001, ///< Cellular module initialization failed.
  263. FSP_ERR_CELLULAR_TRANSMIT_FAILED = 80002, ///< Transmission failed
  264. FSP_ERR_CELLULAR_FW_UPTODATE = 80003, ///< Firmware is uptodate
  265. FSP_ERR_CELLULAR_FW_UPGRADE_FAILED = 80004, ///< Firmware upgrade failed
  266. FSP_ERR_CELLULAR_FAILED = 80005, ///< Cellular Failed.
  267. FSP_ERR_CELLULAR_INVALID_STATE = 80006, ///< API Called in invalid state.
  268. FSP_ERR_CELLULAR_REGISTRATION_FAILED = 80007, ///< Cellular Network registration failed
  269. /* Start of SF_BLE specific */
  270. FSP_ERR_BLE_FAILED = 90001, ///< BLE operation failed
  271. FSP_ERR_BLE_INIT_FAILED = 90002, ///< BLE device initialization failed
  272. FSP_ERR_BLE_CONFIG_FAILED = 90003, ///< BLE device configuration failed
  273. FSP_ERR_BLE_PRF_ALREADY_ENABLED = 90004, ///< BLE device Profile already enabled
  274. FSP_ERR_BLE_PRF_NOT_ENABLED = 90005, ///< BLE device not enabled
  275. /* Start of SF_BLE_ABS specific */
  276. FSP_ERR_BLE_ABS_INVALID_OPERATION = 91001, ///< Invalid operation is executed.
  277. FSP_ERR_BLE_ABS_NOT_FOUND = 91002, ///< Valid data or free space is not found.
  278. /* Start of Crypto specific (0x10000) @note Refer to sf_cryoto_err.h for Crypto error code. */
  279. FSP_ERR_CRYPTO_CONTINUE = 0x10000, ///< Continue executing function
  280. FSP_ERR_CRYPTO_SCE_RESOURCE_CONFLICT = 0x10001, ///< Hardware resource busy
  281. FSP_ERR_CRYPTO_SCE_FAIL = 0x10002, ///< Internal I/O buffer is not empty
  282. FSP_ERR_CRYPTO_SCE_HRK_INVALID_INDEX = 0x10003, ///< Invalid index
  283. FSP_ERR_CRYPTO_SCE_RETRY = 0x10004, ///< Retry
  284. FSP_ERR_CRYPTO_SCE_VERIFY_FAIL = 0x10005, ///< Verify is failed
  285. FSP_ERR_CRYPTO_SCE_ALREADY_OPEN = 0x10006, ///< HW SCE module is already opened
  286. FSP_ERR_CRYPTO_NOT_OPEN = 0x10007, ///< Hardware module is not initialized
  287. FSP_ERR_CRYPTO_UNKNOWN = 0x10008, ///< Some unknown error occurred
  288. FSP_ERR_CRYPTO_NULL_POINTER = 0x10009, ///< Null pointer input as a parameter
  289. FSP_ERR_CRYPTO_NOT_IMPLEMENTED = 0x1000a, ///< Algorithm/size not implemented
  290. FSP_ERR_CRYPTO_RNG_INVALID_PARAM = 0x1000b, ///< An invalid parameter is specified
  291. FSP_ERR_CRYPTO_RNG_FATAL_ERROR = 0x1000c, ///< A fatal error occurred
  292. FSP_ERR_CRYPTO_INVALID_SIZE = 0x1000d, ///< Size specified is invalid
  293. FSP_ERR_CRYPTO_INVALID_STATE = 0x1000e, ///< Function used in an valid state
  294. FSP_ERR_CRYPTO_ALREADY_OPEN = 0x1000f, ///< control block is already opened
  295. FSP_ERR_CRYPTO_INSTALL_KEY_FAILED = 0x10010, ///< Specified input key is invalid.
  296. FSP_ERR_CRYPTO_AUTHENTICATION_FAILED = 0x10011, ///< Authentication failed
  297. FSP_ERR_CRYPTO_SCE_KEY_SET_FAIL = 0x10012, ///< Failure to Init Cipher
  298. FSP_ERR_CRYPTO_SCE_AUTHENTICATION = 0x10013, ///< Authentication failed
  299. FSP_ERR_CRYPTO_SCE_PARAMETER = 0x10014, ///< Input date is illegal.
  300. FSP_ERR_CRYPTO_SCE_PROHIBIT_FUNCTION = 0x10015, ///< An invalid function call occurred.
  301. FSP_ERR_CRYPTO_SCE_LBIST_CHECK_BUSY = 0x100ff, ///< LBIST Check BUSY
  302. /* Start of Crypto RSIP specific (0x10100) */
  303. FSP_ERR_CRYPTO_RSIP_RESOURCE_CONFLICT = 0x10100, ///< Hardware resource is busy
  304. FSP_ERR_CRYPTO_RSIP_FATAL = 0x10101, ///< Hardware fatal error or unexpected return
  305. FSP_ERR_CRYPTO_RSIP_FAIL = 0x10102, ///< Internal error
  306. FSP_ERR_CRYPTO_RSIP_KEY_SET_FAIL = 0x10103, ///< Input key type is illegal
  307. FSP_ERR_CRYPTO_RSIP_AUTHENTICATION = 0x10104, ///< Authentication failed
  308. FSP_ERR_CRYPTO_RSIP_LBIST_CHECK_BUSY = 0x101ff, ///< LBIST Check BUSY
  309. /* Start of SF_CRYPTO specific */
  310. FSP_ERR_CRYPTO_COMMON_NOT_OPENED = 0x20000, ///< Crypto Framework Common is not opened
  311. FSP_ERR_CRYPTO_HAL_ERROR = 0x20001, ///< Cryoto HAL module returned an error
  312. FSP_ERR_CRYPTO_KEY_BUF_NOT_ENOUGH = 0x20002, ///< Key buffer size is not enough to generate a key
  313. FSP_ERR_CRYPTO_BUF_OVERFLOW = 0x20003, ///< Attempt to write data larger than what the buffer can hold
  314. FSP_ERR_CRYPTO_INVALID_OPERATION_MODE = 0x20004, ///< Invalid operation mode.
  315. FSP_ERR_MESSAGE_TOO_LONG = 0x20005, ///< Message for RSA encryption is too long.
  316. FSP_ERR_RSA_DECRYPTION_ERROR = 0x20006, ///< RSA Decryption error.
  317. /** @note SF_CRYPTO APIs may return an error code starting from 0x10000 which is of Crypto module.
  318. * Refer to sf_cryoto_err.h for Crypto error codes.
  319. */
  320. /* Start of Sensor specific */
  321. FSP_ERR_SENSOR_INVALID_DATA = 0x30000, ///< Data is invalid.
  322. FSP_ERR_SENSOR_IN_STABILIZATION = 0x30001, ///< Sensor is stabilizing.
  323. FSP_ERR_SENSOR_MEASUREMENT_NOT_FINISHED = 0x30002, ///< Measurement is not finished.
  324. /* Start of COMMS specific */
  325. FSP_ERR_COMMS_BUS_NOT_OPEN = 0x40000, ///< Bus is not open.
  326. } fsp_err_t;
  327. /** @} */
  328. /***********************************************************************************************************************
  329. * Function prototypes
  330. **********************************************************************************************************************/
  331. /* Common macro for FSP header files. There is also a corresponding FSP_HEADER macro at the top of this file. */
  332. FSP_FOOTER
  333. #endif