Easiest solution would be to set the pin's properties at run-time after detecting the mode the project must run.
there are a few APIs to set the required mode for a pn as void Pin_SetDriveMode (uint8 mode).
Yes, it works.
I configured with TopDesign:
- GPIO1: both Analog and Digital Input
- GPIO2: both Analog and Digital Output.
And at startup I set the Drive Mode of GPIO2 to "High Impedance Analog" for Analog or "Strong Drive" for Digital Output.
For GPIO1 the Drive Mode must not be changed, it is "High Impedance Digital" for Analog and for Digital Input.
Thank you Bob