![]() |
MCUSW
|
This file contains interface header for PWM MCAL driver.
Go to the source code of this file.
Data Structures | |
struct | Pwm_ChannelConfigType_PC |
Pwm channel configuration. More... | |
struct | Pwm_ConfigType_PC |
Pwm configuration structure. More... | |
struct | Pwm_ChannelConfigType |
Pwm channel configuration. More... | |
struct | Pwm_ConfigType |
Pwm configuration structure. More... | |
struct | Pwm_RegisterReadbackType |
PWM register readback structure. More... | |
Macros | |
#define | PWM_DUTY_0_PERCENT (0x0U) |
16bit value representing 0% of a period value More... | |
#define | PWM_DUTY_100_PERCENT (0x8000U) |
16 bit value representing 100% of a period value More... | |
#define | PWM_DUTY_50_PERCENT (0x4000U) |
16 bit value representing 50% of a period value More... | |
#define | PWM_MAX_NUM_CHANNELS (30U) |
#define | PWM_CHANNEL1 (0U) |
GP timer 1 instance, in MCU DOMAIN. More... | |
#define | PWM_CHANNEL2 (1U) |
GP timer 2 instance, in MCU DOMAIN. More... | |
#define | PWM_CHANNEL3 (2U) |
GP timer 3 instance, in MCU DOMAIN. More... | |
#define | PWM_CHANNEL4 (3U) |
GP timer 4 instance, in MCU DOMAIN. More... | |
#define | PWM_CHANNEL5 (4U) |
GP timer 5 instance, in MCU DOMAIN(J721E) / MAIN DOMAIN (DRA80x) More... | |
#define | PWM_CHANNEL6 (5U) |
GP timer 6 instance, in MCU DOMAIN(J721E) / MAIN DOMAIN (DRA80x) More... | |
#define | PWM_CHANNEL7 (6U) |
GP timer 7 instance, in MCU DOMAIN(J721E) / MAIN DOMAIN (DRA80x) More... | |
#define | PWM_CHANNEL8 (7U) |
GP timer 8 instance, in MCU DOMAIN(J721E) / MAIN DOMAIN (DRA80x) More... | |
#define | PWM_CHANNEL9 (8U) |
GP timer 9 instance, in MCU DOMAIN(J721E) / MAIN DOMAIN (DRA80x) More... | |
#define | PWM_CHANNEL10 (9U) |
GP timer 10 instance, in MCU DOMAIN(J721E) / MAIN DOMAIN (DRA80x) More... | |
#define | PWM_CHANNEL11 (10U) |
GP timer 11 instance, MAIN DOMAIN (J721E & DRA80x) More... | |
#define | PWM_CHANNEL12 (11U) |
GP timer 12 instance, MAIN DOMAIN (J721E & DRA80x) More... | |
#define | PWM_CHANNEL13 (12U) |
GP timer 13 instance, MAIN DOMAIN (J721E & DRA80x) More... | |
#define | PWM_CHANNEL14 (13U) |
GP timer 14 instance, MAIN DOMAIN (J721E & DRA80x) More... | |
#define | PWM_CHANNEL15 (14U) |
GP timer 15 instance, MAIN DOMAIN (J721E & DRA80x) More... | |
#define | PWM_CHANNEL16 (15U) |
GP timer 16 instance, MAIN DOMAIN (J721E & DRA80x) More... | |
#define | PWM_CHANNEL17 (16U) |
GP timer 17 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL18 (17U) |
GP timer 18 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL19 (18U) |
GP timer 19 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL20 (19U) |
GP timer 20 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL21 (20U) |
GP timer 21 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL22 (21U) |
GP timer 22 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL23 (22U) |
GP timer 23 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL24 (23U) |
GP timer 24 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL25 (24U) |
GP timer 25 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL26 (25U) |
GP timer 26 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL27 (26U) |
GP timer 27 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL28 (27U) |
GP timer 28 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL29 (28U) |
GP timer 29 instance, MAIN DOMAIN (J721E) More... | |
#define | PWM_CHANNEL30 (29U) |
GP timer 30 instance, MAIN DOMAIN (J721E) More... | |
PWM Driver Module SW Version Info | |
Defines for PWM Driver version used for compatibility checks | |
#define | PWM_SW_MAJOR_VERSION (1U) |
Driver Implementation Major Version. More... | |
#define | PWM_SW_MINOR_VERSION (2U) |
Driver Implementation Minor Version. More... | |
#define | PWM_SW_PATCH_VERSION (1U) |
Driver Implementation Patch Version. More... | |
PWM Driver Module AUTOSAR Version Info | |
Defines for PWM Driver AUTOSAR version used for compatibility checks | |
#define | PWM_AR_RELEASE_MAJOR_VERSION (4U) |
AUTOSAR Major version specification implemented by PWM Driver. More... | |
#define | PWM_AR_RELEASE_MINOR_VERSION (3U) |
AUTOSAR Minor version specification implemented by PWM Driver. More... | |
#define | PWM_AR_RELEASE_REVISION_VERSION (1U) |
AUTOSAR Patch version specification implemented by PWM Driver. More... | |
PWM Driver ID Info | |
#define | PWM_VENDOR_ID ((uint16) 44U) |
Texas Instruments Vendor ID. More... | |
#define | PWM_MODULE_ID ((uint16) 121U) |
PWM Driver Module ID. More... | |
#define | PWM_INSTANCE_ID ((uint8) 0U) |
PWM Driver Instance ID. More... | |
PWM Error Codes | |
Error codes returned by PWM functions | |
#define | PWM_E_INIT_FAILED ((uint8)(0x10U)) |
PWM driver configuration parameter error. More... | |
#define | PWM_E_UNINIT ((uint8)(0x11U)) |
PWM driver Not initialized error. More... | |
#define | PWM_E_PARAM_CHANNEL ((uint8)(0x12U)) |
PWM driver Invalid param. More... | |
#define | PWM_E_PERIOD_UNCHANGEABLE ((uint8)(0x13U)) |
PWM driver Fixed period channel. More... | |
#define | PWM_E_ALREADY_INITIALIZED ((uint8)(0x14U)) |
PWM driver Already initialized. More... | |
#define | PWM_E_PARAM_POINTER ((uint8)(0x15U)) |
PWM driver pointer paramter error. More... | |
#define | PWM_E_NOT_DISENGAGED ((uint8)(0x16U)) |
RunTime Error: API Pwm_SetPowerState is called while the PWM module is still in use. More... | |
PWM Service Ids | |
The Service Id is one of the argument to Det_ReportError function and is used to identify the source of the error | |
#define | PWM_SID_INIT ((uint8)(0x0U)) |
PWM driver service ID for Initialization API. More... | |
#define | PWM_SID_DEINIT ((uint8)(0x1U)) |
PWM driver service ID for De-Initialization API. More... | |
#define | PWM_SID_SET_DUTY_CYCLE ((uint8)(0x2U)) |
PWM driver service ID for set duty cycle API. More... | |
#define | PWM_SID_SET_PERIOD_AND_DUTY ((uint8)(0x3U)) |
PWM driver service ID for set duty cycle and period API. More... | |
#define | PWM_SID_SET_OUTPUT_TO_IDLE ((uint8)(0x4U)) |
PWM driver service ID for set output state to idle API. More... | |
#define | PWM_SID_GET_OUTPUT_STATE ((uint8)(0x5U)) |
PWM driver service ID for get output state API. More... | |
#define | PWM_SID_DISABLE_NOTIFICATION ((uint8)(0x6U)) |
PWM driver service ID for disable notification API. More... | |
#define | PWM_SID_ENABLE_NOTIFICATION ((uint8)(0x7U)) |
PWM driver service ID for Enable notification API. More... | |
#define | PWM_SID_GET_VERSION_INFO ((uint8)(0x8U)) |
PWM driver service ID for Get version info API. More... | |
#define | PWM_SID_REGISTER_READBACK ((uint8)(0xDU)) |
PWM driver service ID for Critical register read back API. More... | |
PWM Driver State Values | |
The PWM Driver State Values | |
#define | PWM_STATUS_UNINIT ((uint8)(0U)) |
PWM driver Status uninitialized. More... | |
#define | PWM_STATUS_INIT ((uint8)(1U)) |
PWM driver Status Initialized. More... | |
Typedefs | |
typedef uint32 | Pwm_PeriodType |
typedef of period value More... | |
typedef uint32 | Pwm_ChannelType |
PWM Channel type. More... | |
typedef void(* | Pwm_NotifyFuncType) (void) |
Notification callback function pointer. More... | |
Enumerations | |
enum | Pwm_OutputStateType { PWM_LOW = 0U, PWM_HIGH } |
Possible output states of a PWM channel. More... | |
enum | Pwm_EdgeNotificationType { PWM_RISING_EDGE = 1U, PWM_FALLING_EDGE = 2U, PWM_BOTH_EDGES = 3U } |
Possible edge notification. More... | |
enum | Pwm_ChannelClassType { PWM_FIXED_PERIOD = 0U, PWM_FIXED_PERIOD_SHIFTED, PWM_VARIABLE_PERIOD } |
Period type for pwm channels. Fixed periods prohibit changes to the period length with Pwm_SetPeriod( ). PWM_FIXED_PERIOD_SHIFTED type is not supported due to hardware restrictions of the PWM unit. More... | |
Functions | |
void | Pwm_Init (const Pwm_ConfigType *ConfigPtr) |
Service for PWM initialization. More... | |
void | Pwm_DeInit (void) |
Service for PWM de-initialization. More... | |
void | Pwm_SetDutyCycle (Pwm_ChannelType ChannelNumber, uint16 DutyCycle) |
Service for setting Duty Cycle. More... | |
void | Pwm_SetPeriodAndDuty (Pwm_ChannelType ChannelNumber, Pwm_PeriodType Period, uint16 DutyCycle) |
Service for setting Period and Duty Cycle. More... | |
void | Pwm_SetOutputToIdle (Pwm_ChannelType ChannelNumber) |
Service to set the output of a channel immediately to idle. More... | |
void | Pwm_DisableNotification (Pwm_ChannelType ChannelNumber) |
Service to disable the Edge Notification. More... | |
void | Pwm_EnableNotification (Pwm_ChannelType ChannelNumber, Pwm_EdgeNotificationType Notification) |
Service to enable the Edge Notification. More... | |
void | Pwm_GetVersionInfo (Std_VersionInfoType *versioninfo) |
This service returns the version information of this module. More... | |
Std_ReturnType | Pwm_RegisterReadback (Pwm_ChannelType ChannelNumber, Pwm_RegisterReadbackType *RegRbPtr) |
This function reads the important registers of the hardware unit and returns the value in the structure. More... | |