Routing for PSoC4 is not as universal as in PSoC3 or 5, some pins are dedicated to internal blocks as the I2C. Since all routing and configuration of pins is done by writing the right bit-pattern into the right register you can have that done theoretically by your program. The question is if a couple of jumpers on your pcb would do the same job for less money.
What does the physical interface look like for each different sensor ?
Maybe you could encode the plug for each specific sensor to indicate at connector
level what sensor is there. Or by forcing/reading current or voltage or signal and getting
a response PSOC can look at and translate what sensor is connected. Commonly used
in bed of nails testers to determine what DUT board is present.
Think of the problem of attaching a 3 pin transistor to 3 pins on PSOC, and by using
various forcing functions, V, I, signal, and/or measuring to determine if it is NPN, PNP,
Or put a R load in each sensor plug, its value indicating what sensor
is present,. and use PSOC to measure that load. 1 pin would be all it
takes, even 0 pins if you used reverse current < .3V measurement.
Food for thought.
Thank you both for your answers. I will read the TRM to see the registers involved because if is just a matter of changing registers it won't be a problem. I thought that maybe the ports routing could only be done at programming.
The jumpers are not a posible solution since the PCB have to be really small and no switches can be used.
I had already thought on how to detect each device, I just need to add a voltage divider to each sensor and then just read the voltage to determine which sensor it is.
Anyway, I'll take a look to the TRM and see if Ican figure out a good solution.