The eCAP driver provides API to configure eCAP module. Below are the high level features supported by the driver.
Features Supported
- Configuration of timestamp capture event
- Configuration of one-shot/continuous mode
- Configuration of independent edge polarity (rising / falling edge) selection for all 4 capture events
- Configuration of interrupt on any of the 4 capture events
- Configuration of input signal prescaling
- Configuration of mode to aPWM when not used in capture mode
SysConfig Features
- Note
- It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
SysConfig can be used to configure below parameters apart from common configuration like Clock, MPU, RAT and others.
- ECAP instances and pin mux configurations.
Features NOT Supported
NA
Important Usage Guidelines
NA
Example Usage
Include the below file to access the APIs
ECAP Interrupt Registration
hwiPrms.
intNum = CONFIG_ECAP0_INTR;
hwiPrms.
isPulse = CONFIG_ECAP0_INTR_IS_PULSE;
ECAP Operating Mode Configuration
ECAP One Shot Mode Configuration
ECAP Capture Event Polarity Configuration
ECAP Interrupt Service Routine
ECAP Interrupt De-Registration
API
APIs for ECAP