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

PSoC™ 6 Forum Discussions

aliissa02
Level 4
5 likes given 25 replies posted 50 sign-ins
Level 4

Hello,

I am using a PSOC 6 prototyping board and I would like to drive a pin high so I will use Cy_GPIO_SetDrivemode(P5_1_PORT,P5_1_NUM,CY_GPIO_DM_OD_DRIVESHIGH). I am however not sure how to use it in the actual code. If you can please check the attached picture and advise if the way that I have used it is correct or not?

Thank you

0 Likes
1 Solution
Srivastav
Moderator
Moderator 100 sign-ins 10 likes received 5 likes given
Moderator

Hi @aliissa02 ,

 

Yes. Cy_GPIO_SetDrivemode() can be used here.  It  Configures the pin output buffer drive mode and input buffer enable. The output buffer drive mode and input buffer enable are combined into a single parameter. The drive mode controls the behavior of the pin in general. Enabling the input buffer allows the digital pin state to be read but also contributes to extra current consumption. For more details please refer to https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__gpio__functions__gpi... 

CY_GPIO_DM_OD_DRIVESHIGH can be used to drive the pin HIGH. For more details please refer to https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__gpio__drive_modes.ht... 

 

Kind regards

Arpit Srivastav

View solution in original post

0 Likes
1 Reply
Srivastav
Moderator
Moderator 100 sign-ins 10 likes received 5 likes given
Moderator

Hi @aliissa02 ,

 

Yes. Cy_GPIO_SetDrivemode() can be used here.  It  Configures the pin output buffer drive mode and input buffer enable. The output buffer drive mode and input buffer enable are combined into a single parameter. The drive mode controls the behavior of the pin in general. Enabling the input buffer allows the digital pin state to be read but also contributes to extra current consumption. For more details please refer to https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__gpio__functions__gpi... 

CY_GPIO_DM_OD_DRIVESHIGH can be used to drive the pin HIGH. For more details please refer to https://infineon.github.io/psoc6pdl/pdl_api_reference_manual/html/group__group__gpio__drive_modes.ht... 

 

Kind regards

Arpit Srivastav

0 Likes