cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 6 MCU

APe_3909046
New Contributor II

How can I do PWM_SetPWMDeadTime(x) in psoc6?

I can't find any Cy_TCPWM.... to do it.

0 Likes
1 Solution
LinglingG_46
Moderator
Moderator

You can open the PWM code example, find the API:

_VAL2FLD(TCPWM_CNT_CTRL_GENERIC, ((CY_TCPWM_PWM_MODE_DEADTIME == config->pwmMode) ?

                                                                     config->deadTimeClocks : config->clockPrescaler)));

If PWM in DT mode, you can change the Dead time use the API.

But you can set the value in the component like:

pastedImage_0.png

View solution in original post

2 Replies
LinglingG_46
Moderator
Moderator

You can open the PWM code example, find the API:

_VAL2FLD(TCPWM_CNT_CTRL_GENERIC, ((CY_TCPWM_PWM_MODE_DEADTIME == config->pwmMode) ?

                                                                     config->deadTimeClocks : config->clockPrescaler)));

If PWM in DT mode, you can change the Dead time use the API.

But you can set the value in the component like:

pastedImage_0.png

View solution in original post

APe_3909046
New Contributor II

Thanks, im actually trying to modify the dead time clock through code. I mean the dead time clocks are not going to be fixed, its going to be modified on the go.

0 Likes
Top labels