[CY8CKIT-041S-MAX] PWM set duty fail by using HAL Layer

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.
HuEd_3452391
Level 3
Level 3
25 sign-ins First like received 10 sign-ins

Hi,

I currently use CY8CKIT-041S-MAX board.  would like use PWM HAL sample.

But I got a set duty error. 

I've attached main.c  and log below

****************** HAL: PWM square wave *****************

=====================================================

FAIL: API cyhal_pwm_set_duty_cycle failed with error code
Error Code: 0x04021200

=====================================================

I didn't found the issue on PSOC61.

Please help me with that.

 

Thank you!

BRs

  

 

0 Likes
3 Replies
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @HuEd_3452391 ,

PSoC 4 HAL is still in the development phase.

I will look into the issue and try it out from my end. Then I can suggest a workaround.

Thanks and regards,
Sidramesh

0 Likes

Hi Sidramesh,

Have you found the root cause? or when your team member could fix this? or you could give me the workaround?

Thank you!

BRs

Edward

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @HuEd_3452391 ,

Apologies for the delayed response.

HAL: PWM square wave Code example will not supported for PSoC4 devices.

You can use the below PSoC4- TCPWM-SQUARE WAVE code example instead of it:-
Link :-https://github.com/Infineon/mtb-example-psoc4-tcpwm-square-wave

Thanks and regards,
Sidramesh

0 Likes