fsl_sysmpu.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. /*
  2. * The Clear BSD License
  3. * Copyright (c) 2015 - 2016, Freescale Semiconductor, Inc.
  4. * Copyright 2016-2017 NXP
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without modification,
  8. * are permitted (subject to the limitations in the disclaimer below) provided
  9. * that the following conditions are met:
  10. *
  11. * o Redistributions of source code must retain the above copyright notice, this list
  12. * of conditions and the following disclaimer.
  13. *
  14. * o Redistributions in binary form must reproduce the above copyright notice, this
  15. * list of conditions and the following disclaimer in the documentation and/or
  16. * other materials provided with the distribution.
  17. *
  18. * o Neither the name of the copyright holder nor the names of its
  19. * contributors may be used to endorse or promote products derived from this
  20. * software without specific prior written permission.
  21. *
  22. * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.
  23. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  24. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  25. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  26. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  27. * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  28. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  29. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  30. * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  31. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  32. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  33. */
  34. #ifndef _FSL_SYSMPU_H_
  35. #define _FSL_SYSMPU_H_
  36. #include "fsl_common.h"
  37. /*!
  38. * @addtogroup sysmpu
  39. * @{
  40. */
  41. /*******************************************************************************
  42. * Definitions
  43. ******************************************************************************/
  44. /*! @name Driver version */
  45. /*@{*/
  46. /*! @brief SYSMPU driver version 2.2.0. */
  47. #define FSL_SYSMPU_DRIVER_VERSION (MAKE_VERSION(2, 2, 0))
  48. /*@}*/
  49. /*! @brief define the start master port with read and write attributes. */
  50. #define SYSMPU_MASTER_RWATTRIBUTE_START_PORT (4)
  51. /*! @brief SYSMPU the bit shift for masters with privilege rights: read write and execute. */
  52. #define SYSMPU_REGION_RWXRIGHTS_MASTER_SHIFT(n) (n * 6)
  53. /*! @brief SYSMPU masters with read, write and execute rights bit mask. */
  54. #define SYSMPU_REGION_RWXRIGHTS_MASTER_MASK(n) (0x1Fu << SYSMPU_REGION_RWXRIGHTS_MASTER_SHIFT(n))
  55. /*! @brief SYSMPU masters with read, write and execute rights bit width. */
  56. #define SYSMPU_REGION_RWXRIGHTS_MASTER_WIDTH 5
  57. /*! @brief SYSMPU masters with read, write and execute rights priority setting. */
  58. #define SYSMPU_REGION_RWXRIGHTS_MASTER(n, x) \
  59. (((uint32_t)(((uint32_t)(x)) << SYSMPU_REGION_RWXRIGHTS_MASTER_SHIFT(n))) & SYSMPU_REGION_RWXRIGHTS_MASTER_MASK(n))
  60. /*! @brief SYSMPU masters with read, write and execute rights process enable bit shift. */
  61. #define SYSMPU_REGION_RWXRIGHTS_MASTER_PE_SHIFT(n) (n * 6 + SYSMPU_REGION_RWXRIGHTS_MASTER_WIDTH)
  62. /*! @brief SYSMPU masters with read, write and execute rights process enable bit mask. */
  63. #define SYSMPU_REGION_RWXRIGHTS_MASTER_PE_MASK(n) (0x1u << SYSMPU_REGION_RWXRIGHTS_MASTER_PE_SHIFT(n))
  64. /*! @brief SYSMPU masters with read, write and execute rights process enable setting. */
  65. #define SYSMPU_REGION_RWXRIGHTS_MASTER_PE(n, x) \
  66. (((uint32_t)(((uint32_t)(x)) << SYSMPU_REGION_RWXRIGHTS_MASTER_PE_SHIFT(n))) & SYSMPU_REGION_RWXRIGHTS_MASTER_PE_MASK(n))
  67. /*! @brief SYSMPU masters with normal read write permission bit shift. */
  68. #define SYSMPU_REGION_RWRIGHTS_MASTER_SHIFT(n) ((n - SYSMPU_MASTER_RWATTRIBUTE_START_PORT) * 2 + 24)
  69. /*! @brief SYSMPU masters with normal read write rights bit mask. */
  70. #define SYSMPU_REGION_RWRIGHTS_MASTER_MASK(n) (0x3u << SYSMPU_REGION_RWRIGHTS_MASTER_SHIFT(n))
  71. /*! @brief SYSMPU masters with normal read write rights priority setting. */
  72. #define SYSMPU_REGION_RWRIGHTS_MASTER(n, x) \
  73. (((uint32_t)(((uint32_t)(x)) << SYSMPU_REGION_RWRIGHTS_MASTER_SHIFT(n))) & SYSMPU_REGION_RWRIGHTS_MASTER_MASK(n))
  74. /*! @brief Describes the number of SYSMPU regions. */
  75. typedef enum _sysmpu_region_total_num
  76. {
  77. kSYSMPU_8Regions = 0x0U, /*!< SYSMPU supports 8 regions. */
  78. kSYSMPU_12Regions = 0x1U, /*!< SYSMPU supports 12 regions. */
  79. kSYSMPU_16Regions = 0x2U /*!< SYSMPU supports 16 regions. */
  80. } sysmpu_region_total_num_t;
  81. /*! @brief SYSMPU slave port number. */
  82. typedef enum _sysmpu_slave
  83. {
  84. kSYSMPU_Slave0 = 0U, /*!< SYSMPU slave port 0. */
  85. kSYSMPU_Slave1 = 1U, /*!< SYSMPU slave port 1. */
  86. kSYSMPU_Slave2 = 2U, /*!< SYSMPU slave port 2. */
  87. kSYSMPU_Slave3 = 3U, /*!< SYSMPU slave port 3. */
  88. kSYSMPU_Slave4 = 4U, /*!< SYSMPU slave port 4. */
  89. #if FSL_FEATURE_SYSMPU_SLAVE_COUNT > 5
  90. kSYSMPU_Slave5 = 5U, /*!< SYSMPU slave port 5. */
  91. #endif
  92. #if FSL_FEATURE_SYSMPU_SLAVE_COUNT > 6
  93. kSYSMPU_Slave6 = 6U, /*!< SYSMPU slave port 6. */
  94. #endif
  95. #if FSL_FEATURE_SYSMPU_SLAVE_COUNT > 7
  96. kSYSMPU_Slave7 = 7U, /*!< SYSMPU slave port 7. */
  97. #endif
  98. } sysmpu_slave_t;
  99. /*! @brief SYSMPU error access control detail. */
  100. typedef enum _sysmpu_err_access_control
  101. {
  102. kSYSMPU_NoRegionHit = 0U, /*!< No region hit error. */
  103. kSYSMPU_NoneOverlappRegion = 1U, /*!< Access single region error. */
  104. kSYSMPU_OverlappRegion = 2U /*!< Access overlapping region error. */
  105. } sysmpu_err_access_control_t;
  106. /*! @brief SYSMPU error access type. */
  107. typedef enum _sysmpu_err_access_type
  108. {
  109. kSYSMPU_ErrTypeRead = 0U, /*!< SYSMPU error access type --- read. */
  110. kSYSMPU_ErrTypeWrite = 1U /*!< SYSMPU error access type --- write. */
  111. } sysmpu_err_access_type_t;
  112. /*! @brief SYSMPU access error attributes.*/
  113. typedef enum _sysmpu_err_attributes
  114. {
  115. kSYSMPU_InstructionAccessInUserMode = 0U, /*!< Access instruction error in user mode. */
  116. kSYSMPU_DataAccessInUserMode = 1U, /*!< Access data error in user mode. */
  117. kSYSMPU_InstructionAccessInSupervisorMode = 2U, /*!< Access instruction error in supervisor mode. */
  118. kSYSMPU_DataAccessInSupervisorMode = 3U /*!< Access data error in supervisor mode. */
  119. } sysmpu_err_attributes_t;
  120. /*! @brief SYSMPU access rights in supervisor mode for bus master 0 ~ 3. */
  121. typedef enum _sysmpu_supervisor_access_rights
  122. {
  123. kSYSMPU_SupervisorReadWriteExecute = 0U, /*!< Read write and execute operations are allowed in supervisor mode. */
  124. kSYSMPU_SupervisorReadExecute = 1U, /*!< Read and execute operations are allowed in supervisor mode. */
  125. kSYSMPU_SupervisorReadWrite = 2U, /*!< Read write operations are allowed in supervisor mode. */
  126. kSYSMPU_SupervisorEqualToUsermode = 3U /*!< Access permission equal to user mode. */
  127. } sysmpu_supervisor_access_rights_t;
  128. /*! @brief SYSMPU access rights in user mode for bus master 0 ~ 3. */
  129. typedef enum _sysmpu_user_access_rights
  130. {
  131. kSYSMPU_UserNoAccessRights = 0U, /*!< No access allowed in user mode. */
  132. kSYSMPU_UserExecute = 1U, /*!< Execute operation is allowed in user mode. */
  133. kSYSMPU_UserWrite = 2U, /*!< Write operation is allowed in user mode. */
  134. kSYSMPU_UserWriteExecute = 3U, /*!< Write and execute operations are allowed in user mode. */
  135. kSYSMPU_UserRead = 4U, /*!< Read is allowed in user mode. */
  136. kSYSMPU_UserReadExecute = 5U, /*!< Read and execute operations are allowed in user mode. */
  137. kSYSMPU_UserReadWrite = 6U, /*!< Read and write operations are allowed in user mode. */
  138. kSYSMPU_UserReadWriteExecute = 7U /*!< Read write and execute operations are allowed in user mode. */
  139. } sysmpu_user_access_rights_t;
  140. /*! @brief SYSMPU hardware basic information. */
  141. typedef struct _sysmpu_hardware_info
  142. {
  143. uint8_t hardwareRevisionLevel; /*!< Specifies the SYSMPU's hardware and definition reversion level. */
  144. uint8_t slavePortsNumbers; /*!< Specifies the number of slave ports connected to SYSMPU. */
  145. sysmpu_region_total_num_t regionsNumbers; /*!< Indicates the number of region descriptors implemented. */
  146. } sysmpu_hardware_info_t;
  147. /*! @brief SYSMPU detail error access information. */
  148. typedef struct _sysmpu_access_err_info
  149. {
  150. uint32_t master; /*!< Access error master. */
  151. sysmpu_err_attributes_t attributes; /*!< Access error attributes. */
  152. sysmpu_err_access_type_t accessType; /*!< Access error type. */
  153. sysmpu_err_access_control_t accessControl; /*!< Access error control. */
  154. uint32_t address; /*!< Access error address. */
  155. #if FSL_FEATURE_SYSMPU_HAS_PROCESS_IDENTIFIER
  156. uint8_t processorIdentification; /*!< Access error processor identification. */
  157. #endif /* FSL_FEATURE_SYSMPU_HAS_PROCESS_IDENTIFIER */
  158. } sysmpu_access_err_info_t;
  159. /*! @brief SYSMPU read/write/execute rights control for bus master 0 ~ 3. */
  160. typedef struct _sysmpu_rwxrights_master_access_control
  161. {
  162. sysmpu_supervisor_access_rights_t superAccessRights; /*!< Master access rights in supervisor mode. */
  163. sysmpu_user_access_rights_t userAccessRights; /*!< Master access rights in user mode. */
  164. #if FSL_FEATURE_SYSMPU_HAS_PROCESS_IDENTIFIER
  165. bool processIdentifierEnable; /*!< Enables or disables process identifier. */
  166. #endif /* FSL_FEATURE_SYSMPU_HAS_PROCESS_IDENTIFIER */
  167. } sysmpu_rwxrights_master_access_control_t;
  168. /*! @brief SYSMPU read/write access control for bus master 4 ~ 7. */
  169. typedef struct _sysmpu_rwrights_master_access_control
  170. {
  171. bool writeEnable; /*!< Enables or disables write permission. */
  172. bool readEnable; /*!< Enables or disables read permission. */
  173. } sysmpu_rwrights_master_access_control_t;
  174. /*!
  175. * @brief SYSMPU region configuration structure.
  176. *
  177. * This structure is used to configure the regionNum region.
  178. * The accessRights1[0] ~ accessRights1[3] are used to configure the bus master
  179. * 0 ~ 3 with the privilege rights setting. The accessRights2[0] ~ accessRights2[3]
  180. * are used to configure the high master 4 ~ 7 with the normal read write permission.
  181. * The master port assignment is the chip configuration. Normally, the core is the
  182. * master 0, debugger is the master 1.
  183. * Note that the SYSMPU assigns a priority scheme where the debugger is treated as the highest
  184. * priority master followed by the core and then all the remaining masters.
  185. * SYSMPU protection does not allow writes from the core to affect the "regionNum 0" start
  186. * and end address nor the permissions associated with the debugger. It can only write
  187. * the permission fields associated with the other masters. This protection guarantees that
  188. * the debugger always has access to the entire address space and those rights can't
  189. * be changed by the core or any other bus master. Prepare
  190. * the region configuration when regionNum is 0.
  191. */
  192. typedef struct _sysmpu_region_config
  193. {
  194. uint32_t regionNum; /*!< SYSMPU region number, range form 0 ~ FSL_FEATURE_SYSMPU_DESCRIPTOR_COUNT - 1. */
  195. uint32_t startAddress; /*!< Memory region start address. Note: bit0 ~ bit4 always be marked as 0 by SYSMPU. The actual
  196. start address is 0-modulo-32 byte address. */
  197. uint32_t endAddress; /*!< Memory region end address. Note: bit0 ~ bit4 always be marked as 1 by SYSMPU. The actual end
  198. address is 31-modulo-32 byte address. */
  199. sysmpu_rwxrights_master_access_control_t accessRights1[4]; /*!< Masters with read, write and execute rights setting. */
  200. sysmpu_rwrights_master_access_control_t accessRights2[4]; /*!< Masters with normal read write rights setting. */
  201. #if FSL_FEATURE_SYSMPU_HAS_PROCESS_IDENTIFIER
  202. uint8_t processIdentifier; /*!< Process identifier used when "processIdentifierEnable" set with true. */
  203. uint8_t
  204. processIdMask; /*!< Process identifier mask. The setting bit will ignore the same bit in process identifier. */
  205. #endif /* FSL_FEATURE_SYSMPU_HAS_PROCESS_IDENTIFIER */
  206. } sysmpu_region_config_t;
  207. /*!
  208. * @brief The configuration structure for the SYSMPU initialization.
  209. *
  210. * This structure is used when calling the SYSMPU_Init function.
  211. */
  212. typedef struct _sysmpu_config
  213. {
  214. sysmpu_region_config_t regionConfig; /*!< Region access permission. */
  215. struct _sysmpu_config *next; /*!< Pointer to the next structure. */
  216. } sysmpu_config_t;
  217. /*******************************************************************************
  218. * API
  219. ******************************************************************************/
  220. #if defined(__cplusplus)
  221. extern "C" {
  222. #endif /* _cplusplus */
  223. /*!
  224. * @name Initialization and deinitialization
  225. * @{
  226. */
  227. /*!
  228. * @brief Initializes the SYSMPU with the user configuration structure.
  229. *
  230. * This function configures the SYSMPU module with the user-defined configuration.
  231. *
  232. * @param base SYSMPU peripheral base address.
  233. * @param config The pointer to the configuration structure.
  234. */
  235. void SYSMPU_Init(SYSMPU_Type *base, const sysmpu_config_t *config);
  236. /*!
  237. * @brief Deinitializes the SYSMPU regions.
  238. *
  239. * @param base SYSMPU peripheral base address.
  240. */
  241. void SYSMPU_Deinit(SYSMPU_Type *base);
  242. /* @}*/
  243. /*!
  244. * @name Basic Control Operations
  245. * @{
  246. */
  247. /*!
  248. * @brief Enables/disables the SYSMPU globally.
  249. *
  250. * Call this API to enable or disable the SYSMPU module.
  251. *
  252. * @param base SYSMPU peripheral base address.
  253. * @param enable True enable SYSMPU, false disable SYSMPU.
  254. */
  255. static inline void SYSMPU_Enable(SYSMPU_Type *base, bool enable)
  256. {
  257. if (enable)
  258. {
  259. /* Enable the SYSMPU globally. */
  260. base->CESR |= SYSMPU_CESR_VLD_MASK;
  261. }
  262. else
  263. { /* Disable the SYSMPU globally. */
  264. base->CESR &= ~SYSMPU_CESR_VLD_MASK;
  265. }
  266. }
  267. /*!
  268. * @brief Enables/disables the SYSMPU for a special region.
  269. *
  270. * When SYSMPU is enabled, call this API to disable an unused region
  271. * of an enabled SYSMPU. Call this API to minimize the power dissipation.
  272. *
  273. * @param base SYSMPU peripheral base address.
  274. * @param number SYSMPU region number.
  275. * @param enable True enable the special region SYSMPU, false disable the special region SYSMPU.
  276. */
  277. static inline void SYSMPU_RegionEnable(SYSMPU_Type *base, uint32_t number, bool enable)
  278. {
  279. if (enable)
  280. {
  281. /* Enable the #number region SYSMPU. */
  282. base->WORD[number][3] |= SYSMPU_WORD_VLD_MASK;
  283. }
  284. else
  285. { /* Disable the #number region SYSMPU. */
  286. base->WORD[number][3] &= ~SYSMPU_WORD_VLD_MASK;
  287. }
  288. }
  289. /*!
  290. * @brief Gets the SYSMPU basic hardware information.
  291. *
  292. * @param base SYSMPU peripheral base address.
  293. * @param hardwareInform The pointer to the SYSMPU hardware information structure. See "sysmpu_hardware_info_t".
  294. */
  295. void SYSMPU_GetHardwareInfo(SYSMPU_Type *base, sysmpu_hardware_info_t *hardwareInform);
  296. /*!
  297. * @brief Sets the SYSMPU region.
  298. *
  299. * Note: Due to the SYSMPU protection, the region number 0 does not allow writes from
  300. * core to affect the start and end address nor the permissions associated with
  301. * the debugger. It can only write the permission fields associated
  302. * with the other masters.
  303. *
  304. * @param base SYSMPU peripheral base address.
  305. * @param regionConfig The pointer to the SYSMPU user configuration structure. See "sysmpu_region_config_t".
  306. */
  307. void SYSMPU_SetRegionConfig(SYSMPU_Type *base, const sysmpu_region_config_t *regionConfig);
  308. /*!
  309. * @brief Sets the region start and end address.
  310. *
  311. * Memory region start address. Note: bit0 ~ bit4 is always marked as 0 by SYSMPU.
  312. * The actual start address by SYSMPU is 0-modulo-32 byte address.
  313. * Memory region end address. Note: bit0 ~ bit4 always be marked as 1 by SYSMPU.
  314. * The end address used by the SYSMPU is 31-modulo-32 byte address.
  315. * Note: Due to the SYSMPU protection, the startAddr and endAddr can't be
  316. * changed by the core when regionNum is 0.
  317. *
  318. * @param base SYSMPU peripheral base address.
  319. * @param regionNum SYSMPU region number. The range is from 0 to
  320. * FSL_FEATURE_SYSMPU_DESCRIPTOR_COUNT - 1.
  321. * @param startAddr Region start address.
  322. * @param endAddr Region end address.
  323. */
  324. void SYSMPU_SetRegionAddr(SYSMPU_Type *base, uint32_t regionNum, uint32_t startAddr, uint32_t endAddr);
  325. /*!
  326. * @brief Sets the SYSMPU region access rights for masters with read, write, and execute rights.
  327. * The SYSMPU access rights depend on two board classifications of bus masters.
  328. * The privilege rights masters and the normal rights masters.
  329. * The privilege rights masters have the read, write, and execute access rights.
  330. * Except the normal read and write rights, the execute rights are also
  331. * allowed for these masters. The privilege rights masters normally range from
  332. * bus masters 0 - 3. However, the maximum master number is device-specific.
  333. * See the "SYSMPU_PRIVILEGED_RIGHTS_MASTER_MAX_INDEX".
  334. * The normal rights masters access rights control see
  335. * "SYSMPU_SetRegionRwMasterAccessRights()".
  336. *
  337. * @param base SYSMPU peripheral base address.
  338. * @param regionNum SYSMPU region number. Should range from 0 to
  339. * FSL_FEATURE_SYSMPU_DESCRIPTOR_COUNT - 1.
  340. * @param masterNum SYSMPU bus master number. Should range from 0 to
  341. * SYSMPU_PRIVILEGED_RIGHTS_MASTER_MAX_INDEX.
  342. * @param accessRights The pointer to the SYSMPU access rights configuration. See "sysmpu_rwxrights_master_access_control_t".
  343. */
  344. void SYSMPU_SetRegionRwxMasterAccessRights(SYSMPU_Type *base,
  345. uint32_t regionNum,
  346. uint32_t masterNum,
  347. const sysmpu_rwxrights_master_access_control_t *accessRights);
  348. #if FSL_FEATURE_SYSMPU_MASTER_COUNT > 4
  349. /*!
  350. * @brief Sets the SYSMPU region access rights for masters with read and write rights.
  351. * The SYSMPU access rights depend on two board classifications of bus masters.
  352. * The privilege rights masters and the normal rights masters.
  353. * The normal rights masters only have the read and write access permissions.
  354. * The privilege rights access control see "SYSMPU_SetRegionRwxMasterAccessRights".
  355. *
  356. * @param base SYSMPU peripheral base address.
  357. * @param regionNum SYSMPU region number. The range is from 0 to
  358. * FSL_FEATURE_SYSMPU_DESCRIPTOR_COUNT - 1.
  359. * @param masterNum SYSMPU bus master number. Should range from SYSMPU_MASTER_RWATTRIBUTE_START_PORT
  360. * to ~ FSL_FEATURE_SYSMPU_MASTER_COUNT - 1.
  361. * @param accessRights The pointer to the SYSMPU access rights configuration. See "sysmpu_rwrights_master_access_control_t".
  362. */
  363. void SYSMPU_SetRegionRwMasterAccessRights(SYSMPU_Type *base,
  364. uint32_t regionNum,
  365. uint32_t masterNum,
  366. const sysmpu_rwrights_master_access_control_t *accessRights);
  367. #endif /* FSL_FEATURE_SYSMPU_MASTER_COUNT > 4 */
  368. /*!
  369. * @brief Gets the numbers of slave ports where errors occur.
  370. *
  371. * @param base SYSMPU peripheral base address.
  372. * @param slaveNum SYSMPU slave port number.
  373. * @return The slave ports error status.
  374. * true - error happens in this slave port.
  375. * false - error didn't happen in this slave port.
  376. */
  377. bool SYSMPU_GetSlavePortErrorStatus(SYSMPU_Type *base, sysmpu_slave_t slaveNum);
  378. /*!
  379. * @brief Gets the SYSMPU detailed error access information.
  380. *
  381. * @param base SYSMPU peripheral base address.
  382. * @param slaveNum SYSMPU slave port number.
  383. * @param errInform The pointer to the SYSMPU access error information. See "sysmpu_access_err_info_t".
  384. */
  385. void SYSMPU_GetDetailErrorAccessInfo(SYSMPU_Type *base, sysmpu_slave_t slaveNum, sysmpu_access_err_info_t *errInform);
  386. /* @} */
  387. #if defined(__cplusplus)
  388. }
  389. #endif
  390. /*! @}*/
  391. #endif /* _FSL_SYSMPU_H_ */