The enhanced capture (eCAP) module, can be used in systems where accurate timing of external events is important. The eCAP module provides 6 eCAP channels, where one eCAP channel provides 4 x 32-bit time-stamp capture registers. eCAP channels also can be configured to provide a single-channel PWM output.
Each eCAP-Module (eCAP1-eCAP6) can only be used once.
Pin | |
---|---|
eCAP1 | GPIO5 / GPIO24 / GPIO34 |
eCAP2 | GPIO7 / GPIO25 |
eCAP3 | GPIO9 / GPIO26 |
eCAP4 | GPIO11 / GPIO27 |
eCAP5 | GPIO3 / GPIO48 |
eCAP6 | GPIO1 / GPIO49 |
In this example, eCAP1 is configured on GPIO24. As default, eCAPx is configured with an Interrupt-Service-Routine (ISR) that calculates the applied frequency on respective pin.
An eCAP-Module can also be used to generate a PWM-signal with specific frequency and specific dutycycle on configured pin :
Min. frequency: 2 Hz
Max. frequency: 1 MHz
Min. dutycycle: 0
Max. dutycycle: 100