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

cross mob
shepdog87
Level 3
Level 3
25 sign-ins 10 questions asked 10 replies posted

Device: CY8C6136BZI-F34

IDE: PSoC Creator

Design Goal: Read the current status of a GPIO output pin that is controlled from a PWM block.

Design Approach: Connected a PWM block PWM_n output to a GPIO output pin.

Issue: When I try to use the function Cy_GPIO_ReadOut using the correct port and pin number of my GPIO pin, it always returns "1", even when the GPIO is currently being driven low. I do not use any software commands to change the GPIO pin state, the GPIO is driven from a PWM block on the schematic. I need to know the current output level of the pin to provide feedback on its level.

This works fine for any GPIO output pins I control thru the software.

I cannot find any functions that return the current state of the PWM block pwm or pwm_n signal.

shepdog87_0-1696450841840.png

 

0 Likes
1 Solution
Gautami_12
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @shepdog87 ,

Can you please send the screenshot of the pins tab in the design-wide resources section?

Also please try the code example and let me know if you face the same issue with this.

Warm Regards,
Gautami J

View solution in original post

0 Likes
1 Reply
Gautami_12
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @shepdog87 ,

Can you please send the screenshot of the pins tab in the design-wide resources section?

Also please try the code example and let me know if you face the same issue with this.

Warm Regards,
Gautami J

0 Likes