SchM_Can.c 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267
  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 RTE_MODULE
  28. * @{
  29. */
  30. #ifdef __cplusplus
  31. extern "C"{
  32. #endif
  33. /*==================================================================================================
  34. * INCLUDE FILES
  35. * 1) system and project includes
  36. * 2) needed interfaces from external units
  37. * 3) internal and external interfaces from this unit
  38. ==================================================================================================*/
  39. #include "Std_Types.h"
  40. #include "Mcal.h"
  41. #include "OsIf.h"
  42. #include "SchM_Can.h"
  43. #ifdef MCAL_TESTING_ENVIRONMENT
  44. #include "EUnit.h" /* EUnit Test Suite */
  45. #endif
  46. /*==================================================================================================
  47. * SOURCE FILE VERSION INFORMATION
  48. ==================================================================================================*/
  49. #define SCHM_CAN_AR_RELEASE_MAJOR_VERSION_C 4
  50. #define SCHM_CAN_AR_RELEASE_MINOR_VERSION_C 4
  51. #define SCHM_CAN_AR_RELEASE_REVISION_VERSION_C 0
  52. #define SCHM_CAN_SW_MAJOR_VERSION_C 1
  53. #define SCHM_CAN_SW_MINOR_VERSION_C 0
  54. #define SCHM_CAN_SW_PATCH_VERSION_C 0
  55. /*==================================================================================================
  56. * LOCAL CONSTANTS
  57. ==================================================================================================*/
  58. #ifdef MCAL_PLATFORM_ARM
  59. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  60. #define ISR_STATE_MASK ((uint32)0x00000002UL) /**< @brief DAIF bit I and F */
  61. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  62. #define ISR_STATE_MASK ((uint32)0x00000080UL) /**< @brief CPSR bit I */
  63. #else
  64. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  65. #define ISR_STATE_MASK ((uint32)0x000000FFUL) /**< @brief BASEPRI[7:0] mask */
  66. #else
  67. #define ISR_STATE_MASK ((uint32)0x00000001UL) /**< @brief PRIMASK bit 0 */
  68. #endif
  69. #endif
  70. #else
  71. #ifdef MCAL_PLATFORM_S12
  72. #define ISR_STATE_MASK ((uint32)0x00000010UL) /**< @brief I bit of CCR */
  73. #else
  74. #define ISR_STATE_MASK ((uint32)0x00008000UL) /**< @brief EE bit of MSR */
  75. #endif
  76. #endif
  77. /*==================================================================================================
  78. * LOCAL MACROS
  79. ==================================================================================================*/
  80. #ifdef MCAL_PLATFORM_ARM
  81. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  82. #define ISR_ON(msr) (uint32)(((uint32)(msr) & (uint32)(ISR_STATE_MASK)) != (uint32)3)
  83. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  84. #define ISR_ON(msr) (uint32)(((uint32)(msr) & (uint32)(ISR_STATE_MASK)) != (uint32)(ISR_STATE_MASK))
  85. #else
  86. #define ISR_ON(msr) (uint32)(((uint32)(msr) & (uint32)(ISR_STATE_MASK)) == (uint32)0)
  87. #endif
  88. #else
  89. #ifdef MCAL_PLATFORM_S12
  90. #define ISR_ON(msr) (uint32)(((uint32)(msr) & (uint32)(ISR_STATE_MASK)) == (uint32)0)
  91. #else
  92. #define ISR_ON(msr) (uint32)((uint32)(msr) & (uint32)(ISR_STATE_MASK))
  93. #endif
  94. #endif
  95. /*==================================================================================================
  96. * FILE VERSION CHECKS
  97. ==================================================================================================*/
  98. /*==================================================================================================
  99. * LOCAL TYPEDEFS (STRUCTURES, UNIONS, ENUMS)
  100. ==================================================================================================*/
  101. /*==================================================================================================
  102. * LOCAL VARIABLES
  103. ==================================================================================================*/
  104. #define RTE_START_SEC_VAR_CLEARED_32_NO_CACHEABLE
  105. #include "Rte_MemMap.h"
  106. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_00[NUMBER_OF_CORES];
  107. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_00[NUMBER_OF_CORES];
  108. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_01[NUMBER_OF_CORES];
  109. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_01[NUMBER_OF_CORES];
  110. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_02[NUMBER_OF_CORES];
  111. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_02[NUMBER_OF_CORES];
  112. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_03[NUMBER_OF_CORES];
  113. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_03[NUMBER_OF_CORES];
  114. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_04[NUMBER_OF_CORES];
  115. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_04[NUMBER_OF_CORES];
  116. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_05[NUMBER_OF_CORES];
  117. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_05[NUMBER_OF_CORES];
  118. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_06[NUMBER_OF_CORES];
  119. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_06[NUMBER_OF_CORES];
  120. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_07[NUMBER_OF_CORES];
  121. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_07[NUMBER_OF_CORES];
  122. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_08[NUMBER_OF_CORES];
  123. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_08[NUMBER_OF_CORES];
  124. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_09[NUMBER_OF_CORES];
  125. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_09[NUMBER_OF_CORES];
  126. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_10[NUMBER_OF_CORES];
  127. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_10[NUMBER_OF_CORES];
  128. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_11[NUMBER_OF_CORES];
  129. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_11[NUMBER_OF_CORES];
  130. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_12[NUMBER_OF_CORES];
  131. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_12[NUMBER_OF_CORES];
  132. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_13[NUMBER_OF_CORES];
  133. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_13[NUMBER_OF_CORES];
  134. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_14[NUMBER_OF_CORES];
  135. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_14[NUMBER_OF_CORES];
  136. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_15[NUMBER_OF_CORES];
  137. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_15[NUMBER_OF_CORES];
  138. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_16[NUMBER_OF_CORES];
  139. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_16[NUMBER_OF_CORES];
  140. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_17[NUMBER_OF_CORES];
  141. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_17[NUMBER_OF_CORES];
  142. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_18[NUMBER_OF_CORES];
  143. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_18[NUMBER_OF_CORES];
  144. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_19[NUMBER_OF_CORES];
  145. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_19[NUMBER_OF_CORES];
  146. static volatile uint32 msr_CAN_EXCLUSIVE_AREA_20[NUMBER_OF_CORES];
  147. static volatile uint32 reentry_guard_CAN_EXCLUSIVE_AREA_20[NUMBER_OF_CORES];
  148. #define RTE_STOP_SEC_VAR_CLEARED_32_NO_CACHEABLE
  149. #include "Rte_MemMap.h"
  150. /*==================================================================================================
  151. * GLOBAL CONSTANTS
  152. ==================================================================================================*/
  153. /*==================================================================================================
  154. * GLOBAL VARIABLES
  155. ==================================================================================================*/
  156. /*==================================================================================================
  157. * LOCAL FUNCTION PROTOTYPES
  158. ==================================================================================================*/
  159. #ifndef _COSMIC_C_S32K1XX_
  160. /*================================================================================================*/
  161. /**
  162. * @brief This function returns the MSR register value (32 bits).
  163. * @details This function returns the MSR register value (32 bits).
  164. *
  165. * @param[in] void No input parameters
  166. * @return uint32 msr This function returns the MSR register value (32 bits).
  167. *
  168. * @pre None
  169. * @post None
  170. *
  171. */
  172. uint32 Can_schm_read_msr(void);
  173. #endif /*ifndef _COSMIC_C_S32K1XX_*/
  174. /*==================================================================================================
  175. * LOCAL FUNCTIONS
  176. ==================================================================================================*/
  177. #define RTE_START_SEC_CODE
  178. #include "Rte_MemMap.h"
  179. #if (defined(_GREENHILLS_C_S32K1XX_) || defined(_CODEWARRIOR_C_S32K1XX_))
  180. /*================================================================================================*/
  181. /**
  182. * @brief This macro returns the MSR register value (32 bits).
  183. * @details This macro function implementation returns the MSR register value in r3 (32 bits).
  184. *
  185. * @pre None
  186. * @post None
  187. *
  188. */
  189. #ifdef MCAL_PLATFORM_ARM
  190. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  191. ASM_KEYWORD uint32 Can_schm_read_msr(void)
  192. {
  193. mrs x0, S3_3_c4_c2_1
  194. }
  195. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  196. ASM_KEYWORD uint32 Can_schm_read_msr(void)
  197. {
  198. mrs r0, CPSR
  199. }
  200. #else
  201. ASM_KEYWORD uint32 Can_schm_read_msr(void)
  202. {
  203. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  204. mrs r0, BASEPRI
  205. #else
  206. mrs r0, PRIMASK
  207. #endif
  208. }
  209. #endif
  210. #else
  211. #ifdef MCAL_PLATFORM_S12
  212. ASM_KEYWORD uint32 Can_schm_read_msr(void)
  213. {
  214. tfr ccr, d6
  215. }
  216. #else
  217. ASM_KEYWORD uint32 Can_schm_read_msr(void)
  218. {
  219. mfmsr r3
  220. }
  221. #endif
  222. #endif
  223. #endif /*#ifdef GHS||CW*/
  224. #ifdef _DIABDATA_C_S32K1XX_
  225. /**
  226. * @brief This function returns the MSR register value (32 bits).
  227. * @details This function returns the MSR register value (32 bits).
  228. *
  229. * @param[in] void No input parameters
  230. * @return uint32 msr This function returns the MSR register value (32 bits).
  231. *
  232. * @pre None
  233. * @post None
  234. *
  235. */
  236. #ifdef MCAL_PLATFORM_ARM
  237. uint32 Can_schm_read_msr(void)
  238. {
  239. register uint32 reg_tmp;
  240. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  241. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  242. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  243. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  244. #else
  245. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  246. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  247. #else
  248. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  249. #endif
  250. #endif
  251. return (uint32)reg_tmp;
  252. }
  253. #else
  254. ASM_KEYWORD uint32 Can_schm_read_msr(void)
  255. {
  256. mfmsr r3
  257. }
  258. #endif /* MCAL_PLATFORM_ARM */
  259. #endif /* _DIABDATA_C_S32K1XX_*/
  260. #ifdef _COSMIC_C_S32K1XX_
  261. /*================================================================================================*/
  262. /**
  263. * @brief This function returns the MSR register value (32 bits).
  264. * @details This function returns the MSR register value (32 bits).
  265. *
  266. * @param[in] void No input parameters
  267. * @return uint32 msr This function returns the MSR register value (32 bits).
  268. *
  269. * @pre None
  270. * @post None
  271. *
  272. */
  273. #ifdef MCAL_PLATFORM_S12
  274. #define Can_schm_read_msr() ASM_KEYWORD("tfr ccr, d6")
  275. #else
  276. #define Can_schm_read_msr() ASM_KEYWORD("mfmsr r3")
  277. #endif
  278. #endif /*Cosmic compiler only*/
  279. #ifdef _HITECH_C_S32K1XX_
  280. /*================================================================================================*/
  281. /**
  282. * @brief This function returns the MSR register value (32 bits).
  283. * @details This function returns the MSR register value (32 bits).
  284. *
  285. * @param[in] void No input parameters
  286. * @return uint32 msr This function returns the MSR register value (32 bits).
  287. *
  288. * @pre None
  289. * @post None
  290. *
  291. */
  292. uint32 Can_schm_read_msr(void)
  293. {
  294. uint32 result;
  295. __asm volatile("mfmsr %0" : "=r" (result) :);
  296. return result;
  297. }
  298. #endif /*HighTec compiler only*/
  299. /*================================================================================================*/
  300. #ifdef _LINARO_C_S32K1XX_
  301. /**
  302. * @brief This function returns the MSR register value (32 bits).
  303. * @details This function returns the MSR register value (32 bits).
  304. *
  305. * @param[in] void No input parameters
  306. * @return uint32 msr This function returns the MSR register value (32 bits).
  307. *
  308. * @pre None
  309. * @post None
  310. *
  311. */
  312. uint32 Can_schm_read_msr(void)
  313. {
  314. register uint32 reg_tmp;
  315. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  316. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  317. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  318. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  319. #else
  320. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  321. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  322. #else
  323. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  324. #endif
  325. #endif
  326. return (uint32)reg_tmp;
  327. }
  328. #endif /* _LINARO_C_S32K1XX_*/
  329. /*================================================================================================*/
  330. #ifdef _ARM_DS5_C_S32K1XX_
  331. /**
  332. * @brief This function returns the MSR register value (32 bits).
  333. * @details This function returns the MSR register value (32 bits).
  334. *
  335. * @param[in] void No input parameters
  336. * @return uint32 msr This function returns the MSR register value (32 bits).
  337. *
  338. * @pre None
  339. * @post None
  340. *
  341. */
  342. uint32 Can_schm_read_msr(void)
  343. {
  344. register uint32 reg_tmp;
  345. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  346. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  347. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  348. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  349. #else
  350. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  351. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  352. #else
  353. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  354. #endif
  355. #endif
  356. return (uint32)reg_tmp;
  357. }
  358. #endif /* _ARM_DS5_C_S32K1XX_ */
  359. #ifdef _IAR_C_S32K1XX_
  360. /**
  361. * @brief This function returns the MSR register value (32 bits).
  362. * @details This function returns the MSR register value (32 bits).
  363. *
  364. * @param[in] void No input parameters
  365. * @return uint32 msr This function returns the MSR register value (32 bits).
  366. *
  367. * @pre None
  368. * @post None
  369. *
  370. */
  371. uint32 Can_schm_read_msr(void)
  372. {
  373. register uint32 reg_tmp;
  374. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  375. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  376. #else
  377. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  378. #endif
  379. return (uint32)reg_tmp;
  380. }
  381. #endif /* _IAR_C_S32K1XX_ */
  382. #define RTE_STOP_SEC_CODE
  383. #include "Rte_MemMap.h"
  384. /*==================================================================================================
  385. * GLOBAL FUNCTIONS
  386. ==================================================================================================*/
  387. #define RTE_START_SEC_CODE
  388. #include "Rte_MemMap.h"
  389. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_00(void)
  390. {
  391. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  392. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_00[u32CoreId])
  393. {
  394. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  395. msr_CAN_EXCLUSIVE_AREA_00[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  396. #else
  397. msr_CAN_EXCLUSIVE_AREA_00[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  398. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  399. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_00[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  400. {
  401. OsIf_SuspendAllInterrupts();
  402. #ifdef _ARM_DS5_C_S32K1XX_
  403. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  404. #endif
  405. }
  406. }
  407. reentry_guard_CAN_EXCLUSIVE_AREA_00[u32CoreId]++;
  408. }
  409. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_00(void)
  410. {
  411. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  412. reentry_guard_CAN_EXCLUSIVE_AREA_00[u32CoreId]--;
  413. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_00[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_00[u32CoreId])) /*if interrupts were enabled*/
  414. {
  415. OsIf_ResumeAllInterrupts();
  416. #ifdef _ARM_DS5_C_S32K1XX_
  417. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  418. #endif
  419. }
  420. }
  421. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_01(void)
  422. {
  423. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  424. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_01[u32CoreId])
  425. {
  426. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  427. msr_CAN_EXCLUSIVE_AREA_01[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  428. #else
  429. msr_CAN_EXCLUSIVE_AREA_01[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  430. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  431. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_01[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  432. {
  433. OsIf_SuspendAllInterrupts();
  434. #ifdef _ARM_DS5_C_S32K1XX_
  435. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  436. #endif
  437. }
  438. }
  439. reentry_guard_CAN_EXCLUSIVE_AREA_01[u32CoreId]++;
  440. }
  441. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_01(void)
  442. {
  443. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  444. reentry_guard_CAN_EXCLUSIVE_AREA_01[u32CoreId]--;
  445. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_01[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_01[u32CoreId])) /*if interrupts were enabled*/
  446. {
  447. OsIf_ResumeAllInterrupts();
  448. #ifdef _ARM_DS5_C_S32K1XX_
  449. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  450. #endif
  451. }
  452. }
  453. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_02(void)
  454. {
  455. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  456. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_02[u32CoreId])
  457. {
  458. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  459. msr_CAN_EXCLUSIVE_AREA_02[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  460. #else
  461. msr_CAN_EXCLUSIVE_AREA_02[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  462. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  463. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_02[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  464. {
  465. OsIf_SuspendAllInterrupts();
  466. #ifdef _ARM_DS5_C_S32K1XX_
  467. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  468. #endif
  469. }
  470. }
  471. reentry_guard_CAN_EXCLUSIVE_AREA_02[u32CoreId]++;
  472. }
  473. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_02(void)
  474. {
  475. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  476. reentry_guard_CAN_EXCLUSIVE_AREA_02[u32CoreId]--;
  477. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_02[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_02[u32CoreId])) /*if interrupts were enabled*/
  478. {
  479. OsIf_ResumeAllInterrupts();
  480. #ifdef _ARM_DS5_C_S32K1XX_
  481. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  482. #endif
  483. }
  484. }
  485. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_03(void)
  486. {
  487. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  488. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_03[u32CoreId])
  489. {
  490. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  491. msr_CAN_EXCLUSIVE_AREA_03[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  492. #else
  493. msr_CAN_EXCLUSIVE_AREA_03[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  494. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  495. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_03[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  496. {
  497. OsIf_SuspendAllInterrupts();
  498. #ifdef _ARM_DS5_C_S32K1XX_
  499. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  500. #endif
  501. }
  502. }
  503. reentry_guard_CAN_EXCLUSIVE_AREA_03[u32CoreId]++;
  504. }
  505. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_03(void)
  506. {
  507. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  508. reentry_guard_CAN_EXCLUSIVE_AREA_03[u32CoreId]--;
  509. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_03[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_03[u32CoreId])) /*if interrupts were enabled*/
  510. {
  511. OsIf_ResumeAllInterrupts();
  512. #ifdef _ARM_DS5_C_S32K1XX_
  513. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  514. #endif
  515. }
  516. }
  517. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_04(void)
  518. {
  519. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  520. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_04[u32CoreId])
  521. {
  522. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  523. msr_CAN_EXCLUSIVE_AREA_04[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  524. #else
  525. msr_CAN_EXCLUSIVE_AREA_04[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  526. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  527. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_04[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  528. {
  529. OsIf_SuspendAllInterrupts();
  530. #ifdef _ARM_DS5_C_S32K1XX_
  531. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  532. #endif
  533. }
  534. }
  535. reentry_guard_CAN_EXCLUSIVE_AREA_04[u32CoreId]++;
  536. }
  537. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_04(void)
  538. {
  539. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  540. reentry_guard_CAN_EXCLUSIVE_AREA_04[u32CoreId]--;
  541. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_04[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_04[u32CoreId])) /*if interrupts were enabled*/
  542. {
  543. OsIf_ResumeAllInterrupts();
  544. #ifdef _ARM_DS5_C_S32K1XX_
  545. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  546. #endif
  547. }
  548. }
  549. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_05(void)
  550. {
  551. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  552. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_05[u32CoreId])
  553. {
  554. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  555. msr_CAN_EXCLUSIVE_AREA_05[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  556. #else
  557. msr_CAN_EXCLUSIVE_AREA_05[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  558. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  559. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_05[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  560. {
  561. OsIf_SuspendAllInterrupts();
  562. #ifdef _ARM_DS5_C_S32K1XX_
  563. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  564. #endif
  565. }
  566. }
  567. reentry_guard_CAN_EXCLUSIVE_AREA_05[u32CoreId]++;
  568. }
  569. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_05(void)
  570. {
  571. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  572. reentry_guard_CAN_EXCLUSIVE_AREA_05[u32CoreId]--;
  573. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_05[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_05[u32CoreId])) /*if interrupts were enabled*/
  574. {
  575. OsIf_ResumeAllInterrupts();
  576. #ifdef _ARM_DS5_C_S32K1XX_
  577. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  578. #endif
  579. }
  580. }
  581. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_06(void)
  582. {
  583. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  584. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_06[u32CoreId])
  585. {
  586. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  587. msr_CAN_EXCLUSIVE_AREA_06[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  588. #else
  589. msr_CAN_EXCLUSIVE_AREA_06[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  590. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  591. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_06[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  592. {
  593. OsIf_SuspendAllInterrupts();
  594. #ifdef _ARM_DS5_C_S32K1XX_
  595. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  596. #endif
  597. }
  598. }
  599. reentry_guard_CAN_EXCLUSIVE_AREA_06[u32CoreId]++;
  600. }
  601. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_06(void)
  602. {
  603. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  604. reentry_guard_CAN_EXCLUSIVE_AREA_06[u32CoreId]--;
  605. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_06[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_06[u32CoreId])) /*if interrupts were enabled*/
  606. {
  607. OsIf_ResumeAllInterrupts();
  608. #ifdef _ARM_DS5_C_S32K1XX_
  609. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  610. #endif
  611. }
  612. }
  613. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_07(void)
  614. {
  615. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  616. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_07[u32CoreId])
  617. {
  618. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  619. msr_CAN_EXCLUSIVE_AREA_07[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  620. #else
  621. msr_CAN_EXCLUSIVE_AREA_07[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  622. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  623. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_07[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  624. {
  625. OsIf_SuspendAllInterrupts();
  626. #ifdef _ARM_DS5_C_S32K1XX_
  627. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  628. #endif
  629. }
  630. }
  631. reentry_guard_CAN_EXCLUSIVE_AREA_07[u32CoreId]++;
  632. }
  633. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_07(void)
  634. {
  635. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  636. reentry_guard_CAN_EXCLUSIVE_AREA_07[u32CoreId]--;
  637. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_07[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_07[u32CoreId])) /*if interrupts were enabled*/
  638. {
  639. OsIf_ResumeAllInterrupts();
  640. #ifdef _ARM_DS5_C_S32K1XX_
  641. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  642. #endif
  643. }
  644. }
  645. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_08(void)
  646. {
  647. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  648. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_08[u32CoreId])
  649. {
  650. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  651. msr_CAN_EXCLUSIVE_AREA_08[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  652. #else
  653. msr_CAN_EXCLUSIVE_AREA_08[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  654. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  655. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_08[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  656. {
  657. OsIf_SuspendAllInterrupts();
  658. #ifdef _ARM_DS5_C_S32K1XX_
  659. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  660. #endif
  661. }
  662. }
  663. reentry_guard_CAN_EXCLUSIVE_AREA_08[u32CoreId]++;
  664. }
  665. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_08(void)
  666. {
  667. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  668. reentry_guard_CAN_EXCLUSIVE_AREA_08[u32CoreId]--;
  669. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_08[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_08[u32CoreId])) /*if interrupts were enabled*/
  670. {
  671. OsIf_ResumeAllInterrupts();
  672. #ifdef _ARM_DS5_C_S32K1XX_
  673. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  674. #endif
  675. }
  676. }
  677. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_09(void)
  678. {
  679. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  680. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_09[u32CoreId])
  681. {
  682. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  683. msr_CAN_EXCLUSIVE_AREA_09[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  684. #else
  685. msr_CAN_EXCLUSIVE_AREA_09[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  686. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  687. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_09[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  688. {
  689. OsIf_SuspendAllInterrupts();
  690. #ifdef _ARM_DS5_C_S32K1XX_
  691. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  692. #endif
  693. }
  694. }
  695. reentry_guard_CAN_EXCLUSIVE_AREA_09[u32CoreId]++;
  696. }
  697. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_09(void)
  698. {
  699. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  700. reentry_guard_CAN_EXCLUSIVE_AREA_09[u32CoreId]--;
  701. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_09[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_09[u32CoreId])) /*if interrupts were enabled*/
  702. {
  703. OsIf_ResumeAllInterrupts();
  704. #ifdef _ARM_DS5_C_S32K1XX_
  705. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  706. #endif
  707. }
  708. }
  709. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_10(void)
  710. {
  711. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  712. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_10[u32CoreId])
  713. {
  714. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  715. msr_CAN_EXCLUSIVE_AREA_10[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  716. #else
  717. msr_CAN_EXCLUSIVE_AREA_10[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  718. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  719. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_10[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  720. {
  721. OsIf_SuspendAllInterrupts();
  722. #ifdef _ARM_DS5_C_S32K1XX_
  723. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  724. #endif
  725. }
  726. }
  727. reentry_guard_CAN_EXCLUSIVE_AREA_10[u32CoreId]++;
  728. }
  729. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_10(void)
  730. {
  731. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  732. reentry_guard_CAN_EXCLUSIVE_AREA_10[u32CoreId]--;
  733. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_10[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_10[u32CoreId])) /*if interrupts were enabled*/
  734. {
  735. OsIf_ResumeAllInterrupts();
  736. #ifdef _ARM_DS5_C_S32K1XX_
  737. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  738. #endif
  739. }
  740. }
  741. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_11(void)
  742. {
  743. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  744. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_11[u32CoreId])
  745. {
  746. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  747. msr_CAN_EXCLUSIVE_AREA_11[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  748. #else
  749. msr_CAN_EXCLUSIVE_AREA_11[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  750. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  751. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_11[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  752. {
  753. OsIf_SuspendAllInterrupts();
  754. #ifdef _ARM_DS5_C_S32K1XX_
  755. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  756. #endif
  757. }
  758. }
  759. reentry_guard_CAN_EXCLUSIVE_AREA_11[u32CoreId]++;
  760. }
  761. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_11(void)
  762. {
  763. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  764. reentry_guard_CAN_EXCLUSIVE_AREA_11[u32CoreId]--;
  765. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_11[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_11[u32CoreId])) /*if interrupts were enabled*/
  766. {
  767. OsIf_ResumeAllInterrupts();
  768. #ifdef _ARM_DS5_C_S32K1XX_
  769. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  770. #endif
  771. }
  772. }
  773. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_12(void)
  774. {
  775. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  776. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_12[u32CoreId])
  777. {
  778. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  779. msr_CAN_EXCLUSIVE_AREA_12[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  780. #else
  781. msr_CAN_EXCLUSIVE_AREA_12[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  782. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  783. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_12[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  784. {
  785. OsIf_SuspendAllInterrupts();
  786. #ifdef _ARM_DS5_C_S32K1XX_
  787. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  788. #endif
  789. }
  790. }
  791. reentry_guard_CAN_EXCLUSIVE_AREA_12[u32CoreId]++;
  792. }
  793. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_12(void)
  794. {
  795. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  796. reentry_guard_CAN_EXCLUSIVE_AREA_12[u32CoreId]--;
  797. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_12[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_12[u32CoreId])) /*if interrupts were enabled*/
  798. {
  799. OsIf_ResumeAllInterrupts();
  800. #ifdef _ARM_DS5_C_S32K1XX_
  801. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  802. #endif
  803. }
  804. }
  805. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_13(void)
  806. {
  807. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  808. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_13[u32CoreId])
  809. {
  810. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  811. msr_CAN_EXCLUSIVE_AREA_13[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  812. #else
  813. msr_CAN_EXCLUSIVE_AREA_13[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  814. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  815. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_13[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  816. {
  817. OsIf_SuspendAllInterrupts();
  818. #ifdef _ARM_DS5_C_S32K1XX_
  819. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  820. #endif
  821. }
  822. }
  823. reentry_guard_CAN_EXCLUSIVE_AREA_13[u32CoreId]++;
  824. }
  825. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_13(void)
  826. {
  827. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  828. reentry_guard_CAN_EXCLUSIVE_AREA_13[u32CoreId]--;
  829. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_13[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_13[u32CoreId])) /*if interrupts were enabled*/
  830. {
  831. OsIf_ResumeAllInterrupts();
  832. #ifdef _ARM_DS5_C_S32K1XX_
  833. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  834. #endif
  835. }
  836. }
  837. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_14(void)
  838. {
  839. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  840. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_14[u32CoreId])
  841. {
  842. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  843. msr_CAN_EXCLUSIVE_AREA_14[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  844. #else
  845. msr_CAN_EXCLUSIVE_AREA_14[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  846. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  847. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_14[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  848. {
  849. OsIf_SuspendAllInterrupts();
  850. #ifdef _ARM_DS5_C_S32K1XX_
  851. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  852. #endif
  853. }
  854. }
  855. reentry_guard_CAN_EXCLUSIVE_AREA_14[u32CoreId]++;
  856. }
  857. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_14(void)
  858. {
  859. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  860. reentry_guard_CAN_EXCLUSIVE_AREA_14[u32CoreId]--;
  861. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_14[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_14[u32CoreId])) /*if interrupts were enabled*/
  862. {
  863. OsIf_ResumeAllInterrupts();
  864. #ifdef _ARM_DS5_C_S32K1XX_
  865. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  866. #endif
  867. }
  868. }
  869. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_15(void)
  870. {
  871. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  872. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_15[u32CoreId])
  873. {
  874. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  875. msr_CAN_EXCLUSIVE_AREA_15[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  876. #else
  877. msr_CAN_EXCLUSIVE_AREA_15[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  878. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  879. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_15[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  880. {
  881. OsIf_SuspendAllInterrupts();
  882. #ifdef _ARM_DS5_C_S32K1XX_
  883. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  884. #endif
  885. }
  886. }
  887. reentry_guard_CAN_EXCLUSIVE_AREA_15[u32CoreId]++;
  888. }
  889. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_15(void)
  890. {
  891. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  892. reentry_guard_CAN_EXCLUSIVE_AREA_15[u32CoreId]--;
  893. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_15[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_15[u32CoreId])) /*if interrupts were enabled*/
  894. {
  895. OsIf_ResumeAllInterrupts();
  896. #ifdef _ARM_DS5_C_S32K1XX_
  897. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  898. #endif
  899. }
  900. }
  901. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_16(void)
  902. {
  903. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  904. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_16[u32CoreId])
  905. {
  906. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  907. msr_CAN_EXCLUSIVE_AREA_16[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  908. #else
  909. msr_CAN_EXCLUSIVE_AREA_16[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  910. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  911. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_16[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  912. {
  913. OsIf_SuspendAllInterrupts();
  914. #ifdef _ARM_DS5_C_S32K1XX_
  915. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  916. #endif
  917. }
  918. }
  919. reentry_guard_CAN_EXCLUSIVE_AREA_16[u32CoreId]++;
  920. }
  921. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_16(void)
  922. {
  923. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  924. reentry_guard_CAN_EXCLUSIVE_AREA_16[u32CoreId]--;
  925. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_16[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_16[u32CoreId])) /*if interrupts were enabled*/
  926. {
  927. OsIf_ResumeAllInterrupts();
  928. #ifdef _ARM_DS5_C_S32K1XX_
  929. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  930. #endif
  931. }
  932. }
  933. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_17(void)
  934. {
  935. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  936. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_17[u32CoreId])
  937. {
  938. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  939. msr_CAN_EXCLUSIVE_AREA_17[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  940. #else
  941. msr_CAN_EXCLUSIVE_AREA_17[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  942. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  943. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_17[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  944. {
  945. OsIf_SuspendAllInterrupts();
  946. #ifdef _ARM_DS5_C_S32K1XX_
  947. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  948. #endif
  949. }
  950. }
  951. reentry_guard_CAN_EXCLUSIVE_AREA_17[u32CoreId]++;
  952. }
  953. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_17(void)
  954. {
  955. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  956. reentry_guard_CAN_EXCLUSIVE_AREA_17[u32CoreId]--;
  957. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_17[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_17[u32CoreId])) /*if interrupts were enabled*/
  958. {
  959. OsIf_ResumeAllInterrupts();
  960. #ifdef _ARM_DS5_C_S32K1XX_
  961. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  962. #endif
  963. }
  964. }
  965. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_18(void)
  966. {
  967. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  968. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_18[u32CoreId])
  969. {
  970. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  971. msr_CAN_EXCLUSIVE_AREA_18[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  972. #else
  973. msr_CAN_EXCLUSIVE_AREA_18[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  974. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  975. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_18[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  976. {
  977. OsIf_SuspendAllInterrupts();
  978. #ifdef _ARM_DS5_C_S32K1XX_
  979. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  980. #endif
  981. }
  982. }
  983. reentry_guard_CAN_EXCLUSIVE_AREA_18[u32CoreId]++;
  984. }
  985. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_18(void)
  986. {
  987. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  988. reentry_guard_CAN_EXCLUSIVE_AREA_18[u32CoreId]--;
  989. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_18[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_18[u32CoreId])) /*if interrupts were enabled*/
  990. {
  991. OsIf_ResumeAllInterrupts();
  992. #ifdef _ARM_DS5_C_S32K1XX_
  993. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  994. #endif
  995. }
  996. }
  997. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_19(void)
  998. {
  999. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1000. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_19[u32CoreId])
  1001. {
  1002. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1003. msr_CAN_EXCLUSIVE_AREA_19[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  1004. #else
  1005. msr_CAN_EXCLUSIVE_AREA_19[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1006. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1007. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_19[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1008. {
  1009. OsIf_SuspendAllInterrupts();
  1010. #ifdef _ARM_DS5_C_S32K1XX_
  1011. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1012. #endif
  1013. }
  1014. }
  1015. reentry_guard_CAN_EXCLUSIVE_AREA_19[u32CoreId]++;
  1016. }
  1017. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_19(void)
  1018. {
  1019. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1020. reentry_guard_CAN_EXCLUSIVE_AREA_19[u32CoreId]--;
  1021. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_19[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_19[u32CoreId])) /*if interrupts were enabled*/
  1022. {
  1023. OsIf_ResumeAllInterrupts();
  1024. #ifdef _ARM_DS5_C_S32K1XX_
  1025. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1026. #endif
  1027. }
  1028. }
  1029. void SchM_Enter_Can_CAN_EXCLUSIVE_AREA_20(void)
  1030. {
  1031. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1032. if(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_20[u32CoreId])
  1033. {
  1034. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1035. msr_CAN_EXCLUSIVE_AREA_20[u32CoreId] = OsIf_Trusted_Call_Return(Can_schm_read_msr);
  1036. #else
  1037. msr_CAN_EXCLUSIVE_AREA_20[u32CoreId] = Can_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1038. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1039. if (ISR_ON(msr_CAN_EXCLUSIVE_AREA_20[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1040. {
  1041. OsIf_SuspendAllInterrupts();
  1042. #ifdef _ARM_DS5_C_S32K1XX_
  1043. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1044. #endif
  1045. }
  1046. }
  1047. reentry_guard_CAN_EXCLUSIVE_AREA_20[u32CoreId]++;
  1048. }
  1049. void SchM_Exit_Can_CAN_EXCLUSIVE_AREA_20(void)
  1050. {
  1051. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1052. reentry_guard_CAN_EXCLUSIVE_AREA_20[u32CoreId]--;
  1053. if ((ISR_ON(msr_CAN_EXCLUSIVE_AREA_20[u32CoreId]))&&(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_20[u32CoreId])) /*if interrupts were enabled*/
  1054. {
  1055. OsIf_ResumeAllInterrupts();
  1056. #ifdef _ARM_DS5_C_S32K1XX_
  1057. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1058. #endif
  1059. }
  1060. }
  1061. #ifdef MCAL_TESTING_ENVIRONMENT
  1062. /**
  1063. @brief This function checks that all entered exclusive areas were also exited.
  1064. @details This function checks that all entered exclusive areas were also exited. The check
  1065. is done by verifying that all reentry_guard_* static variables are back to the
  1066. zero value.
  1067. @param[in] void No input parameters
  1068. @return void This function does not return a value. Test asserts are used instead.
  1069. @pre None
  1070. @post None
  1071. @remarks Covers
  1072. @remarks Implements
  1073. */
  1074. void SchM_Check_can(void)
  1075. {
  1076. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1077. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_00[u32CoreId]);
  1078. reentry_guard_CAN_EXCLUSIVE_AREA_00[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_00 for the next test in the suite*/
  1079. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_01[u32CoreId]);
  1080. reentry_guard_CAN_EXCLUSIVE_AREA_01[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_01 for the next test in the suite*/
  1081. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_02[u32CoreId]);
  1082. reentry_guard_CAN_EXCLUSIVE_AREA_02[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_02 for the next test in the suite*/
  1083. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_03[u32CoreId]);
  1084. reentry_guard_CAN_EXCLUSIVE_AREA_03[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_03 for the next test in the suite*/
  1085. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_04[u32CoreId]);
  1086. reentry_guard_CAN_EXCLUSIVE_AREA_04[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_04 for the next test in the suite*/
  1087. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_05[u32CoreId]);
  1088. reentry_guard_CAN_EXCLUSIVE_AREA_05[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_05 for the next test in the suite*/
  1089. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_06[u32CoreId]);
  1090. reentry_guard_CAN_EXCLUSIVE_AREA_06[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_06 for the next test in the suite*/
  1091. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_07[u32CoreId]);
  1092. reentry_guard_CAN_EXCLUSIVE_AREA_07[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_07 for the next test in the suite*/
  1093. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_08[u32CoreId]);
  1094. reentry_guard_CAN_EXCLUSIVE_AREA_08[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_08 for the next test in the suite*/
  1095. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_09[u32CoreId]);
  1096. reentry_guard_CAN_EXCLUSIVE_AREA_09[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_09 for the next test in the suite*/
  1097. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_10[u32CoreId]);
  1098. reentry_guard_CAN_EXCLUSIVE_AREA_10[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_10 for the next test in the suite*/
  1099. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_11[u32CoreId]);
  1100. reentry_guard_CAN_EXCLUSIVE_AREA_11[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_11 for the next test in the suite*/
  1101. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_12[u32CoreId]);
  1102. reentry_guard_CAN_EXCLUSIVE_AREA_12[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_12 for the next test in the suite*/
  1103. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_13[u32CoreId]);
  1104. reentry_guard_CAN_EXCLUSIVE_AREA_13[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_13 for the next test in the suite*/
  1105. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_14[u32CoreId]);
  1106. reentry_guard_CAN_EXCLUSIVE_AREA_14[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_14 for the next test in the suite*/
  1107. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_15[u32CoreId]);
  1108. reentry_guard_CAN_EXCLUSIVE_AREA_15[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_15 for the next test in the suite*/
  1109. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_16[u32CoreId]);
  1110. reentry_guard_CAN_EXCLUSIVE_AREA_16[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_16 for the next test in the suite*/
  1111. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_17[u32CoreId]);
  1112. reentry_guard_CAN_EXCLUSIVE_AREA_17[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_17 for the next test in the suite*/
  1113. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_18[u32CoreId]);
  1114. reentry_guard_CAN_EXCLUSIVE_AREA_18[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_18 for the next test in the suite*/
  1115. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_19[u32CoreId]);
  1116. reentry_guard_CAN_EXCLUSIVE_AREA_19[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_19 for the next test in the suite*/
  1117. EU_ASSERT(0UL == reentry_guard_CAN_EXCLUSIVE_AREA_20[u32CoreId]);
  1118. reentry_guard_CAN_EXCLUSIVE_AREA_20[u32CoreId] = 0UL; /*reset reentry_guard_CAN_EXCLUSIVE_AREA_20 for the next test in the suite*/
  1119. }
  1120. #endif /*MCAL_TESTING_ENVIRONMENT*/
  1121. #define RTE_STOP_SEC_CODE
  1122. #include "Rte_MemMap.h"
  1123. #ifdef __cplusplus
  1124. }
  1125. #endif
  1126. /** @} */