Platform.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. /*==================================================================================================
  2. * Project : RTD AUTOSAR 4.4
  3. * Platform : CORTEXM
  4. * Peripheral :
  5. * Dependencies : none
  6. *
  7. * Autosar Version : 4.4.0
  8. * Autosar Revision : ASR_REL_4_4_REV_0000
  9. * Autosar Conf.Variant :
  10. * SW Version : 1.0.0
  11. * Build Version : S32K1_RTD_1_0_0_HF01_D2109_ASR_REL_4_4_REV_0000_20210907
  12. *
  13. * (c) Copyright 2020-2021 NXP Semiconductors
  14. * All Rights Reserved.
  15. *
  16. * NXP Confidential. This software is owned or controlled by NXP and may only be
  17. * used strictly in accordance with the applicable license terms. By expressly
  18. * accepting such terms or by downloading, installing, activating and/or otherwise
  19. * using the software, you are agreeing that you have read, and that you agree to
  20. * comply with and are bound by, such license terms. If you do not agree to be
  21. * bound by the applicable license terms, then you may not retain, install,
  22. * activate or otherwise use the software.
  23. ==================================================================================================*/
  24. /**
  25. * @file
  26. *
  27. * @addtogroup Platform
  28. * @{
  29. */
  30. /*==================================================================================================
  31. * INCLUDE FILES
  32. ==================================================================================================*/
  33. #include "Mcal.h"
  34. #include "Platform.h"
  35. #include "Platform_Ipw.h"
  36. /*==================================================================================================
  37. * SOURCE FILE VERSION INFORMATION
  38. ==================================================================================================*/
  39. #define PLATFORM_VENDOR_ID_C 43
  40. #define PLATFORM_AR_RELEASE_MAJOR_VERSION_C 4
  41. #define PLATFORM_AR_RELEASE_MINOR_VERSION_C 4
  42. #define PLATFORM_AR_RELEASE_REVISION_VERSION_C 0
  43. #define PLATFORM_SW_MAJOR_VERSION_C 1
  44. #define PLATFORM_SW_MINOR_VERSION_C 0
  45. #define PLATFORM_SW_PATCH_VERSION_C 0
  46. /*==================================================================================================
  47. * FILE VERSION CHECKS
  48. ==================================================================================================*/
  49. /* Check if current file and Platform header file are of the same vendor */
  50. #if (PLATFORM_VENDOR_ID_C != PLATFORM_CFG_VENDOR_ID)
  51. #error "Platform.c and Platform.h have different vendor ids"
  52. #endif
  53. /* Check if current file and Platform header file are of the same Autosar version */
  54. #if ((PLATFORM_AR_RELEASE_MAJOR_VERSION_C != PLATFORM_AR_RELEASE_MAJOR_VERSION) || \
  55. (PLATFORM_AR_RELEASE_MINOR_VERSION_C != PLATFORM_AR_RELEASE_MINOR_VERSION) || \
  56. (PLATFORM_AR_RELEASE_REVISION_VERSION_C != PLATFORM_AR_RELEASE_REVISION_VERSION) \
  57. )
  58. #error "AutoSar Version Numbers of Platform.c and Platform.h are different"
  59. #endif
  60. /* Check if current file and Platform header file are of the same Software version */
  61. #if ((PLATFORM_SW_MAJOR_VERSION_C != PLATFORM_SW_MAJOR_VERSION) || \
  62. (PLATFORM_SW_MINOR_VERSION_C != PLATFORM_SW_MINOR_VERSION) || \
  63. (PLATFORM_SW_PATCH_VERSION_C != PLATFORM_SW_PATCH_VERSION) \
  64. )
  65. #error "Software Version Numbers of Platform.c and Platform.h are different"
  66. #endif
  67. /* Check if current file and Platform_Ipw header file are of the same vendor */
  68. #if (PLATFORM_VENDOR_ID_C != PLATFORM_PLATFORM_IPW_VENDOR_ID)
  69. #error "Platform.c and Platform.h have different vendor ids"
  70. #endif
  71. /* Check if current file and Platform_Ipw header file are of the same Autosar version */
  72. #if ((PLATFORM_AR_RELEASE_MAJOR_VERSION_C != PLATFORM_PLATFORM_IPW_AR_RELEASE_MAJOR_VERSION) || \
  73. (PLATFORM_AR_RELEASE_MINOR_VERSION_C != PLATFORM_PLATFORM_IPW_AR_RELEASE_MINOR_VERSION) || \
  74. (PLATFORM_AR_RELEASE_REVISION_VERSION_C != PLATFORM_PLATFORM_IPW_AR_RELEASE_REVISION_VERSION) \
  75. )
  76. #error "AutoSar Version Numbers of Platform.c and Platform_Ipw.h are different"
  77. #endif
  78. /* Check if current file and Platform_Ipw header file are of the same Software version */
  79. #if ((PLATFORM_SW_MAJOR_VERSION_C != PLATFORM_PLATFORM_IPW_SW_MAJOR_VERSION) || \
  80. (PLATFORM_SW_MINOR_VERSION_C != PLATFORM_PLATFORM_IPW_SW_MINOR_VERSION) || \
  81. (PLATFORM_SW_PATCH_VERSION_C != PLATFORM_PLATFORM_IPW_SW_PATCH_VERSION) \
  82. )
  83. #error "Software Version Numbers of Platform.c and Platform_Ipw.h are different"
  84. #endif
  85. /*==================================================================================================
  86. * GLOBAL CONSTANTS
  87. ==================================================================================================*/
  88. #define PLATFORM_START_SEC_CONFIG_DATA_UNSPECIFIED
  89. #include "Platform_MemMap.h"
  90. extern const Platform_ConfigType *const Platform_Config[PLATFORM_MAX_PARTITIONS];
  91. #define PLATFORM_STOP_SEC_CONFIG_DATA_UNSPECIFIED
  92. #include "Platform_MemMap.h"
  93. /*==================================================================================================
  94. LOCAL FUNCTION PROTOTYPES
  95. ==================================================================================================*/
  96. #define PLATFORM_START_SEC_CODE
  97. #include "Platform_MemMap.h"
  98. #if (PLATFORM_INT_MONITOR == STD_ON)
  99. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  100. static Std_ReturnType Platform_CheckNullPtrCfg(uint8 u8CoreId);
  101. #endif
  102. #endif
  103. #define PLATFORM_STOP_SEC_CODE
  104. #include "Platform_MemMap.h"
  105. /*==================================================================================================
  106. * GLOBAL VARIABLES
  107. ==================================================================================================*/
  108. /*==================================================================================================
  109. * LOCAL FUNCTIONS
  110. ==================================================================================================*/
  111. #define PLATFORM_START_SEC_CODE
  112. #include "Platform_MemMap.h"
  113. #if (PLATFORM_INT_MONITOR == STD_ON)
  114. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  115. static Std_ReturnType Platform_CheckNullPtrCfg(uint8 u8CoreId)
  116. {
  117. Std_ReturnType RetVal = (Std_ReturnType)E_NOT_OK;
  118. if((Platform_Config[u8CoreId]) != NULL_PTR)
  119. {
  120. if((Platform_Config[u8CoreId] -> pIpwConfig) != NULL_PTR)
  121. {
  122. RetVal = E_OK;
  123. }
  124. }
  125. return RetVal;
  126. }
  127. #endif
  128. #endif
  129. /*==================================================================================================
  130. * GLOBAL FUNCTIONS
  131. ==================================================================================================*/
  132. /**
  133. * @internal
  134. * @brief Initializes the platform settings based on user configuration.
  135. * @implements Platform_Init_Activity
  136. */
  137. void Platform_Init(const Platform_ConfigType *pConfig)
  138. {
  139. uint8 u8CoreId;
  140. u8CoreId = (uint8)Platform_GetCoreID();
  141. (void)pConfig;
  142. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  143. if (NULL_PTR != pConfig)
  144. {
  145. (void)Det_ReportError((uint16)PLATFORM_MODULE_ID, 0U, PLATFORM_INIT_ID, PLATFORM_E_PARAM_POINTER);
  146. }
  147. else
  148. {
  149. #if (PLATFORM_MULTICORE_SUPPORT == STD_ON)
  150. if (NULL_PTR == (Platform_Config[u8CoreId]))
  151. {
  152. (void)Det_ReportError((uint16)PLATFORM_MODULE_ID, 0U, PLATFORM_INIT_ID, PLATFORM_E_PARAM_CONFIG);
  153. }
  154. else
  155. {
  156. #endif /*(PLATFORM_MULTICORE_SUPPORT == STD_ON)*/
  157. #endif /*(PLATFORM_DEV_ERROR_DETECT == STD_ON)*/
  158. #if (PLATFORM_MSCM_CFG == STD_ON)
  159. Platform_Ipw_InitNonCore(Platform_Config[u8CoreId] -> pIpwNonCoreConfig);
  160. #endif /* (PLATFORM_MSCM_CFG == STD_ON) */
  161. Platform_Ipw_Init(Platform_Config[u8CoreId] -> pIpwConfig);
  162. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  163. #if (PLATFORM_MULTICORE_SUPPORT == STD_ON)
  164. }
  165. #endif /*(PLATFORM_MULTICORE_SUPPORT == STD_ON)*/
  166. }
  167. #endif /* (PLATFORM_DEV_ERROR_DETECT == STD_ON)*/
  168. }
  169. /**
  170. * @internal
  171. * @brief Configures (enables/disables) an interrupt request.
  172. * @implements Platform_SetIrq_Activity
  173. */
  174. Std_ReturnType Platform_SetIrq(IRQn_Type eIrqNumber, boolean bEnable)
  175. {
  176. Std_ReturnType RetValue = (Std_ReturnType)E_OK;
  177. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  178. if (((sint32)eIrqNumber > (sint32)INT_CTRL_IP_IRQ_MAX) || \
  179. ((sint32)INT_CTRL_IP_IRQ_MIN > (sint32)eIrqNumber))
  180. {
  181. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SET_IRQ_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  182. RetValue = (Std_ReturnType)E_NOT_OK;
  183. }
  184. else
  185. #endif
  186. {
  187. Platform_Ipw_SetIrq(eIrqNumber, bEnable);
  188. }
  189. return RetValue;
  190. }
  191. /**
  192. * @internal
  193. * @brief Configures the priority of an interrupt request.
  194. * @implements Platform_SetIrqPriority_Activity
  195. */
  196. Std_ReturnType Platform_SetIrqPriority(IRQn_Type eIrqNumber, uint8 u8Priority)
  197. {
  198. Std_ReturnType RetValue = (Std_ReturnType)E_OK;
  199. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  200. if (((sint32)eIrqNumber > (sint32)INT_CTRL_IP_IRQ_MAX) || \
  201. ((sint32)INT_CTRL_IP_IRQ_MIN > (sint32)eIrqNumber) || \
  202. (u8Priority >= (uint8)(1U << INT_CTRL_IP_NVIC_PRIO_BITS)))
  203. {
  204. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SET_IRQ_PRIO_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  205. RetValue = (Std_ReturnType)E_NOT_OK;
  206. }
  207. else
  208. #endif
  209. {
  210. Platform_Ipw_SetIrqPriority(eIrqNumber, u8Priority);
  211. }
  212. return RetValue;
  213. }
  214. /**
  215. * @internal
  216. * @brief Returns the priority of an interrupt request.
  217. * @implements Platform_GetIrqPriority_Activity
  218. */
  219. Std_ReturnType Platform_GetIrqPriority(IRQn_Type eIrqNumber, uint8 * u8Priority)
  220. {
  221. Std_ReturnType RetValue = (Std_ReturnType)E_OK;
  222. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  223. if (((sint32)eIrqNumber > (sint32)INT_CTRL_IP_IRQ_MAX) || \
  224. ((sint32)INT_CTRL_IP_IRQ_MIN > (sint32)eIrqNumber))
  225. {
  226. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_GET_IRQ_PRIO_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  227. RetValue = (Std_ReturnType)E_NOT_OK;
  228. }
  229. else if (u8Priority == NULL_PTR)
  230. {
  231. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_GET_IRQ_PRIO_ID, PLATFORM_E_PARAM_POINTER);
  232. RetValue = (Std_ReturnType)E_NOT_OK;
  233. }
  234. else
  235. #endif
  236. {
  237. *u8Priority = Platform_Ipw_GetIrqPriority(eIrqNumber);
  238. }
  239. return RetValue;
  240. }
  241. /**
  242. * @internal
  243. * @brief Installs a new handler for an interrupt request.
  244. * @implements Platform_InstallIrqHandler_Activity
  245. */
  246. Std_ReturnType Platform_InstallIrqHandler(IRQn_Type eIrqNumber,
  247. const Platform_IrqHandlerType pfNewHandler,
  248. Platform_IrqHandlerType* const pfOldHandler)
  249. {
  250. Std_ReturnType RetValue = (Std_ReturnType)E_OK;
  251. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  252. if (((sint32)eIrqNumber > (sint32)INT_CTRL_IP_IRQ_MAX) || \
  253. ((sint32)INT_CTRL_IP_IRQ_MIN > (sint32)eIrqNumber))
  254. {
  255. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_INSTALL_HANDLER_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  256. RetValue = (Std_ReturnType)E_NOT_OK;
  257. }
  258. else
  259. #endif
  260. {
  261. Platform_Ipw_InstallIrqHandler(eIrqNumber, pfNewHandler, pfOldHandler);
  262. }
  263. return RetValue;
  264. }
  265. #if (PLATFORM_INT_MONITOR == STD_ON)
  266. /**
  267. * @internal
  268. * @brief Configures (enables/disables) the interrupt monitor.
  269. * @implements Platform_SetIrqMonitor_Activity
  270. */
  271. void Platform_SetIrqMonitor(boolean bEnable)
  272. {
  273. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  274. uint8 u8CoreId;
  275. u8CoreId = (uint8)Platform_GetCoreID();
  276. if((Std_ReturnType)E_NOT_OK == Platform_CheckNullPtrCfg(u8CoreId))
  277. {
  278. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SET_IRQ_MONITOR_ID, PLATFORM_E_PARAM_CONFIG);
  279. }
  280. else
  281. {
  282. if ((Std_ReturnType)E_NOT_OK == Platform_Ipw_ValidateSetIrqMonitor(Platform_Config[u8CoreId] -> pIpwConfig))
  283. {
  284. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SET_IRQ_MONITOR_ID, PLATFORM_E_PARAM_CONFIG);
  285. }
  286. else
  287. {
  288. #endif
  289. Platform_Ipw_SetIrqMonitor(bEnable);
  290. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  291. }
  292. }
  293. #endif
  294. }
  295. /**
  296. * @internal
  297. * @brief Acknowledges a monitored interrupt has been served.
  298. * @implements Platform_AckIrq_Activity
  299. */
  300. void Platform_AckIrq(IRQn_Type eIrqNumber)
  301. {
  302. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  303. if (((sint32)eIrqNumber > (sint32)INT_CTRL_IP_IRQ_MAX) || \
  304. ((sint32)INT_CTRL_IP_IRQ_MIN > (sint32)eIrqNumber))
  305. {
  306. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_ACK_IRQ_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  307. }
  308. else
  309. {
  310. #endif
  311. Platform_Ipw_AckIrq(eIrqNumber);
  312. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  313. }
  314. #endif
  315. }
  316. /**
  317. * @internal
  318. * @brief Selects an interrupt to monitor.
  319. * @implements Platform_SelectMonitoredIrq_Activity
  320. */
  321. void Platform_SelectMonitoredIrq(uint8 u8Channel , IRQn_Type eIrqNumber)
  322. {
  323. uint8 u8CoreId;
  324. u8CoreId = (uint8)Platform_GetCoreID();
  325. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  326. if (((sint32)eIrqNumber > (sint32)INT_CTRL_IP_IRQ_MAX) || \
  327. ((sint32)INT_CTRL_IP_IRQ_MIN > (sint32)eIrqNumber) ||
  328. (u8Channel >= PLATFORM_INT_MONITOR_CNT))
  329. {
  330. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SELECT_MONITORED_IRQ_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  331. }
  332. else
  333. {
  334. if((Std_ReturnType)E_OK == Platform_CheckNullPtrCfg(u8CoreId))
  335. {
  336. if ((Std_ReturnType)E_NOT_OK == Platform_Ipw_ValidateChannelIntm(Platform_Config[u8CoreId] -> pIpwConfig, u8Channel))
  337. {
  338. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SELECT_MONITORED_IRQ_ID, PLATFORM_E_PARAM_CONFIG);
  339. }
  340. else
  341. {
  342. #endif
  343. Platform_Ipw_SelectMonitoredIrq(Platform_Config[u8CoreId] -> pIpwConfig,
  344. u8Channel, eIrqNumber);
  345. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  346. }
  347. }
  348. else
  349. {
  350. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SELECT_MONITORED_IRQ_ID, PLATFORM_E_PARAM_CONFIG);
  351. }
  352. }
  353. #endif
  354. }
  355. /**
  356. * @internal
  357. * @brief Sets the latency for a monitored interrupt.
  358. * @implements Platform_SetMonitoredIrqLatency_Activity
  359. */
  360. void Platform_SetMonitoredIrqLatency(uint8 u8Channel, uint32 u32Latency)
  361. {
  362. uint8 u8CoreId;
  363. u8CoreId = (uint8)Platform_GetCoreID();
  364. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  365. if ((u32Latency > PLATFORM_INT_MONITOR_MAX_LATENCY) ||
  366. (u8Channel >= PLATFORM_INT_MONITOR_CNT))
  367. {
  368. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SET_MONITORED_IRQ_LATENCY_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  369. }
  370. else
  371. {
  372. if((Std_ReturnType)E_NOT_OK == Platform_CheckNullPtrCfg(u8CoreId))
  373. {
  374. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SET_MONITORED_IRQ_LATENCY_ID, PLATFORM_E_PARAM_CONFIG);
  375. }
  376. else
  377. {
  378. if ((Std_ReturnType)E_NOT_OK == Platform_Ipw_ValidateChannelIntm(Platform_Config[u8CoreId] -> pIpwConfig, u8Channel))
  379. {
  380. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_SET_MONITORED_IRQ_LATENCY_ID, PLATFORM_E_PARAM_CONFIG);
  381. }
  382. else
  383. {
  384. #endif
  385. Platform_Ipw_SetMonitoredIrqLatency(Platform_Config[u8CoreId] -> pIpwConfig,
  386. u8Channel, u32Latency);
  387. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  388. }
  389. }
  390. }
  391. #endif
  392. }
  393. /**
  394. * @internal
  395. * @brief Resets the timer for an interrupt monitor.
  396. * @implements Platform_ResetIrqMonitorTimer_Activity
  397. */
  398. void Platform_ResetIrqMonitorTimer(uint8 u8Channel)
  399. {
  400. uint8 u8CoreId;
  401. u8CoreId = (uint8)Platform_GetCoreID();
  402. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  403. if (u8Channel >= PLATFORM_INT_MONITOR_CNT)
  404. {
  405. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_RESET_IRQ_MONITOR_TIMER_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  406. }
  407. else
  408. {
  409. if((Std_ReturnType)E_NOT_OK == Platform_CheckNullPtrCfg(u8CoreId))
  410. {
  411. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_RESET_IRQ_MONITOR_TIMER_ID, PLATFORM_E_PARAM_CONFIG);
  412. }
  413. else
  414. {
  415. if ((Std_ReturnType)E_NOT_OK == Platform_Ipw_ValidateChannelIntm(Platform_Config[u8CoreId] -> pIpwConfig, u8Channel))
  416. {
  417. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_RESET_IRQ_MONITOR_TIMER_ID, PLATFORM_E_PARAM_CONFIG);
  418. }
  419. else
  420. {
  421. #endif
  422. Platform_Ipw_ResetIrqMonitorTimer(Platform_Config[u8CoreId] -> pIpwConfig,
  423. u8Channel);
  424. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  425. }
  426. }
  427. }
  428. #endif
  429. }
  430. /**
  431. * @internal
  432. * @brief Retrieves the status of an interrupt monitor.
  433. * @implements Platform_GetIrqMonitorStatus_Activity
  434. */
  435. Std_ReturnType Platform_GetIrqMonitorStatus(uint8 u8Channel)
  436. {
  437. uint8 u8CoreId;
  438. Std_ReturnType RetVal = (Std_ReturnType)E_NOT_OK;
  439. u8CoreId = (uint8)Platform_GetCoreID();
  440. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  441. if (u8Channel >= PLATFORM_INT_MONITOR_CNT)
  442. {
  443. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_GET_IRQ_MONITOR_STATUS_ID, PLATFORM_E_PARAM_OUT_OF_RANGE);
  444. }
  445. else
  446. {
  447. if((Std_ReturnType)E_NOT_OK == Platform_CheckNullPtrCfg(u8CoreId))
  448. {
  449. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_GET_IRQ_MONITOR_STATUS_ID, PLATFORM_E_PARAM_CONFIG);
  450. }
  451. else
  452. {
  453. if ((Std_ReturnType)E_NOT_OK == Platform_Ipw_ValidateChannelIntm(Platform_Config[u8CoreId] -> pIpwConfig, u8Channel))
  454. {
  455. (void)Det_ReportError(PLATFORM_MODULE_ID, 0U, PLATFORM_GET_IRQ_MONITOR_STATUS_ID, PLATFORM_E_PARAM_CONFIG);
  456. }
  457. else
  458. {
  459. #endif
  460. RetVal = Platform_Ipw_GetIrqMonitorStatus(Platform_Config[u8CoreId] -> pIpwConfig,
  461. u8Channel);
  462. #if (PLATFORM_DEV_ERROR_DETECT == STD_ON)
  463. }
  464. }
  465. }
  466. #endif
  467. return RetVal;
  468. }
  469. #endif
  470. #define PLATFORM_STOP_SEC_CODE
  471. #include "Platform_MemMap.h"
  472. /** @} */