Most of the Power Conversion functions are instance-based; function names start with the instance name and depend on user configuration.
The instance name 'myPwrConv' has been chosen for the current documentation.
Functions | |
cy_rslt_t | myPwrConv_init (void) |
Performs the Power Conversion instance initialization sequence: More... | |
cy_rslt_t | myPwrConv_enable (void) |
Performs the Power Conversion instance enable sequence: More... | |
cy_rslt_t | myPwrConv_start (void) |
Performs the Power Conversion instance start sequence: More... | |
cy_rslt_t | pwrconv_start (void) |
Starts all the Power Conversion instances in the project synchronously. More... | |
cy_rslt_t | myPwrConv_disable (void) |
Performs the Control System disable (stop) sequence for the Power Conversion instance. More... | |
void | myPwrConv_ramp (void) |
Generates the reference ramping for soft start and target changing of the instance. More... | |
cy_rslt_t | myPwrConv_set_target (float32_t targ) |
Applies a new target for Ramp Generator in case of Infineon Control Loop. More... | |
cy_rslt_t | myPwrConv_set_target (uint32_t targ) |
Applies a new target for Ramp Generator in case of Custom Control Loop. More... | |
cy_rslt_t | myPwrConv_get_state (uint32_t mask) |
Returns the Power Converter instance current state. More... | |
void | myPwrConv_scheduled_adc_trigger (void) |
Triggers the scheduled ADC group. More... | |
__STATIC_FORCEINLINE uint32_t | myPwrConv_Vout_get_result (void) |
Gets the ADC channel result in raw counts. More... | |
__STATIC_INLINE void | myPwrConv_Vout_prot_enable (void) |
Enables HW protection for PwrConv ADC channel. More... | |
__STATIC_INLINE void | myPwrConv_Vout_prot_disable (void) |
Disables HW protection for the PwrConv ADC channel. More... | |
__STATIC_INLINE void | myPwrConv_prot_enable (void) |
Enables HW protection for all PwrConv ADC channels. More... | |
__STATIC_INLINE void | myPwrConv_prot_disable (void) |
Disables HW protection for all PwrConv ADC channels. More... | |
__STATIC_INLINE uint32_t | myPwrConv_prot_get_status (void) |
Returns the HW protection status for all PwrConv ADC channels. More... | |
__STATIC_INLINE uint32_t | myPwrConv_Vout_units_to_counts (float32_t units) |
Calculates the value in ADC counts from the value in the channel natural units (Volts/Amperes/etc.). More... | |
__STATIC_FORCEINLINE int32_t | myPwrConv_get_error (void) |
Returns the error value calculated from reference and feedback values. More... | |
__STATIC_FORCEINLINE void | myPwrConv_mod_upd (void) |
Updates the modulator phase(s) peripheral registers with the mtb_stc_pwrconv_ctx_t::mod value. More... | |
cy_rslt_t myPwrConv_init | ( | void | ) |
Performs the Power Conversion instance initialization sequence:
cy_rslt_t myPwrConv_enable | ( | void | ) |
Performs the Power Conversion instance enable sequence:
cy_rslt_t myPwrConv_start | ( | void | ) |
Performs the Power Conversion instance start sequence:
cy_rslt_t pwrconv_start | ( | void | ) |
Starts all the Power Conversion instances in the project synchronously.
This non-instance-based function (common for all the instances) initiates the ramp generation and triggers synchronous start of all Power Conversion instances PWMs in the same clock cycle. See Synchronous Start for details.
cy_rslt_t myPwrConv_disable | ( | void | ) |
Performs the Control System disable (stop) sequence for the Power Conversion instance.
void myPwrConv_ramp | ( | void | ) |
Generates the reference ramping for soft start and target changing of the instance.
cy_rslt_t myPwrConv_set_target | ( | float32_t | targ | ) |
Applies a new target for Ramp Generator in case of Infineon Control Loop.
This function:
The target value is limited by the min/max values of the controlled parameter (typically Vout) in the PCC:
[in] | targ | The target value in Volts. |
cy_rslt_t myPwrConv_set_target | ( | uint32_t | targ | ) |
Applies a new target for Ramp Generator in case of Custom Control Loop.
This function:
[in] | targ | The target value in Counts. |
cy_rslt_t myPwrConv_get_state | ( | uint32_t | mask | ) |
Returns the Power Converter instance current state.
[in] | mask | The mask to get one or more specified power converter States. |
void myPwrConv_scheduled_adc_trigger | ( | void | ) |
Triggers the scheduled ADC group.
The instance-based function to trigger the scheduled ADC group, if such is configured by the Power Conversion Configurator.
__STATIC_FORCEINLINE uint32_t myPwrConv_Vout_get_result | ( | void | ) |
Gets the ADC channel result in raw counts.
The instance-based ADC-channel-based function to get the ADC channel result directly from the ADC result register.
If ADC DMA is configured for this channel, this function gets ADC value from the SRAM cell, which is more efficient on terms of CPU cycles consumption.
This function exists for each PwrConv ADC channel, under the name: [instance_name]_[channel_name]_get_result.
__STATIC_INLINE void myPwrConv_Vout_prot_enable | ( | void | ) |
Enables HW protection for PwrConv ADC channel.
The instance-based ADC-channel-based function activates the limit crossing detection for the specific ADC channel which is configured with Hardware Protection in the PCC.
This function exists for each Hardware Protection -enabled PwrConv ADC channel, under the name: [instance_name]_[channel_name]_prot_enable.
__STATIC_INLINE void myPwrConv_Vout_prot_disable | ( | void | ) |
Disables HW protection for the PwrConv ADC channel.
The instance-based ADC-channel-based function disactivates the limit crossing detection for the specific ADC channel which is configured with Hardware Protection in the PCC.
This function exists for each Hardware Protection -enabled PwrConv ADC channel, under the name: [instance_name]_[channel_name]_prot_disable.
__STATIC_INLINE void myPwrConv_prot_enable | ( | void | ) |
Enables HW protection for all PwrConv ADC channels.
The instance-based function activates the limit crossing detection for all ADC channels which are configured with Hardware Protection in the PCC.
__STATIC_INLINE void myPwrConv_prot_disable | ( | void | ) |
Disables HW protection for all PwrConv ADC channels.
The instance-based function disactivates the limit crossing detection for all ADC channels which are configured with Hardware Protection in the PCC.
This function is being called by myPwrConv_disable
__STATIC_INLINE uint32_t myPwrConv_prot_get_status | ( | void | ) |
Returns the HW protection status for all PwrConv ADC channels.
The instance-based function returns a combined mask of HW protection status for all ADC channels which are configured with Hardware Protection in the PCC.
The channel specific masks are generated for each HW-protection-enabled channel in the following format: [instance_name]_[channel_name]_MSK
__STATIC_INLINE uint32_t myPwrConv_Vout_units_to_counts | ( | float32_t | units | ) |
Calculates the value in ADC counts from the value in the channel natural units (Volts/Amperes/etc.).
The instance-based ADC-channel-based function considers the particular-channel external gain (voltage divider, shunt resistance, etc.), internal correspondent sampler gain, the ADC resolution, and the reference voltage.
This function exists for each PwrConv ADC channel, under the name: [instance_name]_[channel_name]_units_to_counts.
[in] | units | The value in natural measurement units (Volts/Amperes/etc.) |
__STATIC_FORCEINLINE int32_t myPwrConv_get_error | ( | void | ) |
Returns the error value calculated from reference and feedback values.
The error value is calculated as the difference between the reference mtb_stc_pwrconv_ctx_t::ref and result mtb_stc_pwrconv_ctx_t::res values.
__STATIC_FORCEINLINE void myPwrConv_mod_upd | ( | void | ) |
Updates the modulator phase(s) peripheral registers with the mtb_stc_pwrconv_ctx_t::mod value.