Clock_Ip_Private.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  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 Clock_Ip_Private.h
  26. * @version 1.0.0
  27. *
  28. * @brief CLOCK IP driver private header file.
  29. * @details CLOCK IP driver private header file.
  30. * @addtogroup CLOCK_DRIVER Clock Ip Driver
  31. * @{
  32. */
  33. #if !defined(CLOCK_IP_PRIVATE_H)
  34. #define CLOCK_IP_PRIVATE_H
  35. #include "Clock_Ip.h"
  36. #if defined(CLOCK_IP_PLATFORM_S32R45)
  37. #include "Clock_Ip_Specific1.h"
  38. #else
  39. #include "Clock_Ip_Specific.h"
  40. #endif
  41. #ifdef CLOCK_IP_DEV_ERROR_DETECT
  42. #if (STD_ON == CLOCK_IP_DEV_ERROR_DETECT)
  43. #include "Devassert.h"
  44. #endif /* (STD_ON == CLOCK_IP_DEV_ERROR_DETECT) */
  45. #endif /* #ifdef CLOCK_IP_DEV_ERROR_DETECT */
  46. /*==================================================================================================
  47. SOURCE FILE VERSION INFORMATION
  48. ==================================================================================================*/
  49. #define CLOCK_IP_PRIVATE_VENDOR_ID 43
  50. #define CLOCK_IP_PRIVATE_AR_RELEASE_MAJOR_VERSION 4
  51. #define CLOCK_IP_PRIVATE_AR_RELEASE_MINOR_VERSION 4
  52. #define CLOCK_IP_PRIVATE_AR_RELEASE_REVISION_VERSION 0
  53. #define CLOCK_IP_PRIVATE_SW_MAJOR_VERSION 1
  54. #define CLOCK_IP_PRIVATE_SW_MINOR_VERSION 0
  55. #define CLOCK_IP_PRIVATE_SW_PATCH_VERSION 0
  56. /*==================================================================================================
  57. FILE VERSION CHECKS
  58. ==================================================================================================*/
  59. /* Check if Clock_Ip_Private.h file and Clock_Ip.h file are of the same Autosar version */
  60. #if ((CLOCK_IP_PRIVATE_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_AR_RELEASE_MAJOR_VERSION) || \
  61. (CLOCK_IP_PRIVATE_AR_RELEASE_MINOR_VERSION != CLOCK_IP_AR_RELEASE_MINOR_VERSION) || \
  62. (CLOCK_IP_PRIVATE_AR_RELEASE_REVISION_VERSION != CLOCK_IP_AR_RELEASE_REVISION_VERSION))
  63. #error "AutoSar Version Numbers of Clock_Ip_Private.h and Clock_Ip.h are different"
  64. #endif
  65. /* Check if Clock_Ip_Private.h file and Clock_Ip.h file have same versions */
  66. #if (CLOCK_IP_PRIVATE_VENDOR_ID != CLOCK_IP_VENDOR_ID)
  67. #error "Clock_Ip_Private.h and Clock_Ip.h have different vendor IDs"
  68. #endif
  69. /* Check if Clock_Ip_Private.h file and Clock_Ip.h file are of the same Software version */
  70. #if ((CLOCK_IP_PRIVATE_SW_MAJOR_VERSION != CLOCK_IP_SW_MAJOR_VERSION) || \
  71. (CLOCK_IP_PRIVATE_SW_MINOR_VERSION != CLOCK_IP_SW_MINOR_VERSION) || \
  72. (CLOCK_IP_PRIVATE_SW_PATCH_VERSION != CLOCK_IP_SW_PATCH_VERSION))
  73. #error "Software Version Numbers of Clock_Ip_Private.h and Clock_Ip.h are different"
  74. #endif
  75. #if defined(CLOCK_IP_PLATFORM_S32R45)
  76. /* Check if Clock_Ip_Private.h file and Clock_Ip_Specific1.h file are of the same Autosar version */
  77. #if ((CLOCK_IP_PRIVATE_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_SPECIFIC1_AR_RELEASE_MAJOR_VERSION) || \
  78. (CLOCK_IP_PRIVATE_AR_RELEASE_MINOR_VERSION != CLOCK_IP_SPECIFIC1_AR_RELEASE_MINOR_VERSION) || \
  79. (CLOCK_IP_PRIVATE_AR_RELEASE_REVISION_VERSION != CLOCK_IP_SPECIFIC1_AR_RELEASE_REVISION_VERSION))
  80. #error "AutoSar Version Numbers of Clock_Ip_Private.h and Clock_Ip_Specific1.h are different"
  81. #endif
  82. /* Check if Clock_Ip_Private.h file and Clock_Ip_Specific1.h file have same versions */
  83. #if (CLOCK_IP_PRIVATE_VENDOR_ID != CLOCK_IP_SPECIFIC1_VENDOR_ID)
  84. #error "Clock_Ip_Private.h and Clock_Ip_Specific1.h have different vendor IDs"
  85. #endif
  86. /* Check if Clock_Ip_Private.h file and Clock_Ip_Specific1.h file are of the same Software version */
  87. #if ((CLOCK_IP_PRIVATE_SW_MAJOR_VERSION != CLOCK_IP_SPECIFIC1_SW_MAJOR_VERSION) || \
  88. (CLOCK_IP_PRIVATE_SW_MINOR_VERSION != CLOCK_IP_SPECIFIC1_SW_MINOR_VERSION) || \
  89. (CLOCK_IP_PRIVATE_SW_PATCH_VERSION != CLOCK_IP_SPECIFIC1_SW_PATCH_VERSION))
  90. #error "Software Version Numbers of Clock_Ip_Private.h and Clock_Ip_Specific1.h are different"
  91. #endif
  92. #else
  93. /* Check if Clock_Ip_Private.h file and Clock_Ip_Specific.h file are of the same Autosar version */
  94. #if ((CLOCK_IP_PRIVATE_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION) || \
  95. (CLOCK_IP_PRIVATE_AR_RELEASE_MINOR_VERSION != CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION) || \
  96. (CLOCK_IP_PRIVATE_AR_RELEASE_REVISION_VERSION != CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION))
  97. #error "AutoSar Version Numbers of Clock_Ip_Private.h and Clock_Ip_Specific.h are different"
  98. #endif
  99. /* Check if Clock_Ip_Private.h file and Clock_Ip_Specific.h file have same versions */
  100. #if (CLOCK_IP_PRIVATE_VENDOR_ID != CLOCK_IP_SPECIFIC_VENDOR_ID)
  101. #error "Clock_Ip_Private.h and Clock_Ip_Specific.h have different vendor IDs"
  102. #endif
  103. /* Check if Clock_Ip_Private.h file and Clock_Ip_Specific.h file are of the same Software version */
  104. #if ((CLOCK_IP_PRIVATE_SW_MAJOR_VERSION != CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION) || \
  105. (CLOCK_IP_PRIVATE_SW_MINOR_VERSION != CLOCK_IP_SPECIFIC_SW_MINOR_VERSION) || \
  106. (CLOCK_IP_PRIVATE_SW_PATCH_VERSION != CLOCK_IP_SPECIFIC_SW_PATCH_VERSION))
  107. #error "Software Version Numbers of Clock_Ip_Private.h and Clock_Ip_Specific.h are different"
  108. #endif
  109. #endif
  110. #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
  111. #ifdef CLOCK_IP_DEV_ERROR_DETECT
  112. #if (STD_ON == CLOCK_IP_DEV_ERROR_DETECT)
  113. /* Check if Clock_Ip_Private.h file and Devassert.h file are of the same Autosar version */
  114. #if ((CLOCK_IP_PRIVATE_AR_RELEASE_MAJOR_VERSION != DEVASSERT_AR_RELEASE_MAJOR_VERSION) || \
  115. (CLOCK_IP_PRIVATE_AR_RELEASE_MINOR_VERSION != DEVASSERT_AR_RELEASE_MINOR_VERSION))
  116. #error "AutoSar Version Numbers of Clock_Ip_Private.h and Devassert.h are different"
  117. #endif
  118. #endif /* (STD_ON == CLOCK_IP_DEV_ERROR_DETECT) */
  119. #endif /* #ifdef CLOCK_IP_DEV_ERROR_DETECT */
  120. #endif
  121. #if defined(__cplusplus)
  122. extern "C" {
  123. #endif /* __cplusplus*/
  124. /* Total number of clocks */
  125. #define CLOCK_NAMES_NO FEATURE_CLOCKS_NO
  126. /* Total number of producer clocks */
  127. #define CLOCK_PRODUCERS_NO FEATURE_CLOCK_PRODUCERS_NO
  128. /* Define clock features */
  129. #define CLOCK_MODULE_INSTANCE 0U /* Instance of the module where clock element is implemented. */
  130. #define CLOCK_CALLBACK 1U /* Actions to be done for different implementations of a clock element. */
  131. #define EXTENSION_INDEX 2U /* Specific clock feature extension */
  132. #define POWER_MODE_INDEX 3U /* Index of power mode for multiplexed clock option */
  133. #define SELECTOR_INDEX 4U /* Selector index. */
  134. #define DIVIDER_INDEX 5U /* Divider index. */
  135. #define GATE_INDEX 6U /* Gate index */
  136. #define PCFS_INDEX 7U /* Pcfs index */
  137. #define CMU_INDEX 8U /* Cmu index */
  138. /* Maximum number of clock features for each clock name */
  139. #define CLOCK_FEATURES_NO 9U
  140. #if (defined (CLOCK_IP_S32K3))
  141. #define INV_VAL 255U /* Invalid value */
  142. #define NO_TRIGGER 0U /* No trigger is supported by divider. */
  143. #define TRIGGER 1U /* Trigger is supported by divider. */
  144. #define TRIGGER_VALUE 0xFFFFFFFFU /* Trigger value. */
  145. #endif
  146. #if (defined(CLOCK_IP_DEV_ERROR_DETECT))
  147. #if (CLOCK_IP_DEV_ERROR_DETECT == STD_ON)
  148. #define IRCOSC_OBJECT (1UL << 0U)
  149. #define XOSC_OBJECT (1UL << 1U)
  150. #define PLL_OBJECT (1UL << 2U)
  151. #define SELECTOR_OBJECT (1UL << 3U)
  152. #define DIVIDER_OBJECT (1UL << 4U)
  153. #define DIVIDER_TRIGGER_OBJECT (1UL << 5U)
  154. #define FRAC_DIV_OBJECT (1UL << 6U)
  155. #define EXT_SIG_OBJECT (1UL << 7U)
  156. #define GATE_OBJECT (1UL << 8U)
  157. #define PCFS_OBJECT (1UL << 9U)
  158. #define CMU_OBJECT (1UL << 10U)
  159. #endif
  160. #endif /* CLOCK_IP_DEV_ERROR_DETECT */
  161. #if (defined(CLOCK_IP_DEV_ERROR_DETECT))
  162. #if (CLOCK_IP_DEV_ERROR_DETECT == STD_ON)
  163. #define CLOCK_DEV_ASSERT(x) DevAssert(x)
  164. #else
  165. #define CLOCK_DEV_ASSERT(x)
  166. #endif
  167. #else
  168. #define CLOCK_DEV_ASSERT(x)
  169. #endif
  170. /*! @brief Clock ip source type.
  171. */
  172. typedef enum
  173. {
  174. /* Generic error codes */
  175. UKNOWN_TYPE = 0x00U, /*!< Clock path from source to this clock name has at least one selector. */
  176. IRCOSC_TYPE = 0x01U, /*!< Source is an internal oscillator. */
  177. XOSC_TYPE = 0x02U, /*!< Source is an external oscillator. */
  178. PLL_TYPE = 0x03U, /*!< Source is a pll. */
  179. EXT_CLK_TYPE = 0x04U, /*!< Source is an external clock. */
  180. SERDES_TYPE = 0x04U, /*!< Source is a SERDES. */
  181. } clock_name_source_type;
  182. /*! @brief Clock pll status return codes.
  183. */
  184. typedef enum
  185. {
  186. STATUS_PLL_NOT_ENABLED = 0x00U, /*!< Not enabled */
  187. STATUS_PLL_UNLOCKED = 0x01U, /*!< Unlocked */
  188. STATUS_PLL_LOCKED = 0x02U, /*!< Locked */
  189. } clock_pll_status_t;
  190. /*! @brief Clock dfs status return codes.
  191. */
  192. typedef enum
  193. {
  194. STATUS_DFS_NOT_ENABLED = 0x00U, /*!< Not enabled */
  195. STATUS_DFS_UNLOCKED = 0x01U, /*!< Unlocked */
  196. STATUS_DFS_LOCKED = 0x02U, /*!< Locked */
  197. } clock_dfs_status_t;
  198. typedef void (*intOscSetCallback)(Clock_Ip_IrcoscConfigType const * config);
  199. typedef void (*intOscDisableCallback)(Clock_Ip_NameType IrcoscName);
  200. typedef void (*intOscEnableCallback)(Clock_Ip_IrcoscConfigType const * config);
  201. typedef struct
  202. {
  203. intOscSetCallback Set;
  204. intOscEnableCallback Enable;
  205. intOscDisableCallback Disable;
  206. }intOscCallback;
  207. typedef void (*extOscSetCallback)(Clock_Ip_XoscConfigType const * config);
  208. typedef void (*extOscResetCallback)(Clock_Ip_XoscConfigType const * config);
  209. typedef void (*extOscDisableCallback)(Clock_Ip_NameType ExtoscName);
  210. typedef void (*extOscEnableCallback)(Clock_Ip_XoscConfigType const * config);
  211. typedef struct
  212. {
  213. extOscResetCallback Reset;
  214. extOscSetCallback Set;
  215. extOscSetCallback Complete;
  216. extOscDisableCallback Disable;
  217. extOscEnableCallback Enable;
  218. }extOscCallback;
  219. typedef void (*dividerSetCallback)(Clock_Ip_DividerConfigType const * config);
  220. typedef struct
  221. {
  222. dividerSetCallback Set;
  223. }dividerCallback;
  224. typedef void (*dividerConfigureCallback)(Clock_Ip_DividerTriggerConfigType const * config);
  225. typedef void (*dividerTriggerUpdateCallback)(Clock_Ip_DividerTriggerConfigType const * config);
  226. typedef struct
  227. {
  228. dividerConfigureCallback Configure;
  229. dividerTriggerUpdateCallback TriggerUpdate;
  230. }dividerTriggerCallback;
  231. typedef void (*fracDivSetCallback)(Clock_Ip_FracDivConfigType const * config);
  232. typedef void (*fracDivResetCallback)(Clock_Ip_FracDivConfigType const * config);
  233. typedef clock_dfs_status_t (*fracDivCompleteCallback)(Clock_Ip_NameType DfsName);
  234. typedef struct
  235. {
  236. fracDivResetCallback Reset;
  237. fracDivSetCallback Set;
  238. fracDivCompleteCallback Complete;
  239. }fracDivCallback;
  240. typedef void (*pllSetCallback)(Clock_Ip_PllConfigType const * config);
  241. typedef void (*pllResetCallback)(Clock_Ip_PllConfigType const * config);
  242. typedef clock_pll_status_t (*pllCompleteCallback)(Clock_Ip_NameType PllName);
  243. typedef void (*pllEnableCallback)(Clock_Ip_PllConfigType const * config);
  244. typedef void (*pllDisableCallback)(Clock_Ip_NameType PllName);
  245. typedef struct
  246. {
  247. pllResetCallback Reset;
  248. pllSetCallback Set;
  249. pllCompleteCallback Complete;
  250. pllEnableCallback Enable;
  251. pllDisableCallback Disable;
  252. }pllCallback;
  253. typedef void (*selectorSetCallback)(Clock_Ip_SelectorConfigType const * config);
  254. typedef void (*selectorResetCallback)(Clock_Ip_SelectorConfigType const * config);
  255. typedef struct
  256. {
  257. selectorResetCallback Reset;
  258. selectorSetCallback Set;
  259. }selectorCallback;
  260. typedef void (*gateSetCallback)(Clock_Ip_GateConfigType const * config);
  261. typedef void (*gateUpdateCallback)(Clock_Ip_NameType clockName, boolean gate);
  262. typedef struct
  263. {
  264. gateSetCallback Set;
  265. gateUpdateCallback Update;
  266. }gateCallback;
  267. typedef void (*clockMonitorSetCallback)(Clock_Ip_CmuConfigType const * config);
  268. typedef void (*clockMonitorResetCallback)(Clock_Ip_CmuConfigType const * config);
  269. typedef void (*clockMonitorClearStatusCallback)(Clock_Ip_NameType name);
  270. typedef void (*clockMonitorDisableCallback)(Clock_Ip_NameType name);
  271. typedef Clock_Ip_CmuStatusType (*clockMonitorGetMonitorStatusCallback)(Clock_Ip_NameType name);
  272. typedef void (*clockMonitorEnableCallback)(Clock_Ip_CmuConfigType const * config);
  273. typedef struct
  274. {
  275. clockMonitorResetCallback Reset;
  276. clockMonitorSetCallback Set;
  277. clockMonitorDisableCallback Disable;
  278. clockMonitorClearStatusCallback Clear;
  279. clockMonitorGetMonitorStatusCallback GetStatus;
  280. clockMonitorEnableCallback Enable;
  281. }clockMonitorCallback;
  282. typedef void (*pcfsSetCallback)(Clock_Ip_PcfsConfigType const * config);
  283. typedef struct
  284. {
  285. pcfsSetCallback Set;
  286. }pcfsCallback;
  287. #if (defined (CLOCK_IP_S32K3))
  288. typedef uint32 (*consumerClockCallback)(void);
  289. typedef void (*CalcFreqCallback)(void);
  290. #endif
  291. /* Clock start constant section data */
  292. #define MCU_START_SEC_CONST_8
  293. #include "Mcu_MemMap.h"
  294. extern const uint8 xoscCallbackIndex[ALL_CALLBACKS_COUNT];
  295. extern const uint8 dividerCallbackIndex[ALL_CALLBACKS_COUNT];
  296. extern const uint8 dividertriggerCallbackIndex[ALL_CALLBACKS_COUNT];
  297. extern const uint8 fractional_dividerCallbackIndex[ALL_CALLBACKS_COUNT];
  298. extern const uint8 pllCallbackIndex[ALL_CALLBACKS_COUNT];
  299. extern const uint8 selectorCallbackIndex[ALL_CALLBACKS_COUNT];
  300. extern const uint8 ircoscCallbackIndex[ALL_CALLBACKS_COUNT];
  301. extern const uint8 cmuCallbackIndex[ALL_CALLBACKS_COUNT];
  302. extern const uint8 gateCallbackIndex[ALL_CALLBACKS_COUNT];
  303. extern const uint8 pcfsCallbackIndex[ALL_CALLBACKS_COUNT];
  304. extern const uint8 clockFeatures[CLOCK_NAMES_NO][CLOCK_FEATURES_NO];
  305. /* Clock stop constant section data */
  306. #define MCU_STOP_SEC_CONST_8
  307. #include "Mcu_MemMap.h"
  308. /* Clock start constant section data */
  309. #define MCU_START_SEC_CONST_32
  310. #include "Mcu_MemMap.h"
  311. #if (defined(CLOCK_IP_DEV_ERROR_DETECT))
  312. #if (CLOCK_IP_DEV_ERROR_DETECT == STD_ON)
  313. extern const uint32 clockNameTypes[CLOCK_NAMES_NO];
  314. #endif
  315. #endif
  316. /* Clock stop constant section data */
  317. #define MCU_STOP_SEC_CONST_32
  318. #include "Mcu_MemMap.h"
  319. /* Clock start constant section data */
  320. #define MCU_START_SEC_CONST_UNSPECIFIED
  321. #include "Mcu_MemMap.h"
  322. extern const extOscCallback extOscCallbacks[XOSC_CALLBACKS_COUNT];
  323. extern const dividerCallback dividerCallbacks[DIVIDER_CALLBACKS_COUNT];
  324. extern const dividerTriggerCallback dividerTriggerCallbacks[DIVIDERTRIGGER_CALLBACKS_COUNT];
  325. extern const fracDivCallback fracDivCallbacks[FRACTIONAL_DIVIDER_CALLBACKS_COUNT];
  326. extern const pllCallback pllCallbacks[PLL_CALLBACKS_COUNT];
  327. #if (STD_OFF == CLOCK_IP_NO_PLL)
  328. extern const Clock_Ip_NameType HwPllName[NUMBER_OF_HARDWARE_PLL];
  329. #endif
  330. extern const selectorCallback selectorCallbacks[SELECTOR_CALLBACKS_COUNT];
  331. extern const intOscCallback intOscCallbacks[IRCOSC_CALLBACKS_COUNT];
  332. extern const clockMonitorCallback cmuCallbacks[CMU_CALLBACKS_COUNT];
  333. extern const gateCallback gateCallbacks[GATE_CALLBACKS_COUNT];
  334. extern const pcfsCallback pcfsCallbacks[PCFS_CALLBACKS_COUNT];
  335. extern const clock_name_source_type sourceType_clockName[CLOCK_PRODUCERS_NO + 1U];
  336. /* Clock stop constant section data */
  337. #define MCU_STOP_SEC_CONST_UNSPECIFIED
  338. #include "Mcu_MemMap.h"
  339. #define MCU_START_SEC_VAR_CLEARED_UNSPECIFIED
  340. #include "Mcu_MemMap.h"
  341. #if CMU_INSTANCES_ARRAY_SIZE > 0U
  342. extern const Clock_Ip_ClockConfigType *clockConfig;
  343. #endif
  344. #define MCU_STOP_SEC_VAR_CLEARED_UNSPECIFIED
  345. #include "Mcu_MemMap.h"
  346. /* Clock start section code */
  347. #define MCU_START_SEC_CODE
  348. #include "Mcu_MemMap.h"
  349. void ClockInitializeObjects(void);
  350. void ClockPowerModeChangeNotification(power_modes_t powerMode, power_notification_t notification);
  351. void ReportClockErrors(Clock_Ip_ClockNotificationType error, Clock_Ip_NameType clockName);
  352. void SpecificPeripheralClockInitialization(Clock_IP_SpecificPeriphConfigType const * config);
  353. void SpecificPlatformInitClock(Clock_Ip_ClockConfigType const * config);
  354. #if (defined(CMU_FC_FCE_REF_CNT_LFREF_HFREF) || defined(CGM_X_PCFS_SDUR_DIVC_DIVE_DIVS) || defined(FEATURE_CLOCK_IP_HAS_RAM_WAIT_STATES))
  355. uint32 GetConfiguredFrequencyValue(Clock_Ip_NameType clockName);
  356. #endif
  357. #if (defined(CLOCK_IP_GET_FREQUENCY_API) && (CLOCK_IP_GET_FREQUENCY_API == STD_ON))
  358. uint32 GetFreq(Clock_Ip_NameType clockName);
  359. void SetExternalOscillatorFrequency(Clock_Ip_NameType extOscName, uint32 frequency);
  360. void SetExternalSignalFrequency(Clock_Ip_NameType signalName, uint32 frequency);
  361. #endif
  362. #if CMU_INSTANCES_ARRAY_SIZE > 0U
  363. uint32 Mcu_CMU_GetInterruptStatus(uint8 u8IndexCmu);
  364. void Mcu_CMU_ClockFailInt(void);
  365. #endif
  366. #ifdef FEATURE_CLOCK_IP_HAS_RAM_WAIT_STATES
  367. void SetRamWaitStates(void);
  368. #endif
  369. #ifdef FEATURE_CLOCK_IP_HAS_FLASH_WAIT_STATES
  370. void SetFlashWaitStates(void);
  371. #endif
  372. /*!
  373. * @brief Initializes a starting reference point for timeout
  374. *
  375. * @param[out] startTimeOut The starting time from which elapsed time is measured
  376. * @param[out] elapsedTimeOut The elapsed time to be passed to ClockTimeoutExpired
  377. * @param[out] timeoutTicksOut The timeout value (in ticks) to be passed to ClockTimeoutExpired
  378. * @param[in] timeoutUs The timeout value (in microseconds)
  379. */
  380. void ClockStartTimeout(uint32 *startTimeOut,
  381. uint32 *elapsedTimeOut,
  382. uint32 *timeoutTicksOut,
  383. uint32 timeoutUs);
  384. /*!
  385. * @brief Checks for timeout condition.
  386. *
  387. * @param[in,out] startTimeInOut The starting time from which elapsed time is measured
  388. * @param[in,out] elapsedTimeInOut The accumulated elapsed time from the starting time reference
  389. * @param[in] TimeoutTicks The timeout limit (in ticks)
  390. */
  391. boolean ClockTimeoutExpired(uint32 *startTimeInOut,
  392. uint32 *elapsedTimeInOut,
  393. uint32 TimeoutTicks);
  394. /* Clock stop section code */
  395. #define MCU_STOP_SEC_CODE
  396. #include "Mcu_MemMap.h"
  397. #if defined(__cplusplus)
  398. }
  399. #endif /* __cplusplus*/
  400. /*! @}*/
  401. #endif /* CLOCK_IP_PRIVATE_H */
  402. /*******************************************************************************
  403. * EOF
  404. ******************************************************************************/