Hi
I am exploring how to change the arrangement of GPIO between input and output in run time.
I seem not figure out the impact of the buffer: What is the difference between CY_GPIO_DM_PULLUP_IN_OFF and CY_GPIO_DM_PULLUP?
Moreover, if you need to switch the GPIO between input and output inside the program, what is the right hardware connection and setting to sue ?
Thank You
Hi @leojames01525, The difference between CY_GPIO_DM_PULLUP_IN_OFF and CY_GPIO_DM_PULLUP is that the input buffer connection is disabled. You can refer to the Drive mode description in documentation for detail of drive mode. To change the drive mode and direction of pin( input/output you can Cy_GPIORead more
Hi leojames01525,
See lessThe difference between CY_GPIO_DM_PULLUP_IN_OFF and CY_GPIO_DM_PULLUP is that the input buffer connection is disabled.
You can refer to the Drive mode description in documentation for detail of drive mode.
To change the drive mode and direction of pin( input/output you can Cy_GPIO_SetDriveMode() function in PDL or cyhal_gpio_configure() work in HAL mode.
Legitimate equipment or drive-mode for the GPIO will depend on your hardware.
-For example: CA_NEWLINE_CA – in case the output mode need the solid drive ( hi-current ) with the outside gadget ( other gadget ) has hi-impedance input at that point you’ll be able solid drive. If the external device need external pull-up but you didn’t give it at that point you’ll be able Pull-up mode.
– For input, in case your external device has clear logic( hi or low) at that point you’ll be able HI-impedance advanced, but in the event that the outside device is working with a low open-drain drive that requires an external pull-up but you do not give it at that point you’ll utilize Drive Mode pull up
Warm regards
Nidhi