File syn_port_hrpwm.h¶
FileList > port > syn_port_hrpwm.h
Go to the source code of this file
Platform Port Interface for High-Resolution PWM & Power Driver. More...
#include "../common/syn_defs.h"#include "../util/syn_qmath.h"#include <stdbool.h>#include <stdint.h>
Public Functions¶
| Type | Name |
|---|---|
| SYN_Status | syn_port_hrpwm_enable (uint8_t channel, bool enable) Enable or disable HRPWM complementary outputs. |
| SYN_Status | syn_port_hrpwm_enable_fault (uint8_t channel, uint8_t fault_id, bool enable) Enable hardware emergency fault trip protection input. |
| SYN_Status | syn_port_hrpwm_init (uint8_t channel, uint32_t freq_hz) Initialize high-resolution PWM hardware timer channel. |
| SYN_Status | syn_port_hrpwm_set_deadtime_ns (uint8_t channel, uint16_t rise_ns, uint16_t fall_ns) Configure complementary dead-time insertion in nanoseconds. |
| SYN_Status | syn_port_hrpwm_set_duty_q16 (uint8_t channel, int32_t duty_q16) Set high-resolution duty cycle using Q16.16 fixed-point ratio. |
| SYN_Status | syn_port_hrpwm_set_phase_deg (uint8_t channel, uint16_t phase_deg) Set phase shift angle in degrees (0–360). |
Detailed Description¶
Defines low-level target hardware binding for sub-nanosecond edge placement, complementary gate output pairs with dead-time insertion, phase shifting, and zero-latency hardware fault trip interlocks.
Public Functions Documentation¶
function syn_port_hrpwm_enable¶
Enable or disable HRPWM complementary outputs.
Parameters:
channelPlatform-specific HRPWM channel index.enabletrue to enable complementary gate drivers, false to disable.
Returns:
SYN_OK on success.
function syn_port_hrpwm_enable_fault¶
Enable hardware emergency fault trip protection input.
Parameters:
channelPlatform-specific HRPWM channel index.fault_idHardware fault pin/comparator ID.enabletrue to enable hardware trip interlock.
Returns:
SYN_OK on success.
function syn_port_hrpwm_init¶
Initialize high-resolution PWM hardware timer channel.
Parameters:
channelPlatform-specific HRPWM channel index (0..5).freq_hzSwitching frequency in Hz.
Returns:
SYN_OK on success, SYN_INVALID_PARAM or SYN_ERROR on hardware error.
function syn_port_hrpwm_set_deadtime_ns¶
Configure complementary dead-time insertion in nanoseconds.
Parameters:
channelPlatform-specific HRPWM channel index.rise_nsHigh-side turn-on rise dead-time in nanoseconds.fall_nsLow-side turn-on fall dead-time in nanoseconds.
Returns:
SYN_OK on success.
function syn_port_hrpwm_set_duty_q16¶
Set high-resolution duty cycle using Q16.16 fixed-point ratio.
Parameters:
channelPlatform-specific HRPWM channel index.duty_q16Q16.16 fixed point ratio (0 = 0.0, 65536 = 1.0).
Returns:
SYN_OK on success.
function syn_port_hrpwm_set_phase_deg¶
Set phase shift angle in degrees (0–360).
Parameters:
channelPlatform-specific HRPWM channel index.phase_degPhase offset angle in degrees.
Returns:
SYN_OK on success.
The documentation for this class was generated from the following file src/syntropic/port/syn_port_hrpwm.h