SchM_Pwm.c 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844
  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_Pwm.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_PWM_AR_RELEASE_MAJOR_VERSION_C 4
  50. #define SCHM_PWM_AR_RELEASE_MINOR_VERSION_C 4
  51. #define SCHM_PWM_AR_RELEASE_REVISION_VERSION_C 0
  52. #define SCHM_PWM_SW_MAJOR_VERSION_C 1
  53. #define SCHM_PWM_SW_MINOR_VERSION_C 0
  54. #define SCHM_PWM_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_PWM_EXCLUSIVE_AREA_00[NUMBER_OF_CORES];
  107. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_00[NUMBER_OF_CORES];
  108. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_01[NUMBER_OF_CORES];
  109. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_01[NUMBER_OF_CORES];
  110. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_02[NUMBER_OF_CORES];
  111. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_02[NUMBER_OF_CORES];
  112. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_03[NUMBER_OF_CORES];
  113. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_03[NUMBER_OF_CORES];
  114. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_04[NUMBER_OF_CORES];
  115. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_04[NUMBER_OF_CORES];
  116. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_05[NUMBER_OF_CORES];
  117. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_05[NUMBER_OF_CORES];
  118. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_06[NUMBER_OF_CORES];
  119. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_06[NUMBER_OF_CORES];
  120. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_07[NUMBER_OF_CORES];
  121. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_07[NUMBER_OF_CORES];
  122. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_08[NUMBER_OF_CORES];
  123. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_08[NUMBER_OF_CORES];
  124. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_09[NUMBER_OF_CORES];
  125. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_09[NUMBER_OF_CORES];
  126. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_10[NUMBER_OF_CORES];
  127. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_10[NUMBER_OF_CORES];
  128. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_11[NUMBER_OF_CORES];
  129. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_11[NUMBER_OF_CORES];
  130. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_12[NUMBER_OF_CORES];
  131. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_12[NUMBER_OF_CORES];
  132. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_13[NUMBER_OF_CORES];
  133. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_13[NUMBER_OF_CORES];
  134. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_14[NUMBER_OF_CORES];
  135. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_14[NUMBER_OF_CORES];
  136. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_15[NUMBER_OF_CORES];
  137. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_15[NUMBER_OF_CORES];
  138. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_16[NUMBER_OF_CORES];
  139. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_16[NUMBER_OF_CORES];
  140. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_17[NUMBER_OF_CORES];
  141. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_17[NUMBER_OF_CORES];
  142. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_18[NUMBER_OF_CORES];
  143. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_18[NUMBER_OF_CORES];
  144. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_19[NUMBER_OF_CORES];
  145. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_19[NUMBER_OF_CORES];
  146. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_20[NUMBER_OF_CORES];
  147. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_20[NUMBER_OF_CORES];
  148. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_21[NUMBER_OF_CORES];
  149. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_21[NUMBER_OF_CORES];
  150. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_22[NUMBER_OF_CORES];
  151. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_22[NUMBER_OF_CORES];
  152. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_23[NUMBER_OF_CORES];
  153. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_23[NUMBER_OF_CORES];
  154. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_24[NUMBER_OF_CORES];
  155. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_24[NUMBER_OF_CORES];
  156. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_25[NUMBER_OF_CORES];
  157. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_25[NUMBER_OF_CORES];
  158. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_26[NUMBER_OF_CORES];
  159. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_26[NUMBER_OF_CORES];
  160. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_27[NUMBER_OF_CORES];
  161. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_27[NUMBER_OF_CORES];
  162. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_28[NUMBER_OF_CORES];
  163. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_28[NUMBER_OF_CORES];
  164. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_29[NUMBER_OF_CORES];
  165. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_29[NUMBER_OF_CORES];
  166. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_30[NUMBER_OF_CORES];
  167. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_30[NUMBER_OF_CORES];
  168. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_31[NUMBER_OF_CORES];
  169. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_31[NUMBER_OF_CORES];
  170. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_32[NUMBER_OF_CORES];
  171. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_32[NUMBER_OF_CORES];
  172. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_33[NUMBER_OF_CORES];
  173. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_33[NUMBER_OF_CORES];
  174. static volatile uint32 msr_PWM_EXCLUSIVE_AREA_34[NUMBER_OF_CORES];
  175. static volatile uint32 reentry_guard_PWM_EXCLUSIVE_AREA_34[NUMBER_OF_CORES];
  176. #define RTE_STOP_SEC_VAR_CLEARED_32_NO_CACHEABLE
  177. #include "Rte_MemMap.h"
  178. /*==================================================================================================
  179. * GLOBAL CONSTANTS
  180. ==================================================================================================*/
  181. /*==================================================================================================
  182. * GLOBAL VARIABLES
  183. ==================================================================================================*/
  184. /*==================================================================================================
  185. * LOCAL FUNCTION PROTOTYPES
  186. ==================================================================================================*/
  187. #ifndef _COSMIC_C_S32K1XX_
  188. /*================================================================================================*/
  189. /**
  190. * @brief This function returns the MSR register value (32 bits).
  191. * @details This function returns the MSR register value (32 bits).
  192. *
  193. * @param[in] void No input parameters
  194. * @return uint32 msr This function returns the MSR register value (32 bits).
  195. *
  196. * @pre None
  197. * @post None
  198. *
  199. */
  200. uint32 Pwm_schm_read_msr(void);
  201. #endif /*ifndef _COSMIC_C_S32K1XX_*/
  202. /*==================================================================================================
  203. * LOCAL FUNCTIONS
  204. ==================================================================================================*/
  205. #define RTE_START_SEC_CODE
  206. #include "Rte_MemMap.h"
  207. #if (defined(_GREENHILLS_C_S32K1XX_) || defined(_CODEWARRIOR_C_S32K1XX_))
  208. /*================================================================================================*/
  209. /**
  210. * @brief This macro returns the MSR register value (32 bits).
  211. * @details This macro function implementation returns the MSR register value in r3 (32 bits).
  212. *
  213. * @pre None
  214. * @post None
  215. *
  216. */
  217. #ifdef MCAL_PLATFORM_ARM
  218. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  219. ASM_KEYWORD uint32 Pwm_schm_read_msr(void)
  220. {
  221. mrs x0, S3_3_c4_c2_1
  222. }
  223. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  224. ASM_KEYWORD uint32 Pwm_schm_read_msr(void)
  225. {
  226. mrs r0, CPSR
  227. }
  228. #else
  229. ASM_KEYWORD uint32 Pwm_schm_read_msr(void)
  230. {
  231. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  232. mrs r0, BASEPRI
  233. #else
  234. mrs r0, PRIMASK
  235. #endif
  236. }
  237. #endif
  238. #else
  239. #ifdef MCAL_PLATFORM_S12
  240. ASM_KEYWORD uint32 Pwm_schm_read_msr(void)
  241. {
  242. tfr ccr, d6
  243. }
  244. #else
  245. ASM_KEYWORD uint32 Pwm_schm_read_msr(void)
  246. {
  247. mfmsr r3
  248. }
  249. #endif
  250. #endif
  251. #endif /*#ifdef GHS||CW*/
  252. #ifdef _DIABDATA_C_S32K1XX_
  253. /**
  254. * @brief This function returns the MSR register value (32 bits).
  255. * @details This function returns the MSR register value (32 bits).
  256. *
  257. * @param[in] void No input parameters
  258. * @return uint32 msr This function returns the MSR register value (32 bits).
  259. *
  260. * @pre None
  261. * @post None
  262. *
  263. */
  264. #ifdef MCAL_PLATFORM_ARM
  265. uint32 Pwm_schm_read_msr(void)
  266. {
  267. register uint32 reg_tmp;
  268. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  269. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  270. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  271. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  272. #else
  273. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  274. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  275. #else
  276. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  277. #endif
  278. #endif
  279. return (uint32)reg_tmp;
  280. }
  281. #else
  282. ASM_KEYWORD uint32 Pwm_schm_read_msr(void)
  283. {
  284. mfmsr r3
  285. }
  286. #endif /* MCAL_PLATFORM_ARM */
  287. #endif /* _DIABDATA_C_S32K1XX_*/
  288. #ifdef _COSMIC_C_S32K1XX_
  289. /*================================================================================================*/
  290. /**
  291. * @brief This function returns the MSR register value (32 bits).
  292. * @details This function returns the MSR register value (32 bits).
  293. *
  294. * @param[in] void No input parameters
  295. * @return uint32 msr This function returns the MSR register value (32 bits).
  296. *
  297. * @pre None
  298. * @post None
  299. *
  300. */
  301. #ifdef MCAL_PLATFORM_S12
  302. #define Pwm_schm_read_msr() ASM_KEYWORD("tfr ccr, d6")
  303. #else
  304. #define Pwm_schm_read_msr() ASM_KEYWORD("mfmsr r3")
  305. #endif
  306. #endif /*Cosmic compiler only*/
  307. #ifdef _HITECH_C_S32K1XX_
  308. /*================================================================================================*/
  309. /**
  310. * @brief This function returns the MSR register value (32 bits).
  311. * @details This function returns the MSR register value (32 bits).
  312. *
  313. * @param[in] void No input parameters
  314. * @return uint32 msr This function returns the MSR register value (32 bits).
  315. *
  316. * @pre None
  317. * @post None
  318. *
  319. */
  320. uint32 Pwm_schm_read_msr(void)
  321. {
  322. uint32 result;
  323. __asm volatile("mfmsr %0" : "=r" (result) :);
  324. return result;
  325. }
  326. #endif /*HighTec compiler only*/
  327. /*================================================================================================*/
  328. #ifdef _LINARO_C_S32K1XX_
  329. /**
  330. * @brief This function returns the MSR register value (32 bits).
  331. * @details This function returns the MSR register value (32 bits).
  332. *
  333. * @param[in] void No input parameters
  334. * @return uint32 msr This function returns the MSR register value (32 bits).
  335. *
  336. * @pre None
  337. * @post None
  338. *
  339. */
  340. uint32 Pwm_schm_read_msr(void)
  341. {
  342. register uint32 reg_tmp;
  343. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  344. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  345. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  346. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  347. #else
  348. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  349. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  350. #else
  351. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  352. #endif
  353. #endif
  354. return (uint32)reg_tmp;
  355. }
  356. #endif /* _LINARO_C_S32K1XX_*/
  357. /*================================================================================================*/
  358. #ifdef _ARM_DS5_C_S32K1XX_
  359. /**
  360. * @brief This function returns the MSR register value (32 bits).
  361. * @details This function returns the MSR register value (32 bits).
  362. *
  363. * @param[in] void No input parameters
  364. * @return uint32 msr This function returns the MSR register value (32 bits).
  365. *
  366. * @pre None
  367. * @post None
  368. *
  369. */
  370. uint32 Pwm_schm_read_msr(void)
  371. {
  372. register uint32 reg_tmp;
  373. #if (MCAL_PLATFORM_ARM == MCAL_ARM_AARCH64)
  374. __asm volatile( " mrs %x0, DAIF " : "=r" (reg_tmp) );
  375. #elif (MCAL_PLATFORM_ARM == MCAL_ARM_RARCH)
  376. __asm volatile( " mrs %0, CPSR " : "=r" (reg_tmp) );
  377. #else
  378. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  379. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  380. #else
  381. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  382. #endif
  383. #endif
  384. return (uint32)reg_tmp;
  385. }
  386. #endif /* _ARM_DS5_C_S32K1XX_ */
  387. #ifdef _IAR_C_S32K1XX_
  388. /**
  389. * @brief This function returns the MSR register value (32 bits).
  390. * @details This function returns the MSR register value (32 bits).
  391. *
  392. * @param[in] void No input parameters
  393. * @return uint32 msr This function returns the MSR register value (32 bits).
  394. *
  395. * @pre None
  396. * @post None
  397. *
  398. */
  399. uint32 Pwm_schm_read_msr(void)
  400. {
  401. register uint32 reg_tmp;
  402. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  403. __asm volatile( " mrs %0, basepri " : "=r" (reg_tmp) );
  404. #else
  405. __asm volatile( " mrs %0, primask " : "=r" (reg_tmp) );
  406. #endif
  407. return (uint32)reg_tmp;
  408. }
  409. #endif /* _IAR_C_S32K1XX_ */
  410. #define RTE_STOP_SEC_CODE
  411. #include "Rte_MemMap.h"
  412. /*==================================================================================================
  413. * GLOBAL FUNCTIONS
  414. ==================================================================================================*/
  415. #define RTE_START_SEC_CODE
  416. #include "Rte_MemMap.h"
  417. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_00(void)
  418. {
  419. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  420. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_00[u32CoreId])
  421. {
  422. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  423. msr_PWM_EXCLUSIVE_AREA_00[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  424. #else
  425. msr_PWM_EXCLUSIVE_AREA_00[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  426. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  427. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_00[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  428. {
  429. OsIf_SuspendAllInterrupts();
  430. #ifdef _ARM_DS5_C_S32K1XX_
  431. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  432. #endif
  433. }
  434. }
  435. reentry_guard_PWM_EXCLUSIVE_AREA_00[u32CoreId]++;
  436. }
  437. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_00(void)
  438. {
  439. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  440. reentry_guard_PWM_EXCLUSIVE_AREA_00[u32CoreId]--;
  441. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_00[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_00[u32CoreId])) /*if interrupts were enabled*/
  442. {
  443. OsIf_ResumeAllInterrupts();
  444. #ifdef _ARM_DS5_C_S32K1XX_
  445. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  446. #endif
  447. }
  448. }
  449. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_01(void)
  450. {
  451. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  452. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_01[u32CoreId])
  453. {
  454. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  455. msr_PWM_EXCLUSIVE_AREA_01[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  456. #else
  457. msr_PWM_EXCLUSIVE_AREA_01[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  458. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  459. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_01[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  460. {
  461. OsIf_SuspendAllInterrupts();
  462. #ifdef _ARM_DS5_C_S32K1XX_
  463. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  464. #endif
  465. }
  466. }
  467. reentry_guard_PWM_EXCLUSIVE_AREA_01[u32CoreId]++;
  468. }
  469. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_01(void)
  470. {
  471. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  472. reentry_guard_PWM_EXCLUSIVE_AREA_01[u32CoreId]--;
  473. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_01[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_01[u32CoreId])) /*if interrupts were enabled*/
  474. {
  475. OsIf_ResumeAllInterrupts();
  476. #ifdef _ARM_DS5_C_S32K1XX_
  477. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  478. #endif
  479. }
  480. }
  481. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_02(void)
  482. {
  483. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  484. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_02[u32CoreId])
  485. {
  486. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  487. msr_PWM_EXCLUSIVE_AREA_02[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  488. #else
  489. msr_PWM_EXCLUSIVE_AREA_02[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  490. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  491. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_02[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  492. {
  493. OsIf_SuspendAllInterrupts();
  494. #ifdef _ARM_DS5_C_S32K1XX_
  495. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  496. #endif
  497. }
  498. }
  499. reentry_guard_PWM_EXCLUSIVE_AREA_02[u32CoreId]++;
  500. }
  501. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_02(void)
  502. {
  503. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  504. reentry_guard_PWM_EXCLUSIVE_AREA_02[u32CoreId]--;
  505. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_02[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_02[u32CoreId])) /*if interrupts were enabled*/
  506. {
  507. OsIf_ResumeAllInterrupts();
  508. #ifdef _ARM_DS5_C_S32K1XX_
  509. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  510. #endif
  511. }
  512. }
  513. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_03(void)
  514. {
  515. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  516. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_03[u32CoreId])
  517. {
  518. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  519. msr_PWM_EXCLUSIVE_AREA_03[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  520. #else
  521. msr_PWM_EXCLUSIVE_AREA_03[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  522. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  523. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_03[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  524. {
  525. OsIf_SuspendAllInterrupts();
  526. #ifdef _ARM_DS5_C_S32K1XX_
  527. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  528. #endif
  529. }
  530. }
  531. reentry_guard_PWM_EXCLUSIVE_AREA_03[u32CoreId]++;
  532. }
  533. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_03(void)
  534. {
  535. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  536. reentry_guard_PWM_EXCLUSIVE_AREA_03[u32CoreId]--;
  537. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_03[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_03[u32CoreId])) /*if interrupts were enabled*/
  538. {
  539. OsIf_ResumeAllInterrupts();
  540. #ifdef _ARM_DS5_C_S32K1XX_
  541. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  542. #endif
  543. }
  544. }
  545. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_04(void)
  546. {
  547. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  548. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_04[u32CoreId])
  549. {
  550. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  551. msr_PWM_EXCLUSIVE_AREA_04[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  552. #else
  553. msr_PWM_EXCLUSIVE_AREA_04[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  554. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  555. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_04[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  556. {
  557. OsIf_SuspendAllInterrupts();
  558. #ifdef _ARM_DS5_C_S32K1XX_
  559. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  560. #endif
  561. }
  562. }
  563. reentry_guard_PWM_EXCLUSIVE_AREA_04[u32CoreId]++;
  564. }
  565. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_04(void)
  566. {
  567. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  568. reentry_guard_PWM_EXCLUSIVE_AREA_04[u32CoreId]--;
  569. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_04[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_04[u32CoreId])) /*if interrupts were enabled*/
  570. {
  571. OsIf_ResumeAllInterrupts();
  572. #ifdef _ARM_DS5_C_S32K1XX_
  573. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  574. #endif
  575. }
  576. }
  577. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_05(void)
  578. {
  579. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  580. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_05[u32CoreId])
  581. {
  582. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  583. msr_PWM_EXCLUSIVE_AREA_05[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  584. #else
  585. msr_PWM_EXCLUSIVE_AREA_05[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  586. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  587. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_05[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  588. {
  589. OsIf_SuspendAllInterrupts();
  590. #ifdef _ARM_DS5_C_S32K1XX_
  591. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  592. #endif
  593. }
  594. }
  595. reentry_guard_PWM_EXCLUSIVE_AREA_05[u32CoreId]++;
  596. }
  597. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_05(void)
  598. {
  599. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  600. reentry_guard_PWM_EXCLUSIVE_AREA_05[u32CoreId]--;
  601. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_05[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_05[u32CoreId])) /*if interrupts were enabled*/
  602. {
  603. OsIf_ResumeAllInterrupts();
  604. #ifdef _ARM_DS5_C_S32K1XX_
  605. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  606. #endif
  607. }
  608. }
  609. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_06(void)
  610. {
  611. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  612. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_06[u32CoreId])
  613. {
  614. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  615. msr_PWM_EXCLUSIVE_AREA_06[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  616. #else
  617. msr_PWM_EXCLUSIVE_AREA_06[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  618. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  619. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_06[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  620. {
  621. OsIf_SuspendAllInterrupts();
  622. #ifdef _ARM_DS5_C_S32K1XX_
  623. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  624. #endif
  625. }
  626. }
  627. reentry_guard_PWM_EXCLUSIVE_AREA_06[u32CoreId]++;
  628. }
  629. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_06(void)
  630. {
  631. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  632. reentry_guard_PWM_EXCLUSIVE_AREA_06[u32CoreId]--;
  633. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_06[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_06[u32CoreId])) /*if interrupts were enabled*/
  634. {
  635. OsIf_ResumeAllInterrupts();
  636. #ifdef _ARM_DS5_C_S32K1XX_
  637. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  638. #endif
  639. }
  640. }
  641. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_07(void)
  642. {
  643. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  644. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_07[u32CoreId])
  645. {
  646. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  647. msr_PWM_EXCLUSIVE_AREA_07[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  648. #else
  649. msr_PWM_EXCLUSIVE_AREA_07[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  650. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  651. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_07[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  652. {
  653. OsIf_SuspendAllInterrupts();
  654. #ifdef _ARM_DS5_C_S32K1XX_
  655. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  656. #endif
  657. }
  658. }
  659. reentry_guard_PWM_EXCLUSIVE_AREA_07[u32CoreId]++;
  660. }
  661. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_07(void)
  662. {
  663. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  664. reentry_guard_PWM_EXCLUSIVE_AREA_07[u32CoreId]--;
  665. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_07[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_07[u32CoreId])) /*if interrupts were enabled*/
  666. {
  667. OsIf_ResumeAllInterrupts();
  668. #ifdef _ARM_DS5_C_S32K1XX_
  669. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  670. #endif
  671. }
  672. }
  673. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_08(void)
  674. {
  675. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  676. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_08[u32CoreId])
  677. {
  678. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  679. msr_PWM_EXCLUSIVE_AREA_08[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  680. #else
  681. msr_PWM_EXCLUSIVE_AREA_08[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  682. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  683. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_08[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  684. {
  685. OsIf_SuspendAllInterrupts();
  686. #ifdef _ARM_DS5_C_S32K1XX_
  687. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  688. #endif
  689. }
  690. }
  691. reentry_guard_PWM_EXCLUSIVE_AREA_08[u32CoreId]++;
  692. }
  693. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_08(void)
  694. {
  695. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  696. reentry_guard_PWM_EXCLUSIVE_AREA_08[u32CoreId]--;
  697. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_08[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_08[u32CoreId])) /*if interrupts were enabled*/
  698. {
  699. OsIf_ResumeAllInterrupts();
  700. #ifdef _ARM_DS5_C_S32K1XX_
  701. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  702. #endif
  703. }
  704. }
  705. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_09(void)
  706. {
  707. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  708. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_09[u32CoreId])
  709. {
  710. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  711. msr_PWM_EXCLUSIVE_AREA_09[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  712. #else
  713. msr_PWM_EXCLUSIVE_AREA_09[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  714. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  715. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_09[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  716. {
  717. OsIf_SuspendAllInterrupts();
  718. #ifdef _ARM_DS5_C_S32K1XX_
  719. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  720. #endif
  721. }
  722. }
  723. reentry_guard_PWM_EXCLUSIVE_AREA_09[u32CoreId]++;
  724. }
  725. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_09(void)
  726. {
  727. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  728. reentry_guard_PWM_EXCLUSIVE_AREA_09[u32CoreId]--;
  729. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_09[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_09[u32CoreId])) /*if interrupts were enabled*/
  730. {
  731. OsIf_ResumeAllInterrupts();
  732. #ifdef _ARM_DS5_C_S32K1XX_
  733. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  734. #endif
  735. }
  736. }
  737. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_10(void)
  738. {
  739. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  740. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_10[u32CoreId])
  741. {
  742. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  743. msr_PWM_EXCLUSIVE_AREA_10[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  744. #else
  745. msr_PWM_EXCLUSIVE_AREA_10[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  746. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  747. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_10[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  748. {
  749. OsIf_SuspendAllInterrupts();
  750. #ifdef _ARM_DS5_C_S32K1XX_
  751. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  752. #endif
  753. }
  754. }
  755. reentry_guard_PWM_EXCLUSIVE_AREA_10[u32CoreId]++;
  756. }
  757. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_10(void)
  758. {
  759. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  760. reentry_guard_PWM_EXCLUSIVE_AREA_10[u32CoreId]--;
  761. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_10[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_10[u32CoreId])) /*if interrupts were enabled*/
  762. {
  763. OsIf_ResumeAllInterrupts();
  764. #ifdef _ARM_DS5_C_S32K1XX_
  765. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  766. #endif
  767. }
  768. }
  769. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_11(void)
  770. {
  771. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  772. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_11[u32CoreId])
  773. {
  774. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  775. msr_PWM_EXCLUSIVE_AREA_11[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  776. #else
  777. msr_PWM_EXCLUSIVE_AREA_11[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  778. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  779. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_11[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  780. {
  781. OsIf_SuspendAllInterrupts();
  782. #ifdef _ARM_DS5_C_S32K1XX_
  783. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  784. #endif
  785. }
  786. }
  787. reentry_guard_PWM_EXCLUSIVE_AREA_11[u32CoreId]++;
  788. }
  789. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_11(void)
  790. {
  791. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  792. reentry_guard_PWM_EXCLUSIVE_AREA_11[u32CoreId]--;
  793. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_11[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_11[u32CoreId])) /*if interrupts were enabled*/
  794. {
  795. OsIf_ResumeAllInterrupts();
  796. #ifdef _ARM_DS5_C_S32K1XX_
  797. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  798. #endif
  799. }
  800. }
  801. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_12(void)
  802. {
  803. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  804. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_12[u32CoreId])
  805. {
  806. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  807. msr_PWM_EXCLUSIVE_AREA_12[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  808. #else
  809. msr_PWM_EXCLUSIVE_AREA_12[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  810. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  811. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_12[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  812. {
  813. OsIf_SuspendAllInterrupts();
  814. #ifdef _ARM_DS5_C_S32K1XX_
  815. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  816. #endif
  817. }
  818. }
  819. reentry_guard_PWM_EXCLUSIVE_AREA_12[u32CoreId]++;
  820. }
  821. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_12(void)
  822. {
  823. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  824. reentry_guard_PWM_EXCLUSIVE_AREA_12[u32CoreId]--;
  825. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_12[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_12[u32CoreId])) /*if interrupts were enabled*/
  826. {
  827. OsIf_ResumeAllInterrupts();
  828. #ifdef _ARM_DS5_C_S32K1XX_
  829. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  830. #endif
  831. }
  832. }
  833. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_13(void)
  834. {
  835. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  836. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_13[u32CoreId])
  837. {
  838. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  839. msr_PWM_EXCLUSIVE_AREA_13[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  840. #else
  841. msr_PWM_EXCLUSIVE_AREA_13[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  842. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  843. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_13[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  844. {
  845. OsIf_SuspendAllInterrupts();
  846. #ifdef _ARM_DS5_C_S32K1XX_
  847. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  848. #endif
  849. }
  850. }
  851. reentry_guard_PWM_EXCLUSIVE_AREA_13[u32CoreId]++;
  852. }
  853. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_13(void)
  854. {
  855. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  856. reentry_guard_PWM_EXCLUSIVE_AREA_13[u32CoreId]--;
  857. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_13[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_13[u32CoreId])) /*if interrupts were enabled*/
  858. {
  859. OsIf_ResumeAllInterrupts();
  860. #ifdef _ARM_DS5_C_S32K1XX_
  861. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  862. #endif
  863. }
  864. }
  865. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_14(void)
  866. {
  867. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  868. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_14[u32CoreId])
  869. {
  870. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  871. msr_PWM_EXCLUSIVE_AREA_14[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  872. #else
  873. msr_PWM_EXCLUSIVE_AREA_14[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  874. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  875. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_14[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  876. {
  877. OsIf_SuspendAllInterrupts();
  878. #ifdef _ARM_DS5_C_S32K1XX_
  879. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  880. #endif
  881. }
  882. }
  883. reentry_guard_PWM_EXCLUSIVE_AREA_14[u32CoreId]++;
  884. }
  885. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_14(void)
  886. {
  887. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  888. reentry_guard_PWM_EXCLUSIVE_AREA_14[u32CoreId]--;
  889. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_14[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_14[u32CoreId])) /*if interrupts were enabled*/
  890. {
  891. OsIf_ResumeAllInterrupts();
  892. #ifdef _ARM_DS5_C_S32K1XX_
  893. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  894. #endif
  895. }
  896. }
  897. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_15(void)
  898. {
  899. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  900. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_15[u32CoreId])
  901. {
  902. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  903. msr_PWM_EXCLUSIVE_AREA_15[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  904. #else
  905. msr_PWM_EXCLUSIVE_AREA_15[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  906. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  907. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_15[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  908. {
  909. OsIf_SuspendAllInterrupts();
  910. #ifdef _ARM_DS5_C_S32K1XX_
  911. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  912. #endif
  913. }
  914. }
  915. reentry_guard_PWM_EXCLUSIVE_AREA_15[u32CoreId]++;
  916. }
  917. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_15(void)
  918. {
  919. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  920. reentry_guard_PWM_EXCLUSIVE_AREA_15[u32CoreId]--;
  921. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_15[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_15[u32CoreId])) /*if interrupts were enabled*/
  922. {
  923. OsIf_ResumeAllInterrupts();
  924. #ifdef _ARM_DS5_C_S32K1XX_
  925. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  926. #endif
  927. }
  928. }
  929. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_16(void)
  930. {
  931. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  932. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_16[u32CoreId])
  933. {
  934. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  935. msr_PWM_EXCLUSIVE_AREA_16[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  936. #else
  937. msr_PWM_EXCLUSIVE_AREA_16[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  938. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  939. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_16[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  940. {
  941. OsIf_SuspendAllInterrupts();
  942. #ifdef _ARM_DS5_C_S32K1XX_
  943. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  944. #endif
  945. }
  946. }
  947. reentry_guard_PWM_EXCLUSIVE_AREA_16[u32CoreId]++;
  948. }
  949. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_16(void)
  950. {
  951. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  952. reentry_guard_PWM_EXCLUSIVE_AREA_16[u32CoreId]--;
  953. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_16[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_16[u32CoreId])) /*if interrupts were enabled*/
  954. {
  955. OsIf_ResumeAllInterrupts();
  956. #ifdef _ARM_DS5_C_S32K1XX_
  957. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  958. #endif
  959. }
  960. }
  961. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_17(void)
  962. {
  963. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  964. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_17[u32CoreId])
  965. {
  966. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  967. msr_PWM_EXCLUSIVE_AREA_17[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  968. #else
  969. msr_PWM_EXCLUSIVE_AREA_17[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  970. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  971. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_17[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  972. {
  973. OsIf_SuspendAllInterrupts();
  974. #ifdef _ARM_DS5_C_S32K1XX_
  975. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  976. #endif
  977. }
  978. }
  979. reentry_guard_PWM_EXCLUSIVE_AREA_17[u32CoreId]++;
  980. }
  981. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_17(void)
  982. {
  983. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  984. reentry_guard_PWM_EXCLUSIVE_AREA_17[u32CoreId]--;
  985. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_17[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_17[u32CoreId])) /*if interrupts were enabled*/
  986. {
  987. OsIf_ResumeAllInterrupts();
  988. #ifdef _ARM_DS5_C_S32K1XX_
  989. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  990. #endif
  991. }
  992. }
  993. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_18(void)
  994. {
  995. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  996. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_18[u32CoreId])
  997. {
  998. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  999. msr_PWM_EXCLUSIVE_AREA_18[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1000. #else
  1001. msr_PWM_EXCLUSIVE_AREA_18[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1002. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1003. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_18[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1004. {
  1005. OsIf_SuspendAllInterrupts();
  1006. #ifdef _ARM_DS5_C_S32K1XX_
  1007. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1008. #endif
  1009. }
  1010. }
  1011. reentry_guard_PWM_EXCLUSIVE_AREA_18[u32CoreId]++;
  1012. }
  1013. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_18(void)
  1014. {
  1015. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1016. reentry_guard_PWM_EXCLUSIVE_AREA_18[u32CoreId]--;
  1017. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_18[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_18[u32CoreId])) /*if interrupts were enabled*/
  1018. {
  1019. OsIf_ResumeAllInterrupts();
  1020. #ifdef _ARM_DS5_C_S32K1XX_
  1021. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1022. #endif
  1023. }
  1024. }
  1025. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_19(void)
  1026. {
  1027. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1028. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_19[u32CoreId])
  1029. {
  1030. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1031. msr_PWM_EXCLUSIVE_AREA_19[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1032. #else
  1033. msr_PWM_EXCLUSIVE_AREA_19[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1034. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1035. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_19[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1036. {
  1037. OsIf_SuspendAllInterrupts();
  1038. #ifdef _ARM_DS5_C_S32K1XX_
  1039. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1040. #endif
  1041. }
  1042. }
  1043. reentry_guard_PWM_EXCLUSIVE_AREA_19[u32CoreId]++;
  1044. }
  1045. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_19(void)
  1046. {
  1047. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1048. reentry_guard_PWM_EXCLUSIVE_AREA_19[u32CoreId]--;
  1049. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_19[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_19[u32CoreId])) /*if interrupts were enabled*/
  1050. {
  1051. OsIf_ResumeAllInterrupts();
  1052. #ifdef _ARM_DS5_C_S32K1XX_
  1053. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1054. #endif
  1055. }
  1056. }
  1057. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_20(void)
  1058. {
  1059. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1060. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_20[u32CoreId])
  1061. {
  1062. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1063. msr_PWM_EXCLUSIVE_AREA_20[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1064. #else
  1065. msr_PWM_EXCLUSIVE_AREA_20[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1066. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1067. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_20[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1068. {
  1069. OsIf_SuspendAllInterrupts();
  1070. #ifdef _ARM_DS5_C_S32K1XX_
  1071. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1072. #endif
  1073. }
  1074. }
  1075. reentry_guard_PWM_EXCLUSIVE_AREA_20[u32CoreId]++;
  1076. }
  1077. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_20(void)
  1078. {
  1079. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1080. reentry_guard_PWM_EXCLUSIVE_AREA_20[u32CoreId]--;
  1081. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_20[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_20[u32CoreId])) /*if interrupts were enabled*/
  1082. {
  1083. OsIf_ResumeAllInterrupts();
  1084. #ifdef _ARM_DS5_C_S32K1XX_
  1085. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1086. #endif
  1087. }
  1088. }
  1089. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_21(void)
  1090. {
  1091. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1092. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_21[u32CoreId])
  1093. {
  1094. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1095. msr_PWM_EXCLUSIVE_AREA_21[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1096. #else
  1097. msr_PWM_EXCLUSIVE_AREA_21[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1098. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1099. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_21[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1100. {
  1101. OsIf_SuspendAllInterrupts();
  1102. #ifdef _ARM_DS5_C_S32K1XX_
  1103. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1104. #endif
  1105. }
  1106. }
  1107. reentry_guard_PWM_EXCLUSIVE_AREA_21[u32CoreId]++;
  1108. }
  1109. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_21(void)
  1110. {
  1111. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1112. reentry_guard_PWM_EXCLUSIVE_AREA_21[u32CoreId]--;
  1113. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_21[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_21[u32CoreId])) /*if interrupts were enabled*/
  1114. {
  1115. OsIf_ResumeAllInterrupts();
  1116. #ifdef _ARM_DS5_C_S32K1XX_
  1117. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1118. #endif
  1119. }
  1120. }
  1121. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_22(void)
  1122. {
  1123. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1124. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_22[u32CoreId])
  1125. {
  1126. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1127. msr_PWM_EXCLUSIVE_AREA_22[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1128. #else
  1129. msr_PWM_EXCLUSIVE_AREA_22[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1130. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1131. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_22[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1132. {
  1133. OsIf_SuspendAllInterrupts();
  1134. #ifdef _ARM_DS5_C_S32K1XX_
  1135. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1136. #endif
  1137. }
  1138. }
  1139. reentry_guard_PWM_EXCLUSIVE_AREA_22[u32CoreId]++;
  1140. }
  1141. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_22(void)
  1142. {
  1143. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1144. reentry_guard_PWM_EXCLUSIVE_AREA_22[u32CoreId]--;
  1145. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_22[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_22[u32CoreId])) /*if interrupts were enabled*/
  1146. {
  1147. OsIf_ResumeAllInterrupts();
  1148. #ifdef _ARM_DS5_C_S32K1XX_
  1149. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1150. #endif
  1151. }
  1152. }
  1153. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_23(void)
  1154. {
  1155. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1156. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_23[u32CoreId])
  1157. {
  1158. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1159. msr_PWM_EXCLUSIVE_AREA_23[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1160. #else
  1161. msr_PWM_EXCLUSIVE_AREA_23[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1162. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1163. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_23[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1164. {
  1165. OsIf_SuspendAllInterrupts();
  1166. #ifdef _ARM_DS5_C_S32K1XX_
  1167. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1168. #endif
  1169. }
  1170. }
  1171. reentry_guard_PWM_EXCLUSIVE_AREA_23[u32CoreId]++;
  1172. }
  1173. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_23(void)
  1174. {
  1175. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1176. reentry_guard_PWM_EXCLUSIVE_AREA_23[u32CoreId]--;
  1177. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_23[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_23[u32CoreId])) /*if interrupts were enabled*/
  1178. {
  1179. OsIf_ResumeAllInterrupts();
  1180. #ifdef _ARM_DS5_C_S32K1XX_
  1181. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1182. #endif
  1183. }
  1184. }
  1185. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_24(void)
  1186. {
  1187. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1188. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_24[u32CoreId])
  1189. {
  1190. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1191. msr_PWM_EXCLUSIVE_AREA_24[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1192. #else
  1193. msr_PWM_EXCLUSIVE_AREA_24[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1194. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1195. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_24[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1196. {
  1197. OsIf_SuspendAllInterrupts();
  1198. #ifdef _ARM_DS5_C_S32K1XX_
  1199. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1200. #endif
  1201. }
  1202. }
  1203. reentry_guard_PWM_EXCLUSIVE_AREA_24[u32CoreId]++;
  1204. }
  1205. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_24(void)
  1206. {
  1207. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1208. reentry_guard_PWM_EXCLUSIVE_AREA_24[u32CoreId]--;
  1209. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_24[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_24[u32CoreId])) /*if interrupts were enabled*/
  1210. {
  1211. OsIf_ResumeAllInterrupts();
  1212. #ifdef _ARM_DS5_C_S32K1XX_
  1213. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1214. #endif
  1215. }
  1216. }
  1217. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_25(void)
  1218. {
  1219. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1220. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_25[u32CoreId])
  1221. {
  1222. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1223. msr_PWM_EXCLUSIVE_AREA_25[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1224. #else
  1225. msr_PWM_EXCLUSIVE_AREA_25[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1226. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1227. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_25[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1228. {
  1229. OsIf_SuspendAllInterrupts();
  1230. #ifdef _ARM_DS5_C_S32K1XX_
  1231. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1232. #endif
  1233. }
  1234. }
  1235. reentry_guard_PWM_EXCLUSIVE_AREA_25[u32CoreId]++;
  1236. }
  1237. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_25(void)
  1238. {
  1239. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1240. reentry_guard_PWM_EXCLUSIVE_AREA_25[u32CoreId]--;
  1241. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_25[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_25[u32CoreId])) /*if interrupts were enabled*/
  1242. {
  1243. OsIf_ResumeAllInterrupts();
  1244. #ifdef _ARM_DS5_C_S32K1XX_
  1245. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1246. #endif
  1247. }
  1248. }
  1249. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_26(void)
  1250. {
  1251. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1252. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_26[u32CoreId])
  1253. {
  1254. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1255. msr_PWM_EXCLUSIVE_AREA_26[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1256. #else
  1257. msr_PWM_EXCLUSIVE_AREA_26[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1258. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1259. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_26[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1260. {
  1261. OsIf_SuspendAllInterrupts();
  1262. #ifdef _ARM_DS5_C_S32K1XX_
  1263. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1264. #endif
  1265. }
  1266. }
  1267. reentry_guard_PWM_EXCLUSIVE_AREA_26[u32CoreId]++;
  1268. }
  1269. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_26(void)
  1270. {
  1271. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1272. reentry_guard_PWM_EXCLUSIVE_AREA_26[u32CoreId]--;
  1273. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_26[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_26[u32CoreId])) /*if interrupts were enabled*/
  1274. {
  1275. OsIf_ResumeAllInterrupts();
  1276. #ifdef _ARM_DS5_C_S32K1XX_
  1277. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1278. #endif
  1279. }
  1280. }
  1281. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_27(void)
  1282. {
  1283. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1284. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_27[u32CoreId])
  1285. {
  1286. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1287. msr_PWM_EXCLUSIVE_AREA_27[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1288. #else
  1289. msr_PWM_EXCLUSIVE_AREA_27[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1290. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1291. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_27[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1292. {
  1293. OsIf_SuspendAllInterrupts();
  1294. #ifdef _ARM_DS5_C_S32K1XX_
  1295. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1296. #endif
  1297. }
  1298. }
  1299. reentry_guard_PWM_EXCLUSIVE_AREA_27[u32CoreId]++;
  1300. }
  1301. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_27(void)
  1302. {
  1303. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1304. reentry_guard_PWM_EXCLUSIVE_AREA_27[u32CoreId]--;
  1305. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_27[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_27[u32CoreId])) /*if interrupts were enabled*/
  1306. {
  1307. OsIf_ResumeAllInterrupts();
  1308. #ifdef _ARM_DS5_C_S32K1XX_
  1309. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1310. #endif
  1311. }
  1312. }
  1313. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_28(void)
  1314. {
  1315. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1316. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_28[u32CoreId])
  1317. {
  1318. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1319. msr_PWM_EXCLUSIVE_AREA_28[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1320. #else
  1321. msr_PWM_EXCLUSIVE_AREA_28[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1322. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1323. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_28[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1324. {
  1325. OsIf_SuspendAllInterrupts();
  1326. #ifdef _ARM_DS5_C_S32K1XX_
  1327. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1328. #endif
  1329. }
  1330. }
  1331. reentry_guard_PWM_EXCLUSIVE_AREA_28[u32CoreId]++;
  1332. }
  1333. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_28(void)
  1334. {
  1335. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1336. reentry_guard_PWM_EXCLUSIVE_AREA_28[u32CoreId]--;
  1337. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_28[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_28[u32CoreId])) /*if interrupts were enabled*/
  1338. {
  1339. OsIf_ResumeAllInterrupts();
  1340. #ifdef _ARM_DS5_C_S32K1XX_
  1341. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1342. #endif
  1343. }
  1344. }
  1345. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_29(void)
  1346. {
  1347. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1348. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_29[u32CoreId])
  1349. {
  1350. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1351. msr_PWM_EXCLUSIVE_AREA_29[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1352. #else
  1353. msr_PWM_EXCLUSIVE_AREA_29[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1354. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1355. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_29[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1356. {
  1357. OsIf_SuspendAllInterrupts();
  1358. #ifdef _ARM_DS5_C_S32K1XX_
  1359. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1360. #endif
  1361. }
  1362. }
  1363. reentry_guard_PWM_EXCLUSIVE_AREA_29[u32CoreId]++;
  1364. }
  1365. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_29(void)
  1366. {
  1367. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1368. reentry_guard_PWM_EXCLUSIVE_AREA_29[u32CoreId]--;
  1369. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_29[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_29[u32CoreId])) /*if interrupts were enabled*/
  1370. {
  1371. OsIf_ResumeAllInterrupts();
  1372. #ifdef _ARM_DS5_C_S32K1XX_
  1373. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1374. #endif
  1375. }
  1376. }
  1377. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_30(void)
  1378. {
  1379. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1380. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_30[u32CoreId])
  1381. {
  1382. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1383. msr_PWM_EXCLUSIVE_AREA_30[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1384. #else
  1385. msr_PWM_EXCLUSIVE_AREA_30[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1386. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1387. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_30[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1388. {
  1389. OsIf_SuspendAllInterrupts();
  1390. #ifdef _ARM_DS5_C_S32K1XX_
  1391. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1392. #endif
  1393. }
  1394. }
  1395. reentry_guard_PWM_EXCLUSIVE_AREA_30[u32CoreId]++;
  1396. }
  1397. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_30(void)
  1398. {
  1399. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1400. reentry_guard_PWM_EXCLUSIVE_AREA_30[u32CoreId]--;
  1401. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_30[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_30[u32CoreId])) /*if interrupts were enabled*/
  1402. {
  1403. OsIf_ResumeAllInterrupts();
  1404. #ifdef _ARM_DS5_C_S32K1XX_
  1405. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1406. #endif
  1407. }
  1408. }
  1409. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_31(void)
  1410. {
  1411. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1412. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_31[u32CoreId])
  1413. {
  1414. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1415. msr_PWM_EXCLUSIVE_AREA_31[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1416. #else
  1417. msr_PWM_EXCLUSIVE_AREA_31[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1418. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1419. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_31[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1420. {
  1421. OsIf_SuspendAllInterrupts();
  1422. #ifdef _ARM_DS5_C_S32K1XX_
  1423. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1424. #endif
  1425. }
  1426. }
  1427. reentry_guard_PWM_EXCLUSIVE_AREA_31[u32CoreId]++;
  1428. }
  1429. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_31(void)
  1430. {
  1431. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1432. reentry_guard_PWM_EXCLUSIVE_AREA_31[u32CoreId]--;
  1433. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_31[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_31[u32CoreId])) /*if interrupts were enabled*/
  1434. {
  1435. OsIf_ResumeAllInterrupts();
  1436. #ifdef _ARM_DS5_C_S32K1XX_
  1437. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1438. #endif
  1439. }
  1440. }
  1441. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_32(void)
  1442. {
  1443. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1444. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_32[u32CoreId])
  1445. {
  1446. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1447. msr_PWM_EXCLUSIVE_AREA_32[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1448. #else
  1449. msr_PWM_EXCLUSIVE_AREA_32[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1450. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1451. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_32[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1452. {
  1453. OsIf_SuspendAllInterrupts();
  1454. #ifdef _ARM_DS5_C_S32K1XX_
  1455. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1456. #endif
  1457. }
  1458. }
  1459. reentry_guard_PWM_EXCLUSIVE_AREA_32[u32CoreId]++;
  1460. }
  1461. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_32(void)
  1462. {
  1463. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1464. reentry_guard_PWM_EXCLUSIVE_AREA_32[u32CoreId]--;
  1465. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_32[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_32[u32CoreId])) /*if interrupts were enabled*/
  1466. {
  1467. OsIf_ResumeAllInterrupts();
  1468. #ifdef _ARM_DS5_C_S32K1XX_
  1469. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1470. #endif
  1471. }
  1472. }
  1473. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_33(void)
  1474. {
  1475. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1476. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_33[u32CoreId])
  1477. {
  1478. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1479. msr_PWM_EXCLUSIVE_AREA_33[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1480. #else
  1481. msr_PWM_EXCLUSIVE_AREA_33[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1482. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1483. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_33[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1484. {
  1485. OsIf_SuspendAllInterrupts();
  1486. #ifdef _ARM_DS5_C_S32K1XX_
  1487. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1488. #endif
  1489. }
  1490. }
  1491. reentry_guard_PWM_EXCLUSIVE_AREA_33[u32CoreId]++;
  1492. }
  1493. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_33(void)
  1494. {
  1495. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1496. reentry_guard_PWM_EXCLUSIVE_AREA_33[u32CoreId]--;
  1497. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_33[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_33[u32CoreId])) /*if interrupts were enabled*/
  1498. {
  1499. OsIf_ResumeAllInterrupts();
  1500. #ifdef _ARM_DS5_C_S32K1XX_
  1501. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1502. #endif
  1503. }
  1504. }
  1505. void SchM_Enter_Pwm_PWM_EXCLUSIVE_AREA_34(void)
  1506. {
  1507. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1508. if(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_34[u32CoreId])
  1509. {
  1510. #if ((defined MCAL_ENABLE_USER_MODE_SUPPORT)&&(!defined MCAL_PLATFORM_ARM_M0PLUS))
  1511. msr_PWM_EXCLUSIVE_AREA_34[u32CoreId] = OsIf_Trusted_Call_Return(Pwm_schm_read_msr);
  1512. #else
  1513. msr_PWM_EXCLUSIVE_AREA_34[u32CoreId] = Pwm_schm_read_msr(); /*read MSR (to store interrupts state)*/
  1514. #endif /* MCAL_ENABLE_USER_MODE_SUPPORT */
  1515. if (ISR_ON(msr_PWM_EXCLUSIVE_AREA_34[u32CoreId])) /*if MSR[EE] = 0, skip calling Suspend/Resume AllInterrupts*/
  1516. {
  1517. OsIf_SuspendAllInterrupts();
  1518. #ifdef _ARM_DS5_C_S32K1XX_
  1519. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1520. #endif
  1521. }
  1522. }
  1523. reentry_guard_PWM_EXCLUSIVE_AREA_34[u32CoreId]++;
  1524. }
  1525. void SchM_Exit_Pwm_PWM_EXCLUSIVE_AREA_34(void)
  1526. {
  1527. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1528. reentry_guard_PWM_EXCLUSIVE_AREA_34[u32CoreId]--;
  1529. if ((ISR_ON(msr_PWM_EXCLUSIVE_AREA_34[u32CoreId]))&&(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_34[u32CoreId])) /*if interrupts were enabled*/
  1530. {
  1531. OsIf_ResumeAllInterrupts();
  1532. #ifdef _ARM_DS5_C_S32K1XX_
  1533. ASM_KEYWORD(" nop ");/* Compiler fix - forces the CSPID instruction to be generated with -02, -Ospace are selected*/
  1534. #endif
  1535. }
  1536. }
  1537. #ifdef MCAL_TESTING_ENVIRONMENT
  1538. /**
  1539. @brief This function checks that all entered exclusive areas were also exited.
  1540. @details This function checks that all entered exclusive areas were also exited. The check
  1541. is done by verifying that all reentry_guard_* static variables are back to the
  1542. zero value.
  1543. @param[in] void No input parameters
  1544. @return void This function does not return a value. Test asserts are used instead.
  1545. @pre None
  1546. @post None
  1547. @remarks Covers
  1548. @remarks Implements
  1549. */
  1550. void SchM_Check_pwm(void)
  1551. {
  1552. uint32 u32CoreId = (uint32)OsIf_GetCoreID();
  1553. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_00[u32CoreId]);
  1554. reentry_guard_PWM_EXCLUSIVE_AREA_00[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_00 for the next test in the suite*/
  1555. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_01[u32CoreId]);
  1556. reentry_guard_PWM_EXCLUSIVE_AREA_01[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_01 for the next test in the suite*/
  1557. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_02[u32CoreId]);
  1558. reentry_guard_PWM_EXCLUSIVE_AREA_02[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_02 for the next test in the suite*/
  1559. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_03[u32CoreId]);
  1560. reentry_guard_PWM_EXCLUSIVE_AREA_03[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_03 for the next test in the suite*/
  1561. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_04[u32CoreId]);
  1562. reentry_guard_PWM_EXCLUSIVE_AREA_04[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_04 for the next test in the suite*/
  1563. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_05[u32CoreId]);
  1564. reentry_guard_PWM_EXCLUSIVE_AREA_05[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_05 for the next test in the suite*/
  1565. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_06[u32CoreId]);
  1566. reentry_guard_PWM_EXCLUSIVE_AREA_06[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_06 for the next test in the suite*/
  1567. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_07[u32CoreId]);
  1568. reentry_guard_PWM_EXCLUSIVE_AREA_07[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_07 for the next test in the suite*/
  1569. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_08[u32CoreId]);
  1570. reentry_guard_PWM_EXCLUSIVE_AREA_08[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_08 for the next test in the suite*/
  1571. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_09[u32CoreId]);
  1572. reentry_guard_PWM_EXCLUSIVE_AREA_09[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_09 for the next test in the suite*/
  1573. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_10[u32CoreId]);
  1574. reentry_guard_PWM_EXCLUSIVE_AREA_10[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_10 for the next test in the suite*/
  1575. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_11[u32CoreId]);
  1576. reentry_guard_PWM_EXCLUSIVE_AREA_11[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_11 for the next test in the suite*/
  1577. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_12[u32CoreId]);
  1578. reentry_guard_PWM_EXCLUSIVE_AREA_12[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_12 for the next test in the suite*/
  1579. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_13[u32CoreId]);
  1580. reentry_guard_PWM_EXCLUSIVE_AREA_13[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_13 for the next test in the suite*/
  1581. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_14[u32CoreId]);
  1582. reentry_guard_PWM_EXCLUSIVE_AREA_14[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_14 for the next test in the suite*/
  1583. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_15[u32CoreId]);
  1584. reentry_guard_PWM_EXCLUSIVE_AREA_15[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_15 for the next test in the suite*/
  1585. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_16[u32CoreId]);
  1586. reentry_guard_PWM_EXCLUSIVE_AREA_16[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_16 for the next test in the suite*/
  1587. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_17[u32CoreId]);
  1588. reentry_guard_PWM_EXCLUSIVE_AREA_17[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_17 for the next test in the suite*/
  1589. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_18[u32CoreId]);
  1590. reentry_guard_PWM_EXCLUSIVE_AREA_18[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_18 for the next test in the suite*/
  1591. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_19[u32CoreId]);
  1592. reentry_guard_PWM_EXCLUSIVE_AREA_19[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_19 for the next test in the suite*/
  1593. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_20[u32CoreId]);
  1594. reentry_guard_PWM_EXCLUSIVE_AREA_20[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_20 for the next test in the suite*/
  1595. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_21[u32CoreId]);
  1596. reentry_guard_PWM_EXCLUSIVE_AREA_21[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_21 for the next test in the suite*/
  1597. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_22[u32CoreId]);
  1598. reentry_guard_PWM_EXCLUSIVE_AREA_22[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_22 for the next test in the suite*/
  1599. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_23[u32CoreId]);
  1600. reentry_guard_PWM_EXCLUSIVE_AREA_23[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_23 for the next test in the suite*/
  1601. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_24[u32CoreId]);
  1602. reentry_guard_PWM_EXCLUSIVE_AREA_24[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_24 for the next test in the suite*/
  1603. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_25[u32CoreId]);
  1604. reentry_guard_PWM_EXCLUSIVE_AREA_25[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_25 for the next test in the suite*/
  1605. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_26[u32CoreId]);
  1606. reentry_guard_PWM_EXCLUSIVE_AREA_26[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_26 for the next test in the suite*/
  1607. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_27[u32CoreId]);
  1608. reentry_guard_PWM_EXCLUSIVE_AREA_27[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_27 for the next test in the suite*/
  1609. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_28[u32CoreId]);
  1610. reentry_guard_PWM_EXCLUSIVE_AREA_28[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_28 for the next test in the suite*/
  1611. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_29[u32CoreId]);
  1612. reentry_guard_PWM_EXCLUSIVE_AREA_29[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_29 for the next test in the suite*/
  1613. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_30[u32CoreId]);
  1614. reentry_guard_PWM_EXCLUSIVE_AREA_30[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_30 for the next test in the suite*/
  1615. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_31[u32CoreId]);
  1616. reentry_guard_PWM_EXCLUSIVE_AREA_31[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_31 for the next test in the suite*/
  1617. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_32[u32CoreId]);
  1618. reentry_guard_PWM_EXCLUSIVE_AREA_32[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_32 for the next test in the suite*/
  1619. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_33[u32CoreId]);
  1620. reentry_guard_PWM_EXCLUSIVE_AREA_33[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_33 for the next test in the suite*/
  1621. EU_ASSERT(0UL == reentry_guard_PWM_EXCLUSIVE_AREA_34[u32CoreId]);
  1622. reentry_guard_PWM_EXCLUSIVE_AREA_34[u32CoreId] = 0UL; /*reset reentry_guard_PWM_EXCLUSIVE_AREA_34 for the next test in the suite*/
  1623. }
  1624. #endif /*MCAL_TESTING_ENVIRONMENT*/
  1625. #define RTE_STOP_SEC_CODE
  1626. #include "Rte_MemMap.h"
  1627. #ifdef __cplusplus
  1628. }
  1629. #endif
  1630. /** @} */