The high-frequency PWM signal can be generated on A.5 and B.5 pins.
Unlike PWM mode, HPWM mode is configured by specifying the high time (T1) and period (T). This mode supports higher frequencies, so the high time and period are defined in µs.
HPWM settings are configured with GPIO_SET_HPWM_CFG command.
High time (T1) and PWM period (T) are specified in µs and can vary from 1 to 340 µs. It is self-evident that PWM period should be longer, that high time. You can set the high time parameter in Bytes 6, 7: T1L/T1H (the least and the most significant byte). The PWM period parameter can be set in Bytes 4, 5: TL/TH, respectively.
Use Byte 2: HPWM_NUMBER to choose the pin (A.5 or B.5) to generate HPWM signal on.
You can switch a pin to HPWM mode by setting Byte 3: ON to 1. In this case GPIO_GET_CFG and GPIO_GET_PIN_CFG commands will return GPIO_CFG_HPWM (0x8) value for the pin. While the pin is in HPWM mode, it can be used only by HPWM module. If this byte is set to 0, the pin will be disconnected from HPWM module. GPIO_GET_CFG and GPIO_GET_PIN_CFG commands will return GPIO_CFG_NOT_CONFIGURED (0xf) value for the pin.
To retrieve the HPWM configuration for either A.5 pin or B.5 pin, send GPIO_GET_HPWM_CFG command.