Configure a GPIO pin as ePWM. Set frequency and start PWM signal with specific dutycycle.
Min. frequency: 1145 Hz (2289 Hz in Up- or Down-Count-Mode)
Max. frequency: 1 MHz
Min. dutycycle: 0
Max. dutycycle: 100
| ePWMxA | ePWMxB |
ePWM1 | GPIO0 | GPIO1 |
ePWM2 | GPIO2 | GPIO3 |
ePWM3 | GPIO4 | GPIO5 |
ePWM4 | GPIO6 | GPIO7 |
ePWM5 | GPIO8 | GPIO9 |
ePWM6 | GPIO10 | GPIO11 |
Initialisation of ePWM Pins
- ePWMxA and ePWMxB pins can be configured and signals can be set independently.
- ePWMxA and ePWMxB pins can be driven with different dutycycles but not with different frequencies.
--> Configuring a pin as ePWM output with a frequency will affect both pins of the respective PWM-module: ePWMxA and ePWMxB.
- ePWM1A and ePWM1B will both run at 100 kHz because they belong to one PWM-module (which was configured with 100 kHz)
- first configuration is overwritten
- both pins need to be configured to ensure their configuration as ePWM pins
If you want to use both ePWM pins of one module, ePWMxA and ePWMxB, configure both with the same frequency to prevent misconfiguration:
Code example
void main(void){
int result = 0;
while(1){
}
}
Documented C-Code of module:
epwm
Detailed description in Technical Reference Manual:
Technical_Reference_Manual