2 PWM signals aren't starting at the same time in CYBT-213043-02 mesh board

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
PrRa_4726466
Level 2
Level 2
10 replies posted 5 replies posted First question asked

Hi,

I am generating 2 PWM signals in CYBT-213043-02 using two channels PWM-0 and PWM-1 by coupling it to GPIO-12 and GPIO-13. But the output pwm signals are not stating at a same time. One have a time delay over other, Because of that I get an unwanted spike when i subtract those signals in oscilloscope. Could someone help me out to solve this issue, I tried changing the input clock frequencies too, But i am unable to solve this issue. Also i don't have access to gpio's other than 12 and 13.

Find the attached images of signals from oscilloscope. Channel 1 and channel 2 has PWM signal, Middle red colored one is Math(minus of 2 signals).

Please reply ASAP.

Thanks in advance.

0 Likes
8 Replies
LinglingG_46
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 10 questions asked

You could call the below API to let the two PWM output synchronized.

PWM_TriggerCommand(PWM_MASK | PWM_1_MASK, PWM_CMD_START);

I have a code example here, you can refer to it.

Hope it can be helpful for you! !

0 Likes

Thanks for your response,

Is this command works with CYBT-213043-02 mesh board, Because while reading the documentation i haven't came across this API to synchronize it. Also the file you shared has sources regarding PSoC4 but mine is mesh-kit(CY-20819 MCU).

Anyway let me try and update you.

0 Likes

HI linglingG_46,

I tried the API that you suggested but unfortunately it's not available for CYBT-213043-02 mesh board, Could you suggest me a relevant API to solve my issue.

0 Likes

Hi Dheeraj or Anjana/Others,

Could someone please help me to solve this issue in Synchronizing the PWM signals...

0 Likes

Do you mean that you need the same PWM signal on two GPIOs?

0 Likes

Yes, You're correct.

0 Likes

Could you try to call the API wiced_hal_pwm_start first. Then call the API wiced_hal_aclk_enable to enable the PWM clock?

0 Likes

Hi Xinghao,

I tired the way you told, But still there is no synchronization between the PWM signals.

0 Likes