Hardware Abstraction Layer (HAL)
PWM (Pulse Width Modulator)

Complementary PWM output

In order to setup complimentary output on the PWM using the HAL, a pin that connects to the i+1 instance must be passed into cyhal_pwm_init_adv where i is the instance that the non-complimentary pin connects to. cyhal_pwm_init_adv will return an error if the pin that connects to i+1 instance is not passed or if the i+1 instance is not available or cannot be reserved.

Internally, the HAL reserves the i+1 instance and the hardware then copies over the settings of the i instance to the i+1 instance with the output inverted on the i+1 instance. As a result, two PWM instances (i, i+1) will be consumed when the complimentary output is setup on this platform.

Note
Both instances (i, i+1) operate in a synchronized manner i.e. any setting and operation (start,stop etc.) on the PWM instance i will also have the same effect on the i+1 instance
Complimentary output is not supported on the last PWM instance as there is no i+1 instance available.
The PWM signal on instance i cannot be inverted. Hence, the invert parameter in cyhal_pwm_init_adv is not supported and must always be false on this platform.