89 #include "Std_Types.h" 91 #if (GPT_WAKEUP_FUNCTIONALITY_API == STD_ON) 114 #define GPT_SW_MAJOR_VERSION (1U) 116 #define GPT_SW_MINOR_VERSION (2U) 118 #define GPT_SW_PATCH_VERSION (1U) 128 #define GPT_AR_RELEASE_MAJOR_VERSION (4U) 130 #define GPT_AR_RELEASE_MINOR_VERSION (3U) 132 #define GPT_AR_RELEASE_REVISION_VERSION (1U) 140 #define GPT_VENDOR_ID ((uint16) 44U) 142 #define GPT_MODULE_ID ((uint16) 100U) 144 #define GPT_INSTANCE_ID ((uint8) 0U) 152 #define GPT_CH_ISR_MODE_CONTINUOUS (0U) 154 #define GPT_CH_ISR_MODE_ONESHOT (1U) 156 #define GPT_CH_ISR_MODE_CONT_WAKEUP (2U) 158 #define GPT_CH_ISR_MODE_ONESHOT_WAKEUP (3U) 160 #if defined (SOC_AM65XX) 162 #define GPT_CH_GPTIMER_MAX (16U) 165 #if defined (SOC_J721E) 167 #define GPT_CH_GPTIMER_MAX (30U) 174 #define GPT_CH_GPTIMER1 (0U) 176 #define GPT_CH_GPTIMER2 (1U) 178 #define GPT_CH_GPTIMER3 (2U) 180 #define GPT_CH_GPTIMER4 (3U) 182 #define GPT_CH_GPTIMER5 (4U) 184 #define GPT_CH_GPTIMER6 (5U) 186 #define GPT_CH_GPTIMER7 (6U) 188 #define GPT_CH_GPTIMER8 (7U) 190 #define GPT_CH_GPTIMER9 (8U) 192 #define GPT_CH_GPTIMER10 (9U) 194 #define GPT_CH_GPTIMER11 (10U) 196 #define GPT_CH_GPTIMER12 (11U) 198 #define GPT_CH_GPTIMER13 (12U) 200 #define GPT_CH_GPTIMER14 (13U) 202 #define GPT_CH_GPTIMER15 (14U) 204 #define GPT_CH_GPTIMER16 (15U) 206 #if defined (SOC_J721E) 208 #define GPT_CH_GPTIMER17 (16U) 210 #define GPT_CH_GPTIMER18 (17U) 212 #define GPT_CH_GPTIMER19 (18U) 214 #define GPT_CH_GPTIMER20 (19U) 216 #define GPT_CH_GPTIMER21 (20U) 218 #define GPT_CH_GPTIMER22 (21U) 220 #define GPT_CH_GPTIMER23 (22U) 222 #define GPT_CH_GPTIMER24 (23U) 224 #define GPT_CH_GPTIMER25 (24U) 226 #define GPT_CH_GPTIMER26 (25U) 228 #define GPT_CH_GPTIMER27 (26U) 230 #define GPT_CH_GPTIMER28 (27U) 232 #define GPT_CH_GPTIMER29 (28U) 234 #define GPT_CH_GPTIMER30 (29U) 249 #define GPT_E_UNINIT (0x0AU) 258 #define GPT_E_BUSY (0x0BU) 267 #define GPT_E_MODE (0x0CU) 271 #ifndef GPT_E_ALREADY_INITIALIZED 273 #define GPT_E_ALREADY_INITIALIZED (0x0DU) 277 #ifndef GPT_E_INIT_FAILED 279 #define GPT_E_INIT_FAILED (0x0EU) 283 #ifndef GPT_E_PARAM_CHANNEL 285 #define GPT_E_PARAM_CHANNEL (0x14U) 289 #ifndef GPT_E_PARAM_VALUE 291 #define GPT_E_PARAM_VALUE (0x15U) 295 #ifndef GPT_E_PARAM_POINTER 297 #define GPT_E_PARAM_POINTER (0x16U) 299 #ifndef GPT_E_PARAM_PREDEF_TIMER 302 #define GPT_E_PARAM_PREDEF_TIMER (0x17U) 306 #ifndef GPT_E_PARAM_MODE 308 #define GPT_E_PARAM_MODE (0x1FU) 310 #ifndef GPT_E_INVALID_ISR 312 #define GPT_E_INVALID_ISR (0x80U) 324 #define GPT_SID_GET_VERSION_INFO (0x00U) 326 #define GPT_SID_INIT (0x01U) 328 #define GPT_SID_DEINIT (0x02U) 330 #define GPT_SID_GET_TIME_ELAPSED (0x03U) 332 #define GPT_SID_GET_TIME_REMAINING (0x04U) 334 #define GPT_SID_START_TIMER (0x05U) 336 #define GPT_SID_STOP_TIMER (0x06U) 338 #define GPT_SID_ENABLE_NOTIFY (0x07U) 340 #define GPT_SID_DISABLE_NOTIFY (0x08U) 342 #define GPT_SID_SET_MODE (0x09U) 344 #define GPT_SID_DISABLE_WAKEUP (0x0AU) 346 #define GPT_SID_ENABLE_WAKEUP (0x0BU) 348 #define GPT_SID_CHECK_WAKEUP (0x0CU) 350 #define GPT_SID_GET_PREDEFTIMERVALUE (0x0DU) 352 #define GPT_SID_GET_GETHWUNITOBJ (0x0EU) 354 #define GPT_SID_REGISTER_READBACK (0x0FU) 466 #if (STD_ON == GPT_REPORT_WAKEUP_SOURCE) && (STD_ON == \ 467 GPT_WAKEUP_FUNCTIONALITY_API) 479 typedef struct Gpt_ChannelConfigType_PC_s
488 typedef struct Gpt_ConfigType_s
496 #if (STD_ON == GPT_REGISTER_READBACK_API) 521 #if (STD_ON == GPT_VERSION_INFO_API) 542 GPT_APPL_DATA) VersionInfoPtr);
567 #if (STD_ON == GPT_DEINIT_API) 591 #if (STD_ON == GPT_TIME_ELAPSED_API) 618 #if (STD_ON == GPT_TIME_REMAINING_API) 671 Gpt_ValueType Value);
695 #if (STD_ON == GPT_ENABLE_DISABLE_NOTIFICATION_API) 719 #if (STD_ON == GPT_ENABLE_DISABLE_NOTIFICATION_API) 744 #if (STD_ON == GPT_REPORT_WAKEUP_SOURCE) && (STD_ON == \ 745 GPT_WAKEUP_FUNCTIONALITY_API) 771 FUNC(
void, GPT_CODE)
Gpt_SetMode(Gpt_ModeType Mode);
780 #if (STD_ON == GPT_REPORT_WAKEUP_SOURCE) && (STD_ON == \ 781 GPT_WAKEUP_FUNCTIONALITY_API) 810 #if (STD_ON == GPT_REPORT_WAKEUP_SOURCE) && (STD_ON == \ 811 GPT_WAKEUP_FUNCTIONALITY_API) 841 #if (STD_ON == GPT_REPORT_WAKEUP_SOURCE) && (STD_ON == \ 842 GPT_WAKEUP_FUNCTIONALITY_API) 867 FUNC(
void, GPT_CODE)
Gpt_CheckWakeup(EcuM_WakeupSourceType WakeupSource);
870 #if (STD_ON == GPT_REGISTER_READBACK_API) 900 Gpt_ChannelType GptChannel,
void Gpt_SetMode(Gpt_ModeType Mode)
Gpt_SetMode will set the operation mode of the Gpt driver to the given set mode parameter. If the parameter mode = Normal, then the function will enable the interrupt notifications for all the channels which are configured for notification and notification is enabled. If the Mode = Sleep, the function will enable the wakeup interrupts for all channels which are configured for wakeup and disable all other channels. All the timer channels which are running will be stopped in this mode.
Gpt_PrescaleValueType
List of Prescale values for General purpose timer channels The timer counter is prescaled with the va...
Definition: Gpt.h:397
void Gpt_EnableNotification(Gpt_ChannelType Channel)
Gpt_EnableNotification will enable the interrupt notification for the selected channel. The SETINT bit in RTI Set interrupt register will be Set to enable the Compare interrupt. The interrupt is triggered when Free running counter value matches with compare register value.
void Gpt_CheckWakeup(EcuM_WakeupSourceType WakeupSource)
Gpt_CheckWakeup will check if wakeup capable timer channel is source for a wakeup event and call EcuM...
Gpt_ValueType Gpt_GetTimeRemaining(Gpt_ChannelType Channel)
Gpt_GetTimeRemaining will return the timer value remaining until the target time will be reached next...
void Gpt_StopTimer(Gpt_ChannelType Channel)
Gpt_StopTimer will stop the selected timer channel.This will clear all the registers corresponding to...
void Gpt_DisableWakeup(Gpt_ChannelType Channel)
Gpt_DisableWakeup will disable the wakeup interrupt of the referenced channel. The function will save...
EcuM_WakeupSourceType wakeupSourceRef
Definition: Gpt.h:468
uint32 Gpt_ValueType
Type describing the timeout value.
Definition: Gpt.h:374
Gpt_ChannelType channelId
Definition: Gpt.h:481
global configuration of the driver
Definition: Gpt.h:488
uint32 channelCount
Definition: Gpt.h:492
void Gpt_StartTimer(Gpt_ChannelType Channel, Gpt_ValueType Value)
Gpt_StartTimer will start the selected timer channel with defined target time. If the timer channel i...
Gpt_ValueType Gpt_GetTimeElapsed(Gpt_ChannelType Channel)
Gpt_GetTimeElapsed will return the time elapsed for channel which is referenced. The user can configu...
Gpt_ChannelMode
GPT channel mode macros.
Definition: Gpt.h:425
void Gpt_GetVersionInfo(Std_VersionInfoType *VersionInfoPtr)
This service returns the version information of this module.
uint32 Gpt_ChannelType
Type describing the Gpt channel.
Definition: Gpt.h:369
uint32 gptTimerSynCtrl
Definition: Gpt.h:509
Std_ReturnType Gpt_RegisterReadback(Gpt_ChannelType GptChannel, Gpt_RegisterReadbackType *RegRbPtr)
This function reads the important registers of the hardware unit and returns the value in the structu...
void Gpt_DisableNotification(Gpt_ChannelType Channel)
Gpt_DisableNotification will disable the compare interrupt notification for the selected channel...
void Gpt_DeInit(void)
This service deinitializes the RTI used by Gpt driver to the power on reset state. The Gpt driver state is changed to "Uninitialized" state". All the channel registers are cleared to stop the timer channels. API will disable all interrupt notifications, wakeup interrupts.
uint32 gptTtgr
Definition: Gpt.h:507
Gpt_ModeType
List of process modes.
Definition: Gpt.h:379
SPI sequence config structure parameters Pre-Compile only.
Definition: Gpt.h:479
Gpt_NotifyType fnPtrNotifyFunction
Definition: Gpt.h:464
void Gpt_Init(const Gpt_ConfigType *CfgPtr)
This service initializes all the configured Gpt channels. This will set the state of the each channel...
void(* Gpt_NotifyType)(void)
Notification callback function pointer.
Definition: Gpt.h:422
Gpt_ChannelMode channelMode
Definition: Gpt.h:456
This file contains generated pre compile configurations for GPT MCAL driver.
const Gpt_ChannelConfigType * ChannelCfgPtr
Definition: Gpt.h:490
uint8 enableWakeupFlag
Definition: Gpt.h:462
GPT register readback structure.
Definition: Gpt.h:500
uint32 gptRev
Definition: Gpt.h:505
Gpt_ChannelStateType
GPT channel state GPT will be in one of this state during its lifetime.
Definition: Gpt.h:437
uint32 prescale
Definition: Gpt.h:472
void Gpt_EnableWakeup(Gpt_ChannelType Channel)
Gpt_EnableWakeup will enable the wakeup interrupt of the referenced channel. The function will save t...
uint32 tickValueMax
Definition: Gpt.h:458
Configuration per channel.
Definition: Gpt.h:454